MoneyBoard - Money Making Forums

Full Version: Add "Your Given Ratings" as Sort Option on Reputation Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This small tutorial is supposed to add "Show: Your Given Ratings" as another "sort option" on Reputation Pages.

Open ./reputation.php and find;
PHP Code:
case "negative":
$s_url = "&show=negative";
$conditions = 'AND r.reputation<0';
$show_selected['negative'] = 'selected="selected"';
break;
and ADD the following code just AFTER the second line;
PHP Code:
case "your_given":
$s_url = "&show=your_given";
$conditions = 'AND r.adduid = '.$mybb->user['uid'];
$show_selected['your_given'] = 'selected="selected"';
break;

Now open ./inc/languages/english/reputation.lang.php and find;
PHP Code:
$l['show_negative'] = "Show: Negative Ratings";
and ADD the following code just AFTER that line;
PHP Code:
$l['show_your_given'] = "Show: Your Given Ratings";

Now go to: AdminCP > templates > Your theme's templates > Reputation Templates > reputation > and find;
Code:
<option value="negative" {$show_selected['negative']}>{$lang->show_negative}</option>
and ADD the following code just AFTER that line;
Code:
<option value="your_given" {$show_selected['your_given']}>{$lang->show_your_given}</option>

If every thing goes fine then you'll see another sort option when you visit: http://yourdomain.com/reputation.php?uid=X

http://i.imgur.com/S9x7C.png
http://i.imgur.com/fX7lj.png
Reference URL's