vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced Dynamics > vBa Dynamics v1.0 Support > Addon Modules & Modifications > Modifications

Reply
 
Thread Tools Display Modes
  #1  
Old 09-18-2008, 04:31 AM
aproape aproape is offline
Senior Member
 
Join Date: Dec 2007
Posts: 101
Default vBA Dynamics - Enhanced Article Rating System

Good morning everyone!

This is part 2 that contains a complex rating system for Dynamics.

Important Notes:

A. Please note that one field is added to the entries table and one existing field is altered.

B. This rating system only applies to articles from Dynamics - it does not modify or alter the rating behavio[u]r for the forums.

C. This modification is released to be used ONLY for Dynamics. The code/ideas/formulas from this mod cannot be used in other applications or projects without permission from myself or Maribal Inc.

Detailed description:

As we know, the rating system in VB [and Dynamics] is using the [average] function - to calculate all votes/values. This system can be abused and the average can vary greatly if someone leaves a low vote or has something against the author..

Plus, an article which is newer in the system and has 3 votes of 5 - compared to another article which is one year old - also with 3 votes of 5 - appear equal.. when in fact they should be clearly differentiated using other elements.

This mod enhances the article rating system with the addition of several new elements:

1. Number of votes for an article [total]
2. Average rating for the article
3. Average of the average rating for ALL articles in the system
4. Number of FULL [REAL] reads [all pages of an article]
5. Number of hits [displays] for an article
6. Scale of rating [variable - so we are not limited to only votes values of 1-5 we can also use 1-10 or 1, 3, 5]
7. Maximum number of hits vs max number of reads for ALL articles
8. Number of comments - for an article
9. Maximum number of comments for all articles
10. Date of the articles

The formula we've come up from all the elements above will give you a number - from 1 to 5 with 2 decimals.. 5.00 being the highest possible [and very difficult to attain..].

The result of the calculation we found it to be very fair and it is protecting the article system from exploits like 9 votes of value 5 and 2 votes of value 1 [therefore, average very low].


Installation instructions:

1. SQL table changes:

[change this to your table names if different/more instances/etc]

a. Adds a new field that will hold the _real_ number of reads of an article:

ALTER TABLE `adv_dyna_entries` ADD `reads_nr` INT NOT NULL DEFAULT '0';

b. Alters the [votetotal] field to have decimals:

ALTER TABLE `adv_dyna_entries` CHANGE `votetotal` `votetotal` DECIMAL( 10, 5 ) UNSIGNED NOT NULL DEFAULT '0'


2. Plugins

Copy the plugins folder and all its content to the ROOT of your domain - the directory of www.domainname.com, NOT domainname.com/forums/! Set permissions of debug.txt to 0666 (needed only for debugging purposes)

Using CP Admin go to Plugins & Products > Add New Plugin and enter/select in form as follows:

Product: vBulletin
Hook Location: vba_dyna_functions_saveentry_rate_entry
Title: Weighed rating
Execution Order: 1
Plugin PHP Code: include(DIR . '/../plugins/vba_dyna_functions_saveentry_rate_entry.php');
Plugin is Active: Yes

Plugins for updating articles reads number after the last page is viewed or after a printable version is requested.

Product: vBulletin
Hook Location: vba_dyna_showentry_start
Title: Increment complete reads on last page
Execution Order: 1
Plugin PHP Code: include(DIR . '/../plugins/vba_dyna_showentry_start.php');
Plugin is Active: Yes


Product: vBulletin
Hook Location: vba_dyna_misc_printerfriendly
Title: Increment complete reads on last page
Execution Order: 1
Plugin PHP Code: include(DIR . '/../plugins/vba_dyna_misc_printerfriendly.php');
Plugin is Active: Yes



Enjoy!
aproape
Attached Files
File Type: zip enhanced_article_rating.zip (7.8 KB, 13 views)
Reply With Quote
  #2  
Old 09-18-2008, 07:59 AM
reddyink reddyink is offline
Senior Member
 
Join Date: Aug 2007
Posts: 143
Default

Thank you for rating system. You have added the most critical missing piece to vb dyna.
Reply With Quote
  #3  
Old 08-07-2009, 10:02 PM
Webs961 Webs961 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 10
Default

Hey! Just installed this onto a Dynamics portal.. right now, none of our articles have any posts to them (because so far all of them are admin articles that users are not allowed to post to). Line 154 causes an error because there is no check to make sure that $max_posts isn't zero. This is going to cause a problem for us because we have a Dynamics portal where users will not be allowed to reply to posted articles, but where ratings are still desired. The fix is simple (or at least the one we have decided on works for us), but I though I'd post it here as fixing it in the official release might be a good idea.

Line 154, the change we made:
Code:
$comments_factor = $max_comments > 0 ? ($comments / $max_comments) * ES_RATING_SC * $K3 : 0;
Just a suggestion..
Reply With Quote
  #4  
Old 07-31-2012, 09:31 AM
angeljs angeljs is offline
Senior Member
 
Join Date: Aug 2005
Posts: 155
Default

I'm not sure I understand how this works. I've installed it, but when I give a download a 5-star rating, only 1 star shows with an average of only 0.79 or something...is this normal?
__________________
Sim Fans UK - Sims downloads and discussion
Reply With Quote
Reply


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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
vBA Dynamics Rating Options/Box Revisited aproape Modifications 6 10-22-2009 03:49 PM
Advanced Rating System (I'm paying) etterra Module & Modification Discussion & Requests 9 09-18-2008 04:33 AM
Improvements to article rating scheme? xopek Feedback & Suggestions 0 05-01-2008 03:15 PM
Article system for vBa? pyd Module & Modification Discussion & Requests 5 12-03-2007 05:05 PM
Article system Luke86 "How Do I..." Questions 1 06-26-2007 01:57 PM


All times are GMT -4. The time now is 12:51 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.