vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   template parsing variable (https://vborg.vbsupport.ru/showthread.php?t=189696)

Bilderback 09-01-2008 03:44 AM

template parsing variable
 
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

Quote:

Originally Posted by Marco van Herwaarden (Post 1611763)
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 &#36bbuserinfo[username]
But as soon as you reopen template editor, all your ascii turns back to symbols.

Dismounted 09-02-2008 10:03 AM

Code:

<if condition="$text = '$bbuserinfo[username]'">$text</if>
Ugly, I know - but it should work.

Bilderback 09-02-2008 03:50 PM

Quote:

Originally Posted by Dismounted (Post 1612667)
Code:

<if condition="$text = '$bbuserinfo[username]'">$text</if>

That throws a parse error - unexpected T_STRING

Opserty 09-02-2008 06:53 PM

Quote:

Originally Posted by Bilderback (Post 1612017)
It will work only once by using ascii ie,
$bbuserinfo[username] as &#36bbuserinfo[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:
Code:

<if condition="$text = '\$bbuserinfo[username]'">$text</if>


All times are GMT. The time now is 04:51 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
  • Page Generation 0.01059 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete