Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Support
  • Code University
  • Directory Ranking
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
Directory Ranking
Tweet Topic Started: Jul 5 2009, 05:03 PM (569 Views)
Viral Jul 5 2009, 05:03 PM Post #1


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
I'm creating a directory but I'm having some trouble thinking of a ranking system. The only variables I have to work with for each forum are:
  1. Member Count
  2. Post Count
  3. Hit Count (how many hits in directory)
  4. Rating (0-5)


Anyone have any ideas?

Posted Image
Offline Profile Goto Top
 
Garath531. Jul 5 2009, 05:10 PM Post #2


Posts:
156
Group:
Dedicated
Member
#3,232
Joined:
Jun 17, 2009
Something to do with activity? If this uses server-side of some sort, perhaps the peak amount of users per day/week?
I'm back after an unexpected hiatus. If I've forgotten about a code I was working on for you, just drop me a PM and let me know. :)
Offline Profile Goto Top
 
Viral Jul 5 2009, 05:19 PM Post #3


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
This is what Jory suggested:

Code:
 
SELECT
`id`, `name`, `url`
FROM
`directory_items`
ORDER BY
( member_count * $memberCountRelevance + post_count * $postCountRelevance + hit_count * $hitCountRelevance + rating * $ratingRelevance )


But then again, the rating is either too powerful for small forums, or it means next to nothing for big forums - it's trying to find a balance between the two.

Posted Image
Offline Profile Goto Top
 
Garath531. Jul 5 2009, 05:23 PM Post #4


Posts:
156
Group:
Dedicated
Member
#3,232
Joined:
Jun 17, 2009
I seem to be missing something. What will the "relevance" variables mean?
I'm back after an unexpected hiatus. If I've forgotten about a code I was working on for you, just drop me a PM and let me know. :)
Offline Profile Goto Top
 
Viral Jul 5 2009, 05:44 PM Post #5


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
How much I think they are worth in terms of rating.

Ok, here's something we sorta figured out, but not too sure on how it would work yet:
(post/members)^2 * (sqrt(hits) / (5-rating))

There's then the problem of getting sqrt and powers and stuff in a mysql query

Posted Image
Offline Profile Goto Top
 
Garath531. Jul 5 2009, 05:48 PM Post #6


Posts:
156
Group:
Dedicated
Member
#3,232
Joined:
Jun 17, 2009
How about calculating creation date in there somewhere? Something like:
((post/members)^2 * (sqrt(hits) / (5-rating)))/(days open)
I'm back after an unexpected hiatus. If I've forgotten about a code I was working on for you, just drop me a PM and let me know. :)
Offline Profile Goto Top
 
Viral Jul 5 2009, 06:15 PM Post #7


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
I would, but it would be too much work for that. The only possible way to do it is to grab the join date of the root admin, then somehow convert it into UTC format - which would be far more work than I want to do.

Posted Image
Offline Profile Goto Top
 
Garath531. Jul 5 2009, 06:25 PM Post #8


Posts:
156
Group:
Dedicated
Member
#3,232
Joined:
Jun 17, 2009
Oh, well for your powers/square roots problem (if I read that post correctly), MySQL has built in functions for this.
here
I'm back after an unexpected hiatus. If I've forgotten about a code I was working on for you, just drop me a PM and let me know. :)
Offline Profile Goto Top
 
Viral Jul 5 2009, 06:51 PM Post #9


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
You're a godsend, I'll try them out later

Posted Image
Offline Profile Goto Top
 
Choco Jul 5 2009, 07:28 PM Post #10
Member Avatar
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ

Posts:
589
Group:
Admins
Member
#3,272
Joined:
Jun 30, 2009
Coding language
Everything
Viral
Jul 5 2009, 05:44 PM
How much I think they are worth in terms of rating.

Ok, here's something we sorta figured out, but not too sure on how it would work yet:
(post/members)^2 * (sqrt(hits) / (5-rating))

There's then the problem of getting sqrt and powers and stuff in a mysql query
I can see it now: ERROR: DIVIDE BY 0
Posted ImageIt's a magical world, Hobbes, ol'd buddy... ...let's go exploring!
In progress: Something Special ;)
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Code University · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2
  • 3

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