vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Help! How to add User Access Restrictions on NON VB pages? (https://vborg.vbsupport.ru/showthread.php?t=202031)

BlackJacket 01-28-2009 05:45 PM

Quote:

Originally Posted by Lynne (Post 1727414)
That would go into the template. Except, you aren't using a template are you. Ugh. OK, then back to php.... you will have to put a condition around all the html in your page that you don't want users to see and then another condition around the html in your page that you do want the users to see - like this:

PHP Code:

<?php

if (is_member_of($vbulletin->userinfo6) AND is_member_of($vbulletin->userinfo7))   
{   
?>
a bunch of html to only show to users in group 6 or 7
<?php

}  
?>

And then, when you have html that you only want to show to the non mods/admins:

PHP Code:

<?php

if (!is_member_of($vbulletin->userinfo6) AND !is_member_of($vbulletin->userinfo7))   
{   
?>
a bunch of html to only show to users NOT in group 6 or 7
<?php

}  
?>


lol thank you. I will try this now. :)

Lynne 01-28-2009 05:48 PM

I just changed the conditions you had used and shortened them in the post I made above.

BlackJacket 01-28-2009 05:51 PM

PHP Code:

<?php 

if (is_member_of($vbulletin->userinfo6) AND is_member_of($vbulletin->userinfo7))    
{    
?> 
a bunch of html to only show to users in group 6 or 7 
<?php 

}   
?>

This blocks content even from mods/admins.

Lynne 01-28-2009 06:54 PM

I made a post about how I changed that condition since it was wrong. Look at the post above yours and then at my original post with the conditions two posts above that.

BlackJacket 01-28-2009 07:23 PM

This worked great!

Thank you very, VERY VERY VERY VERY much Lynne. You really worked hard for just a regular user like me. Thank you very much. :)

Lynne 01-28-2009 07:32 PM

Glad you got it working!


All times are GMT. The time now is 10:25 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.01005 seconds
  • Memory Usage 1,736KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete