Customizing SMF > SMF Coding Discussion

Custom BBCode


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?

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?

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

Matthew K.:
Well first of all, I would use embed rather than an iframe personally. But there are mods written that accomplish this.

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

Per example, if I do this with your tag:
it would happily show the Google home page.


[0] Message Index

Go to full version