Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add "Your Given Ratings" as Sort Option on Reputation Page
#1
Star 
This small tutorial is supposed to add "Show: Your Given Ratings" as another "sort option" on Reputation Pages.

Open ./reputation.php and find;
		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;
		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;
$l['show_negative'] = "Show: Negative Ratings";
and ADD the following code just AFTER that line;
$l['show_your_given'] = "Show: Your Given Ratings";

Now go to: AdminCP > templates > Your theme's templates > Reputation Templates > reputation > and find;
<option value="negative" {$show_selected['negative']}>{$lang->show_negative}</option>
and ADD the following code just AFTER that line;
<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
Reply
#2
Is there a way to modify it so that only certain gid's can view given rep?
Reply
#3
Yes, its possible but have to modify the core file. I'll update the first post with this.
Reply
#4
This user has been denied support. This user has been denied support.
Was looking forward to this post, just hoping to see update soon Smile
Reply
#5
This user has been denied support. This user has been denied support.
Nice tutorial. Thanks but I think this will only useful for sites that allow multi reps.
Reply
#6
Doesnt work for me :/ When I select "Your GIven Ratings", it just says

This user currently does not have any reputation ratings with the specified criteria below.

Even tho I gave a lot of reps to other people^^
Reply
#7
Awesome tutorial. I am actually about to test this. Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)