Initial Commit
This commit is contained in:
22
aclindsa-wordpress-theme/404.php
Normal file
22
aclindsa-wordpress-theme/404.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div id="content" class="narrowcolumn">
|
||||
|
||||
<div id="main">
|
||||
<h2 class="center">Error 404 - Page Not Found</h2>
|
||||
<p>Oops, the page you are looking for does not exist. You may search using the search box, or visit the <a href="http://aclindsay.com">homepage</a> to get back on track.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
80
aclindsa-wordpress-theme/archive.php
Normal file
80
aclindsa-wordpress-theme/archive.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div id="content">
|
||||
<div id="main" class="narrowcolumn" role="main">
|
||||
|
||||
<?php if (have_posts()) : ?>
|
||||
|
||||
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
|
||||
<?php /* If this is a category archive */ if (is_category()) { ?>
|
||||
<h2 class="pagetitle">Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>
|
||||
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
|
||||
<h2 class="pagetitle">Posts Tagged ‘<?php single_tag_title(); ?>’</h2>
|
||||
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
|
||||
<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
|
||||
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
|
||||
<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
|
||||
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
|
||||
<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
|
||||
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
|
||||
<h2 class="pagetitle">Author Archive</h2>
|
||||
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
|
||||
<h2 class="pagetitle">Blog Archives</h2>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div class="navigation">
|
||||
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
|
||||
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
|
||||
</div>
|
||||
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
<div <?php post_class() ?>>
|
||||
<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
|
||||
<small><?php the_time('l, F jS, Y') ?></small>
|
||||
|
||||
<div class="entry">
|
||||
<?php the_content() ?>
|
||||
</div>
|
||||
|
||||
<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<div class="navigation">
|
||||
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
|
||||
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
|
||||
</div>
|
||||
<?php else :
|
||||
|
||||
if ( is_category() ) { // If this is a category archive
|
||||
printf("<h2 class='center'>Sorry, but there aren't any posts in the %s category yet.</h2>", single_cat_title('',false));
|
||||
} else if ( is_date() ) { // If this is a date archive
|
||||
echo("<h2>Sorry, but there aren't any posts with this date.</h2>");
|
||||
} else if ( is_author() ) { // If this is a category archive
|
||||
$userdata = get_userdatabylogin(get_query_var('author_name'));
|
||||
printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", $userdata->display_name);
|
||||
} else {
|
||||
echo("<h2 class='center'>No posts found.</h2>");
|
||||
}
|
||||
get_search_form();
|
||||
|
||||
endif;
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
29
aclindsa-wordpress-theme/archives.php
Normal file
29
aclindsa-wordpress-theme/archives.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
/*
|
||||
Template Name: Archives
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php get_header(); ?>
|
||||
|
||||
<div id="content" class="widecolumn">
|
||||
|
||||
<?php get_search_form(); ?>
|
||||
|
||||
<h2>Archives by Month:</h2>
|
||||
<ul>
|
||||
<?php wp_get_archives('type=monthly'); ?>
|
||||
</ul>
|
||||
|
||||
<h2>Archives by Subject:</h2>
|
||||
<ul>
|
||||
<?php wp_list_categories(); ?>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
124
aclindsa-wordpress-theme/comments-popup.php
Normal file
124
aclindsa-wordpress-theme/comments-popup.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title><?php echo get_option('blogname'); ?> - Comments on <?php the_title(); ?></title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||
<style type="text/css" media="screen">
|
||||
@import url( <?php bloginfo('stylesheet_url'); ?> );
|
||||
body { margin: 3px; }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body id="commentspopup">
|
||||
|
||||
<h1 id="header"><a href="" title="<?php echo get_option('blogname'); ?>"><?php echo get_option('blogname'); ?></a></h1>
|
||||
|
||||
<?php
|
||||
/* Don't remove these lines. */
|
||||
add_filter('comment_text', 'popuplinks');
|
||||
if ( have_posts() ) :
|
||||
while ( have_posts() ) : the_post();
|
||||
?>
|
||||
<h2 id="comments">Comments</h2>
|
||||
|
||||
<p><a href="<?php echo get_post_comments_feed_link($post->ID); ?>"><abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.</a></p>
|
||||
|
||||
<?php if ( pings_open() ) { ?>
|
||||
<p>The <abbr title="Universal Resource Locator">URL</abbr> to TrackBack this entry is: <em><?php trackback_url() ?></em></p>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
// this line is WordPress' motor, do not delete it.
|
||||
$commenter = wp_get_current_commenter();
|
||||
extract($commenter);
|
||||
$comments = get_approved_comments($id);
|
||||
$post = get_post($id);
|
||||
if ( post_password_required($post) ) { // and it doesn't match the cookie
|
||||
echo(get_the_password_form());
|
||||
} else { ?>
|
||||
|
||||
<?php if ($comments) { ?>
|
||||
<ol id="commentlist">
|
||||
<?php foreach ($comments as $comment) { ?>
|
||||
<li id="comment-<?php comment_ID() ?>">
|
||||
<?php comment_text() ?>
|
||||
<p><cite><?php comment_type('Comment', 'Trackback', 'Pingback'); ?> by <?php comment_author_link() ?> — <?php comment_date() ?> @ <a href="#comment-<?php comment_ID() ?>"><?php comment_time() ?></a></cite></p>
|
||||
</li>
|
||||
|
||||
<?php } // end for each comment ?>
|
||||
</ol>
|
||||
<?php } else { // this is displayed if there are no comments so far ?>
|
||||
<p>No comments yet.</p>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( comments_open() ) { ?>
|
||||
<h2>Leave a comment</h2>
|
||||
<p>Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
|
||||
|
||||
<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 wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out »</a></p>
|
||||
<?php else : ?>
|
||||
<p>
|
||||
<input type="text" name="author" id="author" class="textarea" value="<?php echo esc_attr($comment_author); ?>" size="28" tabindex="1" />
|
||||
<label for="author">Name</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="28" tabindex="2" />
|
||||
<label for="email">E-mail</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<input type="text" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="28" tabindex="3" />
|
||||
<label for="url"><abbr title="Universal Resource Locator">URL</abbr></label>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<p>
|
||||
<label for="comment">Your Comment</label>
|
||||
<br />
|
||||
<textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
|
||||
<input type="hidden" name="redirect_to" value="<?php echo esc_attr($_SERVER["REQUEST_URI"]); ?>" />
|
||||
<input name="submit" type="submit" tabindex="5" value="Say It!" />
|
||||
</p>
|
||||
<?php do_action('comment_form', $post->ID); ?>
|
||||
</form>
|
||||
<?php } else { // comments are closed ?>
|
||||
<p>Sorry, the comment form is closed at this time.</p>
|
||||
<?php }
|
||||
} // end password check
|
||||
?>
|
||||
|
||||
<div><strong><a href="javascript:window.close()">Close this window.</a></strong></div>
|
||||
|
||||
<?php // if you delete this the sky will fall on your head
|
||||
endwhile; //endwhile have_posts()
|
||||
else: //have_posts()
|
||||
?>
|
||||
<p>Sorry, no posts matched your criteria.</p>
|
||||
<?php endif; ?>
|
||||
<!-- // this is just the end of the motor - don't touch that line either :) -->
|
||||
<?php //} ?>
|
||||
<p class="credit"><?php timer_stop(1); ?> <cite>Powered by <a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform"><strong>WordPress</strong></a></cite></p>
|
||||
<?php // Seen at http://www.mijnkopthee.nl/log2/archive/2003/05/28/esc(18) ?>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
document.onkeypress = function esc(e) {
|
||||
if(typeof(e) == "undefined") { e=event; }
|
||||
if (e.keyCode == 27) { self.close(); }
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
96
aclindsa-wordpress-theme/comments.php
Normal file
96
aclindsa-wordpress-theme/comments.php
Normal file
@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
|
||||
// Do not delete these lines
|
||||
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
|
||||
die ('Please do not load this page directly. Thanks!');
|
||||
|
||||
if ( post_password_required() ) { ?>
|
||||
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
|
||||
<?php
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- You can start editing here. -->
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h3>
|
||||
|
||||
<div class="navigation">
|
||||
<div class="alignleft"><?php previous_comments_link() ?></div>
|
||||
<div class="alignright"><?php next_comments_link() ?></div>
|
||||
</div>
|
||||
|
||||
<ol class="commentlist">
|
||||
<?php wp_list_comments(); ?>
|
||||
</ol>
|
||||
|
||||
<div class="navigation">
|
||||
<div class="alignleft"><?php previous_comments_link() ?></div>
|
||||
<div class="alignright"><?php next_comments_link() ?></div>
|
||||
</div>
|
||||
<?php else : // this is displayed if there are no comments so far ?>
|
||||
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<!-- 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 ( comments_open() ) : ?>
|
||||
|
||||
<div id="respond">
|
||||
|
||||
<h3><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3>
|
||||
|
||||
<div class="cancel-comment-reply">
|
||||
<small><?php cancel_comment_reply_link(); ?></small>
|
||||
</div>
|
||||
|
||||
<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
|
||||
<p>You must be <a href="<?php echo wp_login_url( 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 ( is_user_logged_in() ) : ?>
|
||||
|
||||
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out »</a></p>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<p><input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
|
||||
<label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
|
||||
|
||||
<p><input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
|
||||
<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 esc_attr($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" />
|
||||
<?php comment_id_fields(); ?>
|
||||
</p>
|
||||
<?php do_action('comment_form', $post->ID); ?>
|
||||
|
||||
</form>
|
||||
|
||||
<?php endif; // If registration required and not logged in ?>
|
||||
</div>
|
||||
|
||||
<?php endif; // if you delete this the sky will fall on your head ?>
|
29
aclindsa-wordpress-theme/footer.php
Normal file
29
aclindsa-wordpress-theme/footer.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="footer">
|
||||
<div id="footer-inner">
|
||||
|
||||
<!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. -->
|
||||
<p>
|
||||
<?php bloginfo('name'); ?> is proudly powered by
|
||||
<a href="http://wordpress.org/">WordPress</a>
|
||||
<br /><a href="<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a>
|
||||
and <a href="<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a>.
|
||||
<!-- <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. -->
|
||||
</p>
|
||||
|
||||
© 2009 - 2011 Aaron Lindsay
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Gorgeous design by Michael Heilemann - http://binarybonsai.com/kubrick/ -->
|
||||
<?php /* "Just what do you think you're doing Dave?" */ ?>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
</html>
|
425
aclindsa-wordpress-theme/functions.php
Normal file
425
aclindsa-wordpress-theme/functions.php
Normal file
@ -0,0 +1,425 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
|
||||
automatic_feed_links();
|
||||
|
||||
if ( function_exists('register_sidebar') ) {
|
||||
register_sidebar(array(
|
||||
'before_widget' => '<li id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</li>',
|
||||
'before_title' => '<h2 class="widgettitle">',
|
||||
'after_title' => '</h2>',
|
||||
));
|
||||
}
|
||||
|
||||
/** @ignore */
|
||||
function kubrick_head() {
|
||||
$head = "<style type='text/css'>\n<!--";
|
||||
$output = '';
|
||||
if ( kubrick_header_image() ) {
|
||||
$url = kubrick_header_image_url() ;
|
||||
$output .= "#header { background: url('$url') no-repeat bottom center; }\n";
|
||||
}
|
||||
if ( false !== ( $color = kubrick_header_color() ) ) {
|
||||
$output .= "#headerimg h1 a, #headerimg h1 a:visited, #headerimg .description { color: $color; }\n";
|
||||
}
|
||||
if ( false !== ( $display = kubrick_header_display() ) ) {
|
||||
$output .= "#headerimg { display: $display }\n";
|
||||
}
|
||||
$foot = "--></style>\n";
|
||||
if ( '' != $output )
|
||||
echo $head . $output . $foot;
|
||||
}
|
||||
|
||||
add_action('wp_head', 'kubrick_head');
|
||||
|
||||
function kubrick_header_image() {
|
||||
return apply_filters('kubrick_header_image', get_option('kubrick_header_image'));
|
||||
}
|
||||
|
||||
function kubrick_upper_color() {
|
||||
if (strpos($url = kubrick_header_image_url(), 'header-img.php?') !== false) {
|
||||
parse_str(substr($url, strpos($url, '?') + 1), $q);
|
||||
return $q['upper'];
|
||||
} else
|
||||
return '69aee7';
|
||||
}
|
||||
|
||||
function kubrick_lower_color() {
|
||||
if (strpos($url = kubrick_header_image_url(), 'header-img.php?') !== false) {
|
||||
parse_str(substr($url, strpos($url, '?') + 1), $q);
|
||||
return $q['lower'];
|
||||
} else
|
||||
return '4180b6';
|
||||
}
|
||||
|
||||
function kubrick_header_image_url() {
|
||||
if ( $image = kubrick_header_image() )
|
||||
$url = get_template_directory_uri() . '/images/' . $image;
|
||||
else
|
||||
$url = get_template_directory_uri() . '/images/kubrickheader.jpg';
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
function kubrick_header_color() {
|
||||
return apply_filters('kubrick_header_color', get_option('kubrick_header_color'));
|
||||
}
|
||||
|
||||
function kubrick_header_color_string() {
|
||||
$color = kubrick_header_color();
|
||||
if ( false === $color )
|
||||
return 'white';
|
||||
|
||||
return $color;
|
||||
}
|
||||
|
||||
function kubrick_header_display() {
|
||||
return apply_filters('kubrick_header_display', get_option('kubrick_header_display'));
|
||||
}
|
||||
|
||||
function kubrick_header_display_string() {
|
||||
$display = kubrick_header_display();
|
||||
return $display ? $display : 'inline';
|
||||
}
|
||||
|
||||
add_action('admin_menu', 'kubrick_add_theme_page');
|
||||
|
||||
function kubrick_add_theme_page() {
|
||||
if ( isset( $_GET['page'] ) && $_GET['page'] == basename(__FILE__) ) {
|
||||
if ( isset( $_REQUEST['action'] ) && 'save' == $_REQUEST['action'] ) {
|
||||
check_admin_referer('kubrick-header');
|
||||
if ( isset($_REQUEST['njform']) ) {
|
||||
if ( isset($_REQUEST['defaults']) ) {
|
||||
delete_option('kubrick_header_image');
|
||||
delete_option('kubrick_header_color');
|
||||
delete_option('kubrick_header_display');
|
||||
} else {
|
||||
if ( '' == $_REQUEST['njfontcolor'] )
|
||||
delete_option('kubrick_header_color');
|
||||
else {
|
||||
$fontcolor = preg_replace('/^.*(#[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['njfontcolor']);
|
||||
update_option('kubrick_header_color', $fontcolor);
|
||||
}
|
||||
if ( preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njuppercolor'], $uc) && preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njlowercolor'], $lc) ) {
|
||||
$uc = ( strlen($uc[0]) == 3 ) ? $uc[0]{0}.$uc[0]{0}.$uc[0]{1}.$uc[0]{1}.$uc[0]{2}.$uc[0]{2} : $uc[0];
|
||||
$lc = ( strlen($lc[0]) == 3 ) ? $lc[0]{0}.$lc[0]{0}.$lc[0]{1}.$lc[0]{1}.$lc[0]{2}.$lc[0]{2} : $lc[0];
|
||||
update_option('kubrick_header_image', "header-img.php?upper=$uc&lower=$lc");
|
||||
}
|
||||
|
||||
if ( isset($_REQUEST['toggledisplay']) ) {
|
||||
if ( false === get_option('kubrick_header_display') )
|
||||
update_option('kubrick_header_display', 'none');
|
||||
else
|
||||
delete_option('kubrick_header_display');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
if ( isset($_REQUEST['headerimage']) ) {
|
||||
check_admin_referer('kubrick-header');
|
||||
if ( '' == $_REQUEST['headerimage'] )
|
||||
delete_option('kubrick_header_image');
|
||||
else {
|
||||
$headerimage = preg_replace('/^.*?(header-img.php\?upper=[0-9a-fA-F]{6}&lower=[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['headerimage']);
|
||||
update_option('kubrick_header_image', $headerimage);
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($_REQUEST['fontcolor']) ) {
|
||||
check_admin_referer('kubrick-header');
|
||||
if ( '' == $_REQUEST['fontcolor'] )
|
||||
delete_option('kubrick_header_color');
|
||||
else {
|
||||
$fontcolor = preg_replace('/^.*?(#[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['fontcolor']);
|
||||
update_option('kubrick_header_color', $fontcolor);
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($_REQUEST['fontdisplay']) ) {
|
||||
check_admin_referer('kubrick-header');
|
||||
if ( '' == $_REQUEST['fontdisplay'] || 'inline' == $_REQUEST['fontdisplay'] )
|
||||
delete_option('kubrick_header_display');
|
||||
else
|
||||
update_option('kubrick_header_display', 'none');
|
||||
}
|
||||
}
|
||||
//print_r($_REQUEST);
|
||||
wp_redirect("themes.php?page=functions.php&saved=true");
|
||||
die;
|
||||
}
|
||||
add_action('admin_head', 'kubrick_theme_page_head');
|
||||
}
|
||||
add_theme_page(__('Custom Header'), __('Custom Header'), 'edit_themes', basename(__FILE__), 'kubrick_theme_page');
|
||||
}
|
||||
|
||||
function kubrick_theme_page_head() {
|
||||
?>
|
||||
<script type="text/javascript" src="../wp-includes/js/colorpicker.js"></script>
|
||||
<script type='text/javascript'>
|
||||
// <![CDATA[
|
||||
function pickColor(color) {
|
||||
ColorPicker_targetInput.value = color;
|
||||
kUpdate(ColorPicker_targetInput.id);
|
||||
}
|
||||
function PopupWindow_populate(contents) {
|
||||
contents += '<br /><p style="text-align:center;margin-top:0px;"><input type="button" class="button-secondary" value="<?php esc_attr_e('Close Color Picker'); ?>" onclick="cp.hidePopup(\'prettyplease\')"></input></p>';
|
||||
this.contents = contents;
|
||||
this.populated = false;
|
||||
}
|
||||
function PopupWindow_hidePopup(magicword) {
|
||||
if ( magicword != 'prettyplease' )
|
||||
return false;
|
||||
if (this.divName != null) {
|
||||
if (this.use_gebi) {
|
||||
document.getElementById(this.divName).style.visibility = "hidden";
|
||||
}
|
||||
else if (this.use_css) {
|
||||
document.all[this.divName].style.visibility = "hidden";
|
||||
}
|
||||
else if (this.use_layers) {
|
||||
document.layers[this.divName].visibility = "hidden";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (this.popupWindow && !this.popupWindow.closed) {
|
||||
this.popupWindow.close();
|
||||
this.popupWindow = null;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function colorSelect(t,p) {
|
||||
if ( cp.p == p && document.getElementById(cp.divName).style.visibility != "hidden" )
|
||||
cp.hidePopup('prettyplease');
|
||||
else {
|
||||
cp.p = p;
|
||||
cp.select(t,p);
|
||||
}
|
||||
}
|
||||
function PopupWindow_setSize(width,height) {
|
||||
this.width = 162;
|
||||
this.height = 210;
|
||||
}
|
||||
|
||||
var cp = new ColorPicker();
|
||||
function advUpdate(val, obj) {
|
||||
document.getElementById(obj).value = val;
|
||||
kUpdate(obj);
|
||||
}
|
||||
function kUpdate(oid) {
|
||||
if ( 'uppercolor' == oid || 'lowercolor' == oid ) {
|
||||
uc = document.getElementById('uppercolor').value.replace('#', '');
|
||||
lc = document.getElementById('lowercolor').value.replace('#', '');
|
||||
hi = document.getElementById('headerimage');
|
||||
hi.value = 'header-img.php?upper='+uc+'&lower='+lc;
|
||||
document.getElementById('header').style.background = 'url("<?php echo get_template_directory_uri(); ?>/images/'+hi.value+'") center no-repeat';
|
||||
document.getElementById('advuppercolor').value = '#'+uc;
|
||||
document.getElementById('advlowercolor').value = '#'+lc;
|
||||
}
|
||||
if ( 'fontcolor' == oid ) {
|
||||
document.getElementById('header').style.color = document.getElementById('fontcolor').value;
|
||||
document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value;
|
||||
}
|
||||
if ( 'fontdisplay' == oid ) {
|
||||
document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
|
||||
}
|
||||
}
|
||||
function toggleDisplay() {
|
||||
td = document.getElementById('fontdisplay');
|
||||
td.value = ( td.value == 'none' ) ? 'inline' : 'none';
|
||||
kUpdate('fontdisplay');
|
||||
}
|
||||
function toggleAdvanced() {
|
||||
a = document.getElementById('jsAdvanced');
|
||||
if ( a.style.display == 'none' )
|
||||
a.style.display = 'block';
|
||||
else
|
||||
a.style.display = 'none';
|
||||
}
|
||||
function kDefaults() {
|
||||
document.getElementById('headerimage').value = '';
|
||||
document.getElementById('advuppercolor').value = document.getElementById('uppercolor').value = '#69aee7';
|
||||
document.getElementById('advlowercolor').value = document.getElementById('lowercolor').value = '#4180b6';
|
||||
document.getElementById('header').style.background = 'url("<?php echo get_template_directory_uri(); ?>/images/kubrickheader.jpg") center no-repeat';
|
||||
document.getElementById('header').style.color = '#FFFFFF';
|
||||
document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value = '';
|
||||
document.getElementById('fontdisplay').value = 'inline';
|
||||
document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
|
||||
}
|
||||
function kRevert() {
|
||||
document.getElementById('headerimage').value = '<?php echo esc_js(kubrick_header_image()); ?>';
|
||||
document.getElementById('advuppercolor').value = document.getElementById('uppercolor').value = '#<?php echo esc_js(kubrick_upper_color()); ?>';
|
||||
document.getElementById('advlowercolor').value = document.getElementById('lowercolor').value = '#<?php echo esc_js(kubrick_lower_color()); ?>';
|
||||
document.getElementById('header').style.background = 'url("<?php echo esc_js(kubrick_header_image_url()); ?>") center no-repeat';
|
||||
document.getElementById('header').style.color = '';
|
||||
document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value = '<?php echo esc_js(kubrick_header_color_string()); ?>';
|
||||
document.getElementById('fontdisplay').value = '<?php echo esc_js(kubrick_header_display_string()); ?>';
|
||||
document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
|
||||
}
|
||||
function kInit() {
|
||||
document.getElementById('jsForm').style.display = 'block';
|
||||
document.getElementById('nonJsForm').style.display = 'none';
|
||||
}
|
||||
addLoadEvent(kInit);
|
||||
// ]]>
|
||||
</script>
|
||||
<style type='text/css'>
|
||||
#headwrap {
|
||||
text-align: center;
|
||||
}
|
||||
#kubrick-header {
|
||||
font-size: 80%;
|
||||
}
|
||||
#kubrick-header .hibrowser {
|
||||
width: 780px;
|
||||
height: 260px;
|
||||
overflow: scroll;
|
||||
}
|
||||
#kubrick-header #hitarget {
|
||||
display: none;
|
||||
}
|
||||
#kubrick-header #header h1 {
|
||||
font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
|
||||
font-weight: bold;
|
||||
font-size: 4em;
|
||||
text-align: center;
|
||||
padding-top: 70px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#kubrick-header #header .description {
|
||||
font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
|
||||
font-size: 1.2em;
|
||||
text-align: center;
|
||||
}
|
||||
#kubrick-header #header {
|
||||
text-decoration: none;
|
||||
color: <?php echo kubrick_header_color_string(); ?>;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 200px;
|
||||
text-align: center;
|
||||
background: url('<?php echo kubrick_header_image_url(); ?>') center no-repeat;
|
||||
}
|
||||
#kubrick-header #headerimg {
|
||||
margin: 0;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
display: <?php echo kubrick_header_display_string(); ?>;
|
||||
}
|
||||
#jsForm {
|
||||
display: none;
|
||||
text-align: center;
|
||||
}
|
||||
#jsForm input.submit, #jsForm input.button, #jsAdvanced input.button {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
#advanced {
|
||||
text-align: center;
|
||||
width: 620px;
|
||||
}
|
||||
html>body #advanced {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
left: 50%;
|
||||
margin-left: -380px;
|
||||
}
|
||||
#jsAdvanced {
|
||||
text-align: right;
|
||||
}
|
||||
#nonJsForm {
|
||||
position: relative;
|
||||
text-align: left;
|
||||
margin-left: -370px;
|
||||
left: 50%;
|
||||
}
|
||||
#nonJsForm label {
|
||||
padding-top: 6px;
|
||||
padding-right: 5px;
|
||||
float: left;
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
}
|
||||
.defbutton {
|
||||
font-weight: bold;
|
||||
}
|
||||
.zerosize {
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
#colorPickerDiv a, #colorPickerDiv a:hover {
|
||||
padding: 1px;
|
||||
text-decoration: none;
|
||||
border-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
|
||||
function kubrick_theme_page() {
|
||||
if ( isset( $_REQUEST['saved'] ) ) echo '<div id="message" class="updated fade"><p><strong>'.__('Options saved.').'</strong></p></div>';
|
||||
?>
|
||||
<div class='wrap'>
|
||||
<h2><?php _e('Customize Header'); ?></h2>
|
||||
<div id="kubrick-header">
|
||||
<div id="headwrap">
|
||||
<div id="header">
|
||||
<div id="headerimg">
|
||||
<h1><?php bloginfo('name'); ?></h1>
|
||||
<div class="description"><?php bloginfo('description'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="nonJsForm">
|
||||
<form method="post" action="">
|
||||
<?php wp_nonce_field('kubrick-header'); ?>
|
||||
<div class="zerosize"><input type="submit" name="defaultsubmit" value="<?php esc_attr_e('Save'); ?>" /></div>
|
||||
<label for="njfontcolor"><?php _e('Font Color:'); ?></label><input type="text" name="njfontcolor" id="njfontcolor" value="<?php echo esc_attr(kubrick_header_color()); ?>" /> <?php printf(__('Any CSS color (%s or %s or %s)'), '<code>red</code>', '<code>#FF0000</code>', '<code>rgb(255, 0, 0)</code>'); ?><br />
|
||||
<label for="njuppercolor"><?php _e('Upper Color:'); ?></label><input type="text" name="njuppercolor" id="njuppercolor" value="#<?php echo esc_attr(kubrick_upper_color()); ?>" /> <?php printf(__('HEX only (%s or %s)'), '<code>#FF0000</code>', '<code>#F00</code>'); ?><br />
|
||||
<label for="njlowercolor"><?php _e('Lower Color:'); ?></label><input type="text" name="njlowercolor" id="njlowercolor" value="#<?php echo esc_attr(kubrick_lower_color()); ?>" /> <?php printf(__('HEX only (%s or %s)'), '<code>#FF0000</code>', '<code>#F00</code>'); ?><br />
|
||||
<input type="hidden" name="hi" id="hi" value="<?php echo esc_attr(kubrick_header_image()); ?>" />
|
||||
<input type="submit" name="toggledisplay" id="toggledisplay" value="<?php esc_attr_e('Toggle Text'); ?>" />
|
||||
<input type="submit" name="defaults" value="<?php esc_attr_e('Use Defaults'); ?>" />
|
||||
<input type="submit" class="defbutton" name="submitform" value=" <?php esc_attr_e('Save'); ?> " />
|
||||
<input type="hidden" name="action" value="save" />
|
||||
<input type="hidden" name="njform" value="true" />
|
||||
</form>
|
||||
</div>
|
||||
<div id="jsForm">
|
||||
<form style="display:inline;" method="post" name="hicolor" id="hicolor" action="<?php echo esc_attr($_SERVER['REQUEST_URI']); ?>">
|
||||
<?php wp_nonce_field('kubrick-header'); ?>
|
||||
<input type="button" class="button-secondary" onclick="tgt=document.getElementById('fontcolor');colorSelect(tgt,'pick1');return false;" name="pick1" id="pick1" value="<?php esc_attr_e('Font Color'); ?>"></input>
|
||||
<input type="button" class="button-secondary" onclick="tgt=document.getElementById('uppercolor');colorSelect(tgt,'pick2');return false;" name="pick2" id="pick2" value="<?php esc_attr_e('Upper Color'); ?>"></input>
|
||||
<input type="button" class="button-secondary" onclick="tgt=document.getElementById('lowercolor');colorSelect(tgt,'pick3');return false;" name="pick3" id="pick3" value="<?php esc_attr_e('Lower Color'); ?>"></input>
|
||||
<input type="button" class="button-secondary" name="revert" value="<?php esc_attr_e('Revert'); ?>" onclick="kRevert()" />
|
||||
<input type="button" class="button-secondary" value="<?php esc_attr_e('Advanced'); ?>" onclick="toggleAdvanced()" />
|
||||
<input type="hidden" name="action" value="save" />
|
||||
<input type="hidden" name="fontdisplay" id="fontdisplay" value="<?php echo esc_attr(kubrick_header_display()); ?>" />
|
||||
<input type="hidden" name="fontcolor" id="fontcolor" value="<?php echo esc_attr(kubrick_header_color()); ?>" />
|
||||
<input type="hidden" name="uppercolor" id="uppercolor" value="<?php echo esc_attr(kubrick_upper_color()); ?>" />
|
||||
<input type="hidden" name="lowercolor" id="lowercolor" value="<?php echo esc_attr(kubrick_lower_color()); ?>" />
|
||||
<input type="hidden" name="headerimage" id="headerimage" value="<?php echo esc_attr(kubrick_header_image()); ?>" />
|
||||
<p class="submit"><input type="submit" name="submitform" class="button-primary" value="<?php esc_attr_e('Update Header'); ?>" onclick="cp.hidePopup('prettyplease')" /></p>
|
||||
</form>
|
||||
<div id="colorPickerDiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;visibility:hidden;"> </div>
|
||||
<div id="advanced">
|
||||
<form id="jsAdvanced" style="display:none;" action="">
|
||||
<?php wp_nonce_field('kubrick-header'); ?>
|
||||
<label for="advfontcolor"><?php _e('Font Color (CSS):'); ?> </label><input type="text" id="advfontcolor" onchange="advUpdate(this.value, 'fontcolor')" value="<?php echo esc_attr(kubrick_header_color()); ?>" /><br />
|
||||
<label for="advuppercolor"><?php _e('Upper Color (HEX):');?> </label><input type="text" id="advuppercolor" onchange="advUpdate(this.value, 'uppercolor')" value="#<?php echo esc_attr(kubrick_upper_color()); ?>" /><br />
|
||||
<label for="advlowercolor"><?php _e('Lower Color (HEX):'); ?> </label><input type="text" id="advlowercolor" onchange="advUpdate(this.value, 'lowercolor')" value="#<?php echo esc_attr(kubrick_lower_color()); ?>" /><br />
|
||||
<input type="button" class="button-secondary" name="default" value="<?php esc_attr_e('Select Default Colors'); ?>" onclick="kDefaults()" /><br />
|
||||
<input type="button" class="button-secondary" onclick="toggleDisplay();return false;" name="pick" id="pick" value="<?php esc_attr_e('Toggle Text Display'); ?>"></input><br />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
38
aclindsa-wordpress-theme/header.php
Normal file
38
aclindsa-wordpress-theme/header.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
||||
|
||||
<head profile="http://gmpg.org/xfn/11">
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
|
||||
|
||||
<title><?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?></title>
|
||||
|
||||
<link rel="stylesheet" href="http://aclindsay.com/stylesheet.css" type="text/css" media="screen" />
|
||||
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
|
||||
|
||||
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
|
||||
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class(); ?>>
|
||||
<div id="header">
|
||||
<div id="header-inner">
|
||||
<div id="title"><a href="http://aclindsay.com">aclindsay.com</a></div>
|
||||
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="http://aclindsay.com/home/">Home</a></li>
|
||||
<li><a href="http://aclindsay.com/projects/">Projects</a></li>
|
||||
<li><a href="http://aclindsay.com/about/">About</a></li>
|
||||
<li><a href="http://aclindsay.com/contact/">Contact</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
70
aclindsa-wordpress-theme/image.php
Normal file
70
aclindsa-wordpress-theme/image.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div id="content" class="widecolumn">
|
||||
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
||||
|
||||
<div class="post" id="post-<?php the_ID(); ?>">
|
||||
<h2><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> » <?php the_title(); ?></h2>
|
||||
<div class="entry">
|
||||
<p class="attachment"><a href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'medium' ); ?></a></p>
|
||||
<div class="caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the "caption" ?></div>
|
||||
|
||||
<?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?>
|
||||
|
||||
<div class="navigation">
|
||||
<div class="alignleft"><?php previous_image_link() ?></div>
|
||||
<div class="alignright"><?php next_image_link() ?></div>
|
||||
</div>
|
||||
<br class="clear" />
|
||||
|
||||
<p class="postmetadata alt">
|
||||
<small>
|
||||
This entry was posted on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
|
||||
and is filed under <?php the_category(', ') ?>.
|
||||
<?php the_taxonomies(); ?>
|
||||
You can follow any responses to this entry through the <?php post_comments_feed_link('RSS 2.0'); ?> feed.
|
||||
|
||||
<?php if ( comments_open() && pings_open() ) {
|
||||
// Both Comments and Pings are open ?>
|
||||
You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.
|
||||
|
||||
<?php } elseif ( !comments_open() && pings_open() ) {
|
||||
// Only Pings are Open ?>
|
||||
Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.
|
||||
|
||||
<?php } elseif ( comments_open() && !pings_open() ) {
|
||||
// Comments are open, Pings are not ?>
|
||||
You can skip to the end and leave a response. Pinging is currently not allowed.
|
||||
|
||||
<?php } elseif ( !comments_open() && !pings_open() ) {
|
||||
// Neither Comments, nor Pings are open ?>
|
||||
Both comments and pings are currently closed.
|
||||
|
||||
<?php } edit_post_link('Edit this entry.','',''); ?>
|
||||
|
||||
</small>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php comments_template(); ?>
|
||||
|
||||
<?php endwhile; else: ?>
|
||||
|
||||
<p>Sorry, no attachments matched your criteria.</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
47
aclindsa-wordpress-theme/index.php
Normal file
47
aclindsa-wordpress-theme/index.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="content" class="narrowcolumn" role="main">
|
||||
|
||||
<div id="main">
|
||||
|
||||
<?php if (have_posts()) : ?>
|
||||
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
|
||||
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
|
||||
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
|
||||
<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
|
||||
|
||||
<div class="entry">
|
||||
<?php the_content('Read the rest of this entry »'); ?>
|
||||
</div>
|
||||
|
||||
<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
|
||||
</div>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<div class="navigation">
|
||||
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
|
||||
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<h2 class="center">Not Found</h2>
|
||||
<p class="center">Sorry, but you are looking for something that isn't here.</p>
|
||||
<?php get_search_form(); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
</div>
|
||||
<?php get_footer(); ?>
|
23
aclindsa-wordpress-theme/links.php
Normal file
23
aclindsa-wordpress-theme/links.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
|
||||
/*
|
||||
Template Name: Links
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php get_header(); ?>
|
||||
|
||||
<div id="content" class="widecolumn">
|
||||
|
||||
<h2>Links:</h2>
|
||||
<ul>
|
||||
<?php wp_list_bookmarks(); ?>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
27
aclindsa-wordpress-theme/page.php
Normal file
27
aclindsa-wordpress-theme/page.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="content" class="narrowcolumn" role="main">
|
||||
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
||||
<div class="post" id="post-<?php the_ID(); ?>">
|
||||
<h2><?php the_title(); ?></h2>
|
||||
<div class="entry">
|
||||
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
|
||||
|
||||
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; endif; ?>
|
||||
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
|
||||
</div>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
<?php get_footer(); ?>
|
BIN
aclindsa-wordpress-theme/screenshot.png
Normal file
BIN
aclindsa-wordpress-theme/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
51
aclindsa-wordpress-theme/search.php
Normal file
51
aclindsa-wordpress-theme/search.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="content">
|
||||
<div id="main" class="narrowcolumn" role="main">
|
||||
|
||||
<?php if (have_posts()) : ?>
|
||||
|
||||
<h2 class="pagetitle">Search Results</h2>
|
||||
|
||||
<div class="navigation">
|
||||
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
|
||||
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
|
||||
<div <?php post_class() ?>>
|
||||
<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
|
||||
<small><?php the_time('l, F jS, Y') ?></small>
|
||||
|
||||
<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
|
||||
</div>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<div class="navigation">
|
||||
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
|
||||
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<h2 class="center">No posts found. Try a different search?</h2>
|
||||
<?php get_search_form(); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
83
aclindsa-wordpress-theme/sidebar.php
Normal file
83
aclindsa-wordpress-theme/sidebar.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
?>
|
||||
<div id="sidebar" role="complementary">
|
||||
<ul>
|
||||
<?php /* Widgetized sidebar, if you have the plugin installed. */
|
||||
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
|
||||
<li>
|
||||
<?php get_search_form(); ?>
|
||||
</li>
|
||||
|
||||
<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
|
||||
<li><h2>Author</h2>
|
||||
<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
|
||||
</li>
|
||||
-->
|
||||
|
||||
<?php if ( is_404() || is_category() || is_day() || is_month() ||
|
||||
is_year() || is_search() || is_paged() ) {
|
||||
?> <li>
|
||||
|
||||
<?php /* If this is a 404 page */ if (is_404()) { ?>
|
||||
<?php /* If this is a category archive */ } elseif (is_category()) { ?>
|
||||
<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
|
||||
|
||||
<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
|
||||
<p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
|
||||
for the day <?php the_time('l, F jS, Y'); ?>.</p>
|
||||
|
||||
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
|
||||
<p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
|
||||
for <?php the_time('F, Y'); ?>.</p>
|
||||
|
||||
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
|
||||
<p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
|
||||
for the year <?php the_time('Y'); ?>.</p>
|
||||
|
||||
<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
|
||||
<p>You have searched the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
|
||||
for <strong>'<?php the_search_query(); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
|
||||
|
||||
<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
|
||||
<p>You are currently browsing the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives.</p>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</li>
|
||||
<?php }?>
|
||||
</ul>
|
||||
<ul role="navigation">
|
||||
<?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
|
||||
|
||||
<li><h2>Archives</h2>
|
||||
<ul>
|
||||
<?php wp_get_archives('type=monthly'); ?>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
|
||||
</ul>
|
||||
<ul>
|
||||
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
|
||||
<?php wp_list_bookmarks(); ?>
|
||||
|
||||
<li><h2>Meta</h2>
|
||||
<ul>
|
||||
<?php wp_register(); ?>
|
||||
<li><?php wp_loginout(); ?></li>
|
||||
<li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li>
|
||||
<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
|
||||
<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li>
|
||||
<?php wp_meta(); ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
73
aclindsa-wordpress-theme/single.php
Normal file
73
aclindsa-wordpress-theme/single.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WordPress
|
||||
* @subpackage Default_Theme
|
||||
*/
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div id="content" class="widecolumn" role="main">
|
||||
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
||||
|
||||
<div class="navigation">
|
||||
<div class="alignleft"><?php previous_post_link('« %link') ?></div>
|
||||
<div class="alignright"><?php next_post_link('%link »') ?></div>
|
||||
</div>
|
||||
|
||||
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
|
||||
<h2><?php the_title(); ?></h2>
|
||||
|
||||
<div class="entry">
|
||||
<?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?>
|
||||
|
||||
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
|
||||
<?php the_tags( '<p>Tags: ', ', ', '</p>'); ?>
|
||||
|
||||
<p class="postmetadata alt">
|
||||
<small>
|
||||
This entry was posted
|
||||
<?php /* This is commented, because it requires a little adjusting sometimes.
|
||||
You'll need to download this plugin, and follow the instructions:
|
||||
http://binarybonsai.com/wordpress/time-since/ */
|
||||
/* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
|
||||
on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
|
||||
and is filed under <?php the_category(', ') ?>.
|
||||
You can follow any responses to this entry through the <?php post_comments_feed_link('RSS 2.0'); ?> feed.
|
||||
|
||||
<?php if ( comments_open() && pings_open() ) {
|
||||
// Both Comments and Pings are open ?>
|
||||
You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.
|
||||
|
||||
<?php } elseif ( !comments_open() && pings_open() ) {
|
||||
// Only Pings are Open ?>
|
||||
Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.
|
||||
|
||||
<?php } elseif ( comments_open() && !pings_open() ) {
|
||||
// Comments are open, Pings are not ?>
|
||||
You can skip to the end and leave a response. Pinging is currently not allowed.
|
||||
|
||||
<?php } elseif ( !comments_open() && !pings_open() ) {
|
||||
// Neither Comments, nor Pings are open ?>
|
||||
Both comments and pings are currently closed.
|
||||
|
||||
<?php } edit_post_link('Edit this entry','','.'); ?>
|
||||
|
||||
</small>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php comments_template(); ?>
|
||||
|
||||
<?php endwhile; else: ?>
|
||||
|
||||
<p>Sorry, no posts matched your criteria.</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
Reference in New Issue
Block a user