The Arcive of vBulletin Modifications Site. |
|
Need Help - Why can't I put VBCode in templates Details »»
|
||||||||||||||||||||||||||
I posted this in the wrong forum and can't delte it there, sorry
sometimes when I'm making a hack, I want to have the hack make a post and I'd like to use a template to format that post so it's easy to change later. I always seem to have to make the template / post an html post. When I try to set up the template using vbcode, I get errors. example template Code:
Offending User: $postusername Offending Post: Go directly to post #$postid Original Post Date : $postdate $posttime Thread: $posttitle[hr]$message[hr]The offending post has been copied below Quote:
I'm calling the template like this PHP Code:
Show Your Support
|
||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
of course, the site is parsing the vbcode in my example template above so you can't really see what my template looked like.
here's an example [ url=$bburl/showthread.php?postid=$postid#post$postid ]$threadtitle[ /url ] without the spaces anyway, I found out what was wrong it would come on someing like this $message[hr] and instead of seeing a var with a vbtag after it, it saw just a var from an array. by adding a space between them, the problem was solved $message [hr] I don't really like this solution since it would be too easy for someone to edit the template and get an error. Is there anyway to fix this? How can I let it know that the [hr] in this example is just text and not part of the var? |
|
#3
|
||||
|
||||
|
hmm, you can use the bbcodeparse2 function where the template is caleld to convert the vbcode into html, then it should work
|
|
#4
|
||||
|
||||
|
Shouldn't that be <hr> instead of [hr]?
|
|
#5
|
||||
|
||||
|
no, i have an [hr] vb tag that inserts a <hr>
|
![]() |
|
|