vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Cache System Explanation (datastore) (https://vborg.vbsupport.ru/showthread.php?t=110628)

netwind 01-12-2007 09:04 AM

Read beginning from words
Now in order for vBulletin to know about that specific row, you need to add it to the $specialtemplates array.
Try parse_templates hook.

SDB 01-12-2007 09:35 AM

LOL

I'd already added it to $specialtemplates, as stated in my original post :)

Thank you very much for your help, the parse_templates hook worked a treat.

The problem I have now, is having to manually add 'cachestats' to the special templates array of every single page. Is there a way to maybe add to this array from within global.php or something?

Thanks again

Simon

aah..

answered my own question (wonders will never cease!)

I've added :
$specialtemplates[] = 'cachestats';

to the top of the global.php file which works. So will play around to find the right hook to put it in.

--

additional :
It seems that there isn't a hook early enough in global.php
I'm really playing around in the dark here, so if anyone knows of a hook which runs early enough, could you please let me know?

Cheers
Simon

netwind 01-12-2007 09:46 AM

Hook global_start for $specialtempates[] .=
and parse_templates (and later called specific hooks) for unserialize and other jobs

SDB 01-12-2007 09:47 AM

LOL

what a muppet.. thanks mate :)

correction..

global_start appears to be way too late. There are two that seem to run earlier than this, and neither of those are early enough either.

ok.. I've whacked the $specialtemplates[] = ... into global_start..

but the variable is empty when the header template is built.

when I had identical set-up, but instead of global_start, I hacked the line into the start of the global.php file it worked fine.

netwind 01-12-2007 10:01 AM

Sorry, this my tip was for custom stand-alone scripts like this :
PHP Code:

$specialtemplates = array(
        
'banemail',
);
require_once(
'./global.php'); 

I think modifying global.php only one way..

SDB 01-12-2007 10:05 AM

ok.

Thanks a lot for your help netwind, it got me working anyway, with only one file edit.

If anyone else knows a hook I can use, it would be great.

Thanks

Simon

netwind 01-12-2007 11:02 AM

I have another related problem: build html in admincp/ not work,
since style not selected. I need example code which build all special vars for function fetch_template() in default style.

bigfoot 02-07-2007 09:48 PM

I must say this is a GREAT article, but I need a little help building the forumcache. If I do as this article says, it just f*cks up my forum and its unable to load correctly :(

thincom2000 02-11-2007 06:59 AM

Quote:

Originally Posted by bigfoot (Post 1177127)
I must say this is a GREAT article, but I need a little help building the forumcache. If I do as this article says, it just f*cks up my forum and its unable to load correctly :(

I believe forumcache has its own function.

Like build_options(), build_datastore(), build_birthdays(), build_maxloggedin(),
perhaps build_forumcache() ?

I think this thread only applies to datastore objects you have created yourself.

bigfoot 02-15-2007 05:24 PM

I can't find any similar functions that work for the forumcache. Actually build_datastore() works fine saving the data, but I think the input is wrong :(


All times are GMT. The time now is 11:46 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.01150 seconds
  • Memory Usage 1,739KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_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