diff --git a/wp-content/themes/seo_october_special/README.txt b/wp-content/themes/seo_october_special/README.txt new file mode 100755 index 0000000000000000000000000000000000000000..251aa110f79d9c5c241fcda08dc4e3fbf406b92c --- /dev/null +++ b/wp-content/themes/seo_october_special/README.txt @@ -0,0 +1,38 @@ +############################################### +#Theme: October Special # +#Designed by: Derek Punsalan # +#Search engine optimization by: Neil Patel # +#Copyrighted by Derek Punsalan and Neil Patel # +############################################### + +Tables of Contents +1. Theme Installation +2. Search Engine Optimization Overview +3. Meta Description +4. 301 Permanent Redirect +5. Sitemap + +1. Upload the 'octoberspecial' directory to /wp-contents/themes/. Login and navigate to Presentation tab and activate October Special. The theme does support widgets. Download and install the WordPress Widgets plugin here - http://automattic.com/code/widgets/ + +2. Search Engine Optimization Overview +Currently this theme is optimized for search engines, but there are a few additional things that can be done including a meta description tag, 301 permanent redirect, and creating a sitemap. + +3. Meta Description +Search engines usually see your content as duplicate. Granted it usually is not duplicate content, but without a unique meta description tag on each of your posts you are hampering your search engine traffic. + +To solve this we can use the head meta description tag. It can be downloaded from http://guff.szub.net/2005/09/01/head-meta-description/ and it is easy to install. That URL contains instructions and I recommend setting the length of the meta description tag to 20 or 25 words. + +4. 301 Permanent Redirect +When people link to your blog they usually link to http://domain.com or http://www.domain.com. Because of this the search engines usually see them as two separate sites and you may have 100 sites that link to http://domain.com and 50 sites that link to http://www.domain.com. If the search engines saw it as 150 links in total instead of 50 and 100 your rankings would most likely go up. You want to consolidate the links and do a 301 permanent redirect in your .htaccess file. Here is the code that you may want to use: + +Options +FollowSymLinks +RewriteEngine On +RewriteCond %{HTTP_Host} ^YOURDOMAIN\.com [NC] +RewriteRule ^(.*)$ http://www.YOURDOMAIN.com/$1 [L,R=301] + +**Make sure the code is on 4 lines in your .htaccess file and replace "YOURDOMAIN" with your domain name. + +5. Sitemap +You don't really need a sitemap for your blog, but it will just help get your pages indexed faster. You can create your own HTML sitemap or you can use a WordPress plugin. I recommend using the Google Sitemap generator plugin which can be found at http://www.arnebrachhold.de/2005/06/05/google-sitemaps-generator-v2-final. + + diff --git a/wp-content/themes/seo_october_special/octoberspecial/404.php b/wp-content/themes/seo_october_special/octoberspecial/404.php new file mode 100644 index 0000000000000000000000000000000000000000..9be553ef8b2f3a3dad06d7e74aaf96f502a44a37 --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/404.php @@ -0,0 +1,33 @@ +<?php get_header(); ?> +<div id="content_wrapper"> + <div id="content_inner" class="clearfix"> + <div class="content_left"> + <div class="post"> + <h2>Nothing to see here</h2> + <div class="entry"> + <p>You seem to have found a mislinked file or page.</p> + </div> + <div class="clear"></div> + </div> + </div> + <div class="content_right"> + <?php include (TEMPLATEPATH . '/main_right.php'); ?> + </div> + </div> +</div> +<div id="bottom_wrapper"> + <div id="bottom_inner" class="clearfix"> + <div class="bottom_left"> + <?php comments_template(); ?> + </div> + <?php include (TEMPLATEPATH . '/bottom_right.php'); ?> + <div class="clear"></div> + <div id="categories"> + <h3>Browse by Category</h3> + <ul> + <?php wp_list_cats('sort_column=name&optioncount=0'); ?> + </ul> + </div> + </div> +</div> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/bottom_posts.php b/wp-content/themes/seo_october_special/octoberspecial/bottom_posts.php new file mode 100644 index 0000000000000000000000000000000000000000..ccf5b9fa3aa35e1eb8bf95e4da26ef3a97c2ffe0 --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/bottom_posts.php @@ -0,0 +1,15 @@ +<div id="archived_posts"> +<?php query_posts('showposts=5'); ?> +<?php while(have_posts()) : the_post(); if(!($first_post == $post->ID)) : ?> + <div class="archived_posts_date"> + <?php the_time('F jS Y') ?><br /> + Tags: <?php the_category(', ') ?> + <?php comments_popup_link('No Comments', 'One Comment', '% Comments'); ?> + </div> + <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title() ?></a></h3> + <div class="archived_entry"> + <?php the_content_rss('', TRUE, '', 50); ?> + </div> + <div class="clear"></div> +<?php endif; endwhile; ?> +</div> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/bottom_right.php b/wp-content/themes/seo_october_special/octoberspecial/bottom_right.php new file mode 100644 index 0000000000000000000000000000000000000000..5bbf45b61ef584529e853037a99cc72bbee0a474 --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/bottom_right.php @@ -0,0 +1,10 @@ +<div class="archived_right"> + <div class="archived_sub_right"> + <h3>Search</h3> + <?php include (TEMPLATEPATH . '/searchform.php'); ?> + </div> + <div class="archived_sub_right"> + <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?> + <?php endif; ?> + </div> +</div> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/comments.php b/wp-content/themes/seo_october_special/octoberspecial/comments.php new file mode 100644 index 0000000000000000000000000000000000000000..711447ed14cbed67919383c62c03fbbfc192a834 --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/comments.php @@ -0,0 +1,125 @@ +<?php // 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 there's a password + if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie + ?> + + <p class="nocomments">This post is password protected. Enter the password to view comments.<p> + + <?php + return; + } + } + + /* This variable is for alternating comment background */ + $oddcomment = 'alt'; +?> + +<!-- You can start editing here. --> +<?php if ($comments) : ?> +<div id="comments_title" class="clearfix"> + <h3 id="comments">Activity</h3> + <div id="comment_meta"><?php comments_number('No comments', 'One comment', '% total comments' );?>, <a href="#respond">leave your comment</a> or <a href="<?php trackback_url(true); ?>" rel="trackback">trackback</a>.</div> +</div> + <ol class="commentlist"> + + <?php foreach ($comments as $comment) : ?> + <?php if (get_comment_type() == "comment"){ ?> + <li class="<?php if ($comment->comment_author_email == "admin@domain.com") echo 'author'; else echo $oddcomment; ?> item" id="comment-<?php comment_ID() ?>"> + <div class="comment_credentials"> + <span class="author_highlight"><?php comment_author_link() ?></span><br /> + <a href="#comment-<?php comment_ID() ?>" title="Comment Permalink"><?php comment_date('M jS Y') ?></a> + <?php edit_comment_link('Moderate','<br />',''); ?> + </div> + <div class="comment_text"> + <?php if ($comment->comment_approved == '0') : ?> + <em>Your comment is awaiting moderation.</em> + <?php endif; ?> + <?php comment_text() ?> + </div> + <div class="clear"></div> + </li> + <?php /* Changes every other comment to a different class */ + if ('alt' == $oddcomment) $oddcomment = ''; + else $oddcomment = 'alt'; + ?> + <?php } ?> + <?php endforeach; /* end for each comment */ ?> + </ol> + <a name="showpings"></a> + <ol class="pingslist"> + <?php foreach ($comments as $comment) : ?> + <?php if (get_comment_type() != "comment"){ ?> + <li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>"> + <a name="showpings"></a> + <div class="comment_credentials"> + <?php the_time('F jS Y') ?><br /> + <?php edit_comment_link('Moderate','',''); ?> + </div> + <div class="comment_text"> + <p><?php comment_author_link() ?></p> + </div> + <div class="clear"></div> + </li> + <?php /* Changes every other comment to a different class */ + if ('alt' == $oddcomment) $oddcomment = ''; + else $oddcomment = 'alt'; + ?> + <?php } ?> + <?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) : ?> + <div id="comments_title" class="clearfix"> + <h3 id="comments">Activity</h3> + <div id="comment_meta"><?php comments_number('No comments', 'One comment', '% total comments' );?>, <a href="#respond">leave your comment</a> or <a href="<?php trackback_url(true); ?>" rel="trackback">trackback</a>.</div> + </div> + + <?php else : // comments are closed ?> + <p class="nocomments">Comments are closed.</p> + + <?php endif; ?> +<?php endif; ?> + + +<?php if ('open' == $post->comment_status) : ?> +<br /> +<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 the_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">Logout »</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 <?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><textarea name="comment" id="comment" cols="60" rows="10" tabindex="4"><?php if (function_exists('quoter_comment_server')) { quoter_comment_server(); } ?></textarea></p> + +<p><input name="submit" type="image" src="<?php bloginfo('template_directory'); ?>/images/submit-btn.gif" alt="Submit" id="submit" tabindex="5" value="Submit" /> +<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /> +</p> +<?php do_action('comment_form', $post->ID); ?> + +</form> +<br /> + +<?php endif; // If registration required and not logged in ?> +<?php endif; // if you delete this the sky will fall on your head ?> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/footer.php b/wp-content/themes/seo_october_special/octoberspecial/footer.php new file mode 100644 index 0000000000000000000000000000000000000000..163772e88089fa6640c721eb33b5b46e2c4f7183 --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/footer.php @@ -0,0 +1,12 @@ +<div id="footer_wrapper"> + <div id="footer_inner" class="clearfix"> + <div class="footer_desc"> + <?php bloginfo('name'); ?> and all content & imagery © 2006 unless otherwise noted.<br />Design & layout may not be reused without permission. Design & presentation by <a href="http://5thirtyone.com/archives/703" title="Derek Punsalan">Derek Punsalan</a>, optimized by <a href="http://pronetadvertising.com" title="Pronet Advertising">Pronet Advertising</a>. + </div> + </div> +</div> +<?php wp_footer(); ?> +<!-- Design by Derek Punsalan - http://5thirtyone.com - For Syl --> +</div> +</body> +</html> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/functions.php b/wp-content/themes/seo_october_special/octoberspecial/functions.php new file mode 100644 index 0000000000000000000000000000000000000000..883a5cdc75e4be5511efa2fa3bfc180b977d2193 --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/functions.php @@ -0,0 +1,87 @@ +<?php +if ( function_exists('register_sidebar') ) + register_sidebars((2),array( + 'before_widget' => '<div class="sidebar_widget">', + 'after_widget' => '</div>', + 'before_title' => '<h3>', + 'after_title' => '</h3>', + )); + +/* +File Name: Wordpress Theme Toolkit +Version: 1.0 +Author: Ozh +Author URI: http://planetOzh.com/ +*/ + +/************************************************************************************ + * THEME USERS : don't touch anything !! Or don't ask the theme author for support :) + ************************************************************************************/ + +include(dirname(__FILE__).'/themetoolkit.php'); + +/************************************************************************************ + * THEME AUTHOR : edit the following function call : + ************************************************************************************/ + +themetoolkit( + 'OctoberSpecial', /* Make yourself at home : + * Name of the variable that will contain all the options of + * your theme admin menu (in the form of an array) + * Name it according to PHP naming rules (http://php.net/variables) */ + + array( /* Variables used by your theme features (i.e. things the end user will + * want to customize through the admin menu) + * Syntax : + * 'option_variable' => 'Option Title ## optionnal explanations', + * 'option_variable' => 'Option Title {radio|value1|Text1|value2|Text2} ## optionnal explanations', + * 'option_variable' => 'Option Title {textarea|rows|cols} ## optionnal explanations', + * 'option_variable' => 'Option Title {checkbox|option_varname1|value1|Text1|option_varname2|value2|Text2} ## optionnal explanations', + * Examples : + * 'your_age' => 'Your Age', + * 'cc_number' => 'Credit Card Number ## I can swear I will not misuse it :P', + * 'gender' => 'Gender {radio|girl|You are a female|boy|You are a male} ## What is your gender ?' + * Dont forget the comma at the end of each line ! */ + 'scheme' => 'Color Scheme {radio|blue|Blue|pink|Pink|green|Green|brown|Brown|red|Red|orange|Orange} ## Select the color scheme visible to readers.', + + 'debug' => 'debug', /* this is a fake entry that will activate the "Programmer's Corner" + * showing you vars and values while you build your theme. Remove it + * when your theme is ready for shipping */ + ), + __FILE__ /* Parent. DO NOT MODIFY THIS LINE ! + * This is used to check which file (and thus theme) is calling + * the function (useful when another theme with a Theme Toolkit + * was installed before */ +); + +/************************************************************************************ + * THEME AUTHOR : Congratulations ! The hard work is all done now :) + * + * From now on, you can create functions for your theme that will use the array + * of variables $mytheme->option. For example there will be now a variable + * $mytheme->option['your_age'] with value as set by theme end-user in the admin menu. + ************************************************************************************/ + +/*************************************** + * Additionnal Features and Functions + * + * Create your own functions using the array + * of user defined variables $mytheme->option. + * + **************************************/ + +/* mytheme_scheme() + * Prints css style according to what has been defined in the admin pannel +*/ +function getColorScheme() { + + global $OctoberSpecial; + + $default = "1"; + $tempVar = $OctoberSpecial->option['scheme']; + + echo $tempVar; + +} + +?> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/header.php b/wp-content/themes/seo_october_special/octoberspecial/header.php new file mode 100644 index 0000000000000000000000000000000000000000..612639e03106204a03f4f2491141d1d15a06af34 --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/header.php @@ -0,0 +1,42 @@ +<!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 profile="http://gmpg.org/xfn/11"> +<title><?php if (is_home () ) { bloginfo('name'); } elseif ( is_category() ) { +single_cat_title(); echo " - "; bloginfo('name'); +} elseif (is_single() || is_page() ) { +single_post_title(); +} elseif (is_search() ) { +bloginfo('name'); echo " search results: "; echo wp_specialchars($s); +} else { wp_title('',true); } +?></title> +<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> +<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> +<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> +<link href="<?php bloginfo('template_url'); ?>/switch.css" type="text/css" rel="stylesheet" /> +<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 class="<?php echo getColorScheme(); ?>"> +<div id="main_wrapper"> + <div id="header_wrapper"> + <div id="nav_wrapper" class="clearfix"> + <ul id="navigation"> + <li><a href="/">Home</a></li> + <li><a href="/">Colophon</a></li> + <li><a href="#categories">Archives</a></li> + <li class="right"><a href="#bottom_wrapper">Search</a></li> + </ul> + </div> + </div> + <div id="bca_wrapper"> + <div id="bca_inner" class="clearfix"> + <div class="bca_border"> + <div class="bca_title"> + <h3><?php bloginfo('name'); ?></h3> + </div> + <div class="bca_desc">“I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living, it’s a way of looking at life through the wrong end of a telescope. Which is what I do, and that enables you to laugh at life’s realities.” - <em>Dr. Seuss</em> + </div> + </div> + </div> + </div> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/home.php b/wp-content/themes/seo_october_special/octoberspecial/home.php new file mode 100644 index 0000000000000000000000000000000000000000..1f5a62ffb171f28741480c53e90e5cf12276699c --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/home.php @@ -0,0 +1,58 @@ +<?php get_header(); ?> +<div id="content_wrapper"> + <div id="content_inner" class="clearfix"> + <div class="content_left"> + <?php $top_query = new WP_Query('showposts=1'); ?> + <?php while($top_query->have_posts()) : $top_query->the_post(); $first_post = $post->ID; ?> + <div class="post" id="post-<?php the_ID(); ?>"> + <div class="post_date"> + <?php the_time('M jS Y') ?><br /> + Tags: <?php the_category(', ') ?> + <div class="extra_status"> + <?php comments_popup_link('No Comments', 'One Comment', '% Comments'); ?> + </div> + </div> + <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> + <div class="entry"> + <?php the_content('[...]'); ?> + </div> + <div class="clear"></div> + </div> + <?php endwhile; ?> + </div> + <div class="content_right"> + <?php include (TEMPLATEPATH . '/main_right.php'); ?> + </div> + </div> +</div> +<div id="bottom_wrapper"> + <div id="bottom_inner" class="clearfix"> + <div class="bottom_left"> + <div id="archived_posts"> + <?php query_posts('showposts=6'); ?> + <?php while(have_posts()) : the_post(); if(!($first_post == $post->ID)) : ?> + <div class="archived_posts_date"> + <?php the_time('F jS Y') ?><br /> + Tags: <?php the_category(', ') ?><br /><br /> + <?php comments_popup_link('No Comments', 'One Comment', '% Comments'); ?> + </div> + <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title() ?></a></h3> + <div class="archived_entry"> + <?php the_content_rss('', FALSE, '', 50); ?> + </div> + <div class="clear"></div> + <?php endif; endwhile; ?> + <br /> + </div> + </div> + <?php include (TEMPLATEPATH . '/bottom_right.php'); ?> + <div class="clear"></div> + <div id="categories"> + <h3>Browse by Category</h3> + <ul> + <?php wp_list_cats('sort_column=name&optioncount=0'); ?> + </ul> + </div> + </div> +</div> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/9rules.gif b/wp-content/themes/seo_october_special/octoberspecial/images/9rules.gif new file mode 100644 index 0000000000000000000000000000000000000000..fd9005cb69d6e5960a0f9ec13c34b858b81eb1f9 Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/9rules.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/a-bca.gif b/wp-content/themes/seo_october_special/octoberspecial/images/a-bca.gif new file mode 100644 index 0000000000000000000000000000000000000000..e33ed15c734c48b9f8d4d4d84c071deaa03ba3fa Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/a-bca.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/a-entry.gif b/wp-content/themes/seo_october_special/octoberspecial/images/a-entry.gif new file mode 100644 index 0000000000000000000000000000000000000000..05c9fb0e26fb991d71de2a93c7ad93c6a5dccb97 Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/a-entry.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/archived-wrapper.gif b/wp-content/themes/seo_october_special/octoberspecial/images/archived-wrapper.gif new file mode 100644 index 0000000000000000000000000000000000000000..31ec7bcfbcebb3ac472dbc1b6533d2ffa365f3d3 Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/archived-wrapper.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/author.gif b/wp-content/themes/seo_october_special/octoberspecial/images/author.gif new file mode 100644 index 0000000000000000000000000000000000000000..db18112aae5aeedb8bd916dfb73cd11a119fc892 Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/author.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/brown-content-wrapper.gif b/wp-content/themes/seo_october_special/octoberspecial/images/brown-content-wrapper.gif new file mode 100644 index 0000000000000000000000000000000000000000..ae9c4329a14647bcdb48bf9b4d9e68af36a4672f Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/brown-content-wrapper.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/content-wrapper.gif b/wp-content/themes/seo_october_special/octoberspecial/images/content-wrapper.gif new file mode 100644 index 0000000000000000000000000000000000000000..79c1c408ca65470a7f789008bea64ab118910758 Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/content-wrapper.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/diag-dark.gif b/wp-content/themes/seo_october_special/octoberspecial/images/diag-dark.gif new file mode 100644 index 0000000000000000000000000000000000000000..7df4f6ab0ca9788ca2f73a3b2ca81dc1c8f3bd4d Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/diag-dark.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/green-content-wrapper.gif b/wp-content/themes/seo_october_special/octoberspecial/images/green-content-wrapper.gif new file mode 100644 index 0000000000000000000000000000000000000000..698a94beb8dccdad2e8f7aae410415e4be4da233 Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/green-content-wrapper.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/orange-content-wrapper.gif b/wp-content/themes/seo_october_special/octoberspecial/images/orange-content-wrapper.gif new file mode 100644 index 0000000000000000000000000000000000000000..04e82f2249bbf3ea0929f816419afa6ac1ad2ddd Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/orange-content-wrapper.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/pink-content-wrapper.gif b/wp-content/themes/seo_october_special/octoberspecial/images/pink-content-wrapper.gif new file mode 100644 index 0000000000000000000000000000000000000000..6cc499f61d70dcff959412f32dca49a7e65a3980 Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/pink-content-wrapper.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/red-content-wrapper.gif b/wp-content/themes/seo_october_special/octoberspecial/images/red-content-wrapper.gif new file mode 100644 index 0000000000000000000000000000000000000000..ad37239c24601781ad5000dafb89b5433ab4ed87 Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/red-content-wrapper.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/search-btn.gif b/wp-content/themes/seo_october_special/octoberspecial/images/search-btn.gif new file mode 100644 index 0000000000000000000000000000000000000000..9f3ab06b5157c2c06137c0c82577092c8c486e43 Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/search-btn.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/images/submit-btn.gif b/wp-content/themes/seo_october_special/octoberspecial/images/submit-btn.gif new file mode 100644 index 0000000000000000000000000000000000000000..a61ee3fe54269f64a56aefd09e1308eec9e69638 Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/images/submit-btn.gif differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/index.php b/wp-content/themes/seo_october_special/octoberspecial/index.php new file mode 100644 index 0000000000000000000000000000000000000000..82ce7123b28ea6c782eae8dad2b69ec255fbc0fd --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/index.php @@ -0,0 +1,58 @@ +<?php get_header(); ?> +<div id="content_wrapper"> + <div id="content_inner" class="clearfix"> + <div class="content_left"> + <?php if (have_posts()) : ?> + <?php while (have_posts()) : the_post(); ?> + <div class="post" id="post-<?php the_ID(); ?>"> + <div class="post_date"> + <?php the_time('F jS Y') ?><br /> + Tags: <?php the_category(', ') ?><br /><br /> + <?php comments_popup_link('No Comments', 'One Comment', '% Comments'); ?> + </div> + <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> + <div class="entry"> + <?php the_content_rss('', TRUE, '', 50); ?> + </div> + <div class="clear"></div> + </div> + <?php endwhile; ?> + <?php else : ?> + <div class="post" id="post-<?php the_ID(); ?>"> + <h2>Nothing to see here</h2> + <div class="entry"> + <p>You seemed to have found a mislinked file, page, or search query with zero results. If you feel that you've reached this page in error, double check the URL and or search string and try again.</p> + <p>Alternatively, a more personalized method of tracking down and searching for content can be found <a href="#bottom_box">below</a>.</p> + </div> + <div class="clear"></div> + </div> + <?php endif; ?> + <br /> + <div class="nextprevious"> + <div class="left"><?php next_posts_link('« Previous') ?></div> + <div class="right"><?php previous_posts_link('Next »') ?></div> + </div> + <div class="clear"></div> + </div> + <div class="content_right"> + <?php include (TEMPLATEPATH . '/main_right.php'); ?> + </div> + <div class="clear"></div> + </div> +</div> +<div id="bottom_wrapper"> + <div id="bottom_inner" class="clearfix"> + <div class="bottom_left"> + <?php include (TEMPLATEPATH . '/bottom_posts.php'); ?> + </div> + <?php include (TEMPLATEPATH . '/bottom_right.php'); ?> + <div class="clear"></div> + <div id="categories"> + <h3>Browse by Category</h3> + <ul> + <?php wp_list_cats('sort_column=name&optioncount=0'); ?> + </ul> + </div> + </div> +</div> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/main_right.php b/wp-content/themes/seo_october_special/octoberspecial/main_right.php new file mode 100644 index 0000000000000000000000000000000000000000..917d14191a5a259f4af09bee2ab27b42395816a7 --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/main_right.php @@ -0,0 +1,16 @@ +<div class="content_right_sub"> +<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?> + <h3>Colophon</h3> + <div class="about_me"><p>Donec ac nisi in lectus euismod sodales. Suspendisse congue, arcu sit amet adipiscing scelerisque, enim neque ullamcorper dolor, sed viverra erat leo eu metus. Cras porttitor bibendum nunc.</p></div> + <div class="more_info"> + <a href="#">More info</a> + </div> +</div> +<div class="content_right_sub"> + <h3>Syndicate</h3> + <ul> + <li><a href="feed:<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a> - Full content feed</li> + <li><a href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a> - Full comments feed</li> + </ul> +<?php endif; ?> +</div> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/page.php b/wp-content/themes/seo_october_special/octoberspecial/page.php new file mode 100644 index 0000000000000000000000000000000000000000..1d05371a66b972ebc3a22b65be7eedbbefa68878 --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/page.php @@ -0,0 +1,58 @@ +<?php get_header(); ?> +<div id="content_wrapper"> + <div id="content_inner" class="clearfix"> + <div class="content_left"> + <?php if (have_posts()) : ?> + <?php while (have_posts()) : the_post(); ?> + <div class="post" id="post-<?php the_ID(); ?>"> + <div class="post_date"> + </div> + <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> + <div class="entry"> + <?php the_content('[...]'); ?> + </div> + <div class="clear"></div> + </div> + <?php endwhile; ?> + <?php else : ?> + <?php endif; ?> + </div> + <div class="content_right"> + <?php include (TEMPLATEPATH . '/main_right.php'); ?> + </div> + </div> +</div> +<div id="bottom_wrapper"> + <div id="bottom_inner" class="clearfix"> + <div class="bottom_left"> + <div id="archived_posts"> + <?php query_posts('showposts=5'); ?> + <?php if (have_posts()) : ?> + <?php while (have_posts()) : the_post(); ?> + <div class="archived_posts_date"> + <?php the_time('F jS Y') ?><br /> + Tags: <?php the_category(', ') ?><br /><br /> + <?php comments_popup_link('No Comments', 'One Comment', '% Comments'); ?> + </div> + <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title() ?></a></h3> + <div class="archived_entry"> + <?php the_content_rss('', FALSE, '', 50); ?> + </div> + <div class="clear"></div> + <?php endwhile; ?> + <?php else : ?> + <?php endif; ?> + <br /> + </div> + </div> + <?php include (TEMPLATEPATH . '/bottom_right.php'); ?> + <div class="clear"></div> + <div id="categories"> + <h3>Browse by Category</h3> + <ul> + <?php wp_list_cats('sort_column=name&optioncount=0'); ?> + </ul> + </div> + </div> +</div> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/screenshot.png b/wp-content/themes/seo_october_special/octoberspecial/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..211ec0b9eb8b756022f1f2cd23afd7cdb8e9ff42 Binary files /dev/null and b/wp-content/themes/seo_october_special/octoberspecial/screenshot.png differ diff --git a/wp-content/themes/seo_october_special/octoberspecial/searchform.php b/wp-content/themes/seo_october_special/octoberspecial/searchform.php new file mode 100644 index 0000000000000000000000000000000000000000..5e05d9657bd286ca8cec2eee1631ec3ee26d06d9 --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/searchform.php @@ -0,0 +1,7 @@ +<div id="searchthis"> + <p>The archives run deep. Feel free to search older content using topic keywords.</p> + <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/"> + <div><input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" /> + <input id="searchsubmit" type="image" src="<?php bloginfo('template_directory'); ?>/images/search-btn.gif" alt="Submit" /></div> + </form> +</div> diff --git a/wp-content/themes/seo_october_special/octoberspecial/single.php b/wp-content/themes/seo_october_special/octoberspecial/single.php new file mode 100644 index 0000000000000000000000000000000000000000..7cbb0a063b24ab83a2ec7117f4c4930bbbca487a --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/single.php @@ -0,0 +1,48 @@ +<?php get_header(); ?> +<div id="content_wrapper"> + <div id="content_inner" class="clearfix"> + <div class="content_left"> + <?php if (have_posts()) : ?> + <?php while (have_posts()) : the_post(); ?> + <div class="post" id="post-<?php the_ID(); ?>"> + <div class="post_date"> + <?php the_time('M jS Y') ?><br /> + Tags: <?php the_category(', ') ?> + <div class="extra_status"> + <?php edit_post_link('Edit this post', '', ''); ?> + </div> + </div> + <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> + <div class="entry"> + <?php the_content('[...]'); ?> + </div> + <div class="clear"></div> + </div> + <?php endwhile; ?> + <?php else : ?> + <h2>Nothing to see here</h2> + <p>You seemed to have found a mislinked file, page, or search query with zero results. If you feel that you've reached this page in error, double check the URL and or search string and try again.</p> + <p>Alternatively, a more personalized method of tracking down and searching for content can be found <a href="#bottom_box">below</a>.</p> + <?php endif; ?> + </div> + <div class="content_right"> + <?php include (TEMPLATEPATH . '/main_right.php'); ?> + </div> + </div> +</div> +<div id="bottom_wrapper"> + <div id="bottom_inner" class="clearfix"> + <div class="bottom_left"> + <?php comments_template(); ?> + </div> + <?php include (TEMPLATEPATH . '/bottom_right.php'); ?> + <div class="clear"></div> + <div id="categories"> + <h3>Browse by Category</h3> + <ul> + <?php wp_list_cats('sort_column=name&optioncount=0'); ?> + </ul> + </div> + </div> +</div> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/style.css b/wp-content/themes/seo_october_special/octoberspecial/style.css new file mode 100644 index 0000000000000000000000000000000000000000..e907ea568c4577c770276f61f5a0433ba6165b6e --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/style.css @@ -0,0 +1,184 @@ +/* +Theme Name: October Special +Theme URI: http://5thirtyone.com/ +Description: Breast Cancer Awareness special mod +Version: 1.0 +Author: Derek Punsalan +Author URI: http://5thirtyone.com/ + +Suppporting Breast Cancer Awareness for the month of October 2006 +*/ + +body {background:#5f5f5f;color:#ddd;font-size:62.5%;line-height:2em;font-family:helvetica,arial,verdana, sans-serif;text-align: center;} +* {margin:0;padding:0;} +ul, ol, p, blockquote, br {margin:1em 0;} +a {text-decoration: none;} +h1 {font-size: 1.6em;} +h2 {font-size: 1.4em;} +h3 {font-size: 1.2em;} +h4 {font-size: 1.1em;} +#main_wrapper {} /* apply global rules throughout entire site */ + +/* +start main structural element rules */ +/* base ONLY! no individual element styling */ +#header_wrapper, +#bca_wrapper, +#content_wrapper, +#bottom_wrapper, +#footer_wrapper {width:100%;font-size:1.2em;} + +#header_inner, +#bca_inner, +#content_inner, +#bottom_inner {margin:0 auto;padding:20px 30px;text-align:left;width:920px;} + +#header_wrapper {background:#5f5f5f;color:#ddd;} + #bca_wrapper {background:#6699CC;color:#3c3c3c;} + #bca_inner {background:#6699CC;} + +#content_wrapper {background:#fff;color:#3c3c3c;} + #content_inner {background:#fff url(images/content-wrapper.gif) no-repeat top right;} + +#bottom_wrapper {background:#5f5f5f;color:#eee;} + #bottom_inner {background:url(images/archived-wrapper.gif) no-repeat top left;} + +#footer_wrapper {background:#5f5f5f;color:#eee;} + +/* +start header styling */ +#header_wrapper {} + #header_inner {padding:0 0 10px;} + + #nav_wrapper {background:#5f5f5f;width:100%;} + ul#navigation {background:#5f5f5f;list-style:none;margin:0 auto;text-align:left;width:920px;} + #navigation li {float:left;} + #navigation li a {color:#ddd;display:block;font-weight:bold;line-height:2em;padding:0.5em 1em;} + #navigation li a:hover {background:#555;color:#fff;} + #navigation li.right {float:right;} + +/* +start bca styling */ +#bca_inner {} + .bca_border {border-top:1px solid #83B0DC;padding-top:7px;} + .bca_title {float:left;padding-right:5px;width:163px;} + .bca_desc {float:left;width:750px;} + .bca_desc a {color:#3c3c3c;font-weight:bold;} + .bca_desc a:hover {color:#4C4C4C;text-decoration:underline;} + +/* =start main-content area styling */ +#content_inner a {color:#3c3c3c;font-weight:bold;} + #content_inner a:hover {color:#6699CC;text-decoration:underline;} + +.content_left {float:left;margin-top:1em;width:600px;} + .content_left h2 {border-top:1px solid #aaa;margin-bottom:7px;padding:7px 0 0 166px;} + .content_left h2 a {color:#3c3c3c;} + .post_date {color:#5c5c5c;float:left;font-weight:bold;font-size:0.95em;margin-top:7px;padding-right:5px;width:153px;} + .extra_status {margin:15px 0;} + +.post {margin-bottom:1em;} + .entry {border-top:1px solid #ddd;float:right;padding-top:2px;width:432px;} + .entry a {} + .entry img, + .entry a img {border:1px solid #ddd;max-width:428px;padding:2px;} + .entry ul, + .entry ol, + blockquote {margin-left:2em;} + .entry li {margin-bottom:7px;} + +.content_right {float:right;font-size:0.97em;margin-top:1.2em;width:275px;} + .content_right h3 {color:#3c3c3c;border-top:1px solid #aaa;border-bottom:1px solid #ddd;padding:5px 0 4px 0;text-align:right;} + .content_right_sub {color:#6c6c6c;margin-bottom:2.5em;} + .content_right_sub ul {list-style:none;margin:0 0 1em 0;} + .content_right_sub ul li {border-bottom:1px solid #ddd;line-height:2em;} + .more_info {text-align:right;} + .more_info a {color:#6c6c6c !important;} + .more_info a:hover {color:#967D93 !important;} + +/* =start widgets styling */ +.sidebar_widget {margin:0 0 35px 0;} + +#calendar_wrarp {} + table#wp-calendar {margin:0;padding:0;width:100%;} + #wp-calendar caption {font-size:1.1em;font-weight:bold;margin:4px 0;text-align:right;} + #wp-calendar th,#wp-calendar td {padding:0 7px;text-align:center;} + #wp-calendar td a {border:1px solid transparent;display:block;} + + +.textwidget {margin:15px 0;} + +/* =start bottom main styling */ +#bottom_inner {} + #bottom_inner a {color:#ddd;} + #bottom_inner a:hover {color:#83B0DC !important;text-decoration:underline !important;} + +.bottom_left {float:left;width:600px;} + #archived_posts {color:#ccc;margin-top:1em;} + #archived_posts h3 {border-top:1px solid #8f8f8f;margin:0;padding:5px 0 4px 168px;} + .archived_posts_date {float:left;font-size:0.95em;font-weight:bold;margin-top:6px;width:160px;} + .archived_posts_date br {margin:0;} + .archived_entry {float:right;border-top:1px solid #7f7f7f;margin:0 0 35px 0;padding-top:5px;width:432px;} + +.archived_right {float:right;font-size:0.97em;margin-top:1em;width:275px;} + .archived_sub_right {color:#6c6c6c;margin-bottom:2.5em;} + .archived_sub_right h3 {border-top:1px solid #8f8f8f;border-bottom:1px solid #7f7f7f;color:#ddd;padding:5px 0 4px 0;text-align:right;} + .archived_sub_right a {font-weight:bold;} + .archived_sub_right ul {list-style:none;margin:0 0 1em 0;} + .archived_sub_right ul li {color:#CCC;line-height:2em;border-bottom:1px solid #7f7f7f;} + +#searchthis {color:#ddd;margin-top:1em;} + #s {border:1px solid #ddd;padding:1px;vertical-align:middle;width:208px;} + #searchsubmit {vertical-align:middle;} + +/* +start comment styling */ +#comments_title {border-top:1px solid #8f8f8f;margin:1em 0 0;padding:5px 0;} + #comments {float:left;width:160px;} + #comment_meta {float:left;} + #comment_meta a {font-weight:bold;} + +ol.commentlist, +ol.pingslist {list-style:none;margin:0;padding:0;} + .commentlist li, + .pingslist li {border-top:1px solid #7f7f7f;margin:0;overflow:auto;padding:0;} + .comment_credentials {float:left;font-size:0.97em;margin:10px 0;padding-left:3px;width:152px;} + .comment_credentials .author_highlight {font-weight:bold;} + .comment_credentials br {margin:0;padding:0;} + .comment_text {float:right;margin-top:10px;padding-right:3px;width:437px;} + .comment_text p {margin:0 0 15px;} + li.author {background:url(images/diag-dark.gif) top left;} + +small {font-size:0.95em;margin-left:3px;} +#author, +#email, +#url, +#comment {border:1px solid #ddd;padding:3px;font-size:1em;font-family:helvetica,arial,verdana,sans-serif;} +#respond {border-top:1px solid #8f8f8f;border-bottom:1px solid #7f7f7f;padding:5px 0 5px 0;} + +#author, +#email, +#url {width:250px;} +#comment {width:598px;} + +/* +start category styling */ +#categories {border-top:1px solid #8f8f8f;clear:both;margin-top:10px;} + #categories h3 {color:#ddd;border-bottom:1px solid #7f7f7f;padding:5px 0 5px 4px;} + #categories ul {list-style:none;margin:5px 0 0 0;} + #categories li {display: block;float:left;width:101px;} + #categories li a {display:block;font-weight:bold;padding:2px 5px;} + #categories li a:hover {background:#666;text-decoration:none !important;} + +/* +start footer styling */ +#footer_inner {font-size:0.95em;position:relative;margin:0 auto;padding:20px 10px;text-align:left;width:920px;} + #footer_inner a {color:#eee;font-weight:bold;} + .footer_desc {float:left;margin: 0;} + +/* +start misc */ +.floatleft {float:left;margin:5px 8px 3px 0;} +.floatright {float:right;margin:5px 0 3px 8px;} + +/* +start clearing fix rules */ +.left {float: left;} +.right {float: right;} +.clear {clear: both;} +.clearfix:after {content:".";display:block;height:0;clear:both;visibility:hidden;} +.clearfix {display:inline-block;} +/* Hide from IE Mac \*/ +.clearfix {display:block;} +/* End hide from IE Mac */ \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/switch.css b/wp-content/themes/seo_october_special/octoberspecial/switch.css new file mode 100644 index 0000000000000000000000000000000000000000..f778824361fbe88dba43c89fc7e656b957d18ef2 --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/switch.css @@ -0,0 +1,39 @@ +/* Pink October bits */ +.pink #bca_wrapper {background:#E1CDDE;} + .pink #bca_inner {background:#E1CDDE;} +.pink #content_inner {background:url(images/pink-content-wrapper.gif) no-repeat top right;} +.pink .bca_border {border-top:1px solid #CCADC7;} +.pink #content_inner a:hover {color:#CAA2C5;} +.pink #bottom_inner a:hover {color:#CAA2C5 !important;} + +/* Green bits */ +.green #bca_wrapper {background:#B2CAA5;} + .green #bca_inner {background:#B2CAA5;} +.green #content_inner {background:url(images/green-content-wrapper.gif) no-repeat top right;} +.green .bca_border {border-top:1px solid #89A679;} +.green #content_inner a:hover {color:#89A679;} +.green #bottom_inner a:hover {color:#89A679 !important;} + +/* Brown bits */ +.brown #bca_wrapper {background:#BBA58E;} + .brown #bca_inner {background:#BBA58E;} +.brown #content_inner {background:url(images/brown-content-wrapper.gif) no-repeat top right;} +.brown .bca_border {border-top:1px solid #A2907D;} +.brown #content_inner a:hover {color:#B89E83;} +.brown #bottom_inner a:hover {color:#B89E83 !important;} + +/* Red bits */ +.red #bca_wrapper {background:#D86983;} + .red #bca_inner {background:#D86983;} +.red #content_inner {background:url(images/red-content-wrapper.gif) no-repeat top right;} +.red .bca_border {border-top:1px solid #D84265;} +.red #content_inner a:hover {color:#D3607B;} +.red #bottom_inner a:hover {color:#D3607B !important;} + +/* Orange bits */ +.orange #bca_wrapper {background:#E1C078;} + .orange #bca_inner {background:#E1C078;} +.orange #content_inner {background:url(images/orange-content-wrapper.gif) no-repeat top right;} +.orange .bca_border {border-top:1px solid #F2D698;} +.orange #content_inner a:hover {color:#E6C274;} +.orange #bottom_inner a:hover {color:#E6C274 !important;} \ No newline at end of file diff --git a/wp-content/themes/seo_october_special/octoberspecial/themetoolkit.php b/wp-content/themes/seo_october_special/octoberspecial/themetoolkit.php new file mode 100644 index 0000000000000000000000000000000000000000..8b169d533bed2e016ed191e578fdcc3ecb33811f --- /dev/null +++ b/wp-content/themes/seo_october_special/octoberspecial/themetoolkit.php @@ -0,0 +1,389 @@ +<?php +/* +Hack Name: Wordpress Theme Toolkit +Plugin URI: http://frenchfragfactory.net/ozh/my-projects/wordpress-theme-toolkit-admin-menu/ +Description: Helps theme authors set up an admin menu. Helps theme users customise the theme. +Version: 1.12 +Author: Ozh +Author URI: http://planetOzh.com/ +*/ + +/************************************************************************************ +* DO NOT MODIFY THIS FILE ! +************************************************************************************/ + +/* RELEASE HISTORY : +* 1.0 : initial release +* 1.1 : update for Wordpress 2.0 compatibility +* 1.11 : added {separator} template +* 1.12 : more or less minor bug fixing (one when no plugin activated, other with rare mod_security issue) and better compliancy with WP 2.0 roles +*/ + +if (!function_exists('themetoolkit')) { + function themetoolkit($theme='',$array='',$file='') { + global ${$theme}; + if ($theme == '' or $array == '' or $file == '') { + die ('No theme name, theme option, or parent defined in Theme Toolkit'); + } + ${$theme} = new ThemeToolkit($theme,$array,$file); + } +} + +if (!class_exists('ThemeToolkit')) { + class ThemeToolkit{ + + var $option, $infos; + + function ThemeToolkit($theme,$array,$file){ + + global $wp_version; + // is it WP 2.0+ and do we have plugins like "../themes/foo/functions.php" running ? + if ( $wp_version >= 2 and count(@preg_grep('#^\.\./themes/[^/]+/functions.php$#', get_settings('active_plugins'))) > 0 ) { + wp_cache_flush(); + $this->upgrade_toolkit(); + } + + $this->infos['path'] = '../themes/' . basename(dirname($file)); + + /* Create some vars needed if an admin menu is to be printed */ + if ($array['debug']) { + if ((basename($file)) == $_GET['page']) $this->infos['debug'] = 1; + unset($array['debug']); + } + if ((basename($file)) == $_GET['page']){ + $this->infos['menu_options'] = $array; + $this->infos['classname'] = $theme; + } + $this->option=array(); + + /* Check this file is registered as a plugin, do it if needed */ + $this->pluginification(); + + /* Get infos about the theme and particularly its 'shortname' + * which is used to name the entry in wp_options where data are stored */ + $this->do_init(); + + /* Read data from options table */ + $this->read_options(); + + /* Are we in the admin area ? Add a menu then ! */ + $this->file = $file; + add_action('admin_menu', array(&$this, 'add_menu')); + } + + + /* Add an entry to the admin menu area */ + function add_menu() { + global $wp_version; + if ( $wp_version >= 2 ) { + $level = 'edit_themes'; + } else { + $level = 9; + } + //add_submenu_page('themes.php', 'Configure ' . $this->infos[theme_name], $this->infos[theme_name], 9, $this->infos['path'] . '/functions.php', array(&$this,'admin_menu')); + add_theme_page('Configure ' . $this->infos['theme_name'], $this->infos['theme_name'], 'edit_themes', basename($this->file), array(&$this,'admin_menu')); + /* Thank you MCincubus for opening my eyes on the last parameter :) */ + } + + /* Get infos about this theme */ + function do_init() { + $themes = get_themes(); + $shouldbe= basename($this->infos['path']); + foreach ($themes as $theme) { + $current= basename($theme['Template Dir']); + if ($current == $shouldbe) { + if (get_settings('template') == $current) { + $this->infos['active'] = TRUE; + } else { + $this->infos['active'] = FALSE; + } + $this->infos['theme_name'] = $theme['Name']; + $this->infos['theme_shortname'] = $current; + $this->infos['theme_site'] = $theme['Title']; + $this->infos['theme_version'] = $theme['Version']; + $this->infos['theme_author'] = preg_replace("#>\s*([^<]*)</a>#", ">\\1</a>", $theme['Author']); + } + } + } + + /* Read theme options as defined by user and populate the array $this->option */ + function read_options() { + $options = get_option('theme-'.$this->infos['theme_shortname'].'-options'); + $options['_________junk-entry________'] = 'ozh is my god'; + foreach ($options as $key=>$val) { + $this->option["$key"] = stripslashes($val); + } + array_pop($this->option); + return $this->option; + /* Curious about this "junk-entry" ? :) A few explanations then. + * The problem is that get_option always return an array, even if + * no settings has been previously saved in table wp_options. This + * junk entry is here to populate the array with at least one value, + * removed afterwards, so that the foreach loop doesn't go moo. */ + } + + /* Write theme options as defined by user in database */ + function store_options($array) { + update_option('theme-'.$this->infos['theme_shortname'].'-options',''); + if (update_option('theme-'.$this->infos['theme_shortname'].'-options',$array)) { + return "Options successfully stored"; + } else { + return "Could not save options !"; + } + } + + /* Delete options from database */ + function delete_options() { + /* Remove entry from database */ + delete_option('theme-'.$this->infos['theme_shortname'].'-options'); + /* Unregister this file as a plugin (therefore remove the admin menu) */ + $this->depluginification(); + /* Revert theme back to Kubrick if this theme was activated */ + if ($this->infos['active']) { + update_option('template', 'default'); + update_option('stylesheet', 'default'); + do_action('switch_theme', 'Default'); + } + /* Go back to Theme admin */ + print '<meta http-equiv="refresh" content="0;URL=themes.php?activated=true">'; + echo "<script> self.location(\"themes.php?activated=true\");</script>"; + exit; + } + + /* Check if the theme has been loaded at least once (so that this file has been registered as a plugin) */ + function is_installed() { + global $wpdb; + $where = 'theme-'.$this->infos['theme_shortname'].'-options'; + $check = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->options WHERE option_name = '$where'"); + if ($check == 0) { + return FALSE; + } else { + return TRUE; + } + } + + /* Theme used for the first time (create blank entry in database) */ + function do_firstinit() { + global $wpdb; + $options = array(); + foreach(array_keys($this->option) as $key) { + $options["$key"]=''; + } + add_option('theme-'.$this->infos['theme_shortname'].'-options',$options, 'Options for theme '.$this->infos['theme_name']); + return "Theme options added in database (1 entry in table '". $wpdb->options ."')"; + } + + /* The mother of them all : the Admin Menu printing func */ + function admin_menu () { + global $cache_settings, $wpdb; + + /* Process things when things are to be processed */ + if (@$_POST['action'] == 'store_option') { + unset($_POST['action']); + $msg = $this->store_options($_POST); + } elseif (@$_POST['action'] == 'delete_options') { + $this->delete_options(); + } elseif (!$this->is_installed()) { + $msg = $this->do_firstinit(); + } + + if (@$msg) print "<div class='updated'><p><b>" . $msg . "</b></p></div>\n"; + + echo '<div class="wrap"><h2>Thank you !</h2>'; + echo '<p>Thank you for installing ' . $this->infos['theme_site'] . ', a theme for Wordpress. This theme was made by '.$this->infos['theme_author'].'. </p>'; + + if (!$this->infos['active']) { /* theme is not active */ + echo '<p>(Please note that this theme is currently <strong>not activated</strong> on your site as the default theme.)</p>'; + } + + $cache_settings = ''; + $check = $this->read_options(); + + echo "<h2>Configure ${$this->infos['theme_name']} </h2>"; + echo '<p>This theme allows you to configure some variables to suit your blog, which are :</p> + <form action="" method="post"> + <input type="hidden" name="action" value="store_option"> + <table cellspacing="2" cellpadding="5" border="0" width=100% class="editform">'; + + /* Print form, here comes the fun part :) */ + foreach ($this->infos['menu_options'] as $key=>$val) { + $items=''; + preg_match('/\s*([^{#]*)\s*({([^}]*)})*\s*([#]*\s*(.*))/', $val, $matches); + if ($matches[3]) { + $items = split("\|", $matches[3]); + } + + print "<tr valign='top'><th scope='row' width='33%'>\n"; + if (@$items) { + $type = array_shift($items); + switch ($type) { + case 'separator': + print '<h3>'.$matches[1]."</h3></th>\n<td> </td>"; + break; + case 'radio': + print $matches[1]."</th>\n<td>"; + while ($items) { + $v=array_shift($items); + $t=array_shift($items); + $checked=''; + if ($v == $this->option[$key]) $checked='checked'; + print "<label for='${key}${v}'><input type='radio' id='${key}${v}' name='$key' value='$v' $checked /> $t</label>"; + if (@$items) print "<br />\n"; + } + break; + case 'textarea': + $rows=array_shift($items); + $cols=array_shift($items); + print "<label for='$key'>".$matches[1]."</label></th>\n<td>"; + print "<textarea name='$key' id='$key' rows='$rows' cols='$cols'>" . $this->option[$key] . "</textarea>"; + break; + case 'checkbox': + print $matches[1]."</th>\n<td>"; + while ($items) { + $k=array_shift($items); + $v=array_shift($items); + $t=array_shift($items); + $checked=''; + if ($v == $this->option[$k]) $checked='checked'; + print "<label for='${k}${v}'><input type='checkbox' id='${k}${v}' name='$k' value='$v' $checked /> $t</label>"; + if (@$items) print "<br />\n"; + } + break; + } + } else { + print "<label for='$key'>".$matches[1]."</label></th>\n<td>"; + print "<input type='text' name='$key' id='$key' value='" . $this->option[$key] . "' />"; + } + + if ($matches[5]) print '<br/>'. $matches[5]; + print "</td></tr>\n"; + } + echo '</table> + <p class="submit"><input type="submit" value="Store Options" /></p> + </form>'; + + if ($this->infos['debug'] and $this->option) { + $g = '<span style="color:#006600">'; + $b = '<span style="color:#0000CC">'; + $o = '<span style="color:#FF9900">'; + $r = '<span style="color:#CC0000">'; + echo '<h2>Programmer\'s corner</h2>'; + echo '<p>The array <em>$'. $this->infos['classname'] . '->option</em> is actually populated with the following keys and values :</p> + <p><pre class="updated">'; + $count = 0; + foreach ($this->option as $key=>$val) { + $val=str_replace('<','<',$val); + if ($val) { + print '<span class="ttkline">'.$g.'$'.$this->infos['classname'].'</span>'.$b.'-></span>'.$g.'option</span>'.$b.'[</span>'.$g.'\'</span>'.$r.$key.'</span>'.$g.'\'</span>'.$b.']</span>'.$g.' = "</span>'. $o.$val.'</span>'.$g."\"</span></span>\n"; + $count++; + } + } + if (!$count) print "\n\n"; + echo '</pre><p>To disable this report (for example before packaging your theme and making it available for download), remove the line " <em>\'debug\' => \'debug\'</em> " in the array you edited at the beginning of this file.</p>'; + } + + echo '<h2>Delete Theme options</h2> + <p>To completely remove these theme options from your database (reminder: they are all stored in a single entry, in Wordpress options table <em>'. $wpdb->options. '</em>), click on + the following button. You will be then redirected to the <a href="themes.php">Themes admin interface</a>'; + if ($this->infos['active']) { + echo ' and the Default theme will have been activated'; + } + echo '.</p> + <p><strong>Special notice for people allowing their readers to change theme</strong> (i.e. using a Theme Switcher on their blog)<br/> + Unless you really remove the theme files from your server, this theme will still be available to users, and therefore will self-install again as soon as someone selects it. Also, all custom variables as defined in the above menu will be blank, this could lead to unexpected behaviour. + Press "Delete" only if you intend to remove the theme files right after this.</p> + <form action="" method="post"> + <input type="hidden" name="action" value="delete_options"> + <p class="submit"><input type="submit" value="Delete Options" onclick="return confirm(\'Are you really sure you want to delete ?\');"/></p> + </form>'; + + ob_start(array(&$this,'footercut')); + + echo '<h2>Credits</h2>'; + echo '<p>'.$this->infos['theme_site'].' has been created by '.$this->infos['theme_author'].'. '; + echo 'This administration menu uses <a href="http://frenchfragfactory.net/ozh/my-projects/wordpress-theme-toolkit-admin-menu/" title="Wordpress Theme Toolkit : create a admin menu for your own theme as easily as editing 3 lines">Wordpress Theme Toolkit</a> by <a href="http://frenchfragfactory.net/ozh/" title="planetOzh">Ozh</a>. And everything was made possible thanks to <a href="http://wordpress.org/" title="Best. Blogware. Ever.">Wordpress</a>.</p> + </div> + <div id="footer"><div style="float:right;margin-left:-180px;padding-right:5%"><p><a href="http://frenchfragfactory.net/ozh/my-projects/wordpress-theme-toolkit-admin-menu/">Theme Toolkit</a> by<br /> + <a href="http://planetOzh.com/"><img src="http://frenchfragfactory.net/ozh/wp-images/btn_planetozh.png" border="0" alt="planetOzh.com" /></a><br />'; + echo 'for '.$this->infos['theme_site']."</p></div>\n"; + echo '</div><!-- footercut -->'; + } + + /* Make this footer part of the real #footer DIV of Wordpress admin area */ + function footercut($string) { + return preg_replace('#</div><!-- footercut -->.*<div id="footer">#m', '', $string); + } + + + /*************************************** + * Self-Pluginification (TM)(R)(C) . © ® + * + * The word "Self-Pluginification" and + * any future derivatives are licensed, + * patented and trademarked under the + * terms of the OHYEAHSURE agreement. + * Hmmmmmkey ? Fine. + **************************************/ + function pluginification () { + global $wp_version; + if ($wp_version<2) { + $us = $this->infos['path'].'/functions.php'; + $them = get_settings('active_plugins'); + /* Now, are we members of the PPC (Plugins Private Club) yet ? */ + if (!in_array($us,$them)) { + /* No ? Jeez, claim member card ! */ + $them[]=$us; + update_option('active_plugins',$them); + /* Wow. We're l33t now. */ + return TRUE; + } else { + return FALSE; + } + } + } + + /*************************************** + * De-Pluginification (TM)(R)(C) . © ® + * + * Same legal notice. It's not that I + * really like it, but my lawyer asked + * for it. I swear. + **************************************/ + function depluginification () { + global $wp_version; + if ($wp_version<2) { + $us = $this->infos['path'].'/functions.php'; + $them = get_settings('active_plugins'); + if (in_array($us,$them)) { + $here = array_search($us,$them); + unset($them[$here]); + update_option('active_plugins',$them); + return TRUE; + } else { + return FALSE; + } + } + } + + /*************************************** + * Really, the whole plugin management + * system is really neat in WP, and very + * easy to use. + **************************************/ + + /* Clean plugins lists in order to work with Wordpress 2.0 */ + function upgrade_toolkit () { + $plugins=get_settings('active_plugins'); + $delete=@preg_grep('#^\.\./themes/[^/]+/functions.php$#', $plugins); + $result=array_diff($plugins,$delete); + $temp = array(); + foreach($result as $item) $temp[]=$item; + $result = $temp; + update_option('active_plugins',$result); + wp_cache_flush; + } + + } +} + +?> \ No newline at end of file