Log in

View Full Version : Possible to turn off "Sign Up" link in global site nav


Verbose
10-12-2007, 05:23 PM
Hi there,

I am using a site-wide header.ssi file on all pages of my site, including at the top of my vBulletin forum - this header.ssi contains my site logo and global site nav, and also a "Sign Up" link that leads to the vBulletin Sign Up page (/forums/register.php).

Question:
Is is possible to hide the global "Sign Up" link in my header.ssi file after a user has logged into vBulletin using CSS or javascript or something???

The reason being, it is confusing to display this Sign Up link to users who are already signed up! :)

Thanks!

Dismounted
10-13-2007, 04:15 AM
As it is a Server Side Include, and not PHP that cannot be done. Unless you have two files, one with and one without the link, then use PHP to select which file to include. Then, you might as well convert the whole thing to PHP.

Awjvail
10-13-2007, 06:01 AM
I doubt this will work, but its a start:

<?php
If ($vbulletin->userinfo['userid']!=0)
{
echo "logged in link here";
} else {
echo "register link here";
}
?>

Dismounted
10-13-2007, 07:17 AM
He's using a server side include file (SSI) so PHP will not work in them.

Verbose
10-15-2007, 07:37 PM
Hi Dismounted, actually I have my server setup to parse PHP inside of .html pages too... so I can run PHP code inside my SSI files without issues.

The .ssi in the filename is just he naming convention I've always used... but it could also be header.php just the same.

--------------- Added 1192480701 at 1192480701 ---------------

I doubt this will work, but its a start:

<?php
If ($vbulletin->userinfo['userid']!=0)
{
echo "logged in link here";
} else {
echo "register link here";
}
?>

Thanks Awjvail, I'll give this a try. :)