The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
I have two questions?
1) How to put {vb:rawphrase xxx} in file xxx.js
2) How to count the total number of unread topics in a certain box? Example: forumid = 10. |
#2
|
|||
|
|||
If you look at the headinclude template, you can see where a number of js variables are defined using template variable. You can create one of your own using a phrase, then use the variable in xxx.js (assuming it's included after the headinclude code). You could use the headinclude_javascript template hook to include your code, and maybe create a plugin using hook parse_templates and code like: Code:
global $template_hook; $template_hook['headinclude_javascript'] .= '<script type="text/javascript"> <!-- PHRASE_XXX = "' . addcslashes($vbphrase['xxx'], '"\\') . '"; </script>'; Then use PHRASE_XXX in xxx.js. The phrase has to be a type that's loaded on the page that you're displaying (if it's a phrase you're creating and your not sure, use GLOBAL for the type). I haven't tried the above code at all so it's possible there are typos or other errors. I don't know the answer to your second question. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|