![]() |
Subscribed Threads in Notifications
1 Attachment(s)
As seen on www.pentaxforums.com/forums/ , I'm bringing you a handy mod that adds the number of new subscribed threads to the notifications area, as well as a link to subscription.php. This means that whenever someone replies to one of your subscribed threads, you don't have to check your user cp or your e-mail inbox- just click on the notification! Notifications can also be reset via the User CP (memcached version only*).
This mod is provided free of charge, but I ask that the copyright and contact information be retained within the SOURCE. There are no visible copyrights for this mod. Furthermore, I ask that you do not re-use this code without my permission. Non-Memcached Version: Time to install: <1 minute (upload 1 product file) Current Version: 1.1.0 Queries: 1 per pageload for logged in users Templates: 0 New Phrases: 1 Compatibility: vB 3.7.x-4.x Love this mod? Support further projects by donating: http://www.pentaxforums.com/forums/donations/ Enjoy and don't forget to mark this as installed if you decide to use it! Limited support will be offered to those who click install. Note to owners of large forums: I also offer a version of this mod that does not add any global queries and instead utilizes memcached. I can install this premium version on your site for an hourly charge, assuming your server already has memcached installed. Send me a PM for details. |
Thanks for this MoMan :)
I'll be adding this for the coming weekend. How do your members enjoy this mod? Do they feel that it's useful or have you not received many comments about it on your own site? |
They feel it's very useful- but requested a "notification reset" link, which I've now implemented. I expect to release the updated version shortly.
|
Brilliant. Waiting for the new version to be released. :)
|
New version is out! Keep it mind that the new functionality is memcached-only, and further features will only be implemented in that version.
|
Interesting... what would you need for a test board? I mean, I have one I use for testing various things and could loan you admin access for a while if needed...
|
I'd simply need to log in to the plugins system and see how notifications are handled in vB4. The same code should run no problem, but I bet that it needs to be put in a different place.
|
Update: try changing the hook location for the main code from global_complete to global_bootstrap_init_complete
That should make it work in vB4- let me know! |
Quote:
|
Please add an X-cache version. I'd really like to add this to my big board.
|
And make one for Wincache as well please.
|
I currently don't intend on supporting any caching system other than memcached. If someone would like to adapt this to xcache/whatever other caching system, you have my permission to re-post the plugin in this thread. The adaptation is purely syntactical, and as such, should be quite easy to do.
|
What the "Notification reset" link does?
|
It removes the notifications currently being shown.
|
Hi!
I've got a problem using memcache... the prashe on notification dropdown it's empty on all pages but subscription.php |
well as i see ...
i know this mod have a problem like "in ur DB" have got a problem. just modify your DB in that "query" ,,, PS : Send me pm if you talk in spanish .... |
I sent you a PM. No clue what you're talking about, though!
|
Quote:
|
Quote:
|
It's already on global
|
If it's global, then the phrase should be displaying properly.
|
When you get a bit of free time, could you please please please make a xCache compatible version?
Thank you, thank you, thank you! |
If I ever do get it installed on my server, I'll consider it. As I said earlier, it shouldn't be hard at all.
I've also developed an improved version of this mod for my purposes which uses an added database table instead of memcached to store read marking times. This is much more stable, and if I get time, I'll release it here as well. |
Thanks. I'll wait on that then.
|
Instead of making use of Memcache specific code why don't you simply make use of vBulletin cache, and if your vB uses xCache/Memcache/etc., then the hack will get advantage of this? Also if you go in this way you will not need two versions of your mod anymore as because if your vB doesn't make use of any cache then nothing will be cached.
Take in account that caching in memory is faster than storing the information on the database and both ways are stable. My two cents :) |
Is there any documentation on that? I'll gladly tweak the public version of this mod to use the vBulletin interface if such an interface is available.
On my forum, I don't use vB_Datastore_Memcached as the database is actually faster for simple select queries from the datastore than memcached. I use memcached for mods whose queries take > 0.1s, such as iTrader, LXT, latest threads on forum home, and vBulletin's showgroups page, and the database for mods which spit out information that rarely or never changes. I'd still need two versions of the plugin :p |
Will be any noticeable performance impact if we use the non-cache enabled version in a busy forum? Let's say, 250 members and 2,250 guests at the same time with a cookie timeout of 30 minutes.
Thank you, Jonathan |
Probably not, as it doesn't add any queries for guests. It depends on whether or not mysql is the bottleneck on your site.
The queries in this mod are relatively light unless a user has hundreds of subscribed threads. It shouldn't add much load, but does add 1 query for all users, and 2 additional queries for users with subscribed threads. On my forum, the non-cached version of this mod added just under 0.01s to the generation time of each page. The memcached version, on the other had, doesn't add anything at all, since most of the time, the queries aren't run. |
Hello,
Thanks for clearing things up. I went ahead and installed the NOMEMCACHED version of your mod and it appears not to be working at all. There are two problems:
EDIT: tested on another forum running vBulletin 3.8.1, same issues. Thank you, Jonathan |
Quote:
$phrasegroups[] = 'user'; OR add a new custom global phrase for the product with the correct key. This will be included in the next version of the hack. So you're getting notifications for new threads, but not for threads with replies? That shouldn't be the case. Let me try checking if there are any problems with the code in the simple version. |
Quote:
Quote:
|
When I get the time, I'll be willing to log in to your site and try to debug this. It could be the case that there are other plugins on my site not present on yours that are otherwise required. However, please note that I am pretty busy with other things at the moment and am not planning on actively maintaining the non-memcached version beyond the one released here, nor will I be releasing a single version that includes an option to enable/disable memcached.
Version 1.2.1, which I use on my site, is working flawlessly. I will do my best to release it here as well, but haven't had the time to write the install/uninstall queries needed for it to work. As I mentioned earlier, it uses the database to store marking times, so that even if memcached is flushed, threads beyond the user-set cutoff will not be displayed. If you'd like to install memcached on your server, try the following command: pecl install memcached |
I've now updated the non-memcached version to 1.0.1 final. This includes the missing phrase. Try that- do the notifications work for you?
|
Thanks for the update!
The missing phrase issue is now fixed but unfortunately notifications aren't working. |
I've just realized that this mod requires DB-based thread read marking to work. Make sure that's enabled in your vB options. By default, the cookie-based method is used.
I've now added this to the OP. |
Yes, that was the problem. I changed from cookie based to DB based and now the product is working fine. However I prefer to continue using the cookie based method. Is there any way to adapt your product to work in a cookie based enviroment? Hope it can be possible as because most people use the default method in their forums.
Thank you, Jonathan |
If the threadread cookie stores your latest thread read times, then yes, it would be possible, as that's the only piece of information that this mod needs to work. AFAIK, though, there's a 15-day expiration or something like that, so I'd recommend you make the permanent switch to the DB-based system, as it really doesn't add any load to your board.
I'm willing to adapt this to use the cookie info on a freelance basis, if you'd like to go down that road. |
Yes, I'll love to be able to use this product while using the cookie-based method. Hope you can do it when you get a bit of free time.
Again, take in account that most people are using the cookie-based method. Thank you, Jonathan |
Fatal error: Class 'Memcache' not found in /home/XXXXX/XXXX/global.php(400) : eval()'d code on line 588
|
Quote:
|
All times are GMT. The time now is 06:24 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:
|