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-16-2009 06:23 PM

Help! How to add User Access Restrictions on NON VB pages?
 
I wanted to know how i could use the access restrictions on non VB pages? Like if i have a role of "Paid User" and they have special access to certain forums, how could i also give them certain access to non VB pages that i might have?

Thank you!

V3.8.0

gct13 01-16-2009 06:42 PM

Using this mod could probably help you out:

https://vborg.vbsupport.ru/showthread.php?t=173693

BlackJacket 01-17-2009 10:32 AM

Where do i add this code?

PHP Code:

<?php 
if ($vbulletin->userinfo['usergroupid'] == '6' 
    { 
    echo 
"Have stuff for here"
             } else { 
             echo 
"You do not have permission for this page"; } 
    
?>

I tried but the webpage is still visable.

Thanks!

Dismounted 01-17-2009 11:47 AM

You must include global.php for the code to work.

BlackJacket 01-28-2009 01:46 AM

Quote:

Originally Posted by Dismounted (Post 1715638)
You must include global.php for the code to work.

I need help. I have been at this for hours and i still have not figured it out.

I want this page to only be displayed to moderators and administrators. But its not working when i try to input ANY of the php scripts included with that hack.

PLEASE HELP! :D:D

Thanks again

Lynne 01-28-2009 02:38 AM

Did you start from reading these articles - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.

You'll need to post some of your code if you want us to help you with it. Please use the code/html/php tags so it is easier to read.

BlackJacket 01-28-2009 02:44 AM

Quote:

Originally Posted by Lynne (Post 1726771)
Did you start from reading these articles - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.

You'll need to post some of your code if you want us to help you with it. Please use the code/html/php tags so it is easier to read.

yes and the only one that remotely worked was -

PHP Code:

if (!is_member_of($vbulletin->userinfo6) AND !is_member_of($vbulletin->userinfo7)) 

        
print_no_permission(); 


But it puts that huge login box in the middle of the page and its not even. I just want to block the page but have it look clean instead of a mess like it looked with the previously mentioned code.

:)

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

The main information that i do not want regular user's to see -

HTML Code:

<div class="box1">
                                        <div class="border-top">
                                            <div class="border-right">
                                              <div class="border-bot">
                                                  <div class="border-left">
                                                    <div class="left-top-corner">
                                                        <div class="right-top-corner">
                                                          <div class="right-bot-corner">
                                                              <div class="left-bot-corner">
                                                                <div class="inner2">
                                                                    <h2>Legend Guide</h2>
                                                                    <p>Welcome to the Moderator Control Panel.  More info will be posted soon as well as more tools.  The navigation links above (Garage, Forums, etc...) are not working yet.  Please
                                                                                                                                <a href="http://1320legend.com/index.php">click here</a> to go to the index or Garage.</p>
                                                                                                                                                                <p><a href="http://1320legend.com/community/forumdisplay.php?f=35" target="_blank">Click here</a> for Mod Lounge</p>
                                                                                                                                                                <p><a href="http://1320legend.com/community/modcp/index.php" target="_blank">Mod Control Panel for forum</a></p>
                                                                                                                                       
                                                            </div>
                                                        </div>
                                                      </div>
                                                  </div>
                                                </div>
                                            </div>
                                          </div>
                                      </div>
                                    </div>
                                </div>


Lynne 01-28-2009 03:16 AM

This code doesn't put any html on a page at all so I'm not sure what you are talking about:
PHP Code:

if (!is_member_of($vbulletin->userinfo6) AND !is_member_of($vbulletin->userinfo7))  
{  
        
print_no_permission();  



BlackJacket 01-28-2009 03:23 AM

Quote:

Originally Posted by Lynne (Post 1726800)
This code doesn't put any html on a page at all so I'm not sure what you are talking about:
PHP Code:

if (!is_member_of($vbulletin->userinfo6) AND !is_member_of($vbulletin->userinfo7))  
{  
        
print_no_permission();  



I was trying everything that this thread said to.

Lynne 01-28-2009 03:45 AM

Well, that article should just give you a basic vb page with the header and navbar up top and a footer at the bottom and whatever you put in the template in the middle. If you include the global.php page and then that no permission code you posted in your php page, it should restrict access to your page. It's hard to tell what is wrong without seeing the php code.


All times are GMT. The time now is 01:00 PM.

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.01651 seconds
  • Memory Usage 1,766KB
  • 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)bbcode_html_printable
  • (4)bbcode_php_printable
  • (3)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
  • (10)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