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