![]() |
Hidden register button Trouble
I am having trouble with this mod I am making and I dont understand why it is happening..
this is what I am doing: add to phpinclude: //regbutton $regbutton=""; if ($bbuserinfo['userid']<"1") { $regbutton="<a href="register.php?s=$session[sessionhash]&action=signup"><img src="darkblue/top_register.gif" alt="Registration is free!" border="0"></a>"; } //end and adding $regbutton to the header instead of: <a href="register.php?s=$session[sessionhash]&action=signup"><img src="darkblue/top_register.gif" alt="Registration is free!" border="0"></a> and I am getting Parse error: parse error in global.php(274) : eval()'d code on line 10 |
what are you attempting to do, hide it from everyone but the admin or hide it to anyone thats registerd?.
|
If your trying to hide it from anyone who's registered, it's been done by SaintDog:
http://www.vbulletintemplates.com/mo...light=register |
FWIW you have to escape your quotes. Rather than making it more complicated by explaining that, just include the HTML in single quotes, not double quotes.
|
Quote:
//regbutton $regbutton=""; if ($bbuserinfo['userid']<"1") { $regbutton="<a href=\"register.php?s=$session[sessionhash]&action=signup\"><img src=\"darkblue/top_register.gif\" alt=\"Registration is free!\" border=\"0\"></a>"; } //end |
well I was looking for one and never found on so good.. but if I can get mine working it is a diff mod.. slitly.. and I am doing this for a friend so I am not going to release it here
|
So are you trying to do what the mod I posted is doing? Or something different?
|
it is almost the same.. i am designing a style for someone and I didnt know about the mod you posted until now but I am gonna use mine..
|
try this:
//regbutton if ($bbuserinfo['userid']=="0") { $regbutton="<a href=\"register.php?s=$session[sessionhash]&action=signup\"><img src=\"darkblue/top_register.gif\" alt=\"Registration is free!\" border=\"0\"></a>"; } else { $regbutton=""; } //end |
You should use usergroups tho...
|
Not necessarily, a user with an id 0 is by definition unregistered. A guest goes in the appropriate usergroup but they still have a userid of 0.
|
well he decided he wanted the usercp to hide so I moded my working script to this:
//regbutton $regbutton="<a href=\"usercp.php?s=$session[sessionhash]\"><img src=\"{imagesfolder}/top_profile.gif\" alt=\"Here you can view your subscribed threads, work with private messages and edit your profile and preferences\" border=\"0\"></a>"; if ($bbuserinfo['userid']<"1") { $regbutton="<a href=\"register.php?s=$session[sessionhash]&action=signup\"><img src=\"darkblue/top_register.gif\" alt=\"Registration is free!\" border=\"0\"></a>"; } //end I might use your else.. code thx for your guys help |
The else is just my style of coding, ive always done it like that. And no problem :)
|
All times are GMT. The time now is 12:59 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|