working on changing files over to layouts

This commit is contained in:
John Bintz 2009-07-23 19:58:25 -04:00
parent 6d5b487be6
commit b32425ed7c
6 changed files with 98 additions and 85 deletions

18
404.php
View File

@ -1,16 +1,22 @@
<?php get_header() ?>
<?php
global $comicpress;
<div id="content" class="narrowcolumn">
comicpress_init();
ob_start();
?>
<div class="post-page-head"></div>
<div class="post-page">
<h2 class="pagetitle">Page Not Found</h2>
<p><a href="<?php bloginfo('url') ?>">Click here to return to the home page</a> or try a search:</p>
<p><?php include (TEMPLATEPATH . '/searchform.php') ?></p>
<p><?php include (get_template_directory() . '/searchform.php') ?></p>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
</div>
<?php
<?php get_sidebar() ?>
$content = ob_get_clean();
<?php get_footer() ?>
include(get_template_directory() . '/layouts/' . $comicpress->comicpress_options['layout']);
?>

View File

@ -1,7 +1,11 @@
<?php get_header() ?>
<?php
global $comicpres, $post, $posts;
<div id="content" class="archive">
<?php if (have_posts()) {
comicpress_init();
ob_start();
if (have_posts()) {
include_partial('archive-header');
// why can't wordpress allow for post date asc sorting out of the box...
@ -20,10 +24,9 @@
include_partial('archive-page-nav');
} else {
include_partial('archive-not-found');
} ?>
}
</div>
$content = ob_get_clean();
<?php get_sidebar() ?>
<?php get_footer() ?>
include(get_template_directory() . '/layouts/' . $comicpress->comicpress_options['layout']);
?>

View File

@ -1,69 +1,20 @@
<?php get_header() ?>
<?php
global $comicpres, $post;
<div id="content" class="narrowcolumn">
comicpress_init();
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
ob_start();
<div class="post-page-head"></div>
<div class="post-page" id="post-<?php the_ID() ?>">
<h2 class="pagetitle">
<a href="<?php echo get_permalink($post->post_parent) ?>" rev="attachment"><?php echo get_the_title($post->post_parent) ?></a>
</h2>
<div class="gallery-image">
<a href="<?php echo wp_get_attachment_url($post->ID) ?>" target="_blank" title="Click for full size." ><img src="<?php echo wp_get_attachment_url($post->ID) ?>" alt="<?php the_title() ?>" /></a>
</div>
<div class="gallery-caption">
<?php the_excerpt() ?>
</div>
<div class="imagenav-wrap">
<div class="imagenav">
<div class="imagenav-bg">
<?php previous_image_link() ?>
</div>
<div class="imagenav-arrow">
&lsaquo;
</div>
<div class="imagenav-link">
<?php previous_image_link() ?>
</div>
</div>
<div class="imagenav-center">
<a href="<?php echo wp_get_attachment_url($post->ID) ?>" target="_blank" title="Click for full size." class="imagetitle"><?php the_title() ?></a><br />
<a href="<?php echo get_permalink($post->post_parent) ?>" rev="attachment">&larr; Back to Gallery</a>
</div>
<div class="imagenav">
<div class="imagenav-bg">
<?php next_image_link() ?>
</div>
<div class="imagenav-arrow">
&rsaquo;
</div>
<div class="imagenav-link">
<?php next_image_link() ?>
</div>
</div>
<div class="clear"></div>
</div>
<?php the_content() ?>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
if (have_posts()) {
while (have_posts()) {
the_post();
include_partial('image-post');
}
} else {
include_partial('image-not-found');
}
<?php comments_template() ?>
$content = ob_get_clean();
<?php endwhile; else: ?>
<div class="post-page-head"></div>
<div class="post-page">
<p>Sorry, no image matched your criteria.</p>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php endif; ?>
</div>
<?php get_sidebar() ?>
<?php get_footer() ?>
include(get_template_directory() . '/layouts/' . $comicpress->comicpress_options['layout']);
?>

View File

@ -1,9 +1,10 @@
<?php global $posts ?>
<div class="post-page-head"></div>
<div class="post-page">
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* Category Archive */ if (is_category()) { ?>
<div class="content"><h2 class="pagetitle">Archive for &#8216;<?php single_cat_title() ?>&#8217;</h2></div>
<?php /* Tag Archive */ } elseif( is_tag() ) { ?>
<?php /* Tag Archive */ } elseif(is_tag()) { ?>
<div class="content"><h2 class="pagetitle">Posts Tagged &#8216;<?php single_tag_title() ?>&#8217;</h2></div>
<?php /* Daily Archive */ } elseif (is_day()) { ?>
<div class="content"><h2 class="pagetitle">Archive for <?php the_time('F jS, Y') ?></h2></div>

View File

@ -0,0 +1,6 @@
<div class="post-page-head"></div>
<div class="post-page">
<p>Sorry, no image matched your criteria.</p>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>

46
partials/image-post.inc Normal file
View File

@ -0,0 +1,46 @@
<div class="post-page-head"></div>
<div class="post-page" id="post-<?php the_ID() ?>">
<h2 class="pagetitle">
<a href="<?php echo get_permalink($post->post_parent) ?>" rev="attachment"><?php echo get_the_title($post->post_parent) ?></a>
</h2>
<div class="gallery-image">
<a href="<?php echo wp_get_attachment_url($post->ID) ?>" target="_blank" title="Click for full size." ><img src="<?php echo wp_get_attachment_url($post->ID) ?>" alt="<?php the_title() ?>" /></a>
</div>
<div class="gallery-caption">
<?php the_excerpt() ?>
</div>
<div class="imagenav-wrap">
<div class="imagenav">
<div class="imagenav-bg">
<?php previous_image_link() ?>
</div>
<div class="imagenav-arrow">
&lsaquo;
</div>
<div class="imagenav-link">
<?php previous_image_link() ?>
</div>
</div>
<div class="imagenav-center">
<a href="<?php echo wp_get_attachment_url($post->ID) ?>" target="_blank" title="Click for full size." class="imagetitle"><?php the_title() ?></a><br />
<a href="<?php echo get_permalink($post->post_parent) ?>" rev="attachment">&larr; Back to Gallery</a>
</div>
<div class="imagenav">
<div class="imagenav-bg">
<?php next_image_link() ?>
</div>
<div class="imagenav-arrow">
&rsaquo;
</div>
<div class="imagenav-link">
<?php next_image_link() ?>
</div>
</div>
<div class="clear"></div>
</div>
<?php the_content() ?>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php comments_template() ?>