Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
Enhanced Reputation Given Checks Details »»
Enhanced Reputation Given Checks
Version: 1.06, by Paul M Paul M is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.x Rating:
Released: 11-28-2005 Last Update: 05-14-2006 Installs: 117
 
No support by the author.

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 ;
  • If a member does not have permission to give negative reputation then any negative reputation they give will be set to zero - in default vb they ended up giving positive reputation.
  • The vb fixed admin reputation setting is multiplied by the negative reputation factor - in default vb it was the same value for both positive & negative, while everyone elses negative was half the positive value.
  • If the negative reputation factor is 0.5 (to replicate default vb) then there will be one minor difference, a member whose positive reputation power is 1 will have a negative reputation power of 0, in default vb this would be -1.
  • The reputation cap is checked before any multiplication factors are applied - also the Forum Multiply and Negative Multiply are cumulative (e.g. if the cap is 40, and you have a forum multiply of 3, and a negative multiply of 2, a member could give a rep of -40 * 3 * 2 = -240).


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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 10-30-2006, 09:08 AM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a vB 3.6.x version for this one?
Reply With Quote
  #93  
Old 10-30-2006, 11:03 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, this works fine as is on 3.6
Reply With Quote
  #94  
Old 11-05-2006, 03:18 AM
h2ojunkie h2ojunkie is offline
 
Join Date: Sep 2004
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
}
I've only tested this on vb 3.6.2, so I'm not sure if it still applies for older versions
Reply With Quote
  #95  
Old 11-05-2006, 09:45 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see no reason to need to change it, please explain.
Reply With Quote
  #96  
Old 11-05-2006, 08:56 PM
h2ojunkie h2ojunkie is offline
 
Join Date: Sep 2004
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
    $reppower $reppower/2
    
if ($reppower 1)
    {
        
$reppower 1;
    }
    
$reppower *= -1
So I took that and applied the same idea to your code except I added "greater than 0" condition because without it a person with a reppower of 0 would still be able to give negative rep to other members.
Reply With Quote
  #97  
Old 11-05-2006, 09:20 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #98  
Old 11-07-2006, 10:41 AM
Guest210212002
Guest
 
Posts: n/a
Default

That worked! Thank you very much as always bro. Much appreciated!
Reply With Quote
  #99  
Old 12-03-2006, 08:13 PM
Phrost Phrost is offline
 
Join Date: Jul 2003
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by zylstra View Post
<if condition="$show['ratablelink']">

[/CODE]into the postbit template.
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.
Reply With Quote
  #100  
Old 12-11-2006, 11:58 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Eagle Creek View Post
Is there a vB 3.6.x version for this one?
There is now ;

https://vborg.vbsupport.ru/showthread.php?t=133775
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:34 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14605 seconds
  • Memory Usage 2,297KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete