DIR Return Create A Forum - Home
---------------------------------------------------------
Create A Forum - Support Forums
HTML https://support.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Create a Forum Codes and Support
*****************************************************
#Post#: 7043--------------------------------------------------
[Code] Count unread posts
DIR By: xboi209
Date: November 4, 2012, 1:49 am
---------------------------------------------------------
Description: Counts the number of unread posts since last visit
and new replies to your posts then adds a number next the Show
unread posts since last visit and Show new replies to your posts
links.
This code utilizes jQuery, please use the latest version found
in this thread:
HTML http://support.createaforum.com/5/jquery-v1-8-update/
HTML http://support.createaforum.com/5/jquery-v1-8-update/
Footers:
--- Code ---
<script>function
xboi209_countunread(url,li){$.ajax({url:smf_scripturl+"?action="+url+"",success:function(data){$("ul.reset
> li:eq("+li+")").prepend("["+$(data).find("table.table_grid >
tbody > tr").length+"]
")}})}xboi209_countunread("unreadreplies","2");xboi209_countunread("unread","1");</script>
--- End Code ---
#Post#: 11061--------------------------------------------------
Re: [Code] Count unread posts
DIR By: Silver734
Date: August 6, 2013, 5:51 pm
---------------------------------------------------------
does not work
#Post#: 11064--------------------------------------------------
Re: [Code] Count unread posts
DIR By: xboi209
Date: August 6, 2013, 8:37 pm
---------------------------------------------------------
--- Quote from: Silver734 link ---
>
> does not work
>
--- End Quote ---
It does work, please review whether or not you copied and pasted
the code correctly and you have jQuery
#Post#: 11071--------------------------------------------------
Re: [Code] Count unread posts
DIR By: Silver734
Date: August 7, 2013, 12:54 pm
---------------------------------------------------------
It works now :)
*****************************************************
Page 1 of 1