vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   using Phrases outside of install directory -- what loads them? - init.php or global. (https://vborg.vbsupport.ru/showthread.php?t=309718)

doob 03-20-2014 04:40 AM

using Phrases outside of install directory -- what loads them? - init.php or global.
 
Can anyone tell me what bit of code normally is repsonsible for loading the phrase system and in what php document?

My guess is its something in global.php or init.php but I'm just not seeing it!

Max Taxable 03-20-2014 04:43 AM

It's a template hook call, right? Such as $vbphrase

doob 03-20-2014 04:59 AM

No. I think I'm looking for something within the actual php code. Something like include_once or include or register or similar.

vBNinja 03-20-2014 05:04 AM

I would recommend to just include global.php because the function that initializes the phrases/language (init_language()) still requires the $vbulletin object to exist

In other words, this is possible, you'd just have to go through the hassle of reverse engineering the vB initialization process.

doob 03-20-2014 05:27 AM

I never would have guessed init_language had anything to do with phrases...

It turns out the problem was actually to do with php syntax when converting the templates into php echo statements. PHP doesn't apparently like echoing the variables from the templates, so I needed to chop up the echo into smaller bits so that instead of echoing something like

echo onFocus="if (this.value == \'$vbphrase[username]\') this.value = \'\';" />

it reads

echo onFocus="if (this.value == \'' . $vbphrase['username'] . '\') this.value = \'\';" />

So the problem was always just syntax! Slaps forhead.


All times are GMT. The time now is 02:39 AM.

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.01089 seconds
  • Memory Usage 1,708KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete