Youtube BBCode...

Started on the old forum in January 2016 · view the original in the archive · old links redirect here

5 replies · 350 views · started 10 years ago · 1 min read

3 participants
sky2kv Junior · 30 posts #1

Hi i want to play embeded youtube vids in a lavalair script forum...Can someone help me out with the bbcode please... I want it to be like for instance if a member types...[ytube]I97qh0bs6-M[/ytube] the vid must play... Thanks in advance...

sky2kv Junior · 30 posts #4

Well im still stuck with this code...iv search nearly every site regarding this but i only find the bbcodes for wordpress and other social sites...i tried adding the codes in the wapirate core.php under the bbcode functions but then i get a blank page...can anybody help?

Thanks in Advance...

something else Fellow · 2,296 posts #5
$text = preg_replace( "/\[ytube\](.*?)\[\/ytube\]/is", "​<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/$1\" frameborder=\"0\" allowfullscreen></iframe>", $text );
sky2kv Junior · 30 posts #6

Thanks a zillion mate...i just had to edit my css so that it screen resolution to various mobiles...

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close