![]() |
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 |
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 /> |
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"> 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"> --don |
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. |
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 |
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. |
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"> |
Why have it show at all, why not show it when new replies to subscribed threads are posted.
I now have this. Code:
<br /> |
I dunno... I guess there is no real reason to show it if there are no new posts.
|
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? |
I cannot reproduce this error.
Installed on 3.8.8, working fine. Were you getting this error before making the changes above? |
Quote:
Quote:
I guess I need to do some more investigating... I'll move it back to the hook its intended to use (if I can remember which it is) and see what happens. --don |
I am not using the code that you posted, I am using what I posted.
I tried to view all post by the user that made a post in one of my subscribed threads, no errors. I viewed all my post from postbit where the subscribed thread post was made, no errors. I changed the plugin location to where it was, no errors. Maybe something else is causing that error. Try disabling all plugins and turn each back on one by one until you see the error. I remember the first time I was told that and I had way to many addons installed, it took me a little why until I found my issue. |
All times are GMT. The time now is 06:16 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|