1fa5fcacaSAndreas Haerter<?php 2fa5fcacaSAndreas Haerter 3fa5fcacaSAndreas Haerter/** 46d885141SAndreas Haerter * DokuWiki Media Manager Popup 56d885141SAndreas Haerter * 66d885141SAndreas Haerter * NOTE: Based on the mediamanager.php out of the "starter" template by 76d885141SAndreas Haerter * Anika Henke. 8fa5fcacaSAndreas Haerter * 9fa5fcacaSAndreas Haerter * 10fa5fcacaSAndreas Haerter * LICENSE: This file is open source software (OSS) and may be copied under 11fa5fcacaSAndreas Haerter * certain conditions. See COPYING file for details or try to contact 12fa5fcacaSAndreas Haerter * the author(s) of this file in doubt. 13fa5fcacaSAndreas Haerter * 14fa5fcacaSAndreas Haerter * @license GPLv2 (http://www.gnu.org/licenses/gpl2.html) 15e3217ae2SAndreas Haerter * @author ARSAVA <dokuwiki@dev.arsava.com> 16e3217ae2SAndreas Haerter * @link https://www.dokuwiki.org/template:vector 17e3217ae2SAndreas Haerter * @link https://www.dokuwiki.org/devel:templates 18fa5fcacaSAndreas Haerter */ 19fa5fcacaSAndreas Haerter 20fa5fcacaSAndreas Haerter//check if we are running within the DokuWiki environment 21fa5fcacaSAndreas Haerterif (!defined("DOKU_INC")){ 22fa5fcacaSAndreas Haerter die(); 23fa5fcacaSAndreas Haerter} 24fa5fcacaSAndreas Haerter 256d885141SAndreas Haerter?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 266d885141SAndreas Haerter "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 27bba3b605SAndreas Haerter<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo hsc($conf["lang"]); ?>" lang="<?php echo hsc($conf["lang"]); ?>" dir="<?php echo hsc($lang["direction"]); ?>" class="popup"> 286d885141SAndreas Haerter<head> 296d885141SAndreas Haerter<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 306d885141SAndreas Haerter<title><?php echo hsc($lang["mediaselect"]); echo " - ".hsc($conf["title"]); ?></title> 316d885141SAndreas Haerter<?php 326d885141SAndreas Haerter//show meta-tags 336d885141SAndreas Haertertpl_metaheaders(); 34*23ebf7a6SRuben Carlo Benanteecho "<meta name=\"viewport\" content=\"width=device-width,initial-scale=0.8\" />"; 35fa5fcacaSAndreas Haerter 366d885141SAndreas Haerter//include default or userdefined favicon 376d885141SAndreas Haerter// 386d885141SAndreas Haerter//note: since 2011-04-22 "Rincewind RC1", there is a core function named 396d885141SAndreas Haerter// "tpl_getFavicon()". But its functionality is not really fitting the 406d885141SAndreas Haerter// behaviour of this template, therefore I don't use it here. 416d885141SAndreas Haerterif (file_exists(DOKU_TPLINC."user/favicon.ico")){ 426d885141SAndreas Haerter //user defined - you might find http://tools.dynamicdrive.com/favicon/ 436d885141SAndreas Haerter //useful to generate one 446d885141SAndreas Haerter echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.ico\" />\n"; 456d885141SAndreas Haerter}elseif (file_exists(DOKU_TPLINC."user/favicon.png")){ 466d885141SAndreas Haerter //note: I do NOT recommend PNG for favicons (cause it is not supported by 476d885141SAndreas Haerter //all browsers), but some users requested this feature. 486d885141SAndreas Haerter echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.png\" />\n"; 496d885141SAndreas Haerter}else{ 506d885141SAndreas Haerter //default 516d885141SAndreas Haerter echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/favicon.ico\" />\n"; 526d885141SAndreas Haerter} 536d885141SAndreas Haerter 546d885141SAndreas Haerter//include default or userdefined Apple Touch Icon (see <http://j.mp/sx3NMT> for 556d885141SAndreas Haerter//details) 566d885141SAndreas Haerterif (file_exists(DOKU_TPLINC."user/apple-touch-icon.png")){ 576d885141SAndreas Haerter echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."user/apple-touch-icon.png\" />\n"; 586d885141SAndreas Haerter}else{ 596d885141SAndreas Haerter //default 606d885141SAndreas Haerter echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/apple-touch-icon.png\" />\n"; 616d885141SAndreas Haerter} 626d885141SAndreas Haerter 636d885141SAndreas Haerter//load userdefined js? 646d885141SAndreas Haerterif (tpl_getConf("vector_loaduserjs")){ 656d885141SAndreas Haerter echo "<script type=\"text/javascript\" charset=\"utf-8\" src=\"".DOKU_TPL."user/user.js\"></script>\n"; 666d885141SAndreas Haerter} 676d885141SAndreas Haerter 686d885141SAndreas Haerter//load language specific css hacks? 696d885141SAndreas Haerterif (file_exists(DOKU_TPLINC."lang/".$conf["lang"]."/style.css")){ 706d885141SAndreas Haerter $interim = trim(file_get_contents(DOKU_TPLINC."lang/".$conf["lang"]."/style.css")); 716d885141SAndreas Haerter if (!empty($interim)){ 726d885141SAndreas Haerter echo "<style type=\"text/css\" media=\"all\">\n".hsc($interim)."\n</style>\n"; 736d885141SAndreas Haerter } 746d885141SAndreas Haerter} 756d885141SAndreas Haerter?> 76ab856294SAndreas Haerter<!--[if lte IE 8]><link rel="stylesheet" media="all" type="text/css" href="<?php echo DOKU_TPL; ?>static/css/screen_iehacks.css" /><![endif]--> 776d885141SAndreas Haerter<!--[if lt IE 7]><style type="text/css">body{behavior:url("<?php echo DOKU_TPL; ?>static/3rd/vector/csshover.htc")}</style><![endif]--> 786d885141SAndreas Haerter</head> 796d885141SAndreas Haerter 806d885141SAndreas Haerter<body> 816d885141SAndreas Haerter <div id="media__manager" class="dokuwiki"> 826d885141SAndreas Haerter <?php html_msgarea() ?> 836d885141SAndreas Haerter <div id="mediamgr__aside"><div class="pad"> 846d885141SAndreas Haerter <h1><?php echo hsc($lang['mediaselect'])?></h1> 856d885141SAndreas Haerter 866d885141SAndreas Haerter <?php /* keep the id! additional elements are inserted via JS here */?> 876d885141SAndreas Haerter <div id="media__opts"></div> 886d885141SAndreas Haerter 896d885141SAndreas Haerter <?php tpl_mediaTree() ?> 906d885141SAndreas Haerter </div></div> 916d885141SAndreas Haerter 926d885141SAndreas Haerter <div id="mediamgr__content"><div class="pad"> 936d885141SAndreas Haerter <?php tpl_mediaContent() ?> 946d885141SAndreas Haerter </div></div> 956d885141SAndreas Haerter </div> 966d885141SAndreas Haerter</body> 976d885141SAndreas Haerter</html> 98