The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Watched threads in menubar
Folks-
I've got Subscribed Threads in Notifications Link installed, and it works fine. However, I've decided to eliminate friends and private messages entirely... which leaves subscribed threads as the only notification. I'd like to just put it directly into the menubar. So, can i just change the hook location for the plugin (and to which)—or do I need to do something else? Thanks! --don |
#2
|
||||
|
||||
Hello Don,
The first thing you need to do is change the plugin hook location to global_start Save Then in your navbar template Find: Code:
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase> Code:
<br /> <a href="subscription.php">$vbphrase[new_subscribed_threads]</a> <strong>$new_subscribed_threads</strong> |
Благодарность от: | ||
kh99 |
#3
|
|||
|
|||
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> 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> The plugin seems to be passing variable here: PHP Code:
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> --don |
#4
|
||||
|
||||
Hey Don,
I was under the impression you were removing that code and were no longer using the notification dropdown. What I posted works perfectly on my 3.8.8 site. It will show zero if there are no replies. |
#5
|
|||
|
|||
I am removing the dropdown!
What I can't do, at this point, is get the number of new watched threads to display (or work within the conditional). I'm sure its something I'm doing wrong. A thought: The value I want is displayed on the subscribed threads section of the UserCP template, in the variable $numthreads. Might I be better off ditching this plugin and getting a simpler one that just fetches this value? --don |
#6
|
||||
|
||||
It works just as it did when it was in the drop down but you always see it now at zero until one of your subscribed threads are replied on.
I may be able to hide the whole thing until a reply has been posted. When I get home, I will see what I can do. |
#7
|
|||
|
|||
Got it working!
I was using the wrong variable for the count. Thanks for your help. Here's what works: HTML Code:
<a rel="nofollow" href="usercp.php$session[sessionurl_q]" id="notifications"> <if condition="$new_subscribed_threads>0"> <span class="icon">@</span><span class="word">$vbphrase[new_subscribed_threads]</span><span id="notifications_number">$new_subscribed_threads</span> <else /> <span class="icon" style="color:#deccb5;">@</span><span class="word" style="color:#deccb5;">$vbphrase[new_subscribed_threads]</span> </if> </a> |
#8
|
||||
|
||||
Why have it show at all, why not show it when new replies to subscribed threads are posted.
I now have this. Code:
<br /> <if condition="$new_subscribed_threads>0"> <a href="usercp.php">$vbphrase[new_subscribed_threads]</a> <span style="color:#FFA5A5;"><strong>$new_subscribed_threads</strong></span></if> |
#9
|
|||
|
|||
I dunno... I guess there is no real reason to show it if there are no new posts.
|
#10
|
|||
|
|||
Okay... weird side-effect—
When I use the "Find all posts by..." link in the postbit, It displays the posts, but displays the following error message: Code:
Warning: Cannot use a scalar value as an array in [path]/search.php on line 2504 I don't know why this interacts with search.php. Any ideas, folks? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|