vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Caching phrasegroups (https://vborg.vbsupport.ru/showthread.php?t=101971)

The Geek 11-30-2005 08:32 PM

Caching phrasegroups
 
Is this not possible? Ive been working all night on this, yet I cant for the life of me find out how to do this!

one would assume that since global is merging phrasegroups:
$phrasegroups = array_merge($phrasegroups, $actionphrases["$_templatedo"]);

You would still have time to add to them, but its not working. The above line is between the fetch_style and cache_template hooks with no function calls between but it doesnt make a difference which one you use - it wont fetch the phrasegroups you are after. :P

Help me Calgon. Take me away.

Marco van Herwaarden 11-30-2005 08:46 PM

I guess you already debuged the value of $phrasegroups after the merge?

The Geek 11-30-2005 08:52 PM

er. Thanks Marco. It was one of those situations where you rip the house apart to find your freaking keys only to discover that they are in your pocket :P

Please delete this thread before people discover Im a n00b coding on a comadore64 with FrontPage.

Actually, maybe im not a n00b. I was getting a false positive because I merged the phrasegroup array with the fetch_user_info hook as a test.
Only problem is that at that stage, I cant consistantly tell which forum im in, so it doesnt really work for me :(

Marco van Herwaarden 11-30-2005 09:05 PM

Hmm strange, added the following to Fetch_style:
PHP Code:

$phrasegroups array_merge($phrasegroups, array('cpglobal')); 

And it shows up nice in the $phrasegroups in global, but it doesn't seem to retrieve the phrases.

Must look more into this tomorrow if i have time, probably something i already solved and forget again once.

Marco van Herwaarden 11-30-2005 09:06 PM

Lol then i better also delete my reply. :D

Probably too late to think clear.

Nahh will leave it here for some to have a laugh.

Andreas 11-30-2005 10:59 PM

style_fetch is too late => init_startup

The Geek 12-02-2005 03:23 PM

Thanks Andreas - but isnt that too early for $forumid?

Andreas 12-02-2005 03:41 PM

Yup. That's the reason why I did not port my "Langage by Forum" Hack, as it requires restructuring global.php ;)

If you look at global.php, you can see that the language is initialized before forumids are available.

The Geek 12-02-2005 04:01 PM

I know its not totally a bug per say, but clearly there are more phrasegroups added between the style_fetch hook and cace_templates hook however adding those phrasegroups cant really do anything.

Seeing as 'you de man' now, do you think you can petition the hook gods to give us one thats in a slightly better position ;)

Andreas 12-02-2005 04:15 PM

Hooks won't help in this case, even if every line of global.php had a Hook :)

Take a look at how the code is sructured - as said above, the forumid is not available before the language is initialized.


All times are GMT. The time now is 10:40 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.01176 seconds
  • Memory Usage 1,726KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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