vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How-To Cache Templates (https://vborg.vbsupport.ru/showthread.php?t=104532)

Princeton 01-26-2006 01:14 PM

if it's a file add it to $globaltemplates array (found at the top of page):
HTML Code:

$globaltemplates = array(
        'other_templates_here',
        'adv_portal_photoplog_thumbs',
    );


Guest210212002 01-26-2006 01:18 PM

1 Attachment(s)
Well, the template is called by the file, but I'm not sure exactly where to edit the $globaltemplates array itself.

Apologies for noobing up your thread, I've actually wondered how to do this for awhile now. ;)

Princeton 01-26-2006 01:24 PM

I don't really know anything about that hack but you can add the template to the cache_templates hook (plugin):
$globaltemplates[] = 'adv_portal_photoplog_thumbs';

I recommend adding some kind of condition to it.

Have you tried asking the author of the hack? It could just be something that he overlooked.

Guest210212002 01-26-2006 01:30 PM

Yeah, I posted in his thread, I'm just trying to do it myself so that I know how in the future. I didn't even think of just adding it to the hook. Thanks man. :)

rom56 01-28-2006 06:04 PM

the geek articles use the template cache, i have make a mistake in my modification but i can edit it :s where can i delete this template cache ?

Princeton 01-28-2006 06:09 PM

I'm not sure what you mean. Have you asked the author of the hack?

netwind 01-29-2006 01:44 PM

princeton This article good for creating stand-alone pages, but I need wrote plugins, wich evalulate templates without modify standart forum code.
How ?
PHP Code:

 eval('$adv_code .= "' fetch_template('adv_creativeSuite') . '";'); 


Princeton 01-29-2006 07:52 PM

netwind,
follow the instructions found on this page: https://vborg.vbsupport.ru/showthread.php?t=99132

puertoblack2003 03-11-2006 03:08 PM

ok trying to follow this rule but still confused which i'm learning to cache this template because i have this on my forum
Code:

Uncached templates: Marquee_Text (1)
ok where here do i add the fuction to elimated that uncache...

PHP Code:

switch ($vbulletin->options['mtext_color'])
    {
    case 
0:    $renk 'Dark Red'; break;
    case 
1:    $renk 'Red'; break;
    case 
2:    $renk 'Orange'; break;    
    case 
3:    $renk 'Brown'; break;
    case 
4:    $renk 'Yellow'; break;
    case 
5:    $renk 'Green'; break;
    case 
6:    $renk 'Olive'; break;
    case 
7:    $renk 'Cyan'; break;
    case 
8:    $renk 'Blue'; break;
    case 
9:    $renk 'Dark Blue'; break;
    case 
10:    $renk 'Indigo'; break;
    case 
11:    $renk 'Violet'; break;
    case 
12:    $renk 'White'; break;
    case 
13:    $renk 'Black'; break;
  }

switch (
$vbulletin->options['mtext_direction'])
    {
        case 
0:    $yer 'left'; break;
        case 
1:    $yer 'right'; break;
  }

$Positionx1 '$spacer_open';
    eval(
'$marqtextx = "' fetch_template('Marquee_Text') . '";');
    
$vbulletin->templatecache['header'] = str_replace($Positionx1,$Positionx1.'$marqtextx'  $vbulletin->templatecache['header']); 

thank you

Princeton 03-11-2006 05:00 PM

add the template to the cache_templates hook (plugin):
Code:

$globaltemplates[] = 'Marquee_Text';


All times are GMT. The time now is 06:08 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02126 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete