Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2012, 02:39 AM
darkwise darkwise is offline
 
Join Date: Jul 2012
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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,

Reply With Quote
  #2  
Old 07-06-2012, 03:39 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 07-06-2012, 11:08 AM
darkwise darkwise is offline
 
Join Date: Jul 2012
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 07-07-2012, 02:40 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #5  
Old 07-07-2012, 08:39 PM
darkwise darkwise is offline
 
Join Date: Jul 2012
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
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 05:29 AM.


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.03617 seconds
  • Memory Usage 2,202KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete