You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

98 lines
3.7 KiB

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