diff options
author | Jesús <heckyel@hyperbola.info> | 2018-08-26 19:06:23 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2018-08-26 19:06:23 -0500 |
commit | e3d5ab93bbe4765da98838edd180c13d10912cbc (patch) | |
tree | 1a24f2ab1d08b8f38653098359c047eeb43e582a | |
parent | 764b373623e58876206b52af869eb9dfb574a640 (diff) | |
download | ytlibre-e3d5ab93bbe4765da98838edd180c13d10912cbc.tar.lz ytlibre-e3d5ab93bbe4765da98838edd180c13d10912cbc.tar.xz ytlibre-e3d5ab93bbe4765da98838edd180c13d10912cbc.zip |
Generated iframe for share
-rw-r--r-- | index.php | 25 | ||||
-rw-r--r-- | templates/video.tpl | 10 |
2 files changed, 35 insertions, 0 deletions
@@ -45,5 +45,30 @@ if (empty($_GET['link'])){ 'jquery' => 'templates/libs/jquery/dist/jquery.min.js') ); + /* ---- ---- Embed ---- ---- */ + if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") { + $pro = 'https'; + } else { + $pro = 'http'; + } + + $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); + + $subject = $pro."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['SCRIPT_NAME']; + + $pattern = array(); + $pattern[0] = '/index.php/'; + $substitution = array(); + $substitution[0] = 'embed?link='; + + $embed_url = preg_replace($pattern, $substitution, $subject); + + $decode_url_embed = "<iframe width='560' height='315' src='".$embed_url.$baselink."' frameborder='0' scrolling='no'></iframe>"; + + $current_url = htmlentities($decode_url_embed); + + $video_decode->assign("current_url", $current_url); + /* ---- ---- END ---- --- */ + $video_decode->display('templates/video.tpl'); } diff --git a/templates/video.tpl b/templates/video.tpl index 00826db..92a86ab 100644 --- a/templates/video.tpl +++ b/templates/video.tpl @@ -10,6 +10,15 @@ <!--LibreVideoJS--> <link href="{$styles.teal}" rel="stylesheet"/> <script src="{$javascript.librevideojs}"></script> + <style> + code, kbd, samp { + font-family: monospace, monospace; + font-size: 0.8em; + background: black; + text-align: center; + padding: 1em; + } + </style> </head> <body> <div class="contenedor"> @@ -88,6 +97,7 @@ </div> </section> <p>{$baselink}</p> + <code>{$current_url}</code> <footer> <p class="copyleft">Esta web es Software Libre y esta disponible en <a class="enlace" rel="noopener noreferrer" href="https://notabug.org/heckyel/ytlibre" target="_blank">Notabug</a> bajo la Licencia <a class="enlace" rel="license noopener noreferrer" href="https://www.gnu.org/licenses/agpl-3.0.html" target="_blank"> |