Progressing from my previous query.
I need to register some variables to allow notifications to be registered in my plugin (Post # 216)
I've tried following this guide here..
https://www.vbulletin.com/forum/show...ons-menu-place
I attempted the following, to no avail.
Plugin name = memberbar_member_basic
Plugin Hook = Parse Templates
Plugin Content =
PHP Code:
$templater = vB_Template::create('memberbar_member_basic');
$memberbar_member_basic = $templater->render();vB_Template::preRegister('navbar', array('notifications_menubits' => $notifications_menubits));
vB_Template::preRegister('navbar', array('memberbar_member_basic' => $memberbar_member_basic));
vB_Template::preRegister('navbar', array('notifications_menubits' => $notifications_menubits));
I then moved the notifications code from header to the memberbar_member_basic template, which for reference makes the dropdown appear but does not show notifications nor total notifications.
Code moved.
PHP 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>
<li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li>
</ul>
</li>
</vb:if>
Basically, what i am trying to achieve is moving the notifications from header to my new template.
Thanks
B