PDA

View Full Version : Smilie code to parse BBCode?


Guest210212002
02-22-2013, 02:32 PM
Odd question, but hopefully someone knows the answer. I'm looking to make a smilie code, post and parse a BBCode. For example, if someone posted:


:ducks:


The replacement would be:


url_to_a_picture_of_ducks.jpg


I tried using a replacement variable, which does what it should, but vB doesn't parse the image code - it just shows up as is. If I edit/save the post it displays the image, but I need to add that second parse in there so that when a user types :ducks: both the replacement variable AND the IMG call happen at post time.

Is this possible?

kh99
02-22-2013, 02:42 PM
I'm not sure I follow all that, but can't you use the "Add New Smilie" function (under "Smilies" in the admincp)?

Guest210212002
02-22-2013, 07:20 PM
What I'm trying to do is have a :code: do something other than show a smilie. An image link was a terrible example, haha. Sorry about that!

Exact example: I have an MP3 embed custom BBCode, so urlofsong.mp3 will show a small flash player with the user's input. I tried making a replacement variable that uses the MP3 BBCode with a certain MP3 already included, so that if they type :mp3: in a post it would automatically post urlofsomesongonmyserver.mp3.

The replacement variable works, but what gets put into the post doesn't get parsed. So instead of seeing the results of what would normally happen if you just typed in whatever.com/mp3.mp3 (my flash player), it just shows the exact code itself. The replacement variable works, but it doesn't parse the BBCode. vB is running the query for the replacement variable, so :mp3: DOES put thingIwant into the post, but the BBCode itself doesn't parse.

Does that make sense?