vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   whats the code to not let guests view certain things (https://vborg.vbsupport.ru/showthread.php?t=131473)

salata 11-13-2006 04:21 PM

whats the code to not let guests view certain things
 
if i wanted to restrict access to guests what code do i use?

Kirk Y 11-13-2006 04:56 PM

Code:

<if condition="$show['guest']">You're a guest!</if>

salata 11-19-2006 04:48 AM

i meant if i didnt want them to see...i wrapped it around a link in the navbar and it shows for guests only, i didnt want it to show for guests

Kirk Y 11-19-2006 04:55 AM

Code:

<if condition="!$show['guest']">You're not a guest!</if>

Paul M 11-19-2006 09:28 AM

..... or more correctly ;)

Code:

<if condition="$show['member']">You're a member, not a guest</if>

salata 11-19-2006 04:43 PM

thanks guys.

one another question, can i just show the link but do not give them access to it. and have the login page come up? what code must i use, i'm using hacks like vbradio with there is no permission settings. thanks in advanced

Josh1 11-19-2006 10:56 PM

Quote:

Originally Posted by salata (Post 1120899)
thanks guys.

one another question, can i just show the link but do not give them access to it. and have the login page come up? what code must i use, i'm using hacks like vbradio with there is no permission settings. thanks in advanced

You could try opening the page you don't want to see and adding that php wrap around it or denying them access if its a addon/modification under ACP I guess..

Ntfu2 11-20-2006 05:04 PM

Quote:

Originally Posted by salata (Post 1120899)
thanks guys.

one another question, can i just show the link but do not give them access to it. and have the login page come up? what code must i use, i'm using hacks like vbradio with there is no permission settings. thanks in advanced

At the top of the vbradio template add

Code:

<if condition="$show['member']">
At the very end of the template
Code:

<else />
You must register to use this functions, please <a href="register.php" target="_blank" rel="nofollow">Register</a> for free first!<br />
</if>


Kirk Y 11-20-2006 06:31 PM

It'd be better if you just used a Permissions error via a file edit. Stick this near the top of the file, on it's own line.

Code:

if ($vbulletin->userinfo['userid'] == 0)
{
    print_no_permission();
}



All times are GMT. The time now is 10:40 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.01002 seconds
  • Memory Usage 1,726KB
  • 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
  • (6)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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