2010-04-11, 11:44 PM
2010-04-11, 11:59 PM
You need PHP in Templates / Complex Templates plugin.
2010-04-12, 12:01 AM
It's for a theme I plan on redistributing. I was hoping it'd be simpler than that.
2010-04-12, 12:05 AM
I think by default, we can't use a conditional in mybb template system.
2010-04-13, 02:38 AM
By default it's not that easy. You could do something like Yumi suggested in another thread; use CSS to show and hide based on surrounding DIVs. For example;
Put your welcomeblock in the header_welcomeblock_member template wrapped in, say <div class="welcomeblock">. Underneath, place the text you want shown to logged in users in <div class="usertext">.
Wherever you want the welcomeblock to show, wrap the {$welcomeblock} in #panel. Wherever you want the other stuff to show, wrap in #usertext. You'd probably need to keep this stuff in the header template, as I don't believe $welcomeblock is global, though it may be.
And then, the CSS:
Should work, though there'll be lots of extra HTML laying around unused.
Put your welcomeblock in the header_welcomeblock_member template wrapped in, say <div class="welcomeblock">. Underneath, place the text you want shown to logged in users in <div class="usertext">.
Wherever you want the welcomeblock to show, wrap the {$welcomeblock} in #panel. Wherever you want the other stuff to show, wrap in #usertext. You'd probably need to keep this stuff in the header template, as I don't believe $welcomeblock is global, though it may be.
And then, the CSS:
#panel .usertext {
display: none;
}
#usertext .welcomeblock {
display: none;
}
Should work, though there'll be lots of extra HTML laying around unused.