Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-26-2006, 12:37 PM
puertoblack2003's Avatar
puertoblack2003 puertoblack2003 is offline
 
Join Date: Aug 2005
Location: Philadelphia
Posts: 1,073
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [Question] How to cached Templates

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
Reply With Quote
  #2  
Old 01-26-2006, 01:16 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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()
Reply With Quote
  #3  
Old 01-26-2006, 01:27 PM
puertoblack2003's Avatar
puertoblack2003 puertoblack2003 is offline
 
Join Date: Aug 2005
Location: Philadelphia
Posts: 1,073
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by princeton
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

Quote:
if (THIS_SCRIPT === showthread)
{
$globaltemplates = array_merge($globaltemplates, array(
'post_thanks_button',
'post_thanks_postbit',
'post_thanks_postbit_legacy'
));
}
Reply With Quote
  #4  
Old 01-26-2006, 01:40 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it depends where this template is being used...
this code:
PHP 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 array
PHP Code:
if (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
PHP Code:
if (THIS_SCRIPT === script page goes here)
{
$globaltemplates array_merge($globaltemplates, array(
'adv_portal_post_thanks_stats'
'adv_portal_post_thanks_stats_bit'
));

Reply With Quote
  #5  
Old 01-26-2006, 03:50 PM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
PHP Code:
$globaltemplates[] = 'adv_portal_post_thanks_stats';
$globaltemplates[] = 'adv_portal_post_thanks_stats_bit'
Make sure you change "Plugin is Active" to "Yes".
Reply With Quote
  #6  
Old 01-26-2006, 04:49 PM
puertoblack2003's Avatar
puertoblack2003 puertoblack2003 is offline
 
Join Date: Aug 2005
Location: Philadelphia
Posts: 1,073
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by princeton
it depends where this template is being used...
this code:
PHP 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 array
PHP Code:
if (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
PHP Code:
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
Reply With Quote
  #7  
Old 02-10-2006, 06:08 PM
shadiguy1 shadiguy1 is offline
 
Join Date: Jul 2004
Location: Delco,Pa
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks solved my problems
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 05:47 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07189 seconds
  • Memory Usage 2,241KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete