vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Administrative and Maintenance Tools - Enhanced Reputation Checks (https://vborg.vbsupport.ru/showthread.php?t=133775)

Paul M 05-21-2007 06:45 PM

Huh ?

Xorlev 07-17-2007 05:34 PM

Any possibility of a comma delimited list preventing certain users from using negrep?

Paul M 07-17-2007 10:58 PM

You can use usergroup permisions to control that.

h2ojunkie 07-21-2007 02:32 AM

In the previous version of this mod, I made a slight change to restore the way vb default handles negative rep if the users rep power is only 1

As stated in your notes, if a user has a rep power of 1, this mod causes their negative rep power to be 0

In the last version of this mod I made a simple change to allow users with a rep power of 1 to give a negative rep of -1 when the negative modify factor was 0.5

PHP Code:

// Negative Reputation //
if ($reputation != 'pos')
{
    
$reppower *= $vbulletin->options['negrepfactor'];
    if (
$reppower $reppower 0)
    {
        
$reppower 1;
    }
    
$reppower *= -1;
    if (!(
$perms['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cannegativerep'])) $reppower 0;


But for the life of me, I can't manage to figure out what to modify to get the same functionality out of this new version.

Any chance of pointing me in the right direction?

Paul M 07-21-2007 06:51 PM

Untested, but this might work ;

Replace ;
PHP Code:

if ($repneg)
{
    
$score intval($nfactor*$score);



With ;
PHP Code:

if ($repneg)
{
    if (
$nfactor and $score == 1
    {
        
$score 1;
    }
    else
    {
        
$score intval($nfactor*$score);
    }



h2ojunkie 07-21-2007 08:06 PM

Thanks Paul...that put me on the right track.

A couple minor tweaks and I got it working:

PHP Code:

if ($repneg

    if ((
$nfactor and $nfactor 0) and $score == -1)  
    { 
        
$score = -1
    } 
    else 
    { 
        
$score intval($nfactor*$score); 
    } 



Salazar 08-14-2007 02:15 PM

Sounds interesting. :)

Question: Are administrators exempted from those checks? Example: If I set the open thread limit to 1 week are admistrators able to rate older threads as well? Can they rate postings in forums which are on the disallow list?

Paul M 08-14-2007 08:20 PM

Administrators are not exempt.

Salazar 08-15-2007 10:30 AM

Thank you for the clarification Paul M.

I was hoping your answer would be different though. ;)

DDIG 12-15-2007 09:04 AM

Installed, thanks a lot!


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01133 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete