Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by amykhar amykhar is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-28-2001 Last Update: Never Installs: 9
 
No support by the author.

It irked me to no end that when I added a new usergroup, they had access to all private forums if I wasn't careful. Thus, I wrote this.

It should also be useful for other things. With this field in the forum table, queries to exclude private forums are MUCH easier.

Do not download this attachment for new installs. Download this one

Show Your Support

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

Comments
  #2  
Old 11-29-2001, 05:23 PM
Tommy Boy Tommy Boy is offline
 
Join Date: Nov 2001
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you please explain in more details what this hack does?

I have a similar problem, that when I opened a new hidden forum, all people who had access to the first one also had access to the new one, and I don't like it. Will your hack help me?
Reply With Quote
  #3  
Old 11-29-2001, 05:40 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What it does is when you create a new private forum or make a forum private that wasn't private before, it sets a field in the database to mark it as private.

Then, when you create a new user group, it sets the forumpermissions to can't view for all private forums. This way, you can create a new group and not have them see your private forums by default.

I am not 100% sure, but cutting this code:

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)");
      }
    }
  } 
out of your forum.php file should fix your problem for NEW forums that you create. However, if you take an existing forum and make it private, the same thing would still happen. I will investigate the code for changing a forum a little closer and see if I can't get that fixed as well.

Amy
Reply With Quote
  #4  
Old 11-30-2001, 11:15 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just one thing.

Instead of this:
Code:
$tempGroupid=$DB_site->query_first("Select usergroupid from usergroup ORDER BY usergroupid DESC limit 1");
You can simply do this:
Code:
$tempGroupid=$DB_site->insert_id();
For more info:
http://www.php.net/manual/en/functio...-insert-id.php

Reply With Quote
  #5  
Old 11-30-2001, 11:37 AM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool. I learn something every day.

Amy
Reply With Quote
  #6  
Old 12-15-2001, 07:57 PM
DarkReaper DarkReaper is offline
 
Join Date: Oct 2001
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hm...ok. Lets say I have 2 private forums already, and all moderators and admins have access to it. I then create another private forum, but want the moderators for that one not to have access to the previous forum, and I don't want any existing moderators to have access to the forum I just created. Can I do this?
Reply With Quote
  #7  
Old 03-28-2002, 01:13 PM
Wayne2k1.com's Avatar
Wayne2k1.com Wayne2k1.com is offline
 
Join Date: Nov 2001
Location: Italy
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by DarkReaper
Hm...ok. Lets say I have 2 private forums already, and all moderators and admins have access to it. I then create another private forum, but want the moderators for that one not to have access to the previous forum, and I don't want any existing moderators to have access to the forum I just created. Can I do this?
Reply With Quote
  #8  
Old 03-09-2003, 09:15 PM
The Red Devil The Red Devil is offline
 
Join Date: Mar 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed the hack, but it dont work for me. Im using 2.3.0
Everything is added and I get no error messages, but the new usergroup's I make still got access to all "hidden" forums.

Wayne2k1.com: A quite fast and easy solution to your problem would be to make another usergroup and make that "moderators" too, then edit the settings on who got rights of the usergroups to view the different forums.
Reply With Quote
  #9  
Old 03-09-2003, 09:18 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a real oldie and I can't guarantee it works anymore. I don't use it because I don't install more usergroups.

Amy
Reply With Quote
  #10  
Old 03-10-2003, 04:12 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow this is an oldie but a lovely idea !

How do i miss these hacks ?

- miSt
Reply With Quote
Reply


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 02:47 PM.


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.04292 seconds
  • Memory Usage 2,299KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)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
  • (10)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_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