News:

Create A Forum Installed

Author Topic: [Code] Count unread posts  (Read 1671 times)

0 Members and 1 Guest are viewing this topic.

Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile

Badges: (View All)
Level 6 Sixth year Anniversary Fifth year Anniversary
[Code] Count unread posts
« on: November 04, 2012, 06:49:58 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: http://support.createaforum.com/5/jquery-v1-8-update/

Footers:
Code: [Select]
<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>
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.

Share on Facebook Share on Twitter


Offline Silver734

  • Full Member
  • ***
  • Posts: 165
  • Karma: 1
  • Gender: Female
    • View Profile
    • Fairy Tail

Badges: (View All)
Second year Anniversary One year Anniversary Poll Voter
Re: [Code] Count unread posts
« Reply #1 on: August 06, 2013, 10:51:41 pm »
does not work
Fairytailrp.netFairytailrp.net
This forum was made with Create a Forum!! :3

Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile

Badges: (View All)
Level 6 Sixth year Anniversary Fifth year Anniversary
Re: [Code] Count unread posts
« Reply #2 on: August 07, 2013, 01:37:00 am »
does not work
It does work, please review whether or not you copied and pasted the code correctly and you have jQuery
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.

Offline Silver734

  • Full Member
  • ***
  • Posts: 165
  • Karma: 1
  • Gender: Female
    • View Profile
    • Fairy Tail

Badges: (View All)
Second year Anniversary One year Anniversary Poll Voter
Re: [Code] Count unread posts
« Reply #3 on: August 07, 2013, 05:54:47 pm »
It works now :)
Fairytailrp.netFairytailrp.net
This forum was made with Create a Forum!! :3

 

Related Topics

  Subject / Started by Replies Last post
9 Replies
2769 Views
Last post March 13, 2013, 10:51:19 pm
by aIURbliS
0 Replies
862 Views
Last post November 03, 2012, 11:30:45 pm
by aIURbliS
1 Replies
997 Views
Last post March 17, 2013, 10:15:08 pm
by aIURbliS
1 Replies
256 Views
Last post August 16, 2018, 12:29:47 pm
by CreateAForum
4 Replies
197 Views
Last post July 29, 2022, 03:48:43 pm
by Albion