From: fabrixxm Date: Mon, 28 Dec 2015 17:07:31 +0000 (+0100) Subject: get rid of unwanted
s in items with oembed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6da04d16bdaf0dc4694e8e850daa0b8e54ce9323;p=friendica.git get rid of unwanted
s in items with oembed fix video thumbnail in quattro, vier, duepuntozero themes --- diff --git a/include/bbcode.php b/include/bbcode.php index 100c3b9306..b68a7c5b18 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -301,14 +301,12 @@ function bb_onelinecode_cb($match) { } function tryoembed($match){ - //$url = ((count($match)==2)?$match[1]:$match[2]); $url = $match[1]; // Always embed the SSL version $url = str_replace(array("http://www.youtube.com/", "http://player.vimeo.com/"), array("https://www.youtube.com/", "https://player.vimeo.com/"), $url); - //logger("tryoembed: $url"); $o = oembed_fetch_url($url); @@ -318,7 +316,7 @@ function tryoembed($match){ if ($o->type=="error") return $match[0]; $html = oembed_format_object($o); - return $html; //oembed_iframe($html,$o->width,$o->height); + return $html; } diff --git a/include/oembed.php b/include/oembed.php index 0e12383603..c848a4580c 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -1,12 +1,9 @@ width,$j->height); - - + return $s; } @@ -144,15 +141,12 @@ function oembed_format_object($j){ } else { $ret=$jhtml; } - $ret.="
"; + //$ret.="
"; }; break; case "photo": { $ret.= ""; - //$ret.= ""; - $ret.="
"; }; break; case "link": { - //$ret = "".$j->title.""; }; break; case "rich": { // not so safe.. @@ -194,10 +188,10 @@ function oembed_format_object($j){ } else { // add for html2bbcode conversion $ret .= "$embedurl"; - $ret .= "
"; } $ret.=""; - return mb_convert_encoding($ret, 'HTML-ENTITIES', mb_detect_encoding($ret)); + $ret = str_replace("\n","",$ret); + return mb_convert_encoding($ret, 'HTML-ENTITIES', mb_detect_encoding($ret)); } function oembed_iframe($src,$width,$height) { diff --git a/view/templates/oembed_video.tpl b/view/templates/oembed_video.tpl index 4aa1351545..8392c469cd 100644 --- a/view/templates/oembed_video.tpl +++ b/view/templates/oembed_video.tpl @@ -1,5 +1,4 @@ - -
+
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 76bbab8e05..c004eb53d0 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -1221,6 +1221,10 @@ input#dfrn-url { } .type-link .oembed { } +.oembed.video .embed_video > div { + position: absolute; top: 0px; left: 0px; + background: rgba(0, 0, 0, 0.5) url(shiny.png) no-repeat scroll center center; +} .shared_header { height: 32px; diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index 1b021687cd..847017ee5b 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -463,7 +463,7 @@ a:hover { text-decoration: underline; } blockquote { - background: #ffffff; + background: #FFFFFF; padding: 1em; margin-left: 1em; border-left: 1em solid #e6e6e6; @@ -544,7 +544,6 @@ header { margin: 0; padding: 0; /*width: 100%; height: 12px; */ - z-index: 110; color: #ffffff; } @@ -922,7 +921,6 @@ aside .posted-date-selector-months { overflow: auto; height: auto; /*.contact-block-div { width:60px; height: 60px; }*/ - } #contact-block .contact-block-h4 { float: left; @@ -1004,7 +1002,6 @@ aside .posted-date-selector-months { margin-bottom: 2em; /*.action .s10 { width: 10px; overflow: hidden; padding: 0;} .action .s16 { width: 16px; overflow: hidden; padding: 0;}*/ - } .widget h3 { padding: 0; @@ -1308,7 +1305,6 @@ section { height: 32px; margin-left: 16px; /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ - } .comment-edit-preview .contact-photo-menu-button { top: 15px !important; @@ -1447,9 +1443,13 @@ blockquote.shared_content { } .oembed.video > a.embed_video { display: block; - float: none; + float: left; + position: relative; } .oembed.video > a.embed_video > div { + position: absolute; + top: 0px; + left: 0px; background: rgba(255, 255, 255, 0.36) url(../../../images/icons/48/play.png) no-repeat center center !important; } /* threaded comments */ @@ -2241,7 +2241,6 @@ ul.tabs li .active { min-height: 22px; padding-top: 6px; /* a { display: block;}*/ - } #photo-caption { display: block; diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 4c50fb35fa..4cfcb59273 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -463,7 +463,7 @@ a:hover { text-decoration: underline; } blockquote { - background: #ffffff; + background: #FFFFFF; padding: 1em; margin-left: 1em; border-left: 1em solid #e6e6e6; @@ -544,7 +544,6 @@ header { margin: 0; padding: 0; /*width: 100%; height: 12px; */ - z-index: 110; color: #ffffff; } @@ -922,7 +921,6 @@ aside .posted-date-selector-months { overflow: auto; height: auto; /*.contact-block-div { width:60px; height: 60px; }*/ - } #contact-block .contact-block-h4 { float: left; @@ -1004,7 +1002,6 @@ aside .posted-date-selector-months { margin-bottom: 2em; /*.action .s10 { width: 10px; overflow: hidden; padding: 0;} .action .s16 { width: 16px; overflow: hidden; padding: 0;}*/ - } .widget h3 { padding: 0; @@ -1308,7 +1305,6 @@ section { height: 32px; margin-left: 16px; /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ - } .comment-edit-preview .contact-photo-menu-button { top: 15px !important; @@ -1447,9 +1443,13 @@ blockquote.shared_content { } .oembed.video > a.embed_video { display: block; - float: none; + float: left; + position: relative; } .oembed.video > a.embed_video > div { + position: absolute; + top: 0px; + left: 0px; background: rgba(255, 255, 255, 0.36) url(../../../images/icons/48/play.png) no-repeat center center !important; } /* threaded comments */ @@ -2241,7 +2241,6 @@ ul.tabs li .active { min-height: 22px; padding-top: 6px; /* a { display: block;}*/ - } #photo-caption { display: block; diff --git a/view/theme/quattro/lilac/style.css b/view/theme/quattro/lilac/style.css index 7fb505dec5..2ff7cfcb0c 100644 --- a/view/theme/quattro/lilac/style.css +++ b/view/theme/quattro/lilac/style.css @@ -420,7 +420,7 @@ body { font-family: Liberation Sans, helvetica, arial, clean, sans-serif; font-size: 11px; - background-color: #f6ecf9; + background-color: #F6ECF9; color: #2d2d2d; margin: 50px 0 0 0; display: table; @@ -463,7 +463,7 @@ a:hover { text-decoration: underline; } blockquote { - background: #ffffff; + background: #FFFFFF; padding: 1em; margin-left: 1em; border-left: 1em solid #e6e6e6; @@ -544,7 +544,6 @@ header { margin: 0; padding: 0; /*width: 100%; height: 12px; */ - z-index: 110; color: #ffffff; } @@ -922,7 +921,6 @@ aside .posted-date-selector-months { overflow: auto; height: auto; /*.contact-block-div { width:60px; height: 60px; }*/ - } #contact-block .contact-block-h4 { float: left; @@ -1004,7 +1002,6 @@ aside .posted-date-selector-months { margin-bottom: 2em; /*.action .s10 { width: 10px; overflow: hidden; padding: 0;} .action .s16 { width: 16px; overflow: hidden; padding: 0;}*/ - } .widget h3 { padding: 0; @@ -1308,7 +1305,6 @@ section { height: 32px; margin-left: 16px; /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ - } .comment-edit-preview .contact-photo-menu-button { top: 15px !important; @@ -1447,9 +1443,13 @@ blockquote.shared_content { } .oembed.video > a.embed_video { display: block; - float: none; + float: left; + position: relative; } .oembed.video > a.embed_video > div { + position: absolute; + top: 0px; + left: 0px; background: rgba(255, 255, 255, 0.36) url(../../../images/icons/48/play.png) no-repeat center center !important; } /* threaded comments */ @@ -1753,7 +1753,7 @@ span[id^="showmore-wrap"] { height: 20px; width: 500px; font-weight: bold; - border: 1px solid #f6ecf9; + border: 1px solid #F6ECF9; } #jot #jot-title:-webkit-input-placeholder { font-weight: normal; @@ -1780,7 +1780,7 @@ span[id^="showmore-wrap"] { margin: 0; height: 20px; width: 200px; - border: 1px solid #f6ecf9; + border: 1px solid #F6ECF9; } #jot #jot-category:hover { border: 1px solid #999999; @@ -2241,7 +2241,6 @@ ul.tabs li .active { min-height: 22px; padding-top: 6px; /* a { display: block;}*/ - } #photo-caption { display: block; diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index d47263b500..681cfcc374 100644 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -745,7 +745,7 @@ section { margin: 1em 0; max-height: 160px; overflow: hidden; - padding-left: 1em; + padding-left: 1em; } .oembed {} } @@ -780,8 +780,10 @@ blockquote.shared_content { .oembed.video { > a.embed_video { display: block; - float: none; + float: left; + position: relative; > div { + position: absolute; top: 0px; left: 0px; background: rgba(255, 255, 255, 0.36) url(../../../images/icons/48/play.png) diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 7d0c36be1d..e53ac45f74 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -2522,6 +2522,25 @@ blockquote { display: block; } +.oembed.video .embed_video > div { + position: absolute; top: 0px; left: 0px; + background-color: rgba(0,0,0,0.5); +} +.oembed.video .embed_video > div::before { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + display: inline-block; + text-decoration: inherit; + vertical-align: top; + font-size: 3em; + content: "\f01d"; /* icon-play-circle */ + color: #fff; + bottom: 10px; + right: 10px; + position: absolute; +} + /* ================== */ /* = Contacts Block = */ /* ================== */