vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   [RELEASE v2.x.x] Moderators Being able to control Accessmasks via MODCP (https://vborg.vbsupport.ru/showthread.php?t=27724)

merk 09-11-2001 10:55 AM

normal mods wouldnt see any forums, if they wernt in the moderator group, and even sometimes wouldnt show up at all.

simple SQL fix.

find
PHP Code:

maketableheader("Forum List");
//MODIFIED CODE//
if($bbuserinfo[usergroupid]==7){
  
$forumlist=$DB_site->query("SELECT forum.*,moderator.userid,moderator.forumid FROM forum,moderator WHERE moderator.forumid=forum.forumid AND forum.allowmodaccess=1 AND moderator.userid=$bbuserinfo[userid] ORDER BY forum.title");
} elseif(
$bbuserinfo[usergroupid]==OR $bbuserinfo[usergroupid]==6) {
$forumlist=$DB_site->query("SELECT * FROM forum WHERE forum.allowmodaccess=1 ORDER BY forum.title");
}

//UNMODIFIED CODE// 

replace with

PHP Code:

maketableheader("Forum List");
///modified code
if($bbuserinfo[usergroupid]==OR $bbuserinfo[usergroupid]==6) {
    
$forumlist=$DB_site->query("SELECT * FROM forum WHERE forum.allowmodaccess=1 ORDER BY forum.title");
}
else {
    
$forumlist=$DB_site->query("SELECT moderator.userid,forum.title FROM moderator,forum WHERE moderator.forumid=forum.forumid AND moderator.userid=$bbuserinfo[userid] AND forum.allowmodaccess=1 ORDER BY forum.title");
}
//end modify 


Pie'oh'pah 09-11-2001 12:55 PM

Hi there,

thanx again for this hack.

There is one problem I have though:

The Option 'List Users Access per Forum' leads to a blank screen, while the 'Access Granting For Forums' Option works perfectly

Any hints?

-Alex

Pie'oh'pah 09-11-2001 01:45 PM

And one more thing i noticed:

if a forum has subforums and the the moderator is only moderator of the subforums by inharitance, this mod will not be able to modify the subforums specifically.

-Alex

merk 09-12-2001 07:36 AM

Good point, not that i really care about that much, it is a point.

If you want to go ahead and try and fix it, best bet would most probably be something along the lines of

looking for a forum with the forumid of XX, or looking for the forum with parentid CONTAINING XX. probably too complex for what i wrote the script for, but hey, if you want to fix it all up... ;)

Scott MacVicar 09-12-2001 05:48 PM

I have been using a hack similar to this for the past couple of months. But I also have the edit access masks as part of the UserGroup Permissions.

The inheritance also works for my version. I would have to try and remember what I done as I never bothered documenting it when i done it.

If anyone wishes it I will post it.

DarkReaper 09-13-2001 12:37 AM

Quote:

Originally posted by PPN
I have been using a hack similar to this for the past couple of months. But I also have the edit access masks as part of the UserGroup Permissions.

The inheritance also works for my version. I would have to try and remember what I done as I never bothered documenting it when i done it.

If anyone wishes it I will post it.

Please post it! :)

The Prohacker 09-13-2001 01:15 AM

I am reposting the text file, with the updated code, and I have added the sql query you should execute to create this field.....

merk 09-13-2001 05:57 AM

Thanks heaps Prohacker.

I couldnt be bothered making one :)

Pie'oh'pah 09-15-2001 03:53 PM

Quote:

Originally posted by merk
Good point, not that i really care about that much, it is a point.

If you want to go ahead and try and fix it, best bet would most probably be something along the lines of

looking for a forum with the forumid of XX, or looking for the forum with parentid CONTAINING XX. probably too complex for what i wrote the script for, but hey, if you want to fix it all up... ;)

That is ok, man.

Regarding the other prob, displaying blank screen when 'List Users Access per Forum'.... anything??

-Alex

Scott MacVicar 09-15-2001 06:06 PM

This is the version i have been using on my forums for past couple of months.

Editing access masks is added to the find feature within /mod/user.php it follows same principles as the ban mod features. People with admin and super mod privledges for the usergroup can edit all forum access masks.

If someone is a moderator by inheritance they can also edit all the forums they are entitled to.

Hope this helps some people.


All times are GMT. The time now is 08:44 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.01337 seconds
  • Memory Usage 1,748KB
  • 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
  • (2)bbcode_quote_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