Thanks, Tim!
I'll move the plugin to global start... but there's something missing from the template edit you suggested.
Currently, I have:
HTML Code:
<span id="notifications_menu">
<a rel="nofollow" href="usercp.php$session[sessionurl_q]" id="notifications">
<if condition="$notifications_total>0">
<span class="icon">@</span><span class="word">Notifications</span><span id="notifications_number">$notifications_total</span>
<else />
<span class="icon" style="color:#deccb5;">@</span><span class="word" style="color:#deccb5;">Notifications</span>
</if>
</a>
<!-- notifications menu -->
<div class="dropdown">
$notifications_menubits
</div>
<!-- / notifications menu -->
</span>
in the navbar template, and:
HTML Code:
<a href="$notification[link]"<if condition="$notification['total'] > 0"> style="font-weight:bold"</if> class="menu_item"><span class="padder">$notification[phrase] ($notification[total])</span></a>
in the navbar_notifications_menubit template.
The plugin seems to be passing variable here:
PHP Code:
$vbulletin->userinfo['adam_subsct_count'] = $new_subscribed_threads;
$notifications['adam_subsct_count'] = array(
'phrase' => $vbphrase['new_subscribed_threads'],
'link' => $vbulletin->options['bburl'] . '/subscription.php?do=viewsubscription&daysprune=-1&folderid=all',
'order' => 50
);
I tried:
HTML Code:
<a rel="nofollow" href="usercp.php$session[sessionurl_q]" id="notifications">
<if condition="$userinfo[adam_subsct_count]>0">
<span class="icon">@</span><span class="word">$vbphrase[new_subscribed_threads]</span><span id="notifications_number">$userinfo[adam_subsct_count]</span>
<else />
<span class="icon" style="color:#deccb5;">@</span><span class="word" style="color:#deccb5;">$vbphrase[new_subscribed_threads]</span>
</if>
The phrase works fine, but the subscription count seems to be empty. Is it a syntax error in my template edit, or something else?
--don