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:vector
17 * @link https://www.dokuwiki.org/devel:templates
18 */
19
20//check if we are running within the DokuWiki environment
21if (!defined("DOKU_INC")){
22    die();
23}
24
25?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
26  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
27<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">
28<head>
29<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
30<title><?php echo hsc($lang["mediaselect"]); echo " - ".hsc($conf["title"]); ?></title>
31<?php
32//show meta-tags
33tpl_metaheaders();
34echo "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />";
35
36//include default or userdefined favicon
37//
38//note: since 2011-04-22 "Rincewind RC1", there is a core function named
39//      "tpl_getFavicon()". But its functionality is not really fitting the
40//      behaviour of this template, therefore I don't use it here.
41if (file_exists(DOKU_TPLINC."user/favicon.ico")){
42    //user defined - you might find http://tools.dynamicdrive.com/favicon/
43    //useful to generate one
44    echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.ico\" />\n";
45}elseif (file_exists(DOKU_TPLINC."user/favicon.png")){
46    //note: I do NOT recommend PNG for favicons (cause it is not supported by
47    //all browsers), but some users requested this feature.
48    echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."user/favicon.png\" />\n";
49}else{
50    //default
51    echo "\n<link rel=\"shortcut icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/favicon.ico\" />\n";
52}
53
54//include default or userdefined Apple Touch Icon (see <http://j.mp/sx3NMT> for
55//details)
56if (file_exists(DOKU_TPLINC."user/apple-touch-icon.png")){
57    echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."user/apple-touch-icon.png\" />\n";
58}else{
59    //default
60    echo "<link rel=\"apple-touch-icon\" href=\"".DOKU_TPL."static/3rd/dokuwiki/apple-touch-icon.png\" />\n";
61}
62
63//load userdefined js?
64if (tpl_getConf("vector_loaduserjs")){
65    echo "<script type=\"text/javascript\" charset=\"utf-8\" src=\"".DOKU_TPL."user/user.js\"></script>\n";
66}
67
68//load language specific css hacks?
69if (file_exists(DOKU_TPLINC."lang/".$conf["lang"]."/style.css")){
70  $interim = trim(file_get_contents(DOKU_TPLINC."lang/".$conf["lang"]."/style.css"));
71  if (!empty($interim)){
72      echo "<style type=\"text/css\" media=\"all\">\n".hsc($interim)."\n</style>\n";
73  }
74}
75?>
76<!--[if lte IE 8]><link rel="stylesheet" media="all" type="text/css" href="<?php echo DOKU_TPL; ?>static/css/screen_iehacks.css" /><![endif]-->
77<!--[if lt IE 7]><style type="text/css">body{behavior:url("<?php echo DOKU_TPL; ?>static/3rd/vector/csshover.htc")}</style><![endif]-->
78</head>
79
80<body>
81    <div id="media__manager" class="dokuwiki">
82        <?php html_msgarea() ?>
83        <div id="mediamgr__aside"><div class="pad">
84            <h1><?php echo hsc($lang['mediaselect'])?></h1>
85
86            <?php /* keep the id! additional elements are inserted via JS here */?>
87            <div id="media__opts"></div>
88
89            <?php tpl_mediaTree() ?>
90        </div></div>
91
92        <div id="mediamgr__content"><div class="pad">
93            <?php tpl_mediaContent() ?>
94        </div></div>
95    </div>
96</body>
97</html>
98