Permalink
Browse files

Initial import of reflection theme for WP.

  • Loading branch information...
mdave committed May 31, 2008
0 parents commit 3f77044c4e8a19932140a5ae99caedd02a53f7e7
29 404.php
@@ -0,0 +1,29 @@
<?
/*
* 404.php
* -------
* Error finding requested page. Output error page with links to most popular
* pages and also contact e-mail.
*/
get_header();
?>
<div id="pagecontent">
<h1>Not Found</h1>
<p>Sorry, that page could not be found. Please <a href="mailto:<?bloginfo('admin_email');?>">contact me</a> if you tried to get here from a link on the site. Here's some popular links:</p>
<ul>
<li><a href="/">Home Page</a></li>
<li><a href="/mosaic/">Mosaic</a></li>
<li><a href="/about/">About</a></li>
</div>
<?
get_footer();
?>
@@ -0,0 +1,45 @@
<?
/*
* ajax_request.php
* ----------------
* Request image information for a post in the blog. Returns a json object to
* the browser for use in the JavaScript code.
*/
require_once('../../../wp-config.php');
$id = intval($_GET['id']);
query_posts('p='.$id);
while(have_posts()) {
the_post();
include (TEMPLATEPATH . '/yapb_filter.php');
$next_post = get_next_post();
$prev_post = get_previous_post();
ob_start();
the_content();
$content = ob_get_clean();
$info = array(
'image_uri' => get_thumbnail(true),
'post_content' => $content,
'post_title' => $post->post_title,
'post_date' => get_the_time('jS F Y'),
'permalink' => get_permalink($post->ID),
'next_post' => $next_post ? $next_post->ID : 0,
'prev_post' => $prev_post ? $prev_post->ID : 0,
'next_post_perm' => $next_post ? get_permalink($next_post->ID) : '',
'prev_post_perm' => $prev_post ? get_permalink($prev_post->ID) : '',
'comment_status' => $post->comment_status,
'comment_count' => $post->comment_count,
'exif' => get_exif(),
);
echo json_encode($info);
}
?>
@@ -0,0 +1,111 @@
<?php
/*
* comments.php
* -------
* Pretty much taken straight out of the standard WordPress file.
*/
// Do not delete these lines
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if (!empty($post->post_password)) {
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {
?>
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
<?php
return;
}
}
$oddcomment = 'class="alt" ';
?>
<!-- You can start editing here. -->
<?php if ($comments) : ?>
<h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
<ol class="commentlist">
<?php $i = 0; foreach ($comments as $comment) : $i++; ?>
<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
<div class="commentcount"><?=$i?></div>
<cite><?php comment_author_link() ?>:</cite>
<div class="commenttext">
<?php if ($comment->comment_approved == '0') : ?>
<p><em>Your comment is awaiting moderation.</em></p>
<?php endif; ?>
<?php comment_text() ?>
</div>
<small class="commentmetadata"><?php comment_date('F jS, Y') ?> at <?php comment_time() ?> <?php edit_comment_link('edit','&nbsp;&nbsp;',''); ?></small>
</li>
<?php
/* Changes every other comment to a different class */
$oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
?>
<?php endforeach; /* end for each comment */ ?>
</ol>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?>
<!-- If comments are open, but there are no comments. -->
<?php else : // comments are closed ?>
<!-- If comments are closed. -->
<p class="nocomments">Comments are closed.</p>
<?php endif; ?>
<?php endif; ?>
<?php if ('open' == $post->comment_status) : ?>
<h3 id="respond">Leave a Reply</h3>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
<?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>
<?php else : ?>
<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
<label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
<label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
<label for="url"><small>Website</small></label></p>
<?php endif; ?>
<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p>
<?php do_action('comment_form', $post->ID); ?>
</form>
<?php endif; // If registration required and not logged in ?>
<?php endif; // if you delete this the sky will fall on your head ?>
@@ -0,0 +1,12 @@
</div>
<div id="footer">
Powered by <a href="http://wordpress.org/">WordPress <?php bloginfo('version');?></a>, <a href="http://photoblog.xyloid.org/reflection/">Reflection</a>
and <a href="http://johannes.jarolim.com/yapb/">YAPB</a>: <a href="#">Entries (RSS)</a> and <a href="#">Comments (RSS)</a>.<br />
All images and content are copyright &copy; Your Name 2008.
</div>
</body>
</html>
@@ -0,0 +1,61 @@
<?
/*
* header.php
* ----------
* Header file for every page. Does standard stuff like including the JavaScript files
* necessary for each site and a bunch of other stuff.
*/
// Hack for always displaying a single post. Taken from the Viewfinder Grain theme
// which you can find at: http://mac.defx.de/grain-theme/
if (is_home()) {
$myposts = get_posts('numberposts=1&orderby=ID&order=DESC');
foreach ($myposts as $post)
break;
// pretend we are on a single page so that next/prev post functions work
$wp_query->is_single = true;
}
?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if (is_home()): ?> &raquo; latest <?php else: ?><?php wp_title(); ?><?php endif;?></title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
<script type="text/javascript" src="<?php bloginfo('template_directory');?>/js/mootools-1.11.js"></script>
<?if (is_home() || is_single()):?><script type="text/javascript" src="<?php bloginfo('template_directory');?>/js/blog.js"></script>
<script type="text/javascript">
Site.templateDir = '<?php bloginfo('template_directory');?>';
window.addEvent('load', Site.init.bind(Site));
</script><?php endif;?>
<?if (is_page('Mosaic')):?><script type="text/javascript" src="<?php bloginfo('template_directory');?>/js/mosaic.js"></script><?php endif;?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>
</head>
<body>
<div id="topcontainer">
<div id="header">
<a href="<?php bloginfo('url');?>">
<img src="<?php bloginfo('template_directory');?>/images/logo.jpg" alt="logo" style="border:0;" />
</a>
<div id="navbar">
<ul>
<li><a href="<?php bloginfo('url');?>">Latest</a></li>
<li><a href="<?php bloginfo('url');?>/?do=random">Random</a></li>
<li><a href="<?php bloginfo('url');?>/mosaic/">Mosaic</a></li>
<li><a href="<?php bloginfo('url');?>/about/">About</a></li>
<li><?php wp_loginout(); ?></li>
</ul>
</div>
</div>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,92 @@
<?php
/*
* index.php
* ---------
* Main page. Deals with random pages, sets up the main layout and actually displays images.
*/
if ($_GET['do'] == 'random') {
$random_id = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE post_type = 'post' AND post_password = '' AND post_status = 'publish' ORDER BY RAND() LIMIT 1");
wp_redirect( get_permalink( $random_id ) );
}
include(TEMPLATEPATH . '/yapb_filter.php');
get_header();
if (have_posts()) : while (have_posts()) : the_post();
$next_post = get_next_post() ? get_next_post()->ID : 0;
$prev_post = get_previous_post() ? get_previous_post()->ID : 0;
$next_post_perm = get_permalink($next_post);
$prev_post_perm = get_permalink($prev_post);
?>
<?php if (is_home() || is_single()):?>
<script type="text/javascript">
Site.nextPostID = <?=$next_post?>;
Site.prevPostID = <?=$prev_post?>;
</script>
<?php endif;?>
<div id="topcontent" style="width:<?=$im_dim?>px;">
<div id="title">
<div id="titlebits">
<ul>
<?php if (is_home()):?>
<li>
<a id="prevPostLink" href="<?php if ($prev_post): ?><?=$prev_post_perm?>">&laquo;<?php else:?>"><?php endif;?></a> |
<a id="nextPostLink" href="<?php if ($next_post): ?><?=$next_post_perm?>">&raquo;<?php else:?>"><?php endif;?></a>
</li>
<?php endif;?>
<li><a id="comment" href="<?php comments_link();?>"><?php comments_number('0 comments','1 comment','% comments');?></a></li>
<li><a class="panel" id="exif" href="">exif</a></li>
<li><a <?php if(is_home()): ?>class="panel" <?php endif;?>id="info" href="<?the_permalink();?>#notes">info</a></li>
</ul>
</div>
<h3 id="texttitle">
<a href="<?php the_permalink();?>"><?php the_title();?></a>
<span id="inlinedate"><?php the_date('jS F Y');?></span>
</h3>
</div>
<div id="imageholder">
<div id="exif_holder" class="overlay" style="right:0;top:0;">
<div id="exif_panel">
<?echo get_exif();?>
</div>
</div>
<?php if (is_home()): ?>
<div id="info_holder" class="overlay" style="bottom:0;left:0;right:0">
<div id="info_panel">
<?php the_content('Read more...'); ?>
</div>
</div>
<div id="theoverlay_holder" class="overlay" style="left:0;top:0;z-index:100">
<div id="theoverlay_panel"></div>
</div>
<?php endif; ?>
<div id="overlaynav">
<a href="<?php if ($prev_post): ?><?=$prev_post_perm?>"<?php else:?>" style="display:none"<?php endif;?> id="overPrevLink"></a>
<a href="<?php if ($next_post): ?><?=$next_post_perm?>"<?php else:?>" style="display:none"<?php endif;?> id="overNextLink"></a>
</div>
<img id="mainimage" src="<?echo get_thumbnail();?>" alt="image" />
</div>
</div>
<div id="reflectionholder"></div>
<?php if (is_single() && !is_home()): ?>
<div id="content">
<a name="info" id="notes"></a>
<h3>Shot Notes</h3>
<?php the_content(); ?>
</div>
<div id="comments">
<?php comments_template(); ?>
</div>
<?php endif;?>
<?php break; endwhile; endif;?>
<?php get_footer(); ?>
Oops, something went wrong.

0 comments on commit 3f77044

Please sign in to comment.