Skip to content
Snippets Groups Projects
Commit 0e4d3b5b authored by root's avatar root Committed by lechuck
Browse files

Add theme seo_october_special

parent a061f8cb
Branches
No related tags found
No related merge requests found
Showing
with 799 additions and 0 deletions
wp-content/themes/seo_october_special/octoberspecial/images/red-content-wrapper.gif

552 B

wp-content/themes/seo_october_special/octoberspecial/images/search-btn.gif

642 B

wp-content/themes/seo_october_special/octoberspecial/images/submit-btn.gif

622 B

<?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('&laquo; Previous') ?></div>
<div class="right"><?php previous_posts_link('Next &raquo;') ?></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
<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
<?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
wp-content/themes/seo_october_special/octoberspecial/screenshot.png

54.9 KiB

<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>
<?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
/*
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
/* 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
<?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>&nbsp;</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('<','&lt;',$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 "&nbsp;<em>\'debug\' => \'debug\'</em>&nbsp;" 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment