vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Advanced Warning System (AWS) (https://vborg.vbsupport.ru/forumdisplay.php?f=105)
-   -   bug.... I think (https://vborg.vbsupport.ru/showthread.php?t=82795)

luck777jojo 06-10-2005 03:37 AM

bug.... I think
 
on my forums we have several supermoderator and moderator groups. When changing the options I have set the appropriate supermod and mod groups into the fields all seperated by a | like it said.

The problem starts there, one of our supermod groups has a userid of 23, so when I add 23 to the field of supermod user ids the mods can no longer warn regular members (userid 2) I have set the settings correctly as far as I can tell however it seems that the hack (while recognizing the usergroup 23 as supermods) also thinks that usergroup 2 cannot be warned by anyone lower than admins.

when I remove that usergroup everything is once again fine.

sv1cec 06-10-2005 04:30 AM

Yes, there seems to be a bug in the instructions for the file includes/functions_showthread.php. It's located in that part of the code, which decides if the Warn XYZ button and View XYZ's Warnings button will be shown. It's not that you can't alert the user, it's that the buttons do not show.

Until a better fix is provided, in the next version, please use the following:

Open includes/functions_showthread.php and find:

PHP Code:

        $useradmin preg_match("/^(.*|)?$bbuserinfo[usergroupid](|.*)?$/",$vboptions['warn_admingroups']);
        
$postadmin preg_match("/^(.*|)?$post[usergroupid](|.*)?$/",$vboptions['warn_admingroups']);

        
$usermod preg_match("/^(.*|)?$bbuserinfo[usergroupid](|.*)?$/",$vboptions['warn_modgroups']);
        
$postmod preg_match("/^(.*|)?$post[usergroupid](|.*)?$/",$vboptions['warn_modgroups']);

        
$usersmod preg_match("/^(.*|)?$bbuserinfo[usergroupid](|.*)?$/",$vboptions['warn_smodgroups']);
        
$postsmod preg_match("/^(.*|)?$post[usergroupid](|.*)?$/",$vboptions['warn_smodgroups']); 

Replace that with:

PHP Code:

                $admgroups=explode("|",$vboptions['warn_admingroups']);
        
$modgroups=explode("|",$vboptions['warn_modgroups']);
        
$smodgroups=explode("|",$vboptions['warn_smodgroups']);
        
        if(
$admgroups[0])
        {
            foreach(
$admgroups as $adm)
            {
                if (
$adm==$bbuserinfo['usergroupid'])
                {
                    
$useradmin=1;
                }
            }
        }
        if(
$modgroups[0])
        {
            foreach(
$modgroups as $mod)
            {
                if (
$mod==$bbuserinfo['usergroupid'])
                {
                    
$usermod=1;
                }
            }
        }
        if(
$smodgroups[0])
        {
            foreach(
$smodgroups as $smod)
            {
                if (
$smod==$bbuserinfo['usergroupid'])
                {
                    
$usersmod=1;
                }
            }
        }
        
        if(
$admgroups[0])
        {
            foreach(
$admgroups as $adm)
            {
                if (
$adm==$post['usergroupid'])
                {
                    
$postadmin=1;
                }
            }
        }
        if(
$modgroups[0])
        {
            foreach(
$modgroups as $mod)
            {
                if (
$mod==$post['usergroupid'])
                {
                    
$postmod=1;
                }
            }
        }
        if(
$smodgroups[0])
        {
            foreach(
$smodgroups as $smod)
            {
                if (
$smod==$post['usergroupid'])
                {
                    
$postsmod=1;
                }
            }
        } 

Please apply the same change in the file member.php

Let me know if everything works now.

Rgds and tnx



Update

Please check the sticky thread, I created with instructions on how to permanently fix the problem. If you have used the above instructions, first reverse them and then apply the correct ones. If you have a problem, please let me know.

luck777jojo 06-13-2005 04:25 PM

thnx the full fix in the sticky works just fine :D

sv1cec 06-14-2005 02:16 PM

Glad I didn't cause much of a problem.

Rgds


All times are GMT. The time now is 11:42 PM.

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.01486 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete