Theme
<?php get_header(); ?>
<?php global $lang; ?>
<?php $avatar = get_post_meta($post->ID,'avatar',true); ?>
<div style="position: relative; z-index: 99; font-size: 2.0em; margin: -7px 21px -0px 21px; height:0; overflow: visible">
<?php
if(get_post_meta($post->ID,'unlisted',true)!='yes')
{
global $wpdb;
$unlisted = "
SELECT wpostmeta.post_id
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
WHERE wposts.ID = wpostmeta.post_id
AND (wpostmeta.meta_key = 'unlisted' OR wpostmeta.meta_key = 'blank')
AND wpostmeta.meta_value = 'yes'
AND wposts.post_type = 'page'
";
$unlisted = implode(",",$wpdb->get_col($unlisted));
$sibs = get_pages('exclude='.$unlisted.'&hierarchical=1&depth=1&child_of='.$post->post_parent);
$prev = 0;
foreach($sibs as $ptr)
{
if($ptr->ID==$post->ID)
{
$next = current($sibs); if(!$next||$next->ID==$post->ID) break; $next = $next->ID;
echo '<a class="alignright" style="color: #88A6C0; margin-left:-6ex;"'; //hack: make zero width
$hack = get_post($next); //PHP4...
echo ' href="', get_page_link($next), '" title="', strip_tags($hack->post_title), '">»</a>';
$hack = end($sibs); //PHP4...
if(!$prev) $prev = $hack->ID;
$hack = get_post($prev); //PHP4...
echo '<a style="color: #88A6C0;" href="', get_page_link($prev), '"
title="', strip_tags($hack->post_title), '">«</a>'; //should always exist to prop up div
break;
}
else $prev = $ptr->ID;
}
}
else echo ' ';
?>
<br style="clear:both">
</div>
<?php if(have_posts()) : while (have_posts()) : the_post(); ?>
<?php if($avatar)
{
echo '<div style="position:relative; top:-25px; margin-bottom:-32px">';
include (TEMPLATEPATH . '/' . $avatar . '.php');
echo '</div>';
}?>
<div id="content" class="narrowcolumn">
<?php
if($avatar) include (TEMPLATEPATH . '/' . 'adbubble.php');
?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2 class="d3-page-title"><?php the_title(); ?></h2>
<div class="entry">
<?php
switch($lang)
{
default: //FALL THRU
{
$xx = substr($lang,0,2); $xurl = '';
$xxid = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name = '" . $post->post_name . "-page-$xx" . "'");
if($xxid)
{
$xpost = get_post($xxid); $xcred = get_userdata($xpost->post_author);
$hack = get_post($xxid); //PHP4...
echo '<p>', $hack->post_content, '</p>';
$xurl = $xcred->user_url; if($xurl==''||$xurl=='http://') $xurl = 0; //defaults
$xurl = $xurl?('<a href="'.$xurl.'" title="'.sprintf(__('Visit %s\'s website'),$xcred->display_name).'" rel="external">'.$xcred->display_name.'</a>'):$xcred->display_name;
echo '<small>',sprintf(I18N_X('Translated thanks to %s'),$xurl),'<br /></small>';
break;
}
else; //FALL THRU
}
case '': global $no_autop; $no_autop = 1;
the_content('<p class="serif">Read the rest of this page »</p>');
$no_autop = 0;
}
?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
<br /><em><small>© <?php the_author_link() ?> </small></em><br />
<p class="postmetadata alt" style="margin: 30px 0 -8px 0">
<small>
This page was published
<?php /* This is commented, because it requires a little adjusting sometimes.
You'll need to download this plugin, and follow the instructions:
http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
/* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>.
You can follow any responses to this page through the <?php post_comments_feed_link('RSS 2.0'); ?> feed.
<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
// Both Comments and Pings are open ?>
You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.
<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
// Only Pings are Open ?>
Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.
<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
// Comments are open, Pings are not ?>
You can skip to the end and leave a response. Pinging is currently not allowed.
<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
// Neither Comments, nor Pings are open ?>
Both comments and pings are currently closed.
<?php } edit_post_link('Edit this page','','.'); ?>
</small>
</p>
<?php if(wp_list_pages('child_of=' . $post->ID . '&depth=1&echo=0&title_li=0')){ ?>
<h2>Further Reading<br></h2><big style="line-height:1.2em"><?php txfx_wp_subpages(); ?></big>
<?php }?>
</div>
<?php $archives = get_post_meta($post->ID,'archives',true);
if($archives) echo '<br><a name="archives"></a><center><small style="width:80%;">the following archival materials may not reflect the present policies of www.digitaldevildb.com and are not subject to change</small></center><div id="d3-archives">', $archives, '</div>';
?>
<?php comments_template(); ?>
</div>
</div>
<?php endwhile; endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
© Digital Devil Database
Leave a Reply
You must be logged in to post a comment.
Megami Ibunroku Persona “Be Your True Mind”