Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OUGC Custom Reputation

Please note that this is pretty much a negative criticism post, rather than a balanced review as mentioned in this thread. Also be aware that stuff posted here may be highly subjective.
Please feel free to criticise this post, however.

Plugin Reviewed: OUGC Custom Reputation
Plugin Version: 1.0.1 (last updated 25th November 2012)
Plugin Author: Omar G.
Author Message
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #1
OUGC Custom Reputation
Adding to our collection is the 5th OUGC plugin!  The nice prefix littered virtually everything, which I struggle to pronounce, demonstrates the author's intent on trying self improve!

The plugin is called something to do with reputations, but I'm going to call it post ratings, as it seems to be a more accurate description (ratings are associated with posts & users, not just users).

So one of the first things you notice is that this package includes screenshots.  Now before you moan about a >500KB download package, this one happens to be under 100KB - nice one!
Nonetheless, there's a fair bit more code than I'm willing to go through, so yeah...
  • How to use the rating interface isn't obvious in any way - you've got an icon, then a "x [number]"; not only is this difficult to see that it's meant to be clicked on, the fact that the icon and number links and their respective functions isn't obvious.  You can toggle the rating you've chosen by clicking on the icon, although this isn't exactly obvious either (there's no visual indication (not even in a tooltip) on whether clicking the icon will add to the reputation or remove from it).  Note that, however, you can't change your rating by clicking on another icon - you need to 'unrate' the post by clicking on the rating you originally specified (and this can be difficult to tell since there's no visual indication) and then click the other rating.  For example, if there's two ratings, "Good" and "Bad", and you originally rated a post as "Bad" but now want to change it to "Good", you have to click "Bad" first (to unrate the post), then click "Good" (to rate the post) - you can't simply click "Good" and have the rating carry across.
  • Rating interface does not work with Javascript disabled (seems like a bug as opposed to intentional behaviour).  Interestingly, turning off the AJAX setting makes it fail to work as well, regardless of whether Javascript is enabled or not
  • PHP Code:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    	$PL->settings('ougc_customrep', $lang->ougc_customrep, $lang->ougc_customrep_d, array(
    		'groups'	=> array(
    			'title'			=> $lang->ougc_customrep_s_groups,
    			'description'	=> $lang->ougc_customrep_s_groups,
    			'optionscode'	=> 'text',
    			'value'			=> '7,1,5',
    		),
    		'forums'	=> array(
    			'title'			=> $lang->ougc_customrep_s_forums,
    			'description'	=> $lang->ougc_customrep_s_forums,

    Having the same description as the title really doesn't help people understand what you mean...

  • Code:
    			`groups` text NOT NULL DEFAULT '',
    			`forums` text NOT NULL DEFAULT '',

    You can't specify default values for a text field in MySQL (although MySQL will probably just ignore the error)

  • I question the use of bigint's in most database columns added, but I guess it really doesn't matter...
  • PHP Code:
    1
    2
    3
    4
    5
    6
    7
    8
    		if($customrep->firstpost_only)
    		{
    			$pids = "pid='{$thread['firstpost']}'";
    		}
    		else
    		{
    			$pids = $GLOBALS['pids'];
    		}

    Breaks if showthread is in threaded mode because $GLOBALS['pids'] isn't set

  • PHP Code:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    	if(!isset($customrep->cache['query']))
    	{
    // ...
    	if($customrep->firstpost_only)
    	{
    		global $thread;
    
    		if($post['pid'] != $thread['firstpost'])
    		{
    			return;
    		}
    
    		global $plugins;
    
    		$plugins->remove_hook('postbit', 'ougc_customrep_postbit');
    	}

    I'd perform the first post check before running the query.  I'm not entirely sure of the reason behind checking whether "$post['pid'] != $thread['firstpost']" as this will always be true if not on the first page of the thread.

  • The ougc_customrep_log table seems to mostly query on the rid,pid columns - there really should be indexes on these; one would presume that pid,uid should be a unique key as you can't vote for more than once for each post.  The good thing about identifying these uniques is that it could help one simplify something like

    PHP Code:
    $customrep->cache['query'][$rep['rid']][$rep['pid']][$rep['lid']][$rep['uid']] = 1; //TODO
    

    where the 'lid' key seems to be unnecessary

  • On postbit, the plugin loads ALL votes, and does a summation + check for current user voting on this.  This can potentially be problematic if there happens to be a large number of votes.
  • PHP Code:
    $lang->ougc_customrep_popup_date = $lang->sprintf($lang->ougc_customrep_popup_date, $log['date'], $log['time']);

    Overwrites $lang var in a loop = broken behaviour

  • What does Reputation Type do?

A decent post rating (classification perhaps?) plugin, but improvement on the user interface needs to be done IMO.

My Blog
(This post was last modified: 11-27-2012 02:35 PM by ZiNgA BuRgA.)
11-26-2012 04:04 PM
Find all posts by this user Quote this message in a reply


Messages In This Thread
OUGC Custom Reputation - ZiNgA BuRgA - 11-26-2012 04:04 PM
RE: OUGC Custom Reputation - Sama34 - 11-26-2012, 06:00 PM
RE: OUGC Custom Reputation - ZiNgA BuRgA - 11-27-2012, 02:35 PM
RE: OUGC Custom Reputation - ZiNgA BuRgA - 12-01-2012, 09:26 AM
RE: OUGC Custom Reputation - Sama34 - 12-01-2012, 05:28 PM
RE: OUGC Custom Reputation - ZiNgA BuRgA - 12-01-2012, 10:20 PM
RE: OUGC Custom Reputation - Sama34 - 12-03-2012, 04:18 PM
RE: OUGC Custom Reputation - ZiNgA BuRgA - 12-03-2012, 04:30 PM

Forum Jump: