forked from arsava/dokuwiki-template-monobook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmediamanager.php
101 lines (90 loc) · 4.38 KB
/
mediamanager.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
/**
* 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 (http://www.gnu.org/licenses/gpl2.html)
* @author ARSAVA <[email protected]>
* @link https://www.dokuwiki.org/template:monobook
* @link https://www.dokuwiki.org/devel:templates
*/
//check if we are running within the DokuWiki environment
if (!defined("DOKU_INC")){
die();
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo hsc($lang["mediaselect"]); echo " - ".hsc($conf["title"]); ?></title>
<?php
//show meta-tags
tpl_metaheaders();
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 http://tools.dynamicdrive.com/favicon/
//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";
}else{
//default
echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/favicon.ico\" />\n";
}
//include default or userdefined Apple Touch Icon (see <http://j.mp/sx3NMT> for
//details)
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";
}else{
//default
echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/apple-touch-icon.png\" />\n";
}
//load userdefined js?
if (tpl_getConf("monobook_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 5.5000]><link rel="stylesheet" media="all" type="text/css" href="<?php echo DOKU_TPL; ?>static/3rd/monobook/IE50Fixes.css" /><![endif]-->
<!--[if IE 5.5000]><link rel="stylesheet" media="all" type="text/css" href="<?php echo DOKU_TPL; ?>static/3rd/monobook/IE55Fixes.css" /><![endif]-->
<!--[if IE 6]><link rel="stylesheet" media="all" type="text/css" href="<?php echo DOKU_TPL; ?>static/3rd/monobook/IE60Fixes.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" media="all" type="text/css" href="<?php echo DOKU_TPL; ?>static/3rd/monobook/IE70Fixes.css" /><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" charset="utf-8" src="<?php echo DOKU_TPL; ?>static/3rd/wikipedia/IEFixes.js"></script><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
</head>
<body>
<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></div>
<div id="mediamgr__content"><div class="pad">
<?php tpl_mediaContent() ?>
</div></div>
</div>
</body>
</html>