<?php
// PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: tdiary.skin.php,v 1.22 2005/04/23 11:40:00 henoheno Exp $
+// tdiary.skin.php
+// Copyright
+// 2002-2016 PukiWiki Development Team
+// 2001-2002 Originally written by yu-ji
+// License: GPL v2 or (at your option) any later version
//
-// tDiary-wrapper skin
+// tDiary-wrapper skin (Updated for tdiary-theme 2.1.2)
// ------------------------------------------------------------
// Settings (define before here, if you want)
+// Set site identities
+$_IMAGE['skin']['favicon'] = ''; // Sample: 'image/favicon.ico';
+
// Select theme
if (! defined('TDIARY_THEME'))
define('TDIARY_THEME', 'loose-leaf'); // Default
if (! isset($_LANG)) die('$_LANG is not set');
if (! defined('PKWK_READONLY')) die('PKWK_READONLY is not set');
-// Check theme
-$theme = TDIARY_THEME;
-if ($theme == '' || $theme == 'TDIARY_THEME') {
+// ------------------------------------------------------------
+// Check tDiary theme
+
+if (! defined('TDIARY_THEME') || TDIARY_THEME == '') {
die('Theme is not specified. Set "TDIARY_THEME" correctly');
} else {
- $theme = rawurlencode($theme); // Supress all nasty letters
+ $theme = rawurlencode(TDIARY_THEME); // Supress all nasty letters
$theme_css = SKIN_DIR . 'theme/' . $theme . '/' . $theme . '.css';
if (! file_exists($theme_css)) {
echo 'tDiary theme wrapper: ';
- echo 'Theme not found: ' . htmlspecialchars($theme_css) . '<br />';
+ echo 'Theme not found: ' . htmlsc($theme_css) . '<br />';
echo 'You can get tdiary-theme from: ';
- echo 'http://sourceforge.net/projects/tdiary/';
+ echo 'http://www.tdiary.org/';
exit;
}
}
// ------------------------------------------------------------
-// Exception
+// tDiary theme: Exception
// Adjust DTD (bug between these theme(=CSS) and MSIE)
// NOTE:
// Adjust reverse-link default design manually
$disable_backlink = FALSE;
switch(TDIARY_THEME){
-case 'hatena':
+case 'hatena': /* FALLTHROUGH */
+case 'hatena-black':
+case 'hatena-brown':
+case 'hatena-darkgray':
+case 'hatena-green':
+case 'hatena-lightblue':
+case 'hatena-lightgray':
+case 'hatena-purple':
+case 'hatena-red':
+case 'hatena-white':
+case 'hatena_cinnamon':
+case 'hatena_japanese':
+case 'hatena_leaf':
+case 'hatena_water':
$disable_backlink = TRUE; // or very viewable title color
break;
}
// ------------------------------------------------------------
-// Select CSS color theme (testing)
-$css_theme = '';
-switch(TDIARY_THEME){
-case 'alfa':
-case 'bill':
-case 'black-lingerie':
-case 'bubble':
-case 'cosmos':
-case 'darkness-pop':
-case 'fine':
-case 'fri':
-case 'giza':
-case 'kaizou':
-case 'lightning':
-case 'lime':
-case 'line':
-case 'midnight':
-case 'moo':
-case 'nachtmusik':
-case 'nebula':
-case 'nippon':
-case 'noel':
-case 'petith-b':
-case 'quiet_black':
-case 'redgrid':
-case 'starlight':
-case 'tinybox_green':
-case 'white-lingerie':
-case 'whiteout':
-case 'wine':
-case 'wood':
-case 'xmastree':
-case 'yukon':
- $css_theme = 'black';
-
-// Another theme needed?
-case 'bluely':
-case 'brown':
-case 'deepblue':
-case 'scarlet':
-case 'smoking_black':
- ;
+// tDiary theme: Select CSS color theme (Now testing:black only)
+
+if (defined('TDIARY_COLOR_THEME')) {
+ $css_theme = rawurlencode(TDIARY_COLOR_THEME);
+} else {
+ $css_theme = '';
+
+ switch(TDIARY_THEME){
+ case 'alfa':
+ case 'bill':
+ case 'black-lingerie':
+ case 'blackboard':
+ case 'bubble':
+ case 'cosmos':
+ case 'darkness-pop':
+ case 'digital_gadgets':
+ case 'fine':
+ case 'fri':
+ case 'giza':
+ case 'hatena-black':
+ case 'hatena_savanna-blue':
+ case 'hatena_savanna-green':
+ case 'hatena_savanna-red':
+ case 'kaizou':
+ case 'lightning':
+ case 'lime':
+ case 'line':
+ case 'midnight':
+ case 'moo':
+ case 'nachtmusik':
+ case 'nebula':
+ case 'nippon':
+ case 'noel':
+ case 'petith-b':
+ case 'quiet_black':
+ case 'redgrid':
+ case 'starlight':
+ case 'tinybox_green':
+ case 'white-lingerie':
+ case 'white_flower':
+ case 'whiteout':
+ case 'wine':
+ case 'wood':
+ case 'xmastree':
+ case 'yukon':
+ $css_theme = 'black';
+
+ // Another theme needed?
+ case 'bluely':
+ case 'brown':
+ case 'deepblue':
+ case 'scarlet':
+ case 'smoking_black':
+ ;
+ }
}
-// Select title design (which is fancy, date and text?)
-$title_design_date = 1; // Default: Select the date desin, or 'the same design'
-switch(TDIARY_THEME){
-case '3minutes':
-case 'aoikuruma':
-case 'black-lingerie':
-case 'blog':
-case 'book':
-case 'book2-feminine':
-case 'book3-sky':
-case 'candy':
-case 'cards':
-case 'desert':
-case 'dot':
-case 'himawari':
-case 'light-blue':
-case 'lovely':
-case 'lovely_pink':
-case 'lr':
-case 'magic':
-case 'maroon':
-case 'midnight':
-case 'momonga':
-case 'nande-ya-nen':
-case 'narrow':
-case 'natrium':
-case 'nebula':
-case 'orange':
-case 'parabola':
-case 'plum':
-case 'pool_side':
-case 'rainy-season':
-case 'right':
-case 's-blue':
-case 's-pink':
-case 'sky':
-case 'snow_man':
-case 'spring':
-case 'tag':
-case 'tdiarynet':
-case 'white-lingerie':
-case 'whiteout':
-case 'wood':
- $title_design_date = 0; // Select text design
- break;
+// ------------------------------------------------------------
+// tDiary theme: Page title design (which is fancy, date and text?)
-case 'arrow':
-case 'fluxbox':
-case 'fluxbox2':
-case 'fluxbox3':
- $title_design_date = 2; // Show both :)
- break;
+if (defined('TDIARY_TITLE_DESIGN_DATE') &&
+ (TDIARY_TITLE_DESIGN_DATE == 0 ||
+ TDIARY_TITLE_DESIGN_DATE == 1 ||
+ TDIARY_TITLE_DESIGN_DATE == 2)) {
+ $title_design_date = TDIARY_TITLE_DESIGN_DATE;
+} else {
+ $title_design_date = 1; // Default: Select the date desin, or 'the same design'
+ switch(TDIARY_THEME){
+ case '3minutes': /* FALLTHROUGH */
+ case '90':
+ case 'aoikuruma':
+ case 'black-lingerie':
+ case 'blog':
+ case 'book':
+ case 'book2-feminine':
+ case 'book3-sky':
+ case 'candy':
+ case 'cards':
+ case 'desert':
+ case 'dot':
+ case 'himawari':
+ case 'kitchen-classic':
+ case 'kitchen-french':
+ case 'kitchen-natural':
+ case 'light-blue':
+ case 'lovely':
+ case 'lovely_pink':
+ case 'lr':
+ case 'magic':
+ case 'maroon':
+ case 'midnight':
+ case 'momonga':
+ case 'nande-ya-nen':
+ case 'narrow':
+ case 'natrium':
+ case 'nebula':
+ case 'orange':
+ case 'parabola':
+ case 'plum':
+ case 'pool_side':
+ case 'rainy-season':
+ case 'right':
+ case 's-blue':
+ case 's-pink':
+ case 'sky':
+ case 'sleepy_kitten':
+ case 'snow_man':
+ case 'spring':
+ case 'tag':
+ case 'tdiarynet':
+ case 'treetop':
+ case 'white-lingerie':
+ case 'white_flower':
+ case 'whiteout':
+ case 'wood':
+ $title_design_date = 0; // Select text design
+ break;
+
+ case 'aqua':
+ case 'arrow':
+ case 'fluxbox':
+ case 'fluxbox2':
+ case 'fluxbox3':
+ case 'ymck':
+ $title_design_date = 2; // Show both :)
+ break;
+ }
}
-// Sidebar: default position
+// ------------------------------------------------------------
+// tDiary 'Sidebar' position
+
+// Default position
if (defined('TDIARY_SIDEBAR_POSITION')) {
$sidebar = TDIARY_SIDEBAR_POSITION;
} else {
// List of themes having sidebar CSS < (AllTheme / 2)
// $ grep div.sidebar */*.css | cut -d: -f1 | cut -d/ -f1 | sort | uniq
// $ wc -l *.txt
- // 78 list-sidebar.txt
- // 196 list-all.txt
+ // 142 list-sidebar.txt
+ // 286 list-all.txt
switch(TDIARY_THEME){
case '3minutes': /*FALLTHROUGH*/
case '3pink':
case 'aoikuruma':
+ case 'aqua':
case 'arrow':
+ case 'artnouveau-blue':
+ case 'artnouveau-green':
+ case 'artnouveau-red':
+ case 'asterisk-blue':
+ case 'asterisk-lightgray':
+ case 'asterisk-maroon':
+ case 'asterisk-orange':
+ case 'asterisk-pink':
case 'autumn':
case 'babypink':
- case 'be_r5';
+ case 'be_r5':
case 'bill':
case 'bistro_menu':
case 'bluely':
case 'book2-feminine':
case 'book3-sky':
case 'bright-green':
+ case 'britannian':
case 'bubble':
case 'candy':
case 'cat':
case 'cherry':
+ case 'cherry_blossom':
+ case 'chiffon_leafgreen':
+ case 'chiffon_pink':
+ case 'chiffon_skyblue':
case 'citrus':
case 'clover':
+ case 'colorlabel':
case 'cool_ice':
case 'cosmos':
+ case 'curtain':
case 'darkness-pop':
+ case 'delta':
case 'diamond_dust':
case 'dice':
+ case 'digital_gadgets':
+ case 'dot-lime':
+ case 'dot-orange':
+ case 'dot-pink':
+ case 'dot-sky':
+ case 'dotted_line-blue':
+ case 'dotted_line-green':
+ case 'dotted_line-red':
case 'emboss':
case 'flower':
case 'gear':
case 'germany':
case 'gray2':
+ case 'green_leaves':
case 'happa':
case 'hatena':
+ case 'hatena-black':
+ case 'hatena-brown':
+ case 'hatena-darkgray':
+ case 'hatena-green':
+ case 'hatena-lightblue':
+ case 'hatena-lightgray':
+ case 'hatena-lime':
+ case 'hatena-orange':
+ case 'hatena-pink':
+ case 'hatena-purple':
+ case 'hatena-red':
+ case 'hatena-sepia':
+ case 'hatena-tea':
+ case 'hatena-white':
+ case 'hatena_cinnamon':
+ case 'hatena_japanese':
+ case 'hatena_leaf':
+ case 'hatena_rainyseason':
+ case 'hatena_savanna-blue':
+ case 'hatena_savanna-green':
+ case 'hatena_savanna-red':
+ case 'hatena_savanna-white':
+ case 'hatena_water':
case 'himawari':
+ case 'jungler':
case 'kaeru':
+ case 'kitchen-classic':
+ case 'kitchen-french':
+ case 'kitchen-natural':
case 'kotatsu':
case 'light-blue':
case 'loose-leaf':
case 'nippon':
case 'note':
case 'old-pavement':
+ case 'orange_flower':
case 'pain':
case 'pale':
case 'paper':
case 'rainy-season':
case 'rectangle':
case 'repro':
+ case 'rim-daidaiiro':
+ case 'rim-fujiiro':
+ case 'rim-mizuiro':
+ case 'rim-sakurairo':
+ case 'rim-tanpopoiro':
+ case 'rim-wakabairo':
case 'russet':
case 's-blue':
case 'sagegreen':
case 'scarlet':
case 'sepia':
case 'simple':
+ case 'sleepy_kitten':
case 'smoking_black':
case 'smoking_white':
case 'spring':
case 'tile':
case 'tinybox':
case 'tinybox_green':
+ case 'treetop':
+ case 'white_flower':
case 'wine':
case 'yukon':
+ case 'zef':
$sidebar = 'bottom'; // This is the default position of tDiary's.
break;
}
// Manually adjust sidebar's default position
switch(TDIARY_THEME){
+ // 'bottom'
+ case '90': // But upper navigatin UI will be hidden by sidebar
+ case 'blackboard':
+ case 'quirky':
+ case 'quirky2':
+ $sidebar = 'bottom';
+ break;
+
// 'top': Assuming sidebar is above of the body
case 'autumn': /*FALLTHROUGH*/
case 'cosmos':
case 'sunset':
case 'tinybox': // For MSIE with narrow window width, seems meanless
case 'tinybox_green': // The same
+ case 'ymck':
$sidebar = 'top';
break;
case '3minutes': /*FALLTHROUGH*/
case '3pink':
case 'aoikuruma':
+ case 'aqua':
+ case 'artnouveau-blue':
+ case 'artnouveau-green':
+ case 'artnouveau-red':
+ case 'asterisk-blue':
+ case 'asterisk-lightgray':
+ case 'asterisk-maroon':
+ case 'asterisk-orange':
+ case 'asterisk-pink':
case 'bill':
case 'candy':
case 'cat':
+ case 'chiffon_leafgreen':
+ case 'chiffon_pink':
+ case 'chiffon_skyblue':
+ case 'city':
case 'clover':
+ case 'colorlabel':
case 'cool_ice':
+ case 'dot-lime':
+ case 'dot-orange':
+ case 'dot-pink':
+ case 'dot-sky':
+ case 'dotted_line-blue':
+ case 'dotted_line-green':
+ case 'dotted_line-red':
case 'flower':
case 'germany':
+ case 'green-tea':
+ case 'hatena':
+ case 'hatena-black':
+ case 'hatena-brown':
+ case 'hatena-darkgray':
+ case 'hatena-green':
+ case 'hatena-lightblue':
+ case 'hatena-lightgray':
+ case 'hatena-lime':
+ case 'hatena-orange':
+ case 'hatena-pink':
+ case 'hatena-purple':
+ case 'hatena-red':
+ case 'hatena-sepia':
+ case 'hatena-tea':
+ case 'hatena-white':
case 'hiki':
case 'himawari':
+ case 'kasumi':
+ case 'kitchen-classic':
+ case 'kitchen-french':
+ case 'kitchen-natural':
case 'kotatsu':
+ case 'kurenai':
case 'light-blue':
case 'loose-leaf':
case 'marguerite':
case 'matcha':
+ case 'memo':
+ case 'memo2':
+ case 'memo3':
+ case 'mirage':
case 'mizu':
case 'mono':
case 'moo': // For MSIE, strict seems meanless
+ case 'navy':
+ case 'pict':
+ case 'pokke-blue':
+ case 'pokke-orange':
+ case 'query000':
+ case 'query011':
+ case 'query101':
+ case 'query110':
+ case 'query111or':
case 'puppy':
case 'rainy-season':
case 's-blue': // For MSIE, strict seems meanless
case 'scarlet':
case 'sepia':
case 'simple':
+ case 'smoking_gray':
case 'spring':
case 'teacup':
case 'wine':
$sidebar = 'strict';
break;
- // 'another': They have sidebar-design, but can not show it at the 'side' of the contents
+ // 'another': They have sidebar-design, but can not show it
+ // at the 'side' of the contents
case 'babypink': /*FALLTHROUGH*/
case 'bubble':
case 'cherry':
case 'darkness-pop':
case 'diamond_dust':
case 'gear':
+ case 'necktie':
case 'pale':
case 'pink-border':
case 'rectangle':
case 'russet':
case 'smoking_black':
+ case 'zef':
$sidebar = 'another'; // Show as an another page below
break;
}
}
// ------------------------------------------------------------
+// Code continuing ...
$lang = & $_LANG['skin'];
$link = & $_LINK;
+$image = & $_IMAGE['skin'];
$rw = ! PKWK_READONLY;
-// Decide charset for CSS
-$css_charset = 'iso-8859-1';
-switch(UI_LANG){
- case 'ja': $css_charset = 'Shift_JIS'; break;
-}
-
// ------------------------------------------------------------
+// Output
-// Output HTTP headers
+// HTTP headers
pkwk_common_headers();
header('Cache-control: no-cache');
header('Pragma: no-cache');
header('Content-Type: text/html; charset=' . CONTENT_CHARSET);
-// Output HTML DTD, <html>, and receive content-type
+// HTML DTD, <html>, and receive content-type
if (isset($pkwk_dtd)) {
$meta_content_type = pkwk_output_dtd($pkwk_dtd);
} else {
<head>
<?php echo $meta_content_type ?>
<meta http-equiv="content-style-type" content="text/css" />
-<?php if (! $is_read) { ?> <meta name="robots" content="NOINDEX,NOFOLLOW" /><?php } ?>
+<?php if ($nofollow || ! $is_read) { ?> <meta name="robots" content="NOINDEX,NOFOLLOW" /><?php } ?>
<?php if (PKWK_ALLOW_JAVASCRIPT && isset($javascript)) { ?> <meta http-equiv="Content-Script-Type" content="text/javascript" /><?php } ?>
<title><?php echo $title ?> - <?php echo $page_title ?></title>
- <link rel="stylesheet" href="skin/theme/base.css" type="text/css" media="all" />
- <link rel="stylesheet" href="skin/theme/<?php echo $theme ?>/<?php echo $theme ?>.css" type="text/css" media="all" />
- <link rel="stylesheet" href="skin/tdiary.css.php?charset=<?php echo $css_charset ?>&color=<?php echo $css_theme ?>" type="text/css" media="screen" charset="<?php echo $css_charset ?>" />
- <link rel="stylesheet" href="skin/tdiary.css.php?charset=<?php echo $css_charset ?>&color=<?php echo $css_theme ?>&media=print" type="text/css" media="print" charset="<?php echo $css_charset ?>" />
-
+ <link rel="SHORTCUT ICON" href="<?php echo $image['favicon'] ?>" />
+ <link rel="stylesheet" type="text/css" media="all" href="<?php echo SKIN_DIR ?>theme/base.css" />
+ <link rel="stylesheet" type="text/css" media="all" href="<?php echo SKIN_DIR ?>theme/<?php echo $theme ?>/<?php echo $theme ?>.css" />
+ <link rel="stylesheet" type="text/css" href="<?php echo SKIN_DIR ?>tdiary.css.php?color=<?php echo $css_theme ?>" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $link['rss'] ?>" /><?php // RSS auto-discovery ?>
-<?php if (PKWK_ALLOW_JAVASCRIPT && $trackback_javascript) { ?> <script type="text/javascript" src="skin/trackback.js"></script><?php } ?>
-
<?php echo $head_tag ?>
</head>
-<body><!-- Theme:<?php echo htmlspecialchars($theme) . ' Sidebar:' . $sidebar ?> -->
+<body><!-- Theme:<?php echo htmlsc($theme) . ' Sidebar:' . $sidebar ?> -->
<?php if ($menu && $sidebar == 'strict') { ?>
<!-- Sidebar top -->
<?php _navigator('search') ?>
<?php _navigator('recent') ?>
<?php _navigator('help') ?>
-
-<?php if ($trackback) { ?>
- <?php _navigator('trackback', $lang['trackback'] . '(' . tb_count($_page) . ')',
- ($trackback_javascript == 1) ? 'onclick="OpenTrackback(this.href); return false"' : '') ?>
-<?php } ?>
-<?php if ($referer) { ?>
- <?php _navigator('refer') ?>
-<?php } ?>
+ <?php if ($enable_login) { ?>
+ <?php _navigator('login') ?>
+ <?php } ?>
+ <?php if ($enable_logout) { ?>
+ <?php _navigator('logout') ?>
+ <?php } ?>
</div></div>
<?php } else { ?>
<div id="navigator"></div>
$title = '';
if ($disable_backlink) {
if ($_page != '') {
- $title = htmlspecialchars($_page);
+ $title = htmlsc($_page);
} else {
$title = $page; // Search, or something message
}
if ($page != '') {
$title = $page;
} else {
- $title = htmlspecialchars($_page);
+ $title = htmlsc($_page);
}
}
$title_date = $title_text = '';
Site admin: <a href="<?php echo $modifierlink ?>"><?php echo $modifier ?></a><p />
<?php echo S_COPYRIGHT ?>.
Powered by PHP <?php echo PHP_VERSION ?><br />
- HTML convert time: <?php echo $taketime ?> sec.
+ HTML convert time: <?php echo elapsedtime() ?> sec.
</div><!-- class="footer" -->