2009-08-21 19:29:45 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
Template Name: Comic Year Archive
|
|
|
|
*/
|
|
|
|
?>
|
2009-09-03 01:12:30 +00:00
|
|
|
<?
|
2009-08-21 19:29:45 +00:00
|
|
|
if (isset($_GET['archive_year'])) {
|
|
|
|
$archive_year = (int)$_GET['archive_year'];
|
|
|
|
} else {
|
|
|
|
$latest_comic = get_terminal_post_in_category(get_all_comic_categories_as_cat_string(),false);
|
|
|
|
$archive_year = get_post_time('Y', false, $latest_comic, true);
|
|
|
|
}
|
2009-08-26 04:01:17 +00:00
|
|
|
if (empty($archive_year)) $archive_year = date('Y');
|
2009-08-21 19:29:45 +00:00
|
|
|
?>
|
2009-09-03 01:12:30 +00:00
|
|
|
<?php get_header(); ?>
|
2009-08-21 19:29:45 +00:00
|
|
|
|
2009-09-15 10:23:54 +00:00
|
|
|
<div id="content-wrapper-top"></div>
|
2009-09-03 01:12:30 +00:00
|
|
|
<div id="content-wrapper">
|
2009-08-21 19:29:45 +00:00
|
|
|
|
2009-09-15 10:23:54 +00:00
|
|
|
<?php if (is_cp_theme_layout('gn,v3c')) get_sidebar('left'); ?>
|
2009-08-21 19:29:45 +00:00
|
|
|
|
2009-09-15 10:23:54 +00:00
|
|
|
<?php if (is_cp_theme_layout('gn')) { ?>
|
|
|
|
<div id="pagewrap-right">
|
|
|
|
<?php } ?>
|
2009-08-21 19:29:45 +00:00
|
|
|
|
2009-09-15 10:23:54 +00:00
|
|
|
<?php if (is_cp_theme_layout('v3c,v')) { ?>
|
|
|
|
<div id="content" class="narrowcolumn">
|
|
|
|
<div class="column">
|
2009-08-21 19:29:45 +00:00
|
|
|
<?php } ?>
|
2009-09-15 10:23:54 +00:00
|
|
|
|
2009-08-21 19:29:45 +00:00
|
|
|
<?php get_sidebar('overblog'); ?>
|
2009-09-07 13:37:15 +00:00
|
|
|
<?php if (is_cp_theme_layout('3c')) get_sidebar('left'); ?>
|
2009-08-21 19:29:45 +00:00
|
|
|
|
2009-09-15 10:23:54 +00:00
|
|
|
<?php if (!is_cp_theme_layout('v3c,v')) { ?>
|
2009-08-21 19:29:45 +00:00
|
|
|
<div id="content" class="narrowcolumn">
|
2009-09-15 10:23:54 +00:00
|
|
|
<div class="column">
|
2009-08-21 19:29:45 +00:00
|
|
|
<?php } ?>
|
2009-09-15 10:23:54 +00:00
|
|
|
|
|
|
|
<div class="<?php comicpress_blogpost_class(); ?>">
|
2009-08-21 19:29:45 +00:00
|
|
|
<div class="post-page-head"></div>
|
|
|
|
<div class="post-page">
|
|
|
|
<?php while (have_posts()) : the_post() ?>
|
|
|
|
<div class="entry">
|
2009-08-27 15:57:50 +00:00
|
|
|
<h2 class="pagetitle"><?php the_title() ?> <span class="page-archive-year"> <?php echo $archive_year; ?></span></h2>
|
2009-08-21 19:29:45 +00:00
|
|
|
<?php the_content(); ?>
|
|
|
|
</div>
|
|
|
|
<?php endwhile; ?>
|
|
|
|
|
|
|
|
<div class="archive-yearlist">|
|
|
|
|
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date ASC");
|
|
|
|
foreach ( $years as $year ) {
|
|
|
|
if ($year != (0) ) { ?>
|
|
|
|
<a href="<?php echo add_query_arg('archive_year', $year) ?>"><strong><?php echo $year ?></strong></a> |
|
|
|
|
<?php } } ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<table class="month-table">
|
|
|
|
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$archive_year);
|
|
|
|
while ($comicArchive->have_posts()) : $comicArchive->the_post() ?>
|
|
|
|
<tr><td class="archive-date"><?php the_time('M j') ?></td><td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="Permanent Link: <?php the_title() ?>"><?php the_title() ?></a></td></tr>
|
|
|
|
<?php endwhile; ?>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<br class="clear-margins" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="post-page-foot"></div>
|
2009-09-12 15:28:32 +00:00
|
|
|
</div>
|
2009-09-03 01:12:30 +00:00
|
|
|
</div>
|
2009-08-21 19:29:45 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php
|
2009-09-07 13:37:15 +00:00
|
|
|
if (is_cp_theme_layout('3c,v3c,gn,standard,v')) {
|
2009-09-03 01:12:30 +00:00
|
|
|
get_sidebar('right'); ?>
|
|
|
|
<?php } ?>
|
|
|
|
|
2009-09-07 13:37:15 +00:00
|
|
|
<?php if (is_cp_theme_layout('gn')) { ?>
|
2009-09-03 01:12:30 +00:00
|
|
|
</div>
|
|
|
|
<?php } ?>
|
2009-08-21 19:29:45 +00:00
|
|
|
|
|
|
|
<div class="clear"></div>
|
2009-09-07 22:23:01 +00:00
|
|
|
</div>
|
|
|
|
<div id="content-wrapper-bottom"></div>
|
2009-08-21 17:45:23 +00:00
|
|
|
<?php get_footer() ?>
|