View Full Version : [Question] How to cached Templates
puertoblack2003
01-26-2006, 12:37 PM
I have a question it's bugging me seeing that i'm getting a small script form a hack the post thank you hack at the bottom of the board :ermm: .
now this is what it read:
Uncached templates: adv_portal_post_thanks_stats (1)
Uncached templates: adv_portal_post_thanks_stats_bit (10)
Is there a way to solve the problem or is a problem for the coders to resolve and how can i fix that problem.?????.
Thank you in advance
Princeton
01-26-2006, 01:16 PM
add this to cache_templates hook:
$globaltemplates[] = 'adv_portal_post_thanks_stats';
$globaltemplates[] = 'adv_portal_post_thanks_stats_bit';
you can also use array_merge()
puertoblack2003
01-26-2006, 01:27 PM
add this to cache_templates hook:
$globaltemplates[] = 'adv_portal_post_thanks_stats';
$globaltemplates[] = 'adv_portal_post_thanks_stats_bit';
you can also use array_merge()
I'm Sorry sir but i'm a noob to this but willing to learn and don't want to screw it up this is what i have can you direct me thank you
if (THIS_SCRIPT === showthread)
{
$globaltemplates = array_merge($globaltemplates, array(
'post_thanks_button',
'post_thanks_postbit',
'post_thanks_postbit_legacy'
));
}
Princeton
01-26-2006, 01:40 PM
it depends where this template is being used...
this code:if (THIS_SCRIPT === showthread)
{
$globaltemplates = array_merge($globaltemplates, array(
'post_thanks_button',
'post_thanks_postbit',
'post_thanks_postbit_legacy'
));
} will only cache the above templates in showthread.php
if the adv_portal_post_thanks_stats_bit and adv_portal_post_thanks_stats are displayed on the showthread.php page then you can just add it to the $globaltemplates arrayif (THIS_SCRIPT === showthread)
{
$globaltemplates = array_merge($globaltemplates, array(
'post_thanks_button',
'post_thanks_postbit',
'post_thanks_postbit_legacy',
'adv_portal_post_thanks_stats',
'adv_portal_post_thanks_stats_bit'
));
}
if it's on another page.. add
if (THIS_SCRIPT === script page goes here)
{
$globaltemplates = array_merge($globaltemplates, array(
'adv_portal_post_thanks_stats'
'adv_portal_post_thanks_stats_bit'
));
}
harmor19
01-26-2006, 03:50 PM
Go to "Add Plugin" in the ACP.
Select the "Post Thank You" (or whatever you may say) as the product.
Select "cache_templates" for the hook location
Make the title something like "Post Thank You Hack cache templates
In the large textarea add
$globaltemplates[] = 'adv_portal_post_thanks_stats';
$globaltemplates[] = 'adv_portal_post_thanks_stats_bit';
Make sure you change "Plugin is Active" to "Yes".
puertoblack2003
01-26-2006, 04:49 PM
it depends where this template is being used...
this code:if (THIS_SCRIPT === showthread)
{
$globaltemplates = array_merge($globaltemplates, array(
'post_thanks_button',
'post_thanks_postbit',
'post_thanks_postbit_legacy'
));
} will only cache the above templates in showthread.php
if the adv_portal_post_thanks_stats_bit and adv_portal_post_thanks_stats are displayed on the showthread.php page then you can just add it to the $globaltemplates arrayif (THIS_SCRIPT === showthread)
{
$globaltemplates = array_merge($globaltemplates, array(
'post_thanks_button',
'post_thanks_postbit',
'post_thanks_postbit_legacy',
'adv_portal_post_thanks_stats',
'adv_portal_post_thanks_stats_bit'
));
}
if it's on another page.. add
if (THIS_SCRIPT === script page goes here)
{
$globaltemplates = array_merge($globaltemplates, array(
'adv_portal_post_thanks_stats'
'adv_portal_post_thanks_stats_bit'
));
}
ok guys that part work great in forum page i guess we getting there...
now i will show you the two part i have the portal page and the forum page with the cache template problem..
portal page (cmps) :
Uncached templates: adv_portal_post_thanks_stats (1)
Uncached templates: adv_portal_post_thanks_stats_bit (10)
Uncached templates: pagecompressor_stats (1)
And
forum page:
Uncached templates: latestgallery (5)
Uncached templates: pagecompressor_stats (1)
if you can you can visit the site and see 4 ya self: http://www.puertotech.com user=TEST1 pass=TEST in caps
your help is greatly appreciated trying to fix that problem
shadiguy1
02-10-2006, 06:08 PM
thanks solved my problems
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.