Use Slim 3.3 (fixes #49)

This commit is contained in:
Pierre Rudloff 2016-03-30 01:39:47 +02:00
parent 0db96bad5d
commit 81f32c3e61
10 changed files with 234 additions and 234 deletions

View file

@ -7,9 +7,8 @@
"require": { "require": {
"smarty/smarty": "~3.1.29", "smarty/smarty": "~3.1.29",
"rg3/youtube-dl": "2016.03.14", "rg3/youtube-dl": "2016.03.14",
"slim/slim": "~2.6.2", "slim/slim": "~3.3.0",
"slim/views": "~0.1.3", "mathmarques/smarty-view": "~1.0.0",
"rudloff/smarty-plugin-noscheme": "~0.1.0",
"symfony/yaml": "~3.0.0", "symfony/yaml": "~3.0.0",
"ffmpeg/ffmpeg": "~2.8.2" "ffmpeg/ffmpeg": "~2.8.2"
}, },

315
composer.lock generated
View file

@ -4,9 +4,36 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "d4b9e76dbda3af97316a38bfe163ac00", "hash": "22d65db5d1fd37d20bc4b2ad6736ab4a",
"content-hash": "6eb27104cc39af34f798d35fb3f381ac", "content-hash": "bbf51588b3930e62a675a947d23aa6b0",
"packages": [ "packages": [
{
"name": "container-interop/container-interop",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/container-interop/container-interop.git",
"reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e",
"reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e",
"shasum": ""
},
"type": "library",
"autoload": {
"psr-4": {
"Interop\\Container\\": "src/Interop/Container/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
"time": "2014-12-30 15:22:37"
},
{ {
"name": "ffmpeg/ffmpeg", "name": "ffmpeg/ffmpeg",
"version": "2.8.4", "version": "2.8.4",
@ -22,102 +49,123 @@
"type": "library" "type": "library"
}, },
{ {
"name": "jeremykendall/php-domain-parser", "name": "mathmarques/smarty-view",
"version": "3.0.0", "version": "1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/jeremykendall/php-domain-parser.git", "url": "https://github.com/mathmarques/Smarty-View.git",
"reference": "896e7e70f02bd4fd77190052799bc61e4d779672" "reference": "0e7e34611d78183efbf748fa351be3faf09bcbce"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/jeremykendall/php-domain-parser/zipball/896e7e70f02bd4fd77190052799bc61e4d779672", "url": "https://api.github.com/repos/mathmarques/Smarty-View/zipball/0e7e34611d78183efbf748fa351be3faf09bcbce",
"reference": "896e7e70f02bd4fd77190052799bc61e4d779672", "reference": "0e7e34611d78183efbf748fa351be3faf09bcbce",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-curl": "*", "php": ">=5.5.0",
"ext-intl": "*", "slim/slim": "^3.0",
"ext-mbstring": "*", "smarty/smarty": "~3.1"
"php": ">=5.3.0"
}, },
"require-dev": { "require-dev": {
"jeremykendall/debug-die": "0.0.1.*", "phpunit/phpunit": "^4.8.0"
"mikey179/vfsstream": "~1.4",
"phpunit/phpunit": "~4.4"
}, },
"bin": [
"bin/parse",
"bin/update-psl"
],
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Pdp\\": "src/" "Slim\\Views\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Matheus Marques",
"email": "matheusocmarques@gmail.com",
"homepage": "http://matheusmarques.com"
}
],
"description": "Slim Framework 3 view helper built on top of the Smarty templating component",
"keywords": [
"framework",
"slim",
"smarty",
"template",
"view"
],
"time": "2015-12-07 21:31:37"
},
{
"name": "nikic/fast-route",
"version": "v0.6.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/FastRoute.git",
"reference": "31fa86924556b80735f98b294a7ffdfb26789f22"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/FastRoute/zipball/31fa86924556b80735f98b294a7ffdfb26789f22",
"reference": "31fa86924556b80735f98b294a7ffdfb26789f22",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"type": "library",
"autoload": {
"psr-4": {
"FastRoute\\": "src/"
}, },
"files": [ "files": [
"src/pdp-parse-url.php" "src/functions.php"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"MIT" "BSD-3-Clause"
], ],
"authors": [ "authors": [
{ {
"name": "Jeremy Kendall", "name": "Nikita Popov",
"homepage": "http://about.me/jeremykendall", "email": "nikic@php.net"
"role": "Developer"
},
{
"name": "Contributors",
"homepage": "https://github.com/jeremykendall/php-domain-parser/graphs/contributors"
} }
], ],
"description": "Public Suffix List based URL parsing implemented in PHP.", "description": "Fast request router for PHP",
"homepage": "https://github.com/jeremykendall/php-domain-parser",
"keywords": [ "keywords": [
"Public Suffix List", "router",
"domain parsing", "routing"
"url parsing"
], ],
"time": "2015-03-30 12:49:45" "time": "2015-06-18 19:15:47"
}, },
{ {
"name": "league/uri", "name": "pimple/pimple",
"version": "4.1.0", "version": "v3.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/uri.git", "url": "https://github.com/silexphp/Pimple.git",
"reference": "a4f0ea3323745214c955af2f6451d7743f30a076" "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/uri/zipball/a4f0ea3323745214c955af2f6451d7743f30a076", "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a30f7d6e57565a2e1a316e1baf2a483f788b258a",
"reference": "a4f0ea3323745214c955af2f6451d7743f30a076", "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-fileinfo": "*", "php": ">=5.3.0"
"ext-intl": "*",
"ext-mbstring": "*",
"jeremykendall/php-domain-parser": "^3.0",
"php": ">=5.5.9",
"psr/http-message": "^1.0"
},
"require-dev": {
"fabpot/php-cs-fixer": "^1.9",
"phpunit/phpunit": "^4.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "4.1-dev" "dev-master": "3.0.x-dev"
} }
}, },
"autoload": { "autoload": {
"psr-4": { "psr-0": {
"League\\Uri\\": "src" "Pimple": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -126,26 +174,17 @@
], ],
"authors": [ "authors": [
{ {
"name": "Ignace Nyamagana Butera", "name": "Fabien Potencier",
"email": "nyamsprod@gmail.com", "email": "fabien@symfony.com"
"homepage": "https://nyamsprod.com"
} }
], ],
"description": "URI manipulation library", "description": "Pimple, a simple Dependency Injection Container",
"homepage": "http://url.thephpleague.com", "homepage": "http://pimple.sensiolabs.org",
"keywords": [ "keywords": [
"data", "container",
"data-uri", "dependency injection"
"ftp",
"http",
"parse_url",
"psr-7",
"rfc3986",
"uri",
"url",
"ws"
], ],
"time": "2016-02-18 14:46:01" "time": "2015-09-11 15:10:35"
}, },
{ {
"name": "psr/http-message", "name": "psr/http-message",
@ -206,114 +245,35 @@
}, },
"type": "library" "type": "library"
}, },
{
"name": "rudloff/smarty-plugin-noscheme",
"version": "0.1.0",
"source": {
"type": "git",
"url": "https://github.com/Rudloff/smarty-plugin-noscheme.git",
"reference": "537bcb2f7576252af70d8f9f817bfe050d873072"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Rudloff/smarty-plugin-noscheme/zipball/537bcb2f7576252af70d8f9f817bfe050d873072",
"reference": "537bcb2f7576252af70d8f9f817bfe050d873072",
"shasum": ""
},
"require": {
"league/uri": "~4.0"
},
"require-dev": {
"symfony/var-dumper": "~2.7.6"
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-3.0"
],
"authors": [
{
"name": "Pierre Rudloff",
"email": "contact@rudloff.pro",
"homepage": "https://rudloff.pro/",
"role": "Developer"
}
],
"description": "Smarty modifier that removes the scheme in URLs",
"time": "2015-10-31 10:25:47"
},
{ {
"name": "slim/slim", "name": "slim/slim",
"version": "2.6.2", "version": "3.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/slimphp/Slim.git", "url": "https://github.com/slimphp/Slim.git",
"reference": "20a02782f76830b67ae56a5c08eb1f563c351a37" "reference": "939f2e85d57508de9cff241d10091cd972f221c3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/slimphp/Slim/zipball/20a02782f76830b67ae56a5c08eb1f563c351a37", "url": "https://api.github.com/repos/slimphp/Slim/zipball/939f2e85d57508de9cff241d10091cd972f221c3",
"reference": "20a02782f76830b67ae56a5c08eb1f563c351a37", "reference": "939f2e85d57508de9cff241d10091cd972f221c3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.0" "container-interop/container-interop": "^1.1",
"nikic/fast-route": "^0.6",
"php": ">=5.5.0",
"pimple/pimple": "^3.0",
"psr/http-message": "^1.0"
}, },
"suggest": { "require-dev": {
"ext-mcrypt": "Required for HTTP cookie encryption" "phpunit/phpunit": "^4.0",
}, "squizlabs/php_codesniffer": "^2.5"
"type": "library",
"autoload": {
"psr-0": {
"Slim": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Josh Lockhart",
"email": "info@joshlockhart.com",
"homepage": "http://www.joshlockhart.com/"
}
],
"description": "Slim Framework, a PHP micro framework",
"homepage": "http://github.com/codeguy/Slim",
"keywords": [
"microframework",
"rest",
"router"
],
"time": "2015-03-08 18:41:17"
},
{
"name": "slim/views",
"version": "0.1.3",
"source": {
"type": "git",
"url": "https://github.com/slimphp/Slim-Views.git",
"reference": "8561c785e55a39df6cb6f95c3aba3281a60ed5b0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/slimphp/Slim-Views/zipball/8561c785e55a39df6cb6f95c3aba3281a60ed5b0",
"reference": "8561c785e55a39df6cb6f95c3aba3281a60ed5b0",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"slim/slim": ">=2.4.0"
},
"suggest": {
"smarty/smarty": "Smarty templating system",
"twig/twig": "Twig templating system"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Slim\\Views\\": "./" "Slim\\": "Slim"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -321,25 +281,36 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Rob Allen",
"email": "rob@akrabat.com",
"homepage": "http://akrabat.com"
},
{ {
"name": "Josh Lockhart", "name": "Josh Lockhart",
"email": "info@joshlockhart.com", "email": "hello@joshlockhart.com",
"homepage": "http://www.joshlockhart.com/" "homepage": "https://joshlockhart.com"
},
{
"name": "Gabriel Manricks",
"email": "gmanricks@me.com",
"homepage": "http://gabrielmanricks.com"
}, },
{ {
"name": "Andrew Smith", "name": "Andrew Smith",
"email": "a.smith@silentworks.co.uk", "email": "a.smith@silentworks.co.uk",
"homepage": "http://thoughts.silentworks.co.uk/" "homepage": "http://silentworks.co.uk"
} }
], ],
"description": "Smarty and Twig View Parser package for the Slim Framework", "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs",
"homepage": "http://github.com/codeguy/Slim-Views", "homepage": "http://slimframework.com",
"keywords": [ "keywords": [
"extensions", "api",
"slimphp", "framework",
"templating" "micro",
"router"
], ],
"time": "2014-12-09 23:48:51" "time": "2016-03-10 21:37:40"
}, },
{ {
"name": "smarty/smarty", "name": "smarty/smarty",

View file

@ -30,63 +30,77 @@ class FrontController
/** /**
* Display index page * Display index page
* *
* @param Request $request PSR-7 request
* @param Response $response PSR-7 response
*
* @return void * @return void
*/ */
static function index() static function index($request, $response)
{ {
global $app; global $container;
$config = Config::getInstance(); $config = Config::getInstance();
$app->render( $container->view->render(
$response,
'head.tpl', 'head.tpl',
array( array(
'class'=>'index' 'class'=>'index'
) )
); );
$app->render( $container->view->render(
$response,
'header.tpl' 'header.tpl'
); );
$app->render( $container->view->render(
$response,
'index.tpl', 'index.tpl',
array( array(
'convert'=>$config->convert 'convert'=>$config->convert
) )
); );
$app->render('footer.tpl'); $container->view->render($response, 'footer.tpl');
} }
/** /**
* Display a list of extractors * Display a list of extractors
* *
* @param Request $request PSR-7 request
* @param Response $response PSR-7 response
*
* @return void * @return void
*/ */
static function extractors() static function extractors($request, $response)
{ {
global $app; global $container;
$app->render( $container->view->render(
$response,
'head.tpl', 'head.tpl',
array( array(
'class'=>'extractors' 'class'=>'extractors'
) )
); );
$app->render('header.tpl'); $container->view->render($response, 'header.tpl');
$app->render('logo.tpl'); $container->view->render($response, 'logo.tpl');
$app->render( $container->view->render(
$response,
'extractors.tpl', 'extractors.tpl',
array( array(
'extractors'=>VideoDownload::listExtractors() 'extractors'=>VideoDownload::listExtractors()
) )
); );
$app->render('footer.tpl'); $container->view->render($response, 'footer.tpl');
} }
/** /**
* Dislay information about the video * Dislay information about the video
* *
* @param Request $request PSR-7 request
* @param Response $response PSR-7 response
*
* @return void * @return void
*/ */
static function video() static function video($request, $response)
{ {
global $app; global $container;
$config = Config::getInstance(); $config = Config::getInstance();
if (isset($_GET["url"])) { if (isset($_GET["url"])) {
if (isset($_GET['audio'])) { if (isset($_GET['audio'])) {
@ -147,56 +161,63 @@ class FrontController
} else { } else {
try { try {
$video = VideoDownload::getJSON($_GET["url"]); $video = VideoDownload::getJSON($_GET["url"]);
$app->render( $container->view->render(
$response,
'head.tpl', 'head.tpl',
array( array(
'class'=>'video' 'class'=>'video'
) )
); );
$app->render( $container->view->render(
$response,
'video.tpl', 'video.tpl',
array( array(
'video'=>$video 'video'=>$video
) )
); );
$app->render('footer.tpl'); $container->view->render($response, 'footer.tpl');
} catch (\Exception $e) { } catch (\Exception $e) {
$error = $e->getMessage(); $error = $e->getMessage();
} }
} }
} }
if (isset($error)) { if (isset($error)) {
$app->render( $container->view->render(
$response,
'head.tpl', 'head.tpl',
array( array(
'class'=>'video' 'class'=>'video'
) )
); );
$app->render( $container->view->render(
$response,
'error.tpl', 'error.tpl',
array( array(
'errors'=>$error 'errors'=>$error
) )
); );
$app->render('footer.tpl'); $container->view->render($response, 'footer.tpl');
} }
} }
/** /**
* Redirect to video file * Redirect to video file
* *
* @param Request $request PSR-7 request
* @param Response $response PSR-7 response
*
* @return void * @return void
*/ */
static function redirect() static function redirect($request, $response)
{ {
global $app; global $app;
if (isset($_GET["url"])) { if (isset($_GET["url"])) {
try { try {
$video = VideoDownload::getURL($_GET["url"]); $video = VideoDownload::getURL($_GET["url"]);
$app->redirect($video['url']); return $response->withRedirect($video['url']);
} catch (\Exception $e) { } catch (\Exception $e) {
$app->response->headers->set('Content-Type', 'text/plain');
echo $e->getMessage().PHP_EOL; echo $e->getMessage().PHP_EOL;
return $response->withHeader('Content-Type', 'text/plain');
} }
} }
} }
@ -204,18 +225,22 @@ class FrontController
/** /**
* Output JSON info about the video * Output JSON info about the video
* *
* @param Request $request PSR-7 request
* @param Response $response PSR-7 response
*
* @return void * @return void
*/ */
static function json() static function json($request, $response)
{ {
global $app; global $app;
if (isset($_GET["url"])) { if (isset($_GET["url"])) {
$app->response->headers->set('Content-Type', 'application/json');
try { try {
$video = VideoDownload::getJSON($_GET["url"]); $video = VideoDownload::getJSON($_GET["url"]);
echo json_encode($video); return $response->withJson($video);
} catch (\Exception $e) { } catch (\Exception $e) {
echo json_encode(array('success'=>false, 'error'=>$e->getMessage())); return $response->withJson(
array('success'=>false, 'error'=>$e->getMessage())
);
} }
} }
} }

View file

@ -15,16 +15,16 @@
require_once __DIR__.'/vendor/autoload.php'; require_once __DIR__.'/vendor/autoload.php';
use Alltube\VideoDownload; use Alltube\VideoDownload;
$app = new \Slim\Slim( $app = new \Slim\App();
array( $container = $app->getContainer();
'view' => new \Slim\Views\Smarty() $container['view'] = function ($c) {
) $view = new \Slim\Views\Smarty(__DIR__.'/templates/');
);
$view = $app->view(); $view->addSlimPlugins($c['router'], $c['request']->getUri());
$view->parserExtensions = array(
__DIR__.'/vendor/slim/views/SmartyPlugins', return $view;
__DIR__.'/vendor/rudloff/smarty-plugin-noscheme/' };
);
$app->get( $app->get(
'/', '/',
array('Alltube\Controller\FrontController', 'index') array('Alltube\Controller\FrontController', 'index')
@ -32,11 +32,11 @@ $app->get(
$app->get( $app->get(
'/extractors', '/extractors',
array('Alltube\Controller\FrontController', 'extractors') array('Alltube\Controller\FrontController', 'extractors')
)->name('extractors'); )->setName('extractors');
$app->get( $app->get(
'/video', '/video',
array('Alltube\Controller\FrontController', 'video') array('Alltube\Controller\FrontController', 'video')
)->name('video'); )->setName('video');
$app->get( $app->get(
'/redirect', '/redirect',
array('Alltube\Controller\FrontController', 'redirect') array('Alltube\Controller\FrontController', 'redirect')

View file

@ -17,6 +17,6 @@
· ·
</div> </div>
</footer> </footer>
<script src="{siteUrl|noscheme|replace:'index.php':'' url='dist/main.js'}"></script> <script src="{base_url}/dist/main.js"></script>
</body> </body>
</html> </html>

View file

@ -4,21 +4,26 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name=viewport content="width=device-width, initial-scale=1"> <meta name=viewport content="width=device-width, initial-scale=1">
<meta name="description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." /> <meta name="description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." />
<link rel="stylesheet" href="{siteUrl|noscheme|replace:'index.php':'' url='dist/main.css'}" /> <link rel="stylesheet" href="{base_url}/dist/main.css" />
<link rel="author" href="https://plus.google.com/110403274854419000481?rel=author" /> <link rel="author" href="https://plus.google.com/110403274854419000481?rel=author" />
<link rel="author" href="https://plus.google.com/103696815796116179392?rel=author" /> <link rel="author" href="https://plus.google.com/103696815796116179392?rel=author" />
<link href="https://plus.google.com/108799967445657477255" rel="publisher" /> <link href="https://plus.google.com/108799967445657477255" rel="publisher" />
<title itemprop="name">AllTube Download</title> <title itemprop="name">AllTube Download</title>
<meta itemprop="url" content="{siteUrl}" /> <meta itemprop="url" content="{base_url}" />
<link rel="canonical" href="{currentUrl|replace:{siteUrl}:'http://www.alltubedownload.net/'}" /> {if isset($smarty.server.HTTPS)}
<link rel="icon" href="{siteUrl|noscheme|replace:'index.php':'' url='img/favicon.png'}" /> {$scheme = "https://"}
<meta property="og:url" content="{siteUrl}" /> {else}
{$scheme = "http://"}
{/if}
<link rel="canonical" href="{$scheme|cat:$smarty.server.HTTP_HOST|cat:$smarty.server.REQUEST_URI|replace:{base_url}:'http://www.alltubedownload.net'}" />
<link rel="icon" href="{base_url}/img/favicon.png" />
<meta property="og:url" content="{base_url}" />
<meta property="og:title" content="AllTube Download" /> <meta property="og:title" content="AllTube Download" />
<meta property="og:description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." /> <meta property="og:description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." />
<meta property="og:image" content="{siteUrl|replace:'index.php':'' url='img/logo.png'}" /> <meta property="og:image" content="{base_url}/img/logo.png" />
<meta name="twitter:card" content="summary" /> <meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="AllTube Download" /> <meta name="twitter:title" content="AllTube Download" />
<meta name="twitter:image" content="{siteUrl|replace:'index.php':'' url='img/logo.png'}" /> <meta name="twitter:image" content="{base_url}/img/logo.png" />
<meta name="twitter:creator" content="@Tael67" /> <meta name="twitter:creator" content="@Tael67" />
<meta name="twitter:description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." /> <meta name="twitter:description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." />
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script> <script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>

View file

@ -1,8 +1,8 @@
<header> <header>
<div class="social"> <div class="social">
<a class="twitter" href="http://twitter.com/home?status={siteUrl|urlencode}" target="_blank"> <a class="twitter" href="http://twitter.com/home?status={base_url|urlencode}" target="_blank">
Share on Twitter<div class="twittermask"></div></a> Share on Twitter<div class="twittermask"></div></a>
<a class="facebook" href="https://www.facebook.com/sharer/sharer.php?u={siteUrl|urlencode}" target="_blank">Share on Facebook<div class="facebookmask"></div></a> <a class="facebook" href="https://www.facebook.com/sharer/sharer.php?u={base_url|urlencode}" target="_blank">Share on Facebook<div class="facebookmask"></div></a>
</div> </div>
</header> </header>
<div class="wrapper"> <div class="wrapper">

View file

@ -1,7 +1,7 @@
<div class="main"> <div class="main">
<div><img itemprop="image" class="logo" src="{siteUrl|noscheme|replace:'index.php':'' url='img/logo.png'}" <div><img itemprop="image" class="logo" src="{base_url}/img/logo.png"
alt="AllTube Download" width="328" height="284"></div> alt="AllTube Download" width="328" height="284"></div>
<form action="{urlFor name="video"}"> <form action="{path_for name="video"}">
<label class="labelurl" for="url"> <label class="labelurl" for="url">
Copy here the URL of your video (Youtube, Dailymotion, etc.) Copy here the URL of your video (Youtube, Dailymotion, etc.)
</label> </label>
@ -20,10 +20,10 @@
{/if} {/if}
</div> </div>
</form> </form>
<a class="combatiblelink" href="{urlFor name="extractors"}">See all supported websites</a> <a class="combatiblelink" href="{path_for name="extractors"}">See all supported websites</a>
<div id="bookmarklet"> <div id="bookmarklet">
<p> Drag this to your bookmarks bar: </p> <p> Drag this to your bookmarks bar: </p>
<a class="bookmarklet" href="javascript:window.location='{siteUrl withUri=false}{urlFor name='video'}?url='+encodeURIComponent(location.href);">Bookmarklet</a> <a class="bookmarklet" href="javascript:window.location='{base_url}{path_for name='video'}?url='+encodeURIComponent(location.href);">Bookmarklet</a>
</div> </div>
</div> </div>

View file

@ -1,4 +1,4 @@
<h1 class="logobis"> <h1 class="logobis">
<a class="logocompatible" href="{siteUrl}"> <a class="logocompatible" href="{base_url}">
AllTube Download<span class="logocompatiblemask"><img src="{siteUrl|noscheme|replace:'index.php':'' url='img/logocompatiblemask.png'}" width="447" height="107" alt="" /></span> AllTube Download<span class="logocompatiblemask"><img src="{base_url}/img/logocompatiblemask.png" width="447" height="107" alt="" /></span>
</a></h1> </a></h1>

View file

@ -9,13 +9,13 @@
href="{$video->webpage_url}"> href="{$video->webpage_url}">
{$video->title}</a></i>. {$video->title}</a></i>.
<img class="cast_icon" id="cast_disabled" <img class="cast_icon" id="cast_disabled"
src="{siteUrl|noscheme|replace:'index.php':'' url='img/ic_media_route_disabled_holo_light.png'}" src="{base_url}/img/ic_media_route_disabled_holo_light.png"
alt="Google Cast™ is disabled" alt="Google Cast™ is disabled"
title="Google Cast is not supported on this browser." /> title="Google Cast is not supported on this browser." />
<img class="cast_btn cast_hidden cast_icon" id="cast_btn_launch" <img class="cast_btn cast_hidden cast_icon" id="cast_btn_launch"
src="{siteUrl|noscheme|replace:'index.php':'' url='img/ic_media_route_off_holo_light.png'}" src="{base_url}/img/ic_media_route_off_holo_light.png"
title="Cast to ChromeCast" alt="Google Cast™" /> title="Cast to ChromeCast" alt="Google Cast™" />
<img src="{siteUrl|noscheme|replace:'index.php':'' url='img/ic_media_route_on_holo_light.png'}" <img src="{base_url}/img/ic_media_route_on_holo_light.png"
alt="Casting to ChromeCast…" title="Stop casting" alt="Casting to ChromeCast…" title="Stop casting"
id="cast_btn_stop" class="cast_btn cast_hidden cast_icon" /></p> id="cast_btn_stop" class="cast_btn cast_hidden cast_icon" /></p>
{if isset($video->thumbnail)} {if isset($video->thumbnail)}