improved standards compliance of some of the tags and fixed an issue which caused text to bump-over youtube video embeds
This commit is contained in:
parent
f4cb6b9b08
commit
991885f1d4
2 changed files with 4 additions and 4 deletions
|
@ -90,15 +90,15 @@ function bbcode($Text,$preserve_nl = false) {
|
||||||
|
|
||||||
|
|
||||||
// [img=widthxheight]image source[/img]
|
// [img=widthxheight]image source[/img]
|
||||||
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.+?)\[\/img\]/", '<img src="$3" height="$2" width="$1">', $Text);
|
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.+?)\[\/img\]/", '<img src="$3" style="height:{$2}px; width:{$1}px;" >', $Text);
|
||||||
|
|
||||||
// Youtube extensions
|
// Youtube extensions
|
||||||
$Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.+?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text);
|
$Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.+?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text);
|
||||||
$Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.+?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text);
|
$Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.+?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text);
|
||||||
|
|
||||||
$Text = preg_replace("/\[youtube\](.+?)\[\/youtube\]/", '<iframe width="425" height="349" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>', $Text);
|
$Text = preg_replace("/\[youtube\](.+?)\[\/youtube\]/", '<br /><iframe style="width:425px;height:349px;padding:10px 0 10px 0;float:left;" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>', $Text);
|
||||||
|
|
||||||
// $Text = preg_replace("/\[youtube\](.+?)\[\/youtube\]/", '<object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/$1" ><param name="movie" value="http://www.youtube.com/v/$1"></param><!--[if IE]><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350" /><![endif]--></object>', $Text);
|
// $Text = preg_replace("/\[youtube\](.+?)\[\/youtube\]/", '<br /><object style="width:425px;height:350px;" type="application/x-shockwave-flash" data="http://www.youtube.com/v/$1" ><param name="movie" value="http://www.youtube.com/v/$1"></param><!--[if IE]><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" style="width:425px;height:350px;" /><![endif]--></object>', $Text);
|
||||||
|
|
||||||
// oembed tag
|
// oembed tag
|
||||||
$Text = oembed_bbcode2html($Text);
|
$Text = oembed_bbcode2html($Text);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
onmouseover="if (typeof t$id != 'undefined') clearTimeout(t$id); openMenu('wall-item-photo-menu-button-$id')"
|
onmouseover="if (typeof t$id != 'undefined') clearTimeout(t$id); openMenu('wall-item-photo-menu-button-$id')"
|
||||||
onmouseout="t$id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$id\'); closeMenu(\'wall-item-photo-menu-$id\');',200)">
|
onmouseout="t$id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$id\'); closeMenu(\'wall-item-photo-menu-$id\');',200)">
|
||||||
<a href="$profile_url" title="$linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$id">
|
<a href="$profile_url" title="$linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$id">
|
||||||
<img src="$thumb" class="wall-item-photo$sparkle" id="wall-item-photo-$id" height="80" width="80" alt="$name" />
|
<img src="$thumb" class="wall-item-photo$sparkle" id="wall-item-photo-$id" alt="$name" />
|
||||||
</a>
|
</a>
|
||||||
<span onclick="openClose('wall-item-photo-menu-$id');" class="fakelink wall-item-photo-menu-button" id="wall-item-photo-menu-button-$id">menu</span>
|
<span onclick="openClose('wall-item-photo-menu-$id');" class="fakelink wall-item-photo-menu-button" id="wall-item-photo-menu-button-$id">menu</span>
|
||||||
<div class="wall-item-photo-menu" id="wall-item-photo-menu-$id">
|
<div class="wall-item-photo-menu" id="wall-item-photo-menu-$id">
|
||||||
|
|
Loading…
Reference in a new issue