Find file
Fetching contributors…
Cannot retrieve contributors at this time
98 lines (86 sloc) 3.75 KB
* DokuWiki Media Manager Popup
* NOTE: Based on the mediamanager.php out of the "starter" template by
* Anika Henke.
* LICENSE: This file is open source software (OSS) and may be copied under
* certain conditions. See COPYING file for details or try to contact
* the author(s) of this file in doubt.
* @license GPLv2 (
* @author ARSAVA <>
* @link
* @link
//check if we are running within the DokuWiki environment
if (!defined("DOKU_INC")){
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xml:lang="<?php echo hsc($conf["lang"]); ?>" lang="<?php echo hsc($conf["lang"]); ?>" dir="<?php echo hsc($lang["direction"]); ?>" class="popup">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo hsc($lang["mediaselect"]); echo " - ".hsc($conf["title"]); ?></title>
//show meta-tags
echo "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />";
//include default or userdefined favicon
//note: since 2011-04-22 "Rincewind RC1", there is a core function named
// "tpl_getFavicon()". But its functionality is not really fitting the
// behaviour of this template, therefore I don't use it here.
if (file_exists(DOKU_TPLINC."user/favicon.ico")){
//user defined - you might find
//useful to generate one
echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.ico\" />\n";
}elseif (file_exists(DOKU_TPLINC."user/favicon.png")){
//note: I do NOT recommend PNG for favicons (cause it is not supported by
//all browsers), but some users requested this feature.
echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.png\" />\n";
echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/favicon.ico\" />\n";
//include default or userdefined Apple Touch Icon (see <> for
if (file_exists(DOKU_TPLINC."user/apple-touch-icon.png")){
echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."user/apple-touch-icon.png\" />\n";
echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/apple-touch-icon.png\" />\n";
//load userdefined js?
if (tpl_getConf("vector_loaduserjs")){
echo "<script type=\"text/javascript\" charset=\"utf-8\" src=\"".DOKU_TPL."user/user.js\"></script>\n";
//load language specific css hacks?
if (file_exists(DOKU_TPLINC."lang/".$conf["lang"]."/style.css")){
$interim = trim(file_get_contents(DOKU_TPLINC."lang/".$conf["lang"]."/style.css"));
if (!empty($interim)){
echo "<style type=\"text/css\" media=\"all\">\n".hsc($interim)."\n</style>\n";
<!--[if lte IE 8]><link rel="stylesheet" media="all" type="text/css" href="<?php echo DOKU_TPL; ?>static/css/screen_iehacks.css" /><![endif]-->
<!--[if lt IE 7]><style type="text/css">body{behavior:url("<?php echo DOKU_TPL; ?>static/3rd/vector/")}</style><![endif]-->
<div id="media__manager" class="dokuwiki">
<?php html_msgarea() ?>
<div id="mediamgr__aside"><div class="pad">
<h1><?php echo hsc($lang['mediaselect'])?></h1>
<?php /* keep the id! additional elements are inserted via JS here */?>
<div id="media__opts"></div>
<?php tpl_mediaTree() ?>
<div id="mediamgr__content"><div class="pad">
<?php tpl_mediaContent() ?>