vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Allowing Users Access to ONLY One Sub-Forum (https://vborg.vbsupport.ru/showthread.php?t=285249)

darkwise 07-06-2012 01:39 AM

Allowing Users Access to ONLY One Sub-Forum
 
Good afternoon fellas,

I have hit a wall in trying to set this up.

Obviously when new users sign up to a vb4 site, they have access to all of the normal forums and sub-forums (except for private/restricted ones). I am trying to create a KIDS usergroup, that ONLY has access to a single sub-forum, called KIDS. I do not want them to see any other forum posts outside of the KIDS sub-forum.

I do not want to manually go through and edit the forum/sub-forum permissions on the scores of existing subs, restricting access to KIDS. If I do it this way, any time we create a new sub-forum in the future, we have to once again worry about remembering to restrict KIDS from it, and sooner or later, we will forget, and the KIDS will see adult signatures, swearing, chicks in bikinis, etc... We want to avoid this type of maintenance.

Do any of you have any idea of how to allow an entire USERGROUP access to only a SINGLE SUB-FORUM, and NO other FORUMS on the site?

Very appreciated,

https://vborg.vbsupport.ru/external/2012/07/51.jpg

Simon Lloyd 07-06-2012 02:39 AM

If you only want the kids to EVER see one forum (other than when they aren't logged in but thats another permission story) then put this in your header template right at the very top
HTML Code:

<vb:if condition="$bbuserinfo['usergroupid'] == X AND $forum[forumid] != X">
<meta HTTP-EQUIV="REFRESH" content="0; url=PUT YOUR KIDS FORUM URL HERE">
</vb:if>

Change usergroupid X for your kids usergroup number and forumid X for the forum they CAN see, then put the url of the forum you want them to be able to see, should be good to go :)

darkwise 07-06-2012 10:08 AM

Thanks Simon, I will try this today. I appreciate the feedback very much!

--------------- Added [DATE]1341600456[/DATE] at [TIME]1341600456[/TIME] ---------------

Hey there Simon,

I created usergroup KIDS (ID 19) and sub-forum KIDS [ID 88], created a user called KidsTest who was assigned to usergroup KIDS only. I added the changes below to the very top of my header and saved it. Upon logging in for the very first time, the KidsTest account still sees every single forum and sub. I have tried it with and without tic marks around the 19 and 88, and it makes no difference.

The code I used:

<vb:if condition="$bbuserinfo['19'] == X AND $forum['88'] != X">
<meta HTTP-EQUIV="REFRESH" content="0; url=https://www.og13.com/forums/forumdisplay.php?88-Kids-Customs">
</vb:if>

Anything thoughts?

Thanks!

Anthony

Simon Lloyd 07-07-2012 01:40 AM

It should be this!!!
HTML Code:

<vb:if condition="$bbuserinfo['usergroupid'] == 19 AND $forum[forumid] != 88">
<meta HTTP-EQUIV="REFRESH" content="0; url=https://www.og13.com/forums/forumdisplay.php?88-Kids-Customs">
</vb:if>


darkwise 07-07-2012 07:39 PM

That code did the trick, but...

It refreshes that page over and over, from Firefox, Internet Explorer, and Chrome. I even created a test thread inside of the KIDS sub-forum, and when the KidsTest login enters the thread, it immediately kicks back out to the KIDS sub-forum root folder and auto-refreshes eternally. Does it have anything to do with the REFRESH command in the code?

I am sending you the username and password in email, so that you can login and see what I am, IF you do not mind. :)

Thanks,

Anthony


All times are GMT. The time now is 09:50 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.01674 seconds
  • Memory Usage 1,724KB
  • 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_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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