PDA

View Full Version : What code do i use to hide links from guests?


993ti
05-18-2006, 03:12 PM
With phpBB i can use $userdata['session_logged_in'] in php files and <!-- BEGIN switch_user_logged_in --> in template files to hide certain links and images for guests.
I'd like to do that to my VBulletin board too.
What code do i use to do that?

Thanks in advance.

Logikos
05-20-2006, 07:38 AM
In the templates you would use this condition..

<if condition="!$show['guest']">I'm a registered User</if>
<if condition="$show['guest']">I'm a Guest</if>


In the file you would use..

if (!$show['guest'])
{
//I'm a registered User
}

if ($show['guest'])
{
//I'm a guest
}

Paul M
05-20-2006, 07:42 AM
You can also use $show['guest'] - this is set to true for guests, false for members.

Logikos
05-20-2006, 08:03 AM
forgot that was a global variable. Updated my post for you.

993ti
05-20-2006, 03:27 PM
Thanks guys :)
I'm new to VB so i'm still learning the basic things.

Logikos
05-20-2006, 03:31 PM
No problem buddy. When your stuck and need help just post another thread and we'll see what we can do. :)

ggiersdorf
07-24-2006, 10:21 PM
is there a mod to hide links and images from non registered users? This is not a mod or instructions how to hide them.

Kirk Y
07-24-2006, 10:25 PM
You can use this to hide links:
https://vborg.vbsupport.ru/showthread.php?t=99918

I've never seen anything to hide images, though.

yemenm7bh
04-02-2007, 06:03 AM
Does anyone know how I can get links in threads to be hidden from members until the they reply? I have hide hack but the link comes up as plain text and can not be clicked on. Any suggestions?

Thanks