![]() |
On the front page of a forum, how can I set something up so that it only shows if you are logged in? For example, a message shows up if you are unregistered or not logged in, and goes away when you are logged in.....what if I wanted something the other way around?
|
Well, here's how I do that ... I'm pretty sure all PHP freaks will know of a better way, but anyway :
Code:
<? Code:
<? Like I said at the beginning, there might be thousands ways to do that better ... but hey, it works :) Best regards, Bobbi |
Well for unregistered users, there is a a variable called $unregwelcomemessage in the forumhome template. There is also a template called forumhome_unregmessage. What about setting something up in that matter, basically the same exact thing, just rather than unregmessage, a new one called like loggedin_message or something?
|
In index.php replace this:
PHP Code:
PHP Code:
Also create a template named forumhome_regmessage and use it for messages for logged in users. |
Thanks, that worked perfectly. You made a little mistake in your code for anybody that would like to use this. You did this:
PHP Code:
PHP Code:
Thanks again |
Damn brackets... :rolleyes:
|
All times are GMT. The time now is 08:47 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|