Support Forum
Is there a way to implement a notification button inside of my actual WordPress theme?
For example, when people aren't on the forum, but rather they are inside of a course I have setup, can there be something at the top right of the page (inside of header.php) that shows them the # of unread posts they have? Or # of replies they've had?
Thanks!
You could use the same type of thing that is used in the forum that shows unread posts.
If you have a text widget and something like the Exec-PHP plugin installed you could use the same code that displays unread posts.
Something like:
<?php global $spThisUser; sp_forum_api_support(); sp_UnreadPostsInfo('tagClass=spRight spUnreadPostsInfo&spanClass=spLeft&iconClass=spLeft spIcon', __sp('%COUNT% topics with<br />unread posts'), __sp('Most recent topics with unread posts'), __sp('Mark all topics as read')); ?>
The CSS might or style may need to be adjusted but that should show the unread list on every WP page where the widget is active.
The codex entry sp_UnreadPostsInfo shows more info on that function and how you can change it if needed.
It worked great actually and the code is very simple to grab.
I simply added a link to it like this
<a href="http://www.nicheoptimizer.com/forum/"><?php global $spThisUser; sp_forum_api_support(); sp_UnreadPostsInfo('tagClass=spRight spUnreadPostsInfo&spanClass=spLeft&iconClass=spLeft spIcon', __sp('%COUNT% Unread Posts'), __sp('Most recent topics with unread posts'), __sp('Mark all topics as read')); ?></a>
The possibility sounds good and i will try it too.
here my site: http://www.bulls-club.de
it works great but i can`t open the window with all new topics when i click the "Most recent topics with unread posts" button. i click the button but nothing happens. dosn`t work it on the sidebar?
almase said: it works great but i can`t open the window with all new topics when i click the "Most recent topics with unread posts" button. i click the button but nothing happens. dosn`t work it on the sidebar?
It should be a direct url link to new posts. When you hover over the icon does it show the /forum/newposts link at the bottom of your browser?
Javascript:void(0) is correct. It just means the href attribute is not used. Instead the onclick attribute is used.
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)