1<?php
2
3/**
4 * DokuWiki Media Manager Popup
5 *
6 * NOTE: Based on the mediamanager.php out of the "starter" template by
7 *       Anika Henke.
8 *
9 *
10 * LICENSE: This file is open source software (OSS) and may be copied under
11 *          certain conditions. See COPYING file for details or try to contact
12 *          the author(s) of this file in doubt.
13 *
14 * @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
15 * @author ARSAVA <dokuwiki@dev.arsava.com>
16 * @link https://www.dokuwiki.org/template:mnml-blog
17 * @link https://www.dokuwiki.org/devel:templates
18 * @link https://www.dokuwiki.org/devel:coding_style
19 * @link https://www.dokuwiki.org/devel:environment
20 * @link https://www.dokuwiki.org/devel:action_modes
21 */
22
23//check if we are running within the DokuWiki environment
24if (!defined("DOKU_INC")){
25    die();
26}
27
28?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
29  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
30<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">
31<head>
32<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
33<title><?php echo hsc($lang["mediaselect"]); echo " - ".hsc($conf["title"]); ?></title>
34<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
35<?php
36//show meta-tags
37tpl_metaheaders();
38echo "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />";
39
40//include default or userdefined favicon
41//
42//note: since 2011-04-22 "Rincewind RC1", there is a core function named
43//      "tpl_getFavicon()". But its functionality is not really fitting the
44//      behaviour of this template, therefore I don't use it here exclusively.
45if (file_exists(DOKU_TPLINC."user/favicon.ico")){
46    //user defined - you might find http://tools.dynamicdrive.com/favicon/
47    //useful to generate one
48    echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.ico\" />\n";
49}elseif (file_exists(DOKU_TPLINC."user/favicon.png")){
50    //note: I do NOT recommend PNG for favicons (cause it is not supported by
51    //all browsers).
52    echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.png\" />\n";
53}else{
54    //default
55    echo "\n<link rel=\"shortcut icon\" href=\"".(function_exists("tpl_getFavicon") ? tpl_getFavicon() : DOKU_TPL."images/favicon.ico")."\" />\n";
56}
57
58//include default or userdefined Apple Touch Icon (see <http://j.mp/sx3NMT> for
59//details)
60if (file_exists(DOKU_TPLINC."user/apple-touch-icon.png")){
61    echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."user/apple-touch-icon.png\" />\n";
62}else{
63    //default
64    echo "<link rel=\"apple-touch-icon\" href=\"".(function_exists("tpl_getFavicon") ? tpl_getFavicon(false, "apple-touch-icon.png") : DOKU_TPL."images/apple-touch-icon.png")."\" />\n";
65}
66
67//load userdefined js?
68if (tpl_getConf("mnmlblog_loaduserjs")){
69    echo "<script type=\"text/javascript\" charset=\"utf-8\" src=\"".DOKU_TPL."user/user.js\"></script>\n";
70}
71?>
72<!--[if lte IE 8]><link rel="stylesheet" media="all" type="text/css" href="<?php echo DOKU_TPL; ?>css/mnml-blog_screen_iehacks.css" /><![endif]-->
73<!--[if lt IE 7]><style type="text/css">img { behavior: url(<?php echo DOKU_TPL; ?>js/iepngfix/iepngfix.htc); }</style><![endif]-->
74</head>
75
76<body>
77    <div id="media__manager" class="dokuwiki">
78        <?php html_msgarea() ?>
79        <div id="mediamgr__aside"><div class="pad">
80            <h1><?php echo hsc($lang['mediaselect'])?></h1>
81
82            <?php /* keep the id! additional elements are inserted via JS here */?>
83            <div id="media__opts"></div>
84
85            <?php tpl_mediaTree() ?>
86        </div></div>
87
88        <div id="mediamgr__content"><div class="pad">
89            <?php tpl_mediaContent() ?>
90        </div></div>
91    </div>
92</body>
93</html>
94