vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   User selectable Usergroup in Control Panel (https://vborg.vbsupport.ru/showthread.php?t=120882)

cddw.ltd 07-11-2006 09:10 AM

User selectable Usergroup in Control Panel
 
Basically we have a new forum, and want to give users the choice wether or not they see a paticular section of the forum.

I would like it as default yes.

So ideally the users default group would be

"Registered Users."

Then I want to give them the option in the UserCP to disable a part of the forum by joining an additional group called "disable_xxx forum."

Anyone know how to do this? Would the primary usergroup override the secondary though? If so, it may have to be to change the primary usergroup between

"Registered Users" and "Registered Users XXX disabled"

etc.

Any help much appreciated.
Thanks :)

wnorris 07-11-2006 09:26 AM

no... if a user is in a group which displays a given forum, there is no way to have them join a group to hide that forum. When calculating permissions, it combines all the groups the user is in, and if any of them have "yes" for a given item then it evaluates as "yes". The best approach would be to create a secondary group that can view this forum and have the user leave the group if they don't want to see that particular forum. In order to auto-join the user to that group when they register, you'd need to create a plugin that is hooked at account creation and take advantage of the user data manager to add the group (I think it supports groups anyway).

cddw.ltd 07-11-2006 09:29 AM

So theres no hack to let a user switch their primary usergroup then?

wnorris 07-11-2006 04:37 PM

well I'm sure there is, but that doesn't scale very well. What if you have multiple of these special permission groups? That doesn't work if you have the user changing their primary group.

cddw.ltd 07-11-2006 07:08 PM

I've been looking at the idea since.

it would acctually be a choice between two secondary groups.
One group will allow access,
Other group won't allow access.

wnorris 07-12-2006 04:41 PM

wouldn't that just be the same as having single secondary group that allows access? If the user doesn't want to see that part of the boards, they simply leave the group... no need to have them join another group to hide it.


All times are GMT. The time now is 04:20 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.01054 seconds
  • Memory Usage 1,714KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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