Theme
<?php if(is_home()) //why this condition??
{
global $query_string;
query_posts($query_string."&cat=-47"); //Pagetree
}?>
<?php get_header(); ?>
<div id="content" class="narrowcolumn">
<?php $sticky = 1; $ads = 0; ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php /*
$tag_name = NULL;
$tag_slug = NULL;
$tags = get_the_tags();
if($tags)
foreach($tags as $tag)
{
$tag_name = $tag->name; $tag_slug = $tag->slug; break;
} */
?>
<?php if($sticky) $sticky = get_post_meta($post->ID,'sticky',true)=='yes'; ?>
<div class="post" id="post-<?php the_ID(); ?>">
<?php
global $lang; $xx = 0;
if($lang!='')
{
$xx = get_post_meta($post->ID,substr($lang,0,2),true);
if($xx) $xx = explode("\n",$xx);
}
$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>';
?>
<h2 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($xx) echo $xx[0]; else the_title(); ?></a></h2>
<small><?php printf(I18N_X('%1$s by %2$s at %3$s'),get_the_time(I18N_X('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($xx)
{
if($xcred=get_userdata(intval($xx[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($xx[1],strpos($xx[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; ?>
<!--<div style="margin:-8px 0 3px 0">
<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>
</div>-->
<?php endwhile; ?>
<div class="navigation">
<?php
global $paged, $wp_query;
global $lang, $nocache; $url_args = $nocache?'?nocache':''; //todo: args should be global string
if($wp_query->max_num_pages>1)
if($paged<$wp_query->max_num_pages) echo '<div class="alignleft"><a href="/page/', $paged+1+!$paged, '/', $lang, $url_args, '">', I18N_X('« Older Entries'), '</a></div>';
if($paged) echo '<div class="alignright"><a href="/', ($paged>2?('page/'.($paged-1).'/'):''), $lang, $url_args, '">', I18N_X('Newer Entries »'), '</a></div>';
?>
</div>
<?php else : ?>
<h2 class="center"><?php echo __('Not Found'); ?></h2>
<p class="center"><?php echo __('Sorry, but you are looking for something that isn\'t here.'); ?></p>
<?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”