The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Enhanced Reputation Given Checks Details »» | |||||||||||||||||||||||||
This modification is no longer available or supported. This adds a set of extra checks for whenever members try and give reputation to posts. Reputation Power Cap Sets the maximum reputation giving power for any member. Higher Reputation Forum List Any reputation given in the forums listed will be multiplied by the "Higher Reputation Multiply Factor". Higher Reputation Multiply Factor See above : Forums in the "Higher Reputation Forum List" will have any reputation given multiplied by this factor. No Reputaion Forum List List of Forums in which members cannot give reputation to posts. Open Threads Limit Posts in open threads, that are older than this limit, cannot be given reputation. Closed Threads Limit Posts in closed threads, that are older than this limit, cannot be given reputation. Negative Reputation Multiply Factor All negative reputation is multiplied by this factor (by default vb sets negative reputation to half of positive reputation). Require Reputation Comment Members must leave a comment in order to give a post reputation. Points to note ;
History: v1.04 : Initial Public Release. v1.05 : Fixed zero reputation bug reported by sinaluna in Post #51. v1.06 : Minor changes, no update necessary. Show Your Support
|
Comments |
#92
|
||||
|
||||
Is there a vB 3.6.x version for this one?
|
#93
|
||||
|
||||
No, this works fine as is on 3.6
|
#94
|
|||
|
|||
If you want to continue to use the VB default of negative reputation counting only 1/2 as much as positive reputation, you need to change the Negative Reputation section of Reputation Checks (2) to the following:
Code:
// Negative Reputation // if ($reputation != 'pos') { $reppower *= $vbulletin->options['negrepfactor']; if ($reppower < 1 & $reppower > 0) { $reppower = 1; } $reppower *= -1; if (!($perms['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cannegativerep'])) $reppower = 0; } |
#95
|
||||
|
||||
I see no reason to need to change it, please explain.
|
#96
|
|||
|
|||
If you set the reputation modification factor to 0.5 (vb default) so negative reputation only counts 1/2 has much as positive reputation.
Let's say a users rep power is 1. Using your mod as it is, the following happens. 1st: reppower converted to a negative number (1 X -1) = -1 reppower 2nd: the negrepfactor is applied (-1 X 0.5) = -0.5 reppower So now the system tries to apply a -0.5 to the users reputation. Except for some reason, when applying -0.5 to a users reputation, VB rounds it to zero, so no negative reputation is actually given. I couldn't find any code that was causing it to round to zero, but for some reason that's what happens. It appears that when it actually assigns the points to the users total reputation, it only factors in whole numbers, and does not round them. So a reppower of 5.5 for example, only applies 5 points to the users total reputation. Therefore a reppower of 0.5 only applies 0 points to the users reputation. What is weird, if you view the reputation comments in admin, you'll see it rounds 4.5 to a whole number and displays it as 5. But if you look at the users profile, you'll see that it rounded it down and only applied 4 points to the reputation. So I took at look at the default negative rep code in functions_reputation.php to see how VB dealt with it by default (I'm writing this off the top of my head but I believe it went something like this): PHP Code:
|
#97
|
||||
|
||||
Thank you for the note, however, it works exactly as it was designed - there is/was no requirement for it to work exactly like default vbulletin - I won't be changing it.
If you set the factor to 0.5 then it will almost be the same, the two exceptions being (as you have found) if your positive rep power is 1, then your negative rep will be 0 (not -1). The other exception is already mentioned in the notes (fixed Admin rep power). I will add another note to point out this small difference. |
#98
|
|||
|
|||
That worked! Thank you very much as always bro. Much appreciated!
|
#99
|
|||
|
|||
And if you wrap that conditional around the one that displays rep, you can limit showing reputation scores only in the forums in which it can be earned.
|
#100
|
||||
|
||||
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|