REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rep Fuck Button Information | Troubleshooting | Editing | Download!
#1
I did NOT create the rep fuck button. It was originally created by Boxxy!

Instructions for Clean/New Installation:

1. Download the ZIP archive below; extract it.

2. Upload repfuck.php to the ROOT of your website. (i.e. "/")

3. Open reputation.php and make the following modifications:

Code:
AFTER:

$delete_button = "<input type=\"submit\" name=\"delete\" value=\"{$lang->delete_vote}\" />";

ADD:

if(!in_array($mybb->user['usergroup'], array('3','4',)))
{
        $repfuckbutton = "";
}else{
    $repfuckbutton = "<form action=\"repfuck.php?uid=".$_GET['uid']."\" method=\"post\"><input type=\"submit\" name=\"RepFuck\" value=\"RepFuck\" />";
}

Code:
AFTER:

$delete_button = '';

ADD:

if(!in_array($mybb->user['usergroup'], array('1', '2', '3','4',)))
{
        $repfuckbutton = "";
}else{
    $repfuckbutton = "<form action=\"repfuck.php?uid=".$_GET['uid']."\" method=\"post\"><input type=\"submit\" name=\"RepFuck\" value=\"RepFuck\" />";
}

4. Now in your admin control panel, navigate to the Templating area. Make your way to:
REPUTATION TEMPLATES > REPUTATION_ADD

In that template:

Code:
AFTER:

</form>

ADD:

                {$repfuckbutton}
            </div>

You're done! Please note that the default settings for rep fuck permissions are set to super moderators, and administrators. To change this, look at the above code, and where you see: array('3','4',))), just add or remove groups by usergroup ID. You will also have to do this in repfuck.php

I don't want the script to leave a neutral, negative, or any reputation at all when rep fucking. To do the same, just open up repfuck.php and take this line out:

Code:
$db->query("INSERT INTO `".TABLE_PREFIX."reputation` (`uid`, `adduid`, `reputation`, `dateline`, `comments`) VALUES ('".$useruid."', '".$mybb->user['uid']."', '-25', '".TIME_NOW."', 'Congratulations, you have been repfucked.')"); //Inserts a -25 reputation

If you'd like to edit the comment that the left reputation has, edit the part of the line you see below in repfuck.php that says 'Congratulations, you have been repfucked.'

Code:
$db->query("INSERT INTO `".TABLE_PREFIX."reputation` (`uid`, `adduid`, `reputation`, `dateline`, `comments`) VALUES ('".$useruid."', '".$mybb->user['uid']."', '-25', '".TIME_NOW."', 'Congratulations, you have been repfucked.')"); //Inserts a -25 reputation

If you'd like to edit the amount of negative reputation that is given at the time of repfuck, edit the '-25' in this line which is also located in repfuck.php.

Code:
$db->query("INSERT INTO `".TABLE_PREFIX."reputation` (`uid`, `adduid`, `reputation`, `dateline`, `comments`) VALUES ('".$useruid."', '".$mybb->user['uid']."', '-25', '".TIME_NOW."', 'Congratulations, you have been repfucked.')"); //Inserts a -25 reputation

If you'd like to have a link to rep fuck in the Mod Options on each users profile like this: [Image: 9GFySq.png] then follow these instructions.

1. Navigate to the templating area in the admin cp. Then go to Member Templates.

2. Open "member_profile_modoptions"

3. Where you see:
Code:
<li><a href="{$mybb->settings['bburl']}/modcp.php?action=banuser&amp;uid={$uid}">{$lang->ban_in_mcp}</a></li>

ADD UNDER IT:

Code:
<li><a href="/repfuck.php?uid={$uid}">Rep Fuck</a></li>

Congratulations! You've installed the rep fuck button!

If you have any questions or problems, post below, and I'll do my best to answer.

Screenshots:

[Image: 3BUtH8.png]

[Image: kqx4cS.png]

[Image: 9GFySq.png]


Attached Files
.zip   Rep Fuck Button.zip (Size: 1.7 KB / Downloads: 205)
Reply
#2
Very nice man.

going to implement this now.
Reply
#3
(Oct 30, 2011, 10:05 PM).png Wrote: Very nice man.

going to implement this now.

Glad you like it. Let me know if you need help.
Reply
#4
Will rep fucking delete all their rep?
Reply
#5
(Nov 02, 2011, 05:24 PM)Mebes Net Wrote: Will rep fucking delete all their rep?

This deletes all positive rep.
Reply
#6
Is there a method of assigning this feature to the owner only?
I don't wish to have my moderators and Administrators abusing this feature.
Anyway, I appreciate the share!
Reply
#7
(Nov 29, 2011, 04:27 PM)uzi Wrote: Is there a method of assigning this feature to the owner only?
I don't wish to have my moderators and Administrators abusing this feature.
Anyway, I appreciate the share!

You'd have to make a core code edit, or the easier way is to make a hidden group called Owner or founder or whatever, and then only enable for that group.
Reply
#8
Wow! Awesome! Big Grin
Thanks for releasing this. Tongue
Reply
#9
No problem, but you shouldn't have the rep fuck button since you're not a subscriber.
Reply
#10
I love this plugin lol. The moment I set it up I had to use it :p
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Release] RepFuck Button Oliver Evans 140 61,085 Jun 29, 2017, 06:08 PM
Last Post: juv3
  Looking for the upgrade button D1LeX 2 2,675 May 15, 2014, 05:38 PM
Last Post: Kornox
  [REQUEST] Rep fuck button. KyleFYI 12 5,983 Sep 26, 2011, 11:53 PM
Last Post: F4T4L 3RR0R

Forum Jump:


Users browsing this thread: 1 Guest(s)