The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Notifications in Navbar
Is there any way I can get the normal vB notifications (like new PM's etc) to appear in the Navbar instead of the header?
|
#2
|
||||
|
||||
You'll need to edit the template, did you purchase or download your style somewhere?
I'd ask there. |
#3
|
||||
|
||||
I made the template myself.
|
#4
|
|||
|
|||
When you're rendering your template, register the notification variables to your template, like:
Code:
$templater->register('notifications_menubits', $notifications_menubits); $templater->register('notifications_total', $notifications_total); Then look at the original navbar template and copy the parts that display notifications_menubits and notifications_total (unless that's the part you were asking about, in which case this doesn't help ). |
#5
|
||||
|
||||
That's where I get lost, I don't know anything about rendering. I tried reading this: https://vborg.vbsupport.ru/showthread.php?t=228078 but it loses me very quickly.
|
#6
|
|||
|
|||
OK, when you say you made the template yourself, do you mean that you made a new one called navbar to replace the original? In that case you don't have to worry about the registering, you just need to find the code from the original that mention notifications_menubits and notifications_total, and copy it to your new template.
|
#7
|
||||
|
||||
Oh sorry, my bad, bad wording. I meant I made the style myself. It is still using the original Navbar template.
|
#8
|
|||
|
|||
Actually, it's my fault - I see now the original question is how you would move it to the navbar from the header. I kind of came in in the middle and got confused.
Anyway, it's the same advice - find the code in the header that displays notifications_total and notifications_menubits, and copy it to your navbar template. As it turns out, those are already registered to the navbar template, so you don't have to worry about that (probably it's left over from vb3 or something). Here's the code from the header template: Code:
<vb:if condition="$notifications_total"> <li class="popupmenu notifications" id="notifications"> <a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}: <span class="notifications-number"><strong>{vb:raw notifications_total}</strong></span></a> <ul class="popupbody popuphover"> {vb:raw notifications_menubits} </ul> </li> <vb:else /> <li class="popupmenu nonotifications" id="nonotifications"> <a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}</a> <ul class="popupbody popuphover"> <li>{vb:rawphrase no_new_messages}</li> <vb:if condition="$show['pmmainlink']"><li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li></vb:if> </ul> </li> </vb:if> but that uses <li> tags because it's inside <ul> tags, so if you don't have the same situation in your navbar template then you'll have to do something about that. |
#9
|
||||
|
||||
When you say copy it to my navbit template, which template is that? I don't have a navbit, do you mean navbar?
Almost got it working. Just need to figure out how to change the font size and colour as it's using what was in the header. --------------- Added [DATE]1364840459[/DATE] at [TIME]1364840459[/TIME] --------------- I believe I have it working now. The only thing is the font is slightly different from the navbar items. And when there are no notifications the font size is smaller. |
#10
|
|||
|
|||
navbit was a typo, I meant navbar. If you look at the CSS classes being used in the tags, you could probably figure out the font issue.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|