Initial commit

This commit is contained in:
Knah Tsaeb 2013-08-02 15:20:41 +02:00
commit 84725e5c46
9 changed files with 578 additions and 0 deletions

13
.project Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>theme.wiki.knah-tsaeb.local</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
<nature>com.aptana.projects.webnature</nature>
<nature>com.aptana.editor.php.phpNature</nature>
</natures>
</projectDescription>

134
detail.php Normal file
View File

@ -0,0 +1,134 @@
<?php
/**
* DokuWiki Image Detail Page
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Anika Henke <anika@selfthinker.org>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();
header('X-UA-Compatible: IE=edge,chrome=1');
?><!DOCTYPE html>
<html lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
<head>
<meta charset="utf-8" />
<title>
<?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?>
[<?php echo strip_tags($conf['title'])?>]
</title>
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
<?php tpl_metaheaders()?>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<?php echo tpl_favicon(array('favicon', 'mobile')) ?>
<?php tpl_includeFile('meta.html') ?>
</head>
<body>
<!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
<div id="dokuwiki__site"><div id="dokuwiki__top"
class="dokuwiki site mode_<?php echo $ACT ?>">
<?php include('tpl_header.php') ?>
<div class="wrapper group" id="dokuwiki__detail">
<!-- ********** CONTENT ********** -->
<div id="dokuwiki__content"><div class="pad group">
<?php if(!$ERROR): ?>
<div class="pageId"><span><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG)); ?></span></div>
<?php endif; ?>
<div class="page group">
<?php tpl_flush() ?>
<?php tpl_includeFile('pageheader.html') ?>
<!-- detail start -->
<?php
if($ERROR):
echo '<h1>'.$ERROR.'</h1>';
else: ?>
<h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1>
<?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?>
<div class="img_detail">
<dl>
<?php
// @todo: logic should be transferred to backend
$config_files = getConfigFiles('mediameta');
foreach ($config_files as $config_file) {
if(@file_exists($config_file)) {
include($config_file);
}
}
foreach($fields as $key => $tag){
$t = array();
if (!empty($tag[0])) {
$t = array($tag[0]);
}
if(is_array($tag[3])) {
$t = array_merge($t,$tag[3]);
}
$value = tpl_img_getTag($t);
if ($value) {
echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
if ($tag[2] == 'date') {
echo dformat($value);
} else {
echo hsc($value);
}
echo '</dd>';
}
}
?>
</dl>
</div>
<?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
<?php endif; ?>
</div>
<!-- detail stop -->
<?php tpl_includeFile('pagefooter.html') ?>
<?php tpl_flush() ?>
<?php /* doesn't make sense like this; @todo: maybe add tpl_imginfo()?
<div class="docInfo"><?php tpl_pageinfo(); ?></div>
*/ ?>
</div></div><!-- /content -->
<hr class="a11y" />
<!-- PAGE ACTIONS -->
<?php if (!$ERROR): ?>
<div id="dokuwiki__pagetools">
<h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
<div class="tools">
<ul>
<?php // View in media manager; @todo: transfer logic to backend
$imgNS = getNS($IMG);
$authNS = auth_quickaclcheck("$imgNS:*");
if (($authNS >= AUTH_UPLOAD) && function_exists('media_managerURL')) {
$mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG));
echo '<li><a href="'.$mmURL.'" class="mediaManager"><span>'.$lang['img_manager'].'</span></a></li>';
}
?>
<?php // Back to [ID]; @todo: transfer logic to backend
echo '<li><a href="'.wl($ID).'" class="back"><span>'.$lang['img_backto'].' '.$ID.'</span></a></li>';
?>
</ul>
</div>
</div>
<?php endif; ?>
</div><!-- /wrapper -->
<?php include('tpl_footer.php') ?>
</div></div><!-- /site -->
<!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]-->
</body>
</html>

97
main.php Normal file
View File

