Register Members List Search Today's Posts Mark Forums Read

Thread Tools
Old 01 Aug 2013, 10:59 is offline
Join Date: Jun 2011
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.
Reply With Quote
Old 02 Aug 2013, 20:36
kh99 kh99 is offline
Join Date: Aug 2009
Real name: Kevin
Originally Posted by View Post
1) How to put {vb:rawphrase xxx} in file xxx.js

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

New To Site? Need Help?

All times are GMT. The time now is 10:43.

Layout Options | Width: Wide Color: