Tutorial for add Youtube bbcode (General)

by Aradina @, Saturday, April 25, 2009, 14:38 (5483 days ago)

Hello,

I have code a Mod for MLF Version: 2.0 beta 19 for a youtube bbcode and it's functionally great.

I wish to share my knowledge with all others users :-)

#####################################################################
Mod: add Youtube bbcode

File: /templates/<template>/posting.tpl.inc

Search Code:
<input class="bbcode-button" style="color: #0000ff; text-decoration: underline;" type="button" name="link" value="{#bbcode_link_marking#}"
title="{#bbcode_link_title#}" onclick="insert_link('postingform',
'text','{#bbcode_link_linktext#}','{#bbcode_link_url#}');" /><br />

After add:
<input class="bbcode-button" type="button" name="youtube" value="{#bbcode_youtube_marking#}" title="{#bbcode_youtube_title#}" onclick="bbcode('postingform','text','youtube');" /><br />

-> Save and Close!

################################################################################

File: /lang/english.lang

Search Code:
bbcode_list_title = Insert list:

  • list item

After add:
bbcode_youtube_marking = Youtube
bbcode_youtube_title = Add Youtube Video: [youtube]ae73jju9[/youtube]

-> Save and Close!

*** For German Forums ***
File: /lang/german.lang

Search Code:
bbcode_list_title = Liste einfügen:

  • Listenpunkt

After add:
bbcode_youtube_marking = Youtube
bbcode_youtube_title = Youtube Video hinzufügen: [youtube]ae73jju9[/youtube]

-> Save and Close!

################################################################################

File: /includes/functions.inc.php

Search Code:
$bbcode->addCode ('msg', 'usecontent?', 'do_bbcode_msg', array ('usecontent_param' => 'default'), 'link', array ('listitem', 'block', 'inline', 'quote'), array ('link'));

After add:
$bbcode->addCode ('youtube', 'simple_replace', null, array ('start_tag' => '<embed src="http://www.youtube.com/v/', 'end_tag' => '&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>'), 'inline', array ('listitem', 'block', 'inline', 'link', 'quote', 'pre', 'monospace'), array ());

-> Save and Close!


Have fun :-)

Greetz,
Aradina

Tutorial for add Youtube bbcode

by transac, Sunday, April 26, 2009, 23:31 (5482 days ago) @ Aradina

Thanks for sharing. It works with my MLF 2.1 beta7, but I had to remove 'postingform' on onclick = bbcode :-P

Tutorial for add Youtube bbcode

by Aradina @, Thursday, April 30, 2009, 03:45 (5478 days ago) @ transac

Hello,

yeah, you are right! I have adjust it on my Code.
Thank you very much

Greetz,
Aradina

Tutorial for add Youtube bbcode

by Stan, Wednesday, April 29, 2009, 20:07 (5479 days ago) @ Aradina

Thank you !!!

Tutorial for add Youtube bbcode

by LuuLuu, Tuesday, May 05, 2009, 17:04 (5473 days ago) @ Aradina

Oh this looks WAY over my head!

Avatar

FYI: the current beta version can display flash videos

by Alex ⌂, Tuesday, May 05, 2009, 21:02 (5473 days ago) @ Aradina

- No text -

FYI: the current beta version can display flash videos

by Bert, Thursday, May 07, 2009, 14:05 (5471 days ago) @ Alex

...and working wonderful! :)

Thanks for that one... :ok:

Bert

Tutorial for add Youtube bbcode

by Ted @, Wednesday, September 30, 2009, 22:20 (5325 days ago) @ Aradina

perfect, thanks to Aradina! I also made the change suggested by transac .- ted

RSS Feed of thread