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-head"></div>
<div class="post-page"> <div class="post-page">
<h2 class="pagetitle">Page Not Found</h2> <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><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" /> <br class="clear-margins" />
</div> </div>
<div class="post-page-foot"></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"> comicpress_init();
<?php if (have_posts()) {
ob_start();
if (have_posts()) {
include_partial('archive-header'); include_partial('archive-header');
// why can't wordpress allow for post date asc sorting out of the box... // why can't wordpress allow for post date asc sorting out of the box...
@ -20,10 +24,9 @@
include_partial('archive-page-nav'); include_partial('archive-page-nav');
} else { } else {
include_partial('archive-not-found'); include_partial('archive-not-found');
} ?> }
</div> $content = ob_get_clean();
<?php get_sidebar() ?> include(get_template_directory() . '/layouts/' . $comicpress->comicpress_options['layout']);
?>
<?php get_footer() ?>

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> if (have_posts()) {
<div class="post-page" id="post-<?php the_ID() ?>"> while (have_posts()) {
<h2 class="pagetitle"> the_post();
<a href="<?php echo get_permalink($post->post_parent) ?>" rev="attachment"><?php echo get_the_title($post->post_parent) ?></a> include_partial('image-post');
</h2> }
<div class="gallery-image"> } else {
<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> include_partial('image-not-found');
</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() ?> $content = ob_get_clean();
<?php endwhile; else: ?> include(get_template_directory() . '/layouts/' . $comicpress->comicpress_options['layout']);
?>
<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() ?>

View File

@ -1,3 +1,4 @@
<?php global $posts ?>
<div class="post-page-head"></div> <div class="post-page-head"></div>
<div class="post-page"> <div class="post-page">
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

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() ?>