![]() |
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. |
Quote:
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; 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. |
All times are GMT. The time now is 09:23 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|