The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Give specific REP power to usergroups
Seeing there's no plugin that alters/changes a user or group's Reputation Power directly and instantly, I was wondering if someone could help me with this. I'm wanting to give a specific usergroup reputation power.
I found this: https://vborg.vbsupport.ru/showthread.php?t=98163 but I can't get it to work. Most likely (I assume) because it's meant for an older version of vBulletin, but I appreciate the help someone can give me. I know the "reputation power" is calculated, etc. But the forums reputation has been altered for our needs, and seeing the system is quite limited.. I'm forced to do other methods. Regards, Skyrider |
#2
|
||||
|
||||
Did you try just writing a plugin to use the reputation_power hook location? Something like:
PHP Code:
|
#3
|
|||
|
|||
I have tried that this morning, but that doesn't seem to work I'm afraid. The reputation of the user doesn't change at all. We have our "+" reputation completely disabled / removed. People can only give negative reputation. So if this code "only" works if a user in the group receives positive reputation for it to alter to the number in the plugin code, then I'm afraid I need another method.
I'm afraid the reputation function php code overrides the plugin one.. but I could be wrong. Appreciate the reply btw! |
#4
|
|||
|
|||
Quote:
Try this: @Lynne was very close. Thanks @Lynne Code:
if (is_member_of($vbulletin->userinfo, xx)) $reppower = yy; yy = Your reputation number Hook: reputation_power Note - This does not write to the database, it just alters the displayed information that gets sent to the template. |
#5
|
|||
|
|||
Quote:
I really need specific usergroups to have a specific certain of rep power that works with when they are repping people. If a hook won't do the trick, then maybe I need to try something within the functions_reputation.php regarding the administration rep power that will also affects specific groups as also been used here: https://vborg.vbsupport.ru/showthread.php?t=98163 Same link as I've posted in the first post. Thanks for all the help thus far! Regards, Skyrider |
#6
|
|||
|
|||
What version of vBulletin, PHP?
Show your plugin code here. Something is wrong, or you have another modification interfering. I tested the code above before I posted it. (Of course there is always bizarre circumstances.) Do you have any other reputation mods loaded? |
#7
|
|||
|
|||
Using vBulletin 4.2.1, PHP 5.2.17
Code: Code:
if (is_member_of($vbulletin->userinfo, 27)) $reppower = 123; Running the following reputation mods: (reputation wise). - Enhanced Reputation Checks - https://vborg.vbsupport.ru/showthread.php?t=231790 - Extended reputation display - https://vborg.vbsupport.ru/showthread.php?t=231876 Disabled them, but no effect. Rep power is still the same. |
#8
|
|||
|
|||
Try placing the code in 'functions_reputation.php' right after the hook around line #77. This is very simple code it should work.
Code:
if (is_member_of($vbulletin->userinfo, 6)) $reppower = 66; |
#9
|
|||
|
|||
It's very weird, but not even that seems to work. That's odd, because I'm also using:
Code:
($hook = vBulletinHook::fetch_hook('reputation_power')) ? eval($hook) : false; $reppower *= 2; return $reppower; Of which that works, and is giving every user reputation power of 2. Of which I want for everyone to start off with. But if I even add a if / else like I've done yesterday, or temp-disabled reppower 2 and used your line before and even tried after the return $reppower; (around line 77) code. It refuses to alter/change the rep power of that specific group. Final code: Code:
($hook = vBulletinHook::fetch_hook('reputation_power')) ? eval($hook) : false; if (is_member_of($vbulletin->userinfo, 27)) $reppower = 123; return $reppower; |
#10
|
|||
|
|||
What version of vBulletin are you running?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|