The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
The last part would go in a new plugin (ignore the a, b, c, d plugin) like this:
Hook: process_templates_complete Execution Order: 5 Code:
$vbulletin->userinfo['notifications_total'] = $title_note_count; vB_Template::preRegister('FORUMHOME',array('title_note_count' => $title_note_count)); vB_Template::preRegister('SHOWTHREAD',array('title_note_count' => $title_note_count)); vB_Template::preRegister('recent_thanks',array('title_note_count' => $title_note_count)); vB_Template::preRegister('FORUMDISPLAY',array('title_note_count' => $title_note_count)); vB_Template::preRegister('USERCP_SHELL',array('title_note_count' => $title_note_count)); vB_Template::preRegister('newthread',array('title_note_count' => $title_note_count)); vB_Template::preRegister('newreply',array('title_note_count' => $title_note_count)); |
#12
|
|||
|
|||
OK I will give this a try.
--------------- Added [DATE]1363366543[/DATE] at [TIME]1363366543[/TIME] --------------- Do I leave out the entire first plugin or just the a,b,c,d, part? |
#13
|
||||
|
||||
Yeah just leave out the first plugin entirely - that's if you need to recalculate everything, which you shouldn't if you don't have the vbNotifications mod
|
#14
|
|||
|
|||
Ok great ,Im gonna go test this out!
|
#15
|
||||
|
||||
Ok, can you clarify if you are not using th DB tech mod then what code do we use exactly?
|
#16
|
||||
|
||||
Yep! This one:
https://vborg.vbsupport.ru/showpost....9&postcount=11 The rest of it is all the same as the first post (adding the Javascript & titles into Templates). The only difference is the plugin - sorry for the confusing posts |
#17
|
|||
|
|||
I cant seem to get this to work,I am using 4.1.12. I used the same templates as you.Does it matter where I put the code in these templates
|
#18
|
||||
|
||||
JS should always be in the header tag, so as long as it's somewhere in there! Test to see if the JS is working, simply by changing it to this code:
<script type="text/javascript"> setInterval(function() { var data = "{vb:raw relpath}"; $.get(document.location.toString()).then(function (data){ //find and set the title of the page document.title = "Test2"; }); }, 30000); setTimeout(function() { var data = "{vb:raw relpath}"; $.get(document.location.toString()).then(function (data){ //find and set the title of the page document.title = "Test"; }); }, 1000); </script> Load the relevant page, and the page title should change to "Test" after 1 second, and "Test2" after 30 seconds |
#19
|
|||
|
|||
I dont see anything changing to test or test 2,I must be doing something wrong?
--------------- Added [DATE]1363447219[/DATE] at [TIME]1363447219[/TIME] --------------- I changed this <title>{vb:raw vboptions.bbtitle}</title> to this <title><vb:if condition="$title_note_count">({vb:raw title_note_count}) </vb:if>{vb:raw pagetitle} - {vb:raw vboptions.bbtitle}</title> is this correct? |
#20
|
||||
|
||||
Yes, that is 100% correct, but the JS not changing your title immediately is a problem - are you putting the script code in that same template? It can go right below the <title> tag
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|