@ -0,0 +1,97 @@
<?php
/**
* DokuWiki Default Template 2012
*
* @link http://dokuwiki.org/template
* @author Anika Henke <anika@selfthinker.org>
* @author Clarence Lee <clarencedglee@gmail.com>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
header('X-UA-Compatible: IE=edge,chrome=1');
$hasSidebar = page_findnearest($conf['sidebar']);
$showSidebar = $hasSidebar && ($ACT=='show');
?><!DOCTYPE html>
<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
<head>
<meta charset="utf-8" />
<title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
<?php tpl_metaheaders() ?>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<?php echo tpl_favicon(array('favicon', 'mobile')) ?>
<?php tpl_includeFile('meta.html') ?>
</head>
<body>
<!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
<div id="dokuwiki__site"><div id="dokuwiki__top"
class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'showSidebar' : '';
?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
<?php include('tpl_header.php') ?>
<div class="wrapper group">
<?php if($showSidebar): ?>
<!-- ********** ASIDE ********** -->
<div id="dokuwiki__aside"><div class="pad include group">
<h3 class="toggle"><?php echo $lang['sidebar'] ?></h3>
<div class="content">
<?php tpl_flush() ?>
<?php tpl_includeFile('sidebarheader.html') ?>
<?php tpl_include_page($conf['sidebar'], 1, 1) ?>
<?php tpl_includeFile('sidebarfooter.html') ?>
</div>
</div></div><!-- /aside -->
<?php endif; ?>
<!-- ********** CONTENT ********** -->
<div id="dokuwiki__content"><div class="pad group">
<div class="pageId"><span><?php echo hsc($ID) ?></span></div>
<div class="page group">
<?php tpl_flush() ?>
<?php tpl_includeFile('pageheader.html') ?>
<!-- wikipage start -->
<?php tpl_content() ?>
<!-- wikipage stop -->
<?php tpl_includeFile('pagefooter.html') ?>
</div>
<div class="docInfo"><?php tpl_pageinfo() ?></div>
<?php tpl_flush() ?>
</div></div><!-- /content -->
<hr class="a11y" />
<!-- PAGE ACTIONS -->
<div id="dokuwiki__pagetools">
<h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
<div class="tools">
<ul>
<?php
tpl_action('edit', 1, 'li', 0, '<span>', '</span>');
tpl_action('revert', 1, 'li', 0, '<span>', '</span>');
tpl_action('revisions', 1, 'li', 0, '<span>', '</span>');
tpl_action('backlink', 1, 'li', 0, '<span>', '</span>');
tpl_action('subscribe', 1, 'li', 0, '<span>', '</span>');
tpl_action('top', 1, 'li', 0, '<span>', '</span>');
?>
</ul>
</div>
</div>
</div><!-- /wrapper -->
<?php include('tpl_footer.php') ?>
</div></div><!-- /site -->
<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
<div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
<!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]-->
</body>
</html>

46
mediamanager.php Normal file
View File

@ -0,0 +1,46 @@
<?php
/**
* DokuWiki Media Manager Popup
*
* @author Andreas Gohr <andi@splitbrain.org>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();
header('X-UA-Compatible: IE=edge,chrome=1');
?><!DOCTYPE html>
<html lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="popup no-js">
<head>
<meta charset="utf-8" />
<title>
<?php echo hsc($lang['mediaselect'])?>
[<?php echo strip_tags($conf['title'])?>]
</title>
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
<?php tpl_metaheaders()?>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<?php echo tpl_favicon(array('favicon', 'mobile')) ?>
<?php tpl_includeFile('meta.html') ?>
</head>
<body>
<!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
<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>
<!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]-->
</body>
</html>

79
script.js Normal file
View File

@ -0,0 +1,79 @@
/**
* We handle several device classes based on browser width.
*
* - desktop: > __tablet_width__ (as set in style.ini)
* - mobile:
* - tablet <= __tablet_width__
* - phone <= __phone_width__
*/
var device_class = ''; // not yet known
var device_classes = 'desktop mobile tablet phone';
function tpl_dokuwiki_mobile(){
// the z-index in mobile.css is (mis-)used purely for detecting the screen mode here
var screen_mode = jQuery('#screen__mode').css('z-index') + '';
// determine our device pattern
// TODO: consider moving into dokuwiki core
switch (screen_mode) {
case '1':
if (device_class.match(/tablet/)) return;
device_class = 'mobile tablet';
break;
case '2':
if (device_class.match(/phone/)) return;
device_class = 'mobile phone';
break;
default:
if (device_class == 'desktop') return;
device_class = 'desktop';
}
jQuery('html').removeClass(device_classes).addClass(device_class);
// handle some layout changes based on change in device
var $handle = jQuery('#dokuwiki__aside h3.toggle');
var $toc = jQuery('#dw__toc h3');
if (device_class == 'desktop') {
// reset for desktop mode
if($handle.length) {
$handle[0].setState(1);
$handle.hide();
}
if($toc.length) {
$toc[0].setState(1);
}
}
if (device_class.match(/mobile/)){
// toc and sidebar hiding
if($handle.length) {
$handle.show();
$handle[0].setState(-1);
}
if($toc.length) {
$toc[0].setState(-1);
}
}
}
jQuery(function(){
var resizeTimer;
dw_page.makeToggle('#dokuwiki__aside h3.toggle','#dokuwiki__aside div.content');
tpl_dokuwiki_mobile();
jQuery(window).bind('resize',
function(){
if (resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(tpl_dokuwiki_mobile,200);
}
);
// increase sidebar length to match content (desktop mode only)
var $sidebar = jQuery('.desktop #dokuwiki__aside');
if($sidebar.length) {
var $content = jQuery('#dokuwiki__content div.page');
$content.css('min-height', $sidebar.height());
}
});

79
style.ini Normal file
View File

@ -0,0 +1,79 @@
; Please see http://www.php.net/manual/en/function.parse-ini-file.php
; for limitations of the ini format used here
; To extend this file or make changes to it, it is recommended to create
; a style.local.ini file to prevent losing any changes after an upgrade.
; Please don't forget to copy the section your changes should be under
; (i.e. [stylesheets] or [replacements]) into that file as well.
; Define the stylesheets your template uses here. The second value
; defines for which output media the style should be loaded. Currently
; print, screen and all are supported.
[stylesheets]
css/basic.css = screen
css/_imgdetail.css = screen
css/_media_popup.css = screen
css/_media_fullscreen.css = screen
css/_fileuploader.css = screen
css/_tabs.css = screen
css/_links.css = screen
css/_toc.css = screen
css/_footnotes.css = screen
css/_search.css = screen
css/_recent.css = screen
css/_diff.css = screen
css/_edit.css = screen
css/_modal.css = screen
css/_forms.css = screen
css/_admin.css = screen
css/structure.css = screen
css/design.css = screen
css/pagetools.css = screen
css/content.css = screen
css/includes.css = screen
css/mobile.css = all
css/print.css = print
; This section is used to configure some placeholder values used in
; the stylesheets. Changing this file is the simplest method to
; give your wiki a new look.
[replacements]
;--------------------------------------------------------------------------
;------ guaranteed dokuwiki color placeholders that every plugin can use
; main text and background colors
__text__ = "#333"
__background__ = "#fff"
; alternative text and background colors
__text_alt__ = "#999"
__background_alt__ = "#eee"
; neutral text and background colors
__text_neu__ = "#666"
__background_neu__ = "#ddd"
; border color
__border__ = "#ccc"
; highlighted text (e.g. search snippets)
__highlight__ = "#ff9"
;--------------------------------------------------------------------------
__background_site__ = "#fbfaf9"
; these are used for links
__link__ = "#2b73b7"
__existing__ = "#080"
__missing__ = "#d30"
; site and sidebar widths
__site_width__ = "75em"
__sidebar_width__ = "16em"
; cut off points for mobile devices
__tablet_width__ = "800px"
__phone_width__ = "480px"

7
template.info.txt Normal file
View File

@ -0,0 +1,7 @@
base dokuwiki
author Knah Tsaeb
email knah-tsaeb_dokuwiki@knah-tsaeb.org
date 2013-08-01
name Knah Tsaeb Template
desc Base on DokuWiki template
url http://www.dokuwiki.org/template:dokuwiki

32
tpl_footer.php Normal file
View File

@ -0,0 +1,32 @@
<?php
/**
* Template footer, included in the main and detail files
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();
?>
<!-- ********** FOOTER ********** -->
<div id="dokuwiki__footer"><div class="pad">
<?php tpl_license(''); // license text ?>
<div class="buttons">
<?php
tpl_license('button', true, false, false); // license button, no wrapper
$target = ($conf['target']['extern']) ? 'target="'.$conf['target']['extern'].'"' : '';
?>
<a href="http://www.dokuwiki.org/donate" title="Donate" <?php echo $target?>><img
src="<?php echo tpl_basedir(); ?>images/button-donate.gif" width="80" height="15" alt="Donate" /></a>
<a href="http://www.php.net" title="Powered by PHP" <?php echo $target?>><img
src="<?php echo tpl_basedir(); ?>images/button-php.gif" width="80" height="15" alt="Powered by PHP" /></a>
<a href="http://validator.w3.org/check/referer" title="Valid HTML5" <?php echo $target?>><img
src="<?php echo tpl_basedir(); ?>images/button-html5.png" width="80" height="15" alt="Valid HTML5" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3" title="Valid CSS" <?php echo $target?>><img
src="<?php echo tpl_basedir(); ?>images/button-css.png" width="80" height="15" alt="Valid CSS" /></a>
<a href="http://dokuwiki.org/" title="Driven by DokuWiki" <?php echo $target?>><img
src="<?php echo tpl_basedir(); ?>images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a>
</div>
</div></div><!-- /footer -->
<?php tpl_includeFile('footer.html') ?>

91
tpl_header.php Normal file
View File

@ -0,0 +1,91 @@
<?php
/**
* Template header, included in the main and detail files
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();
?>
<!-- ********** HEADER ********** -->
<div id="dokuwiki__header"><div class="pad group">
<?php tpl_includeFile('header.html') ?>
<div class="headings group">
<ul class="a11y skip">
<li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content']; ?></a></li>
</ul>
<h1><?php
// get logo either out of the template images folder or data/media folder
$logoSize = array();
$logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize);
// display logo and wiki title in a link to the home page
tpl_link(
wl(),
'<img src="'.$logo.'" '.$logoSize[3].' alt="" /> <span>'.$conf['title'].'</span>',
'accesskey="h" title="[H]"'
);
?></h1>
<?php if ($conf['tagline']): ?>
<p class="claim"><?php echo $conf['tagline']; ?></p>
<?php endif ?>
</div>
<div class="tools group">
<!-- USER TOOLS -->
<?php if ($conf['useacl']): ?>
<div id="dokuwiki__usertools">
<h3 class="a11y"><?php echo $lang['user_tools']; ?></h3>
<ul>
<?php
if ($_SERVER['REMOTE_USER']) {
echo '<li class="user">';
tpl_userinfo(); /* 'Logged in as ...' */
echo '</li>';
}
tpl_action('admin', 1, 'li');
tpl_action('profile', 1, 'li');
tpl_action('register', 1, 'li');
tpl_action('login', 1, 'li');
?>
</ul>
</div>
<?php endif ?>
<!-- SITE TOOLS -->
<div id="dokuwiki__sitetools">
<h3 class="a11y"><?php echo $lang['site_tools']; ?></h3>
<?php tpl_searchform(); ?>
<div class="mobileTools">
<?php tpl_actiondropdown($lang['tools']); ?>
</div>
<ul>
<?php
tpl_action('recent', 1, 'li');
tpl_action('media', 1, 'li');
tpl_action('index', 1, 'li');
?>
</ul>
</div>
</div>
<!-- BREADCRUMBS -->
<?php if($conf['breadcrumbs'] || $conf['youarehere']): ?>
<div class="breadcrumbs">
<?php if($conf['youarehere']): ?>
<div class="youarehere"><?php tpl_youarehere() ?></div>
<?php endif ?>
<?php if($conf['breadcrumbs']): ?>
<div class="trace"><?php tpl_breadcrumbs() ?></div>
<?php endif ?>
</div>
<?php endif ?>
<?php html_msgarea() ?>
<hr class="a11y" />
</div></div><!-- /header -->