Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Tip: Locate Uncached Templates in your hack codes
Logician
Join Date: Nov 2001
Posts: 4,444

MCSE, MCDBA, Coder

inside vb code
by Logician Logician is offline 12 Jul 2003

This small hack shows uncached templates to admins while you are browsing the board.

I find it handy when coding a large hack where you use a lot of new templates. Instead of going through the entire code and find out which templates you have, I just run the hack page and at the top I get all uncached templates names with this hack while I'm browsing it.

The hack is designed to work in test boards where you develop the project but I don't think it is a big deal if you install in a real board.

For newbies: Uncached templates add additional queries to your hack code so the best practise is to add their names in the $templatesused variable at the top of your code to make your hack more performance friendly.
Attached Files
File Type: txt show uncached template to admins.txt (1.4 KB, 62 views)
Views: 2235
Reply With Quote
Comments
  #2  
Old 20 Jul 2003, 17:23
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Which "global.php" file?
__________________
DTDLGROUP Technology Forums

Visit us at http://www.dtdlgroup.com
Reply With Quote
  #3  
Old 20 Jul 2003, 17:28
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Real name: Dean Clatworthy
Wow another glorius modification by Logician that i overlooked !

- miSt
__________________
Dean Clatworthy - Web Developer/Designer
Reply With Quote
  #4  
Old 20 Jul 2003, 17:33
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
the one under forum dir
__________________
Logician's Blog | WebTemplates for vb 4.x : VB Integrated Content Management System
Reply With Quote
  #5  
Old 20 Jul 2003, 17:44
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
I tried that one but I got no messages, and I know there's a few that are uncached ... and where *exactly* do ya put the code into the globa.php file?
__________________
DTDLGROUP Technology Forums

Visit us at http://www.dtdlgroup.com

Last edited by Bison; 20 Jul 2003 at 17:46.
Reply With Quote
  #6  
Old 20 Jul 2003, 17:58
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
anywhere at the start should work. For instance right after error_reporting(7);

Please make sure you browse the pages your uncached templates might exist after you installed the hack. It does not list all uncached templates right away after you installed it. It will display them while you are browsing your hack's pages.
__________________
Logician's Blog | WebTemplates for vb 4.x : VB Integrated Content Management System
Reply With Quote
  #7  
Old 20 Jul 2003, 18:59
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Still not showing up for me ... I can't figure this one out!

Must be my old eyes failing me!
__________________
DTDLGROUP Technology Forums

Visit us at http://www.dtdlgroup.com
Reply With Quote
  #8  
Old 20 Jul 2003, 19:23
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
umm then you might be hacking an external file? If this is the case add line $show_uncached_templates=1 to your hack file either.

We can cure your problem alltogether by removing the on-off switch anyway:

Replace line:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

AS

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and you are set.

Also remember to check at the begining of your pages. That is where hack pastes your uncached templates.
Attached Images
File Type: jpg snap1.jpg (66.3 KB, 43 views)
__________________
Logician's Blog | WebTemplates for vb 4.x : VB Integrated Content Management System
Reply With Quote
  #9  
Old 22 Jul 2003, 01:34
Mr. Brian's Avatar
Mr. Brian Mr. Brian is offline
 
Join Date: Jan 2003
Real name: Brian
Woaa.. You are really a magician.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 19:31.

Layout Options | Width: Wide Color: