Log in

View Full Version : template parsing variable


Bilderback
09-01-2008, 03:44 AM
This may be a weird question but how do I stop a vbulletin variable from parsing in templates?
I am trying to create a help page and every time I add $bbuserinfo[username] inside the template,
it shows the users name instead of just displaying $bbuserinfo[username] as text.
Thanks

Marco van Herwaarden
09-01-2008, 06:25 AM
Try adding a backslash (or maybe even 2 or 3, try it) in front of the $, so \$bbuserinfo....

Bilderback
09-01-2008, 02:16 PM
Try adding a backslash (or maybe even 2 or 3, try it) in front of the $, so \$bbuserinfo....

backslash does not work and I have also tried different html tags noparse/html/php/code
bbcode does not parse inside template so that doesnt work.:erm:

update:
It will work only once by using ascii ie,
$bbuserinfo[username] as $bbuserinfo[username]
But as soon as you reopen template editor, all your ascii turns back to symbols.

Dismounted
09-02-2008, 10:03 AM
<if condition="$text = '$bbuserinfo[username]'">$text</if>
Ugly, I know - but it should work.

Bilderback
09-02-2008, 03:50 PM
<if condition="$text = '$bbuserinfo[username]'">$text</if>

That throws a parse error - unexpected T_STRING

Opserty
09-02-2008, 06:53 PM
It will work only once by using ascii ie,
$bbuserinfo[username] as $bbuserinfo[username]
But as soon as you reopen template editor, all your ascii turns back to symbols.
You could maybe post that as a bug on the bug tracker at vBulletin.com (assuming someone else hasn't already pointed it out) see if they can fix it.

Dismounted
09-03-2008, 06:31 AM
Try:
<if condition="$text = '\$bbuserinfo[username]'">$text</if>