Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 01-16-2009, 06:23 PM
BlackJacket's Avatar
BlackJacket BlackJacket is offline
 
Join Date: Nov 2008
Location: 070108111114105100100
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 01-16-2009, 06:42 PM
gct13 gct13 is offline
 
Join Date: Jan 2005
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using this mod could probably help you out:

https://vborg.vbsupport.ru/showthread.php?t=173693
Reply With Quote
  #3  
Old 01-17-2009, 10:32 AM
BlackJacket's Avatar
BlackJacket BlackJacket is offline
 
Join Date: Nov 2008
Location: 070108111114105100100
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #4  
Old 01-17-2009, 11:47 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You must include global.php for the code to work.
Reply With Quote
  #5  
Old 01-28-2009, 01:46 AM
BlackJacket's Avatar
BlackJacket BlackJacket is offline
 
Join Date: Nov 2008
Location: 070108111114105100100
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
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!

Thanks again
Reply With Quote
  #6  
Old 01-28-2009, 02:38 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 01-28-2009, 02:44 AM
BlackJacket's Avatar
BlackJacket BlackJacket is offline
 
Join Date: Nov 2008
Location: 070108111114105100100
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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>
Reply With Quote
  #8  
Old 01-28-2009, 03:16 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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();  

Reply With Quote
  #9  
Old 01-28-2009, 03:23 AM
BlackJacket's Avatar
BlackJacket BlackJacket is offline
 
Join Date: Nov 2008
Location: 070108111114105100100
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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.
Reply With Quote
  #10  
Old 01-28-2009, 03:45 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

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:09 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.04231 seconds
  • Memory Usage 2,263KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_html
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete