Theme
<?php
global $query_string;
query_posts($query_string."&cat=-47"); //Pagetree
?>
<?php get_header(); ?>
<div id="content" class="narrowcolumn">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class="pagetitle"><?php printf(I18N_X('Archive for the ‘%s’ Category'), single_cat_title('', false)); ?></h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h2 class="pagetitle"><?php printf(I18N_X('Posts Tagged ‘%s’'), single_tag_title('', false) ); ?></h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class="pagetitle"><?php printf(I18N_X('Archive for %s<!--Daily archive page-->'), get_the_time(I18N_X('F jS, Y'))); ?></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class="pagetitle"><?php printf(I18N_X('Archive for %s<!--Monthly archive page-->'), get_the_time(I18N_X('F, Y'))); ?></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class="pagetitle"><?php printf(I18N_X('Archive for %s<!--Yearly archive page-->'), get_the_time(I18N_X('Y'))); ?></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class="pagetitle"><?php echo I18N_X('Author Archive'); ?></h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="pagetitle"><?php echo I18N_X('Blog Archives'); ?></h2>
<?php } ?>
<div class="navigation">
<?php
global $paged, $wp_query;
global $lang, $clean_uri; //defined in header.php
$nav_older = ''; $nav_newer = ''; $naked_uri = explode('page/',$clean_uri[0]);
if($wp_query->max_num_pages>1)
if($paged<$wp_query->max_num_pages) $nav_older = '<div class="alignleft"><a href='.$naked_uri[0].'page/'.($paged+1+!$paged).'/'.$lang.$clean_uri[1].'>'.I18N_X('« Older Entries').'</a></div>';
if($paged) $nav_newer = '<div class="alignright"><a href='.$naked_uri[0].($paged>2?('page/'.($paged-1).'/'):''
).$lang.$clean_uri[1].'>'.I18N_X('Newer Entries »').'</a></div>';
echo $nav_older, $nav_newer;
?>
<br /><!-- solid margins -->
</div>
<?php $sticky = 1; $ads = 0; ?>
<?php while (have_posts()) : the_post(); ?>
<?php if($sticky) $sticky = get_post_meta($post->ID,'sticky',true)=='yes'; ?>
<div class="post">
<?php
global $lang; $xlat = 0;
if($lang!='')
{
$xlat = get_post_meta($post->ID,substr($lang,0,2),true);
if($xlat) $xlat = explode("\n",$xlat);
}
$author_link = get_the_author_url();
if($author_link)
$author_link = '<a href="'.$author_link.'">'.get_the_author().'</a>';
else $author_link = get_the_author();
$syndicate = get_post_meta($post->ID,'syndicate',true);
if($syndicate&&substr($syndicate,0,7)=='http://')
{
$siteuri = strpos($syndicate,'/',7);
$website = is_bool($siteuri)?substr($syndicate,7):substr($syndicate,7,$siteuri-7);
$syndicate = '<a target="_blank" href="'.$syndicate.'">'.$website.'</a>';
}
else $syndicate = '<a href="'.$lang.'">www.digitaldevildb.com</a>';
?>
<h3 class="d3-post-title">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(I18N_X('Permanent Link to %s'), the_title_attribute('echo=0')); ?>"><?php if($xlat) echo $xlat[0]; else the_title(); ?></a></h3>
<small><?php printf(I18N_X('%1$s by %2$s at %3$s'),get_the_time(I18N_X('l, F jS, Y')),$author_link,$syndicate); ?></small>
<div class="entry">
<div width="22px" style="max-width:22px; float:left; position: relative; overflow: hidden; left:-26px; margin:0.3em -26px 0 0;" title="For now please use the language options at the top of the page^">
<img src="/UN.png" />
<?php if(get_post_meta($post->ID,'es')) echo '<br /><img src="/ES.png" style="margin-top:-2px"/>'; ?>
<?php if(get_post_meta($post->ID,'zh')) echo '<br /><img src="/ZH.png" style="margin-top:-2px"/>'; ?>
<?php if(get_post_meta($post->ID,'it')) echo '<br /><img src="/IT.png" style="margin-top:-2px"/>'; ?>
<?php if(get_post_meta($post->ID,'fr')) echo '<br /><img src="/FR.png" style="margin-top:-2px"/>'; ?>
</div>
<?php the_content('<nobr>. . . .</nobr><br><br>'.I18N_X('Read the rest of this post').' »'); ?>
<?php $retro = get_post_meta($post->ID,'retro',true); if($retro) $retro = explode(' ',$retro);
if($retro) echo '<p>',I18N_X('Retro-posted'), ' ', __($retro[0]), ' ', $retro[1], ' ', $retro[2], '</p>'; ?>
</div>
<?php if($xlat)
{
if($xcred=get_userdata(intval($xlat[1])))
{
$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;
}
else $xurl = substr($xlat[1],strpos($xlat[1],' ')); //fallback credits
echo '<p><small>',sprintf(I18N_X('Translated thanks to %s'),$xurl),'</small></p>';
}?>
<form id="discussion-<?php echo $post->ID; ?>" target="_blank" action="/bbs/index.php?border=WP&action=search2;brd[]=15;subject_only=1;" method="post" accept-charset="UTF-8" style="display:none">
<textarea name="search">"NEWS: <?php echo str_replace(array("&nbsp;","&"),array(" ","&"),htmlspecialchars(strip_tags($post->post_title))); ?>"</textarea>
</form>
<a href="javascript:document.getElementById('discussion-<?php echo $post->ID; ?>').submit()"><?php echo I18N_X('Forum Discussion'); ?> »</a>
<p class="postmetadata"><?php printf(I18N_X('Posted in %s'), get_the_category_list(', ')); ?> | <?php edit_post_link(__('Edit'), '', ' | '); ?> <nobr><?php comments_popup_link(__('No Comments').' »', __('1 Comment').' »', '% '.__('Comments').' »'); ?></nobr></p>
</div>
<?php if($sticky||$ads++%2||$ads>4) continue; ?>
<script type="text/javascript"><!--
goooooooooooooogle_ad_client = "pub-4203437078642917";
/* 468x60, created 11/17/08 */
goooooooooooooogle_ad_slot = "3892510295"; //"6692656179";
goooooooooooooogle_ad_width = 468;
goooooooooooooogle_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.gooooooooooooooglesyndication.com/pagead/show_ads.js">
</script>
<?php endwhile; ?>
<div class="navigation">
<?php
echo $nav_older, $nav_newer;
?>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
<?php endif; ?>
</div>
<?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”