![]() |
Hi,
I'm in the process of switching boards from UltraBoard to vBulletin. Now what most of my UB2K users were used to is a "login"-button which changes to "logout" if a member is logged in. Is there a possibility to do it like: [pseudocode] if logged_in { <img scr="top_logout" (...) > else <img scr="top_login" (...) > } [/pseudocode] Unfortunately I'm totally new to php as I only was confronted with perl in UB2K. Can anyone post how to do this or at least give a hint were to look for? Thanks, -Tom P.S: I mean the top_buttons, e.g. http://mcseboard.de/forum/images/top_login.gif and http://mcseboard.de/forum/images/top_logout.gif btw: I changed my mind since my last post in maybe the wrong place ( http://www.vbulletin.com/forum/showt...threadid=16465 ) |
Modify your header template to contain the variable $loginlogout where you want this image and place this in your phpinclude template:
if ($bbuserinfo[userid]) { $loginlogout = "<a href=(...)><img src="login.gif"(...)>"; } else { $loginlogout = "<a href=(...)><img src="logout.gif"(...)>"; } |
Hi,
thanks for your help! I don't have php4 installed, so afaik the phpinclude template won't be parsed, but I pasted the code into the global.php and it worked. This is what I used: Code:
// Register button swapping Thanks a bunch for your help freddie :) -Tom |
The phpinclude template works with PHP3 or PHP4. Perhaps you are referring to the comments that are in there by default. That specific command if uncommented is a PHP4 only command and is there to give you pointers on how to include a file for your header.
|
Aaah, I see. Gee, thanks for the hint!
-Tom :) |
can someone post the exact place to put this in the templates please to replace the register button with the logout button on my forums.
Other forum hackers say In so and so template, after Quote:
Quote:
Please post it like that as I am a complete no hope with PHP and dont really want to use trial and error until I get it right. |
All times are GMT. The time now is 08:57 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:
|