The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm trying to show a welcome message to all users who are not registered or not logged in on forumhome, forumdisplay and showthread. I had originally placed code
Code:
<if condition="$show['guest']">something</if> The if statement evaluated correctly before I moved the code to a replacement variable. But now, it always evaluates the if statement as true, showing the guest welcome message whether logged in or not. Does the replacement variable system not work with if statements? Or is there something special I need to be doing to make it function correctly? |
#2
|
||||
|
||||
![]()
I believe you need to just use valid html in the replacement variables and the condition is not valid html. Maybe just spit out a phrase and then if you want to modify the message, you just modify the phrase.
|
#3
|
|||
|
|||
![]()
Good idea. I shoulda thought of that.
![]() --------------- Added [DATE]1241478620[/DATE] at [TIME]1241478620[/TIME] --------------- Hmm... Nope. That didn't work, either. I end up with html output of Code:
$vbphrase[welcome_to_the_x] |
#4
|
||||
|
||||
![]()
I mean put the phrase in the condition in the template. Not put the phrase in the Replacement Variable manager.
|
#5
|
|||
|
|||
![]()
That's the weird thing - I didn't put any phrases in.
I changed the code in the templates to: Code:
<if condition="$show['guest']"> <welcome> </if> This is too much work. I'll just put the old code back into those three templates and deal with it later if I change the welcome message. |
#6
|
||||
|
||||
![]()
I was suggesting you create a phrase, like "welcome_to_my_site". Put your welcome text in there. Then just go:
HTML Code:
<if condition="$show['guest']"> $vbphrase[welcome_to_my_site] </if> |
#7
|
|||
|
|||
![]()
I'm an idiot.
I just realized the problem was between my ears, not in the code. Your original suggestion worked fine. Thanks for your patience. ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|