Customizing SMF > SMF Coding Discussion

Custom BBCode

(1/1)

Luis-:
Hi, i've tryed making a custom bbcode for my forum;

--- Code: --- array(
'tag' => 'vid',
'type' => 'unparsed_equals',
'before' => '<iframe width="420" height="345" src="$1">',
'after' => '</iframe>',
),
--- End code ---
but it wont show the video I enter into "[vid=link here][/vid]" code. I can't understand it :S. Is there anything wrong with it?

Illori:
what exactly are you trying to do with that code? embed a video? how about looking at the mod site at one of the many video embedding mods?

Luis-:
Yeah, i'm trying to embed videos which a user links. I'll take a look now.

тнє נя.:
Well first of all, I would use embed rather than an iframe personally. But there are mods written that accomplish this.

Yoshi:
Also, users can enter ANY link in that tag and it shows up.

Per example, if I do this with your tag:
[vid]http://google.com/[/vid]
it would happily show the Google home page.

Navigation

[0] Message Index

Go to full version