Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
How to Cache an Uncached Template
dsboyce8624
Join Date: May 2005
Posts: 413

 

New Jersey
Show Printable Version Email this Page Subscription
dsboyce8624 dsboyce8624 is offline 05-15-2005, 10:00 PM

I am posting this because it took me so long to find the answer. It may be elementary to those of you who have been doing this for a while, but not to me.

Anyway, here goes:

Open /forum_root/global.php

Find:

PHP Code:
//misc useful 
At the end of the column of template names add yours, don't forget the comma after the last one that's already there, like so:

PHP Code:
'already_there_template',
'template_you_need_cached' 
Reply With Quote
  #12  
Old 07-18-2009, 07:34 PM
ezak ezak is offline
 
Join Date: Nov 2004
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for that great hack
but the templates are not cached,
how to cache the template

Powered by vBulletin® Version 3.8.3, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Page generated in 0.52030 seconds with 28 queries (2 queries for uncached templates)
Uncached templates: nlp_notifications_usercp (1)
Uncached templates: nlp_notifications_usercp_bit (1)
Reply With Quote
  #13  
Old 07-18-2009, 07:57 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am pretty sure there is a more recent version of this article that shows how to cache the templates using plugins.
Reply With Quote
  #14  
Old 07-18-2009, 08:11 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ezak View Post
thanks for that great hack
but the templates are not cached,
how to cache the template


Powered by vBulletin? Version 3.8.3, Copyright ?2000 - 2009, Jelsoft Enterprises Ltd.
Page generated in 0.52030 seconds with 28 queries (2 queries for uncached templates)
Uncached templates: nlp_notifications_usercp (1)
Uncached templates: nlp_notifications_usercp_bit (1)
You could create a plugin with the hook location cache_templates and in the box for the Plugin PHP Code you would insert this code
PHP Code:
$globaltemplates[] = 'nlp_notifications_usercp';
$globaltemplates[] = 'nlp_notifications_usercp_bit'
Hope that helps
Reply With Quote
  #15  
Old 07-19-2009, 09:04 PM
ezak ezak is offline
 
Join Date: Nov 2004
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Redlinemotorsports View Post
You could create a plugin with the hook location cache_templates and in the box for the Plugin PHP Code you would insert this code
PHP Code:
$globaltemplates[] = 'nlp_notifications_usercp';
$globaltemplates[] = 'nlp_notifications_usercp_bit'
Hope that helps
thanks alot bro its really working as well
Reply With Quote
  #16  
Old 06-25-2010, 11:29 AM
KURTZ KURTZ is offline
 
Join Date: Nov 2006
Location: Italy
Posts: 2,257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
I am pretty sure there is a more recent version of this article that shows how to cache the templates using plugins.
i'm looking for it (for vB 4) ... i've searched but i can't find anything ...
Reply With Quote
  #17  
Old 06-25-2010, 01:53 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KURTZ View Post
i'm looking for it (for vB 4) ... i've searched but i can't find anything ...
for vB4:
PHP Code:
$cache[] = 'your_template'
OR
PHP Code:
$cache  array_merge($cache, array(
     
'your_template1',
     
'your_template2',
     
'your_template3',
     
'your_template4',
     
'your_template5'
  
)); 
Reply With Quote
  #18  
Old 06-25-2010, 04:55 PM
KURTZ KURTZ is offline
 
Join Date: Nov 2006
Location: Italy
Posts: 2,257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HMBeaty View Post
You could create a plugin with the hook location cache_templates and in the box for the Plugin PHP Code you would insert this
Quote:
Originally Posted by Lynne View Post
for vB4:
PHP Code:
$cache[] = 'your_template'
OR
PHP Code:
$cache  array_merge($cache, array(
     
'your_template1',
     
'your_template2',
     
'your_template3',
     
'your_template4',
     
'your_template5'
  
)); 
so i need to create a new plugin and then put the code that you give me Lynne? correct?
Reply With Quote
  #19  
Old 06-25-2010, 10:48 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, you need to create a plugin to cache the templates.
Reply With Quote
  #20  
Old 06-27-2010, 09:44 AM
KURTZ KURTZ is offline
 
Join Date: Nov 2006
Location: Italy
Posts: 2,257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

perfect! runs correctly! as always thanks Lynne for the tips
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 01:07 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.04397 seconds
  • Memory Usage 2,311KB
  • Queries Executed 26 (?)
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
  • (8)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete