vBulletin Modifications

User rating

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > vBulletin Modification Requests

Reply
 
LinkBack Thread Tools
Old 07-01-2007, 07:36 PM   #1
vB Newbie
Join Date: Jan 2007
steve1971 is on a distinguished road

Default User rating
Version: 3.6.x
Hack Category: Add-On Releases

I would like to create a User rating by having members reputation points be divided by their postcount, and display the quotient in their postbit. This # would be the "user rating".

I was told that this only requires a few lines in the form of a plugin. Currently running 3.6.7

Last edited by steve1971; 07-01-2007 at 07:39 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07-02-2007, 10:08 AM   #2
vB Newbie
Join Date: Jan 2007
steve1971 is on a distinguished road

Default

This works.

Paste in postbit template:

$post[average]


Plugin location: postbit_display_complete

if ($post['reputation'] != 0)
{
$post['average'] = vb_number_format($post['reputation'] / $post['posts'], 2);
}

Join Date: Jan 2007
Posts: 999
Rep points: 300
User rating: 0.30

Join Date: Jan 2007
Posts: 1,000
Rep points: 300
User rating: 300.00


UPDATE: the comma in 1,000 posts is causing the problem.

Quote:
$post['posts'] is already run though the number formatter, you need to strip it for your personal use, or use another hook location to grab it before that happens.
Any suggestions as to how to "strip" it down?

Last edited by steve1971; 07-02-2007 at 06:44 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-02-2007, 02:43 PM   #3
vB Newbie
Join Date: Jan 2007
steve1971 is on a distinguished road

Default

One last little bug.
This calculation works perfectly unless the members post count is 1000 or more. In that case it just repeats the users reputation points in the "User rating" location.

Join Date: Jan 2007
Posts: 999
Rep points: 300
User rating: 0.30

Join Date: Jan 2007
Posts: 1,000
Rep points: 300
User rating: 300.00

Anybody know why this is?

UPDATE: the comma in 1,000 posts is causing the problem.

Quote:
$post['posts'] is already run though the number formatter, you need to strip it for your personal use, or use another hook location to grab it before that happens.
Any suggestions as to how to "strip" it down?

Last edited by steve1971; 07-02-2007 at 06:45 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[3.6.5] Most active user (today/last week/last month/ever) Fully controlled SolidSnake@GTI vBulletin 3.5 / 3.6 Hack Releases 5 01-13-2008 03:21 PM
User Notes xfile vBulletin Modification Requests 5 05-28-2006 06:02 PM
[REQUEST] Rating System (Possibly by TouchingVirus or ShavedApe?) figure004 vBulletin Modification Requests 4 05-22-2005 04:14 PM


All times are GMT -3. The time now is 06:28 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)