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) 15*e3217ae2SAndreas Haerter * @author ARSAVA <dokuwiki@dev.arsava.com> 16*e3217ae2SAndreas Haerter * @link https://www.dokuwiki.org/template:vector 17*e3217ae2SAndreas 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(); 346d885141SAndreas Haerterecho "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />"; 35fa5fcacaSAndreas Haerter 366d885141SAndreas Haerter//manually load needed CSS? this is a workaround for PHP Bug #49642. In some 376d885141SAndreas Haerter//version/os combinations PHP is not able to parse INI-file entries if there 386d885141SAndreas Haerter//are slashes "/" used for the keynames (see bugreport for more information: 396d885141SAndreas Haerter//<http://bugs.php.net/bug.php?id=49692>). to trigger this workaround, simply 406d885141SAndreas Haerter//delete/rename vector's style.ini. 416d885141SAndreas Haerterif (!file_exists(DOKU_TPLINC."style.ini")){ 426d885141SAndreas Haerter echo "<link rel=\"stylesheet\" media=\"all\" type=\"text/css\" href=\"".DOKU_TPL."bug49642.php".((!empty($lang["direction"]) && $lang["direction"] === "rtl") ? "?langdir=rtl" : "")."\" />\n"; //var comes from DokuWiki core 436d885141SAndreas Haerter} 446d885141SAndreas Haerter 456d885141SAndreas Haerter//include default or userdefined favicon 466d885141SAndreas Haerter// 476d885141SAndreas Haerter//note: since 2011-04-22 "Rincewind RC1", there is a core function named 486d885141SAndreas Haerter// "tpl_getFavicon()". But its functionality is not really fitting the 496d885141SAndreas Haerter// behaviour of this template, therefore I don't use it here. 506d885141SAndreas Haerterif (file_exists(DOKU_TPLINC."user/favicon.ico")){ 516d885141SAndreas Haerter //user defined - you might find http://tools.dynamicdrive.com/favicon/ 526d885141SAndreas Haerter //useful to generate one 536d885141SAndreas Haerter echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.ico\" />\n"; 546d885141SAndreas Haerter}elseif (file_exists(DOKU_TPLINC."user/favicon.png")){ 556d885141SAndreas Haerter //note: I do NOT recommend PNG for favicons (cause it is not supported by 566d885141SAndreas Haerter //all browsers), but some users requested this feature. 576d885141SAndreas Haerter echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.png\" />\n"; 586d885141SAndreas Haerter}else{ 596d885141SAndreas Haerter //default 606d885141SAndreas Haerter echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/favicon.ico\" />\n"; 616d885141SAndreas Haerter} 626d885141SAndreas Haerter 636d885141SAndreas Haerter//include default or userdefined Apple Touch Icon (see <http://j.mp/sx3NMT> for 646d885141SAndreas Haerter//details) 656d885141SAndreas Haerterif (file_exists(DOKU_TPLINC."user/apple-touch-icon.png")){ 666d885141SAndreas Haerter echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."user/apple-touch-icon.png\" />\n"; 676d885141SAndreas Haerter}else{ 686d885141SAndreas Haerter //default 696d885141SAndreas Haerter echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/apple-touch-icon.png\" />\n"; 706d885141SAndreas Haerter} 716d885141SAndreas Haerter 726d885141SAndreas Haerter//load userdefined js? 736d885141SAndreas Haerterif (tpl_getConf("vector_loaduserjs")){ 746d885141SAndreas Haerter echo "<script type=\"text/javascript\" charset=\"utf-8\" src=\"".DOKU_TPL."user/user.js\"></script>\n"; 756d885141SAndreas Haerter} 766d885141SAndreas Haerter 776d885141SAndreas Haerter//load language specific css hacks? 786d885141SAndreas Haerterif (file_exists(DOKU_TPLINC."lang/".$conf["lang"]."/style.css")){ 796d885141SAndreas Haerter $interim = trim(file_get_contents(DOKU_TPLINC."lang/".$conf["lang"]."/style.css")); 806d885141SAndreas Haerter if (!empty($interim)){ 816d885141SAndreas Haerter echo "<style type=\"text/css\" media=\"all\">\n".hsc($interim)."\n</style>\n"; 826d885141SAndreas Haerter } 836d885141SAndreas Haerter} 846d885141SAndreas Haerter?> 85ab856294SAndreas Haerter<!--[if lte IE 8]><link rel="stylesheet" media="all" type="text/css" href="<?php echo DOKU_TPL; ?>static/css/screen_iehacks.css" /><![endif]--> 866d885141SAndreas Haerter<!--[if lt IE 7]><style type="text/css">body{behavior:url("<?php echo DOKU_TPL; ?>static/3rd/vector/csshover.htc")}</style><![endif]--> 876d885141SAndreas Haerter</head> 886d885141SAndreas Haerter 896d885141SAndreas Haerter<body> 906d885141SAndreas Haerter <div id="media__manager" class="dokuwiki"> 916d885141SAndreas Haerter <?php html_msgarea() ?> 926d885141SAndreas Haerter <div id="mediamgr__aside"><div class="pad"> 936d885141SAndreas Haerter <h1><?php echo hsc($lang['mediaselect'])?></h1> 946d885141SAndreas Haerter 956d885141SAndreas Haerter <?php /* keep the id! additional elements are inserted via JS here */?> 966d885141SAndreas Haerter <div id="media__opts"></div> 976d885141SAndreas Haerter 986d885141SAndreas Haerter <?php tpl_mediaTree() ?> 996d885141SAndreas Haerter </div></div> 1006d885141SAndreas Haerter 1016d885141SAndreas Haerter <div id="mediamgr__content"><div class="pad"> 1026d885141SAndreas Haerter <?php tpl_mediaContent() ?> 1036d885141SAndreas Haerter </div></div> 1046d885141SAndreas Haerter </div> 1056d885141SAndreas Haerter</body> 1066d885141SAndreas Haerter</html> 107