View Full Version : How to add vbulletin bbcode variable to a template ?

07-11-2009, 02:28 PM

I have a basic imdb script installed on my webpage which displays very basic information about the movie. And i have the bbcode to display this kind of information. Example of usage : movie_id

What i would like to do with GARS is make it more easy. Because i use GARS for my movie info pages.

I've created a text custom field with the name of "Imdb Id".
In new thread of GARS, there will be above custom field asking the imdb id of the movie. And when user enter the imdb id in the box, it will automatically show the movie info. instead of entering movie_id in the box, just movie_id would be fine.

In GARS_pb template, i've changed the line as :
gars68 is the id of the custom field i've created...

I see that i do something wrong with the default vbulletin bbcode. Because it still displays as movie_id.

How can i make the bbcode work in GARS_pb template so i can display the movie info as it is working on other vbulletin pages ? (movie_id)

Why am i doing that ?
I need that option to be required so user will not be able to post any thread without the movie info. And its simple to make it "required" through GARS.

Thanks in advance...

07-13-2009, 02:20 PM
Custom fields are text only, no HTML because it'd open a security hole, and no BB Code because no HTML is allowed, but you could do this (http://www.thevbgeek.com/showpost.php?p=26116&postcount=13) though be sure to not allow raw HTML for security reasons, or you could use $post[gars68] in a link in the GARS_pb template instead of trying to BB Code it.