Not Solved How to make reputation anonymous, similar to Karma system at Reddit?
#1
Not Solved
How to make reputation anonymous, similar to Karma system at Reddit?

I mean, to show only the top part instead of the list of the names and comments in the https://community.mybb.com/reputation.php?uid=1

Would be handy if Moderators/Admins can see the page in full and hide the bottom part from the users/guests.

Talking about Reddit system, it would also be nice to have the option to give a positive point for posting so the user would get the point once they post their message.
Reply
#2
Not Solved
template conditionals plugin can be used to show specific content to certain user groups
& hide the content for other user groups

Quote:... give a positive point for posting
NewPoints plugin can be used for this purpose
Reply
#3
Not Solved
You could use PHP in templates plugin for this.

Edit theme template "reputation"

Search:
<tr>
	<td class="tcat"><strong>{$lang->comments}</strong></td>
</tr>
{$reputation_votes}
<tr>
	<td class="tfoot" align="right">
	<form action="reputation.php" method="get">
		<input type="hidden" name="uid" value="{$user['uid']}" />
		<select name="show">
			<option value="all" {$show_selected['all']}>{$lang->show_all}</option>
			<option value="positive" {$show_selected['positive']}>{$lang->show_positive}</option>
			<option value="neutral" {$show_selected['neutral']}>{$lang->show_neutral}</option>
			<option value="negative" {$show_selected['negative']}>{$lang->show_negative}</option>
		</select>
		<select name="sort">
			<option value="dateline" {$sort_selected['last_updated']}>{$lang->sort_updated}</option>
			<option value="username" {$sort_selected['username']}>{$lang->sort_username}</option>
		</select>
		{$gobutton}
	</form>
	</td>
</tr>

Replace with:
<if $mybb->usergroup['canmodcp'] then>
<tr>
	<td class="tcat"><strong>{$lang->comments}</strong></td>
</tr>
{$reputation_votes}
<tr>
	<td class="tfoot" align="right">
	<form action="reputation.php" method="get">
		<input type="hidden" name="uid" value="{$user['uid']}" />
		<select name="show">
			<option value="all" {$show_selected['all']}>{$lang->show_all}</option>
			<option value="positive" {$show_selected['positive']}>{$lang->show_positive}</option>
			<option value="neutral" {$show_selected['neutral']}>{$lang->show_neutral}</option>
			<option value="negative" {$show_selected['negative']}>{$lang->show_negative}</option>
		</select>
		<select name="sort">
			<option value="dateline" {$sort_selected['last_updated']}>{$lang->sort_updated}</option>
			<option value="username" {$sort_selected['username']}>{$lang->sort_username}</option>
		</select>
		{$gobutton}
	</form>
	</td>
</tr>
</if>
Reply
#4
Not Solved
(2020-01-09, 10:23 AM).m. Wrote: template conditionals plugin can be used to show specific content to certain user groups
& hide the content for other user groups

Quote:... give a positive point for posting
NewPoints plugin  can be used for this purpose

Thanks .m. I'll check both plugins out.
Reply
#5
Not Solved
SvePu has given exact code & suggested another plugin Smile

personally I prefer using template conditionals plugin &
SvePu's suggested code is also valid with this plugin.
Reply
#6
Not Solved
(2020-01-09, 10:35 AM)SvePu Wrote: You could use PHP in templates plugin for this.

Edit theme template "reputation"

Search:
<tr>
	<td class="tcat"><strong>{$lang->comments}</strong></td>
</tr>
{$reputation_votes}
<tr>
	<td class="tfoot" align="right">
	<form action="reputation.php" method="get">
		<input type="hidden" name="uid" value="{$user['uid']}" />
		<select name="show">
			<option value="all" {$show_selected['all']}>{$lang->show_all}</option>
			<option value="positive" {$show_selected['positive']}>{$lang->show_positive}</option>
			<option value="neutral" {$show_selected['neutral']}>{$lang->show_neutral}</option>
			<option value="negative" {$show_selected['negative']}>{$lang->show_negative}</option>
		</select>
		<select name="sort">
			<option value="dateline" {$sort_selected['last_updated']}>{$lang->sort_updated}</option>
			<option value="username" {$sort_selected['username']}>{$lang->sort_username}</option>
		</select>
		{$gobutton}
	</form>
	</td>
</tr>

Replace with:
<if $mybb->usergroup['canmodcp'] then>
<tr>
	<td class="tcat"><strong>{$lang->comments}</strong></td>
</tr>
{$reputation_votes}
<tr>
	<td class="tfoot" align="right">
	<form action="reputation.php" method="get">
		<input type="hidden" name="uid" value="{$user['uid']}" />
		<select name="show">
			<option value="all" {$show_selected['all']}>{$lang->show_all}</option>
			<option value="positive" {$show_selected['positive']}>{$lang->show_positive}</option>
			<option value="neutral" {$show_selected['neutral']}>{$lang->show_neutral}</option>
			<option value="negative" {$show_selected['negative']}>{$lang->show_negative}</option>
		</select>
		<select name="sort">
			<option value="dateline" {$sort_selected['last_updated']}>{$lang->sort_updated}</option>
			<option value="username" {$sort_selected['username']}>{$lang->sort_username}</option>
		</select>
		{$gobutton}
	</form>
	</td>
</tr>
</if>
Thanks Sven,

What if I skip using the plugin and just edit the template?

(2020-01-09, 11:03 AM).m. Wrote: SvePu has given exact code & suggested another plugin Smile

personally I prefer using template conditionals plugin &
SvePu's suggested code is also valid with this plugin.

Can't extract the conditionals plugin for some reason.
Reply
#7
Not Solved
(2020-01-09, 12:02 PM)SamSam Wrote: ...What if I skip using the plugin and just edit the template?

Without plugin code doesn't take effect.
Reply
#8
Not Solved
(2020-01-09, 12:12 PM)SvePu Wrote:
(2020-01-09, 12:02 PM)SamSam Wrote: ...What if I skip using the plugin and just edit the template?

Without plugin code doesn't take effect.

I understand that but can I change the code to something like

<if $mybb->usergroup['admin'] then>...

??

Honestly, not sure how it should looks like, just guessing.

(2020-01-09, 12:02 PM)SamSam Wrote: Can't extract the conditionals plugin for some reason.

Scratch that, something's not right with my PC. Blush
Reply
#9
Not Solved
(2020-01-09, 12:49 PM)SamSam Wrote: I understand that but can I change the code to something like

<if $mybb->usergroup['admin'] then>...

??
For only admins can see the list, you could add:
<if $mybb->usergroup['cancp'] then>...

(2020-01-09, 12:49 PM)SamSam Wrote:
(2020-01-09, 12:02 PM)SamSam Wrote: Can't extract the conditionals plugin for some reason.

Scratch that, something's not right with my PC. Blush

To uncompress plugin file you'll need a pc tool like 7-Zip
Reply
#10
Not Solved
Thanks guys again. At the end I went with the conditionals plugin. Had a quick look at this forum and found the right thing to put into the reputation template:

<if $GLOBALS['mybb']->user['usergroup'] == 4 then> 


... Whatever I wanted to get rid of...




</if>

Now it's visible only by the admin so it's cool. Mods are usergroup no 6 so I guess I can repeat the code again with different number.


Thanks again to both of you for your help!

Not back to the system that would add a positive rate to the poster automatically. To simply reward users for being active.

Isn't the NewPoints plugin a bit of overkill? Isn't there anything easier/smaller than that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)