vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Moderators & Private Request. (https://vborg.vbsupport.ru/showthread.php?t=34679)

Doogie 02-01-2002 03:29 AM

Hoping I'm not creating something that might already of been covered.

I host clan forums among other things, and now I've got the mod access masks hack going, it's fantastic!!! I don't have to edit access masks for every tom, dick and harriet who wants to be added to the private forums. The mods can do it.

But HOW can I bloody stop it so that it doesn't automatically add the moderators to each private forum I create?? With 120+ moderators, with one two-three who should see the forums, this makes for a lot of editing!!!

Hack No 2:

To be able to list the members who have access to a private forum. I've been asked for this many a time, but there is no way of doing it. I'm a php newbie, so it's beyond my ability :)

Martz 02-01-2002 10:36 AM

1) open admin/forum.php

Find:
PHP Code:

$mods=$DB_site->query("SELECT DISTINCT moderator.userid FROM moderator,user WHERE moderator.userid=user.userid AND user.usergroupid<>6 AND user.usergroupid<>5");
    if (
$DB_site->num_rows($mods)) {
      while (
$mod=$DB_site->fetch_array($mods)) {
        
$accessto[] = $mod['userid'];
      }
      while ( list(
$key,$userid)=each($accessto) ) {

  
$DB_site->query("INSERT INTO access(userid,forumid,accessmask) VALUES ('$userid','$forumid',1)");
      }
    }
  } 

Change to

PHP Code:

$mods=$DB_site->query("SELECT DISTINCT moderator.userid FROM moderator,user WHERE moderator.userid=user.userid AND user.usergroupid<>6 AND user.usergroupid<>5");
    if (
$DB_site->num_rows($mods)) {
      while (
$mod=$DB_site->fetch_array($mods)) {
        
$accessto[] = $mod['userid'];
      }
      while ( list(
$key,$userid)=each($accessto) ) {
// HACK - the line below is commented out to stop moderators getting custom access permissions for private forums.
//  $DB_site->query("INSERT INTO access(userid,forumid,accessmask) VALUES ('$userid','$forumid',1)");
      
}
    }
  } 


Hacking at this level is easy - the work is done already. Just try and understand the php and keep reading it, soon enough it will all become a little clearer.

To check if a user has access to a private forum, Flirefly or PPN has written a hack to display this.

Doogie 02-01-2002 10:51 AM

Much appreciated Martz... nice to see someone else supporting Unreal Tournament Clans. My forums are fairly much similar layout, but you've a lot more posts :)

http://forums.skankyflat.net

Cheers,
Doogie


All times are GMT. The time now is 01:40 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.01131 seconds
  • Memory Usage 1,732KB
  • 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
  • (3)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