The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How does vBulletin make $vbphrase available to JavaScript?
Does anyone know how vBulletin passes phrases to JavaScript? For now I'm using a php file called with a script tag. Here's a sample of the code:
PHP Code:
Could someone point me to the file or function that handles this? |
#2
|
|||
|
|||
I'm not 100% sure, but I don't think there is any "magic" way of doing it. I think the phrases are written into the output either as js string constants or as html text which a js function then manipulates (like with the menus).
|
#3
|
|||
|
|||
See includes/xml/js_safe_phrases.xml.
That seems to be part of some system that does what I want but I have no idea what file or function calls this. |
#4
|
|||
|
|||
Hmm...didn't know that existed. But looking at the code in adminfunctions_language.php that uses that file, it looks like it's just a list of phrases that are adjusted for use in javascript (fetch_js_safe_string() in adminfunctions.php is called on each one to do some replacements). But other than that it doesn't seem to help. I checked where one of the phrases was used and it's for the ckeditor, and they seem to be output as a js function call that creates the editor.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|