Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Zetaboards Modifications
  • Today's top poster and posts in statistics
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
  • 3
Today's top poster and posts in statistics
Tweet Topic Started: Sep 2 2009, 05:20 AM (1,954 Views)
Gorgor Sep 2 2009, 05:20 AM Post #1
Hello

Posts:
1,187
Group:
Former Staff
Member
#2,728
Joined:
Apr 2, 2009
Coding language
PHP
Code name: Today's top poster and posts in statistics
Description: Adds two lines right after the total posts. One for the amount of posts today, and one for the top poster today
Preview: http://s1.zetaboards.com/thread_creator00/index/

Uses double ad credits when viewing the index page

Code
 
<script>
// Posts and top poster today code
// Made by Gorgor
error = "<b>N/A</b>"
if(location.href.match("index")){
$.get(main_url+"stats/top_posters/", function(data){
var posts2day = $("td:contains(Total posts today)", data).html()
var poster = $("td:contains(#1)", data).next().html()
newposts = posts2day.split(":")
if(poster == null){
poster = error
}
$("td:contains(Total Forum Posts)").each(function(){
$(this).children("strong:first").after("<br>Total Forum Posts Today: <b>"+newposts[1]+"</b><br>The top poster today is: "+poster)
})
})
}
</script>
Edit the blue to what you want it to say for top poster today if nobody posted that day.
Edited by Gorgor, Sep 2 2009, 09:45 AM.
Offline Profile Goto Top
 
Reddii Sep 2 2009, 01:41 PM Post #2
Member Avatar
Smile, you're on candid camera.

Posts:
11
Group:
Member
Member
#3,445
Joined:
Aug 29, 2009
Coding language
None
Thanks, this will come in handy when arguing with some members.
;D
Posted Image
I made this sig for a friend a month or so ago, so I'll just use it while I try getting my gfx powarz back.
;D

Offline Profile Goto Top
 
Gorgor Sep 2 2009, 01:58 PM Post #3
Hello

Posts:
1,187
Group:
Former Staff
Member
#2,728
Joined:
Apr 2, 2009
Coding language
PHP
Reddii
Sep 2 2009, 01:41 PM
Thanks, this will come in handy when arguing with some members.
;D
Lol, I've never had members argue over that stuff O_o

Glad you like the code :)
Offline Profile Goto Top
 
Dorith Sep 2 2009, 05:31 PM Post #4
Member Avatar
Has just entered the Matrix

Posts:
2,069
Group:
Former Staff
Member
#1,854
Joined:
Dec 23, 2008
Nice! I haven't added codes to my board in a bit, and I like this one :P
Posted Image
Posted Image
(Made emoticon using Codes Rock's Smiley Generator)
Offline Profile Goto Top
 
Leonartis Sep 4 2009, 12:58 AM Post #5
Member Avatar


Posts:
28
Group:
Member
Member
#3,320
Joined:
Jul 16, 2009
Coding language
HTML/CSS
Nice code there.
Posted Image
Offline Profile Goto Top
 
Gorgor Sep 4 2009, 08:01 AM Post #6
Hello

Posts:
1,187
Group:
Former Staff
Member
#2,728
Joined:
Apr 2, 2009
Coding language
PHP
Thanks :D :)
Offline Profile Goto Top
 
haunguyen Sep 5 2009, 03:39 AM Post #7


Posts:
2
Group:
Member
Member
#1,856
Joined:
Dec 24, 2008
Nice ! Thank
Offline Profile Goto Top
 
R0cky 0wnz Sep 5 2009, 07:14 AM Post #8


Posts:
12
Group:
Member
Member
#3,451
Joined:
Aug 31, 2009
THANKS! <3
Offline Profile Goto Top
 
Amanda Sep 5 2009, 07:30 AM Post #9
Member Avatar


Posts:
5
Group:
Member
Member
#1,522
Joined:
Nov 13, 2008
I like this code a lot :)

Is there a way to avoid it showing members as "viewing board stats" on the online list, when in fact they aren't?
Edited by Amanda, Sep 5 2009, 07:32 AM.
Offline Profile Goto Top
 
Gorgor Sep 5 2009, 07:43 AM Post #10
Hello

Posts:
1,187
Group:
Former Staff
Member
#2,728
Joined:
Apr 2, 2009
Coding language
PHP
Amanda
Sep 5 2009, 07:30 AM
I like this code a lot :)

Is there a way to avoid it showing members as "viewing board stats" on the online list, when in fact they aren't?
You can add this in:
Code:
 
<script>
if(location.href.match("online")){
$("td:contains(Viewing Board Stats)").text("Viewing Board")
}
</script>
But that will make anyone who's viewing the board stats, even if they really are appear that they're viewing the board.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Zetaboards Modifications · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2
  • 3

Track Topic · E-mail Topic Time: 7:49 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy