Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
gmail-like In-title new content notification?
mixedfeelings
New
Hey all,
Has anyone explored adding gmail/facebook-like notifications for new content in Vanilla Forums?
Something like "All Discussions (1)" to indicate that there is a new post. That way people who keep the forum open in a tab have an easy way of knowing when a new post has been made.
Any ideas on where to start on something like that?
Thanks!
Tagged:
1
Answers
Like : http://stackoverflow.com/questions/4841519/how-to-write-number-of-notifications-in-the-address-bar-when-a-notification-is
Be cool huh
There was an error rendering this rich post.
Depending how large the community is using all new posts could get pretty ridiculous, but you could at least put the number of new notifications in there, and that would be easy.
@422 exactly!
Is there a magic variable in vanilla for new notification count?
@jspautsch - luckily my community is very small. This is one idea I had to make it a just a little more user friendly.
sounds like some add-on potential here. just a thought, make sure your jquery callbacks are set at a reasonable interval. otherwise 100 people inactively sitting with browsers open could swamp your webserver with update requests for the number of notifications.
i mention this because i had a problem with the who's online plugin, it got set to 0 interval and even 10-12 people online flooded my webserver and brought it to it's knees.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
I'd be willing to give making a plugin a shot - anyone have any idea how to pull the unread posts and notification counts?
I have started working on a simple plugin - mostly as a learning exercise (I am pretty new to this):
https://github.com/mixedfeelings/NotificationTitle
I am using $Session->User->CountNotifications to get a number of unattended notifications and printing it in the title like this "(2) Forum Title"
The title stuff is based on the [http://vanillaforums.org/addon/webtitle-plugin](WebTitle Plugin), which I use. I haven't looked into what i should really be using for the title variable yet.
I also haven't figured out the ajax refresh stuff yet or how to to get a count of all unread posts rather than of notifications.
As I said, I am new at this and totally open to comments / suggestions / help of any kind.
A start!
I figured the notifications would be easiest because of CountNotifications, I don't think there's any core function to count all unread posts, you'd have to code that.
As for the AJAX refresh, that crossed my mind as the hardest part, I know very little about how Vanilla's scripts are setup, so I don't know if there's a way to access that.
Maybe @Todd knows something?
This jQuery plugin seems potentially useful:
http://heyman.info/2010/sep/30/jquery-title-alert/
Thats cool @mixedfeelings
There was an error rendering this rich post.
Is there any documentation of available variables? Besides the "CountUnreadDiscussions", i am also looking for the best method of including the overall page title.