initial commit

This commit is contained in:
John Bintz 2009-08-21 13:45:23 -04:00
commit 87bd6a2f55
144 changed files with 9271 additions and 0 deletions

47
404.php Normal file
View File

@ -0,0 +1,47 @@
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="post-page-head"></div>
<div class="post-page">
<h2 class="pagetitle">Page Not Found</h2>
<p><a href="<?php bloginfo('url') ?>">Click here to return to the home page</a> or try a search:</p>
<p><?php include (get_template_directory() . '/searchform.php') ?></p>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
</div>
<div class="clear"></div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right'); ?>
<?php } ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

18
README Normal file
View File

@ -0,0 +1,18 @@
ComicPress is the WordPress Comic Pubishing Theme.
Copyright 2005-2009 Tyler Martin
Copyright 2008-2009 John Bintz
Copyright 2009 Philip M. Hofer
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

153
archive-blog-calendar.php Normal file
View File

@ -0,0 +1,153 @@
<?php
/*
Template Name: Blog Calendar Archive
*/
?>
<?php get_header(); ?>
<?php
$dayWidth = 22; //set to .cpcal-day total width in pixels including: width, left & right border, left & right margin, left & right padding
if (isset($_GET['archive_year'])) {
$archive_year = (int)$_GET['archive_year'];
} else {
$latest_comic = get_terminal_post_in_category(get_all_comic_categories_as_cat_string(),false);
$archive_year = get_post_time('Y', false, $latest_comic, true);
if (empty($archive_year)) $archive_year = date('Y');
}
$firstDayMargins = array();
for ($i = 1; $i <= 12; ++$i) {
$dateInfo = getdate(mktime(0,0,0,$i,1,$archive_year));
$firstDayMargins[$i] = $dateInfo['wday'] * $dayWidth;
}
$tempPost = $post;
$comicArchive = new WP_Query(); $comicArchive->query('&showposts=1000&cat=-'.exclude_comic_categories().'&year='.$archive_year);
while ($comicArchive->have_posts()) : $comicArchive->the_post();
$calTitle = get_the_title();
$calLink = get_permalink();
$calDay = get_the_time('j');
$calMonth = get_the_time('F');
$calComic[$calMonth.$calDay] = array('link' => $calLink, 'title' => $calTitle);
endwhile;
$post = $tempPost;
function leapYear($yr) {
if ($yr % 4 != 0) {
return 28;
} else {
if ($yr % 100 != 0) {
return 29;
} else {
if ($yr % 400 != 0) {
return 28;
} else {
return 29;
}
}
}
}
$leapYear = leapYear($archive_year);
$month['1'] = array('month' => 'January', 'days' => '31');
$month['2'] = array('month' => 'February', 'days' => $leapYear);
$month['3'] = array('month' => 'March', 'days' => '31');
$month['4'] = array('month' => 'April', 'days' => '30');
$month['5'] = array('month' => 'May', 'days' => '31');
$month['6'] = array('month' => 'June', 'days' => '30');
$month['7'] = array('month' => 'July', 'days' => '31');
$month['8'] = array('month' => 'August', 'days' => '31');
$month['9'] = array('month' => 'September', 'days' => '30');
$month['10'] = array('month' => 'October', 'days' => '31');
$month['11'] = array('month' => 'November', 'days' => '30');
$month['12'] = array('month' => 'December', 'days' => '31');
?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>
<div class="entry">
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<div class="archive-yearlist">|
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date ASC");
foreach ( $years as $year ) {
if ($year != (0) ) { ?>
<a href="<?php echo add_query_arg('archive_year', $year) ?>"><strong><?php echo $year ?></strong></a> |
<?php } } ?>
</div>
<?php $i=1; while($i<=12) { ?>
<div class="cpcal-month" id="<?php echo $month[$i]['month'] ?>">
<div class="cpcal-monthtitle"><?php echo $month[$i]['month']." ".$archive_year ?></div>
<?php foreach(array("S", "M", "T", "W", "T", "F", "S") as $dow) { ?>
<div class="cpcal-dayletter"><?php echo $dow ?></div>
<?php } ?>
<div class="clear"></div>
<?php $day=1; while($day<=$month[$i]['days']) {
if ($day == 1) { ?>
<div style="width:<?php echo $firstDayMargins[$i]; ?>px;height:15px;float:left;"></div>
<?php } ?>
<div class="cpcal-day">
<?php if (isset($calComic[$month[$i]['month'].$day])) { ?>
<a href="<?php echo $calComic[$month[$i]['month'].$day]['link'] ?>" title="<?php echo $calComic[$month[$i]['month'].$day]['title'] ?>"><?php echo $day ?></a>
<?php } else {
echo $day." ";
} ?>
</div>
<?php ++$day;
}
++$i ?>
</div>
<?php } ?>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php if ('open' == $post->comment_status) {
comments_template('', true);
} ?>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

82
archive-blog-year.php Normal file
View File

@ -0,0 +1,82 @@
<?php
/*
Template Name: Blog Year Archive
*/
?>
<?php get_header(); ?>
<?php
if (isset($_GET['archive_year'])) {
$archive_year = (int)$_GET['archive_year'];
} else {
$latest_comic = get_terminal_post_in_category(get_all_comic_categories_as_cat_string(),false);
$archive_year = get_post_time('Y', false, $latest_comic, true);
if (empty($archive_year)) $archive_year = date('Y');
}
?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>
<div class="entry">
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<div class="archive-yearlist">|
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date ASC");
foreach ( $years as $year ) {
if ($year != (0) ) { ?>
<a href="<?php echo add_query_arg('archive_year', $year) ?>"><strong><?php echo $year ?></strong></a> |
<?php } } ?>
</div>
<table class="month-table">
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat=-'.exclude_comic_categories().'&year='.$archive_year);
while ($comicArchive->have_posts()) : $comicArchive->the_post() ?>
<tr><td class="archive-date"><?php the_time('M j') ?></td><td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="Permanent Link: <?php the_title() ?>"><?php the_title() ?></a></td></tr>
<?php endwhile; ?>
</table>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

155
archive-comic-calendar.php Normal file
View File

@ -0,0 +1,155 @@
<?php
/*
Template Name: Comic Calendar Archive
*/
?>
<?php get_header(); ?>
<?php
$dayWidth = 22; //set to .cpcal-day total width in pixels including: width, left & right border, left & right margin, left & right padding
if (isset($_GET['archive_year'])) {
$archive_year = (int)$_GET['archive_year'];
} else {
$latest_comic = get_terminal_post_in_category(get_all_comic_categories_as_cat_string(),false);
$archive_year = get_post_time('Y', false, $latest_comic, true);
if (empty($archive_year)) $archive_year = date('Y');
}
$firstDayMargins = array();
for ($i = 1; $i <= 12; ++$i) {
$dateInfo = getdate(mktime(0,0,0,$i,1,$archive_year));
$firstDayMargins[$i] = $dateInfo['wday'] * $dayWidth;
}
$tempPost = $post;
$comicArchive = new WP_Query(); $comicArchive->query('&showposts=1000&cat='.get_all_comic_categories_as_cat_string().'&year='.$archive_year);
while ($comicArchive->have_posts()) : $comicArchive->the_post();
$calTitle = get_the_title();
$calLink = get_permalink();
$calDay = get_the_time('j');
$calMonth = get_the_time('F');
$calComic[$calMonth.$calDay] = array('link' => $calLink, 'title' => $calTitle);
endwhile;
$post = $tempPost;
function leapYear($yr) {
if ($yr % 4 != 0) {
return 28;
} else {
if ($yr % 100 != 0) {
return 29;
} else {
if ($yr % 400 != 0) {
return 28;
} else {
return 29;
}
}
}
}
$leapYear = leapYear($archive_year);
$month['1'] = array('month' => 'January', 'days' => '31');
$month['2'] = array('month' => 'February', 'days' => $leapYear);
$month['3'] = array('month' => 'March', 'days' => '31');
$month['4'] = array('month' => 'April', 'days' => '30');
$month['5'] = array('month' => 'May', 'days' => '31');
$month['6'] = array('month' => 'June', 'days' => '30');
$month['7'] = array('month' => 'July', 'days' => '31');
$month['8'] = array('month' => 'August', 'days' => '31');
$month['9'] = array('month' => 'September', 'days' => '30');
$month['10'] = array('month' => 'October', 'days' => '31');
$month['11'] = array('month' => 'November', 'days' => '30');
$month['12'] = array('month' => 'December', 'days' => '31');
?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>
<div class="entry">
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<div class="archive-yearlist">|
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date ASC");
foreach ( $years as $year ) {
if ($year != (0) ) { ?>
<a href="<?php echo add_query_arg('archive_year', $year) ?>"><strong><?php echo $year ?></strong></a> |
<?php } } ?>
</div>
<?php $i=1; while($i<=12) { ?>
<div class="cpcal-month" id="<?php echo $month[$i]['month'] ?>">
<div class="cpcal-monthtitle"><?php echo $month[$i]['month']." ".$archive_year ?></div>
<?php foreach(array("S", "M", "T", "W", "T", "F", "S") as $dow) { ?>
<div class="cpcal-dayletter"><?php echo $dow ?></div>
<?php } ?>
<div class="clear"></div>
<?php $day=1; while($day<=$month[$i]['days']) {
if ($day == 1) { ?>
<div style="width:<?php echo $firstDayMargins[$i]; ?>px;height:15px;float:left;"></div>
<?php } ?>
<div class="cpcal-day">
<?php if (isset($calComic[$month[$i]['month'].$day])) { ?>
<a href="<?php echo $calComic[$month[$i]['month'].$day]['link'] ?>" title="<?php echo $calComic[$month[$i]['month'].$day]['title'] ?>"><?php echo $day ?></a>
<?php } else {
echo $day." ";
} ?>
</div>
<?php ++$day;
}
++$i ?>
</div>
<?php } ?>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php if ('open' == $post->comment_status) {
comments_template('', true);
} ?>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

View File

@ -0,0 +1,105 @@
<?php
/*
Template Name: Comic Storyline with Thumbs
*/
?>
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>
<div class="entry">
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<ul id="storyline" class="level-0">
<?php if (get_option('comicpress-enable-storyline-support') == 1) {
if (($result = get_option("comicpress-storyline-category-order")) !== false) {
$categories_by_id = get_all_category_objects_by_id();
$current_depth = 0;
$storyline_root = " class=\"storyline-root\"";
foreach (explode(",", $result) as $node) {
$parts = explode("/", $node);
$target_depth = count($parts) - 2;
$category_id = end($parts);
$category = $categories_by_id[$category_id];
$description = $category->description;
$first_comic_in_category = get_terminal_post_in_category($category_id);
$first_comic_permalink = get_permalink($first_comic_in_category->ID);
$archive_image = null;
foreach (array("archive", "rss", "comic") as $type) {
if (($requested_archive_image = get_comic_url("archive", $first_comic_in_category)) !== false) {
$archive_image = $requested_archive_image; break;
}
}
if ($target_depth < $current_depth) {
echo str_repeat("</ul></li>", ($current_depth - $target_depth));
}
if ($target_depth > $current_depth) {
for ($i = $current_depth; $i < $target_depth; ++$i) {
$next_i = $i + 1;
echo "<li><ul class=\"level-${next_i}\">";
}
} ?>
<li id="storyline-<?php echo $category->category_nicename ?>"<?php echo $storyline_root; $storyline_root = null ?>>
<?php if (!empty($first_comic_in_category)) { ?>
<a href="<?php echo $first_comic_permalink ?>" title="First comic in <?php echo $category->cat_name ?>."><img src="<?php echo $archive_image ?>" /></a>
<?php } ?>
<a href="<?php echo get_category_link($category_id) ?>" class="storyline-title"><?php echo $category->cat_name ?></a>
<?php if (!empty($description)) { ?>
<div class="storyline-description"><?php echo $description ?></div>
<?php } ?>
<div class="storyline-foot"></div>
</li>
<?php $current_depth = $target_depth;
}
if ($current_depth > 0) {
echo str_repeat("</ul></li>", $current_depth);
}
}
} else { ?>
<li><h3>Storyline Support is not currently enabled on this site.</h3><br /><br /><strong>Note to the Administrator:</strong><br /> To enable storyline support and manage storyline categories make sure you are running the latest version of the <a href="http://wordpress.org/extend/plugins/comicpress-manager/">ComicPress Manager</a> plugin and check your storyline settings from it's administration menu.</h3></li>
<?php } ?>
</ul>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

107
archive-comic-storyline.php Normal file
View File

@ -0,0 +1,107 @@
<?php
/*
Template Name: Comic Storyline Archive
*/
?>
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>
<div class="entry">
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<ul id="storyline" class="level-0">
<?php if (get_option('comicpress-enable-storyline-support') == 1) {
if (($result = get_option("comicpress-storyline-category-order")) !== false) {
$categories_by_id = get_all_category_objects_by_id();
$current_depth = 0;
$storyline_root = " class=\"storyline-root\"";
foreach (explode(",", $result) as $node) {
$parts = explode("/", $node);
$target_depth = count($parts) - 2;
$category_id = end($parts);
$category = $categories_by_id[$category_id];
$description = $category->description;
$first_comic_in_category = get_terminal_post_in_category($category_id);
$first_comic_permalink = get_permalink($first_comic_in_category->ID);
$archive_image = null;
foreach (array("archive", "rss", "comic") as $type) {
if (($requested_archive_image = get_comic_url("archive", $first_comic_in_category)) !== false) {
$archive_image = $requested_archive_image; break;
}
}
if ($target_depth < $current_depth) {
echo str_repeat("</ul></li>", ($current_depth - $target_depth));
}
if ($target_depth > $current_depth) {
for ($i = $current_depth; $i < $target_depth; ++$i) {
$next_i = $i + 1;
echo "<li><ul class=\"level-${next_i}\">";
}
} ?>
<li id="storyline-<?php echo $category->category_nicename ?>"<?php echo $storyline_root; $storyline_root = null ?>>
<a href="<?php echo get_category_link($category_id) ?>" class="storyline-title"><?php echo $category->cat_name ?></a>
<div class="storyline-description">
<?php if (!empty($description)) { ?>
<?php echo $description ?>
<?php } ?>
<?php if (!empty($first_comic_in_category)) { ?>
Begins with &ldquo;<a href="<?php echo $first_comic_permalink ?>"><?php echo $first_comic_in_category->post_title ?></a>&rdquo;.
<?php } ?>
</div>
<div class="storyline-foot"></div>
</li>
<?php $current_depth = $target_depth;
}
if ($current_depth > 0) {
echo str_repeat("</ul></li>", $current_depth);
}
}
} else { ?>
<li><h3>Storyline Support is not currently enabled on this site.</h3><br /><br /><strong>Note to the Administrator:</strong><br /> To enable storyline support and manage storyline categories make sure you are running the latest version of the <a href="http://wordpress.org/extend/plugins/comicpress-manager/">ComicPress Manager</a> plugin and check your storyline settings from it's administration menu.</h3></li>
<?php } ?>
</ul>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

82
archive-comic-year.php Normal file
View File

@ -0,0 +1,82 @@
<?php
/*
Template Name: Comic Year Archive
*/
?>
<?php get_header(); ?>
<?php
if (isset($_GET['archive_year'])) {
$archive_year = (int)$_GET['archive_year'];
} else {
$latest_comic = get_terminal_post_in_category(get_all_comic_categories_as_cat_string(),false);
$archive_year = get_post_time('Y', false, $latest_comic, true);
if (empty($archive_year)) $archive_year = date('Y');
}
?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>
<div class="entry">
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<div class="archive-yearlist">|
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date ASC");
foreach ( $years as $year ) {
if ($year != (0) ) { ?>
<a href="<?php echo add_query_arg('archive_year', $year) ?>"><strong><?php echo $year ?></strong></a> |
<?php } } ?>
</div>
<table class="month-table">
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$archive_year);
while ($comicArchive->have_posts()) : $comicArchive->the_post() ?>
<tr><td class="archive-date"><?php the_time('M j') ?></td><td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="Permanent Link: <?php the_title() ?>"><?php the_title() ?></a></td></tr>
<?php endwhile; ?>
</table>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

69
archive-comic.php Normal file
View File

@ -0,0 +1,69 @@
<?php
/*
Template Name: Comic Archive
*/
?>
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>
<div class="entry">
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date DESC");
foreach ( $years as $year ) {
if ($year != (0) ) { ?>
<h3><?php echo $year ?></h3>
<table class="month-table">
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$year);
while ($comicArchive->have_posts()) : $comicArchive->the_post() ?>
<tr><td class="archive-date"><?php the_time('M j') ?></td><td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="Permanent Link: <?php the_title() ?>"><?php the_title() ?></a></td></tr>
<?php endwhile; ?>
</table>
<?php } } ?>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
</div>
<div class="clear"></div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

153
archive.php Normal file
View File

@ -0,0 +1,153 @@
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php
$tmp_search = new WP_Query($query_string.'&order=desc&show_posts=-1&posts_per_page=-1');
$count = $tmp_search->post_count;
?>
<?php if (!$count) $count = "no"; ?>
<div class="searchresults">Found <?php echo $count; ?> result<?php if ($count !== 1) { echo "s"; } ?>.</div>
<?php if (have_posts()) : ?>
<?php $posts = query_posts($query_string.'&order=desc'); ?>
<div class="post-page-head"></div>
<div class="post-page">
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* Category Archive */ if (is_category()) { ?>
<div class="content"><h2 class="pagetitle">Archive for &#8216;<?php single_cat_title() ?>&#8217;</h2></div>
<?php /* Tag Archive */ } elseif( is_tag() ) { ?>
<div class="content"><h2 class="pagetitle">Posts Tagged &#8216;<?php single_tag_title() ?>&#8217;</h2></div>
<?php /* Daily Archive */ } elseif (is_day()) { ?>
<div class="content"><h2 class="pagetitle">Archive for <?php the_time('F jS, Y') ?></h2></div>
<?php /* Monthly Archive */ } elseif (is_month()) { ?>
<div class="content"><h2 class="pagetitle">Archive for <?php the_time('F, Y') ?></h2></div>
<?php /* Yearly Archive */ } elseif (is_year()) { ?>
<div class="content"><h2 class="pagetitle">Archive for <?php the_time('Y') ?></h2></div>
<?php /* Author Archive */ } elseif (is_author()) { ?>
<div class="content"><h2 class="pagetitle">Author Archive</h2></div>
<?php /* Paged Archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<div class="content"><h2 class="pagetitle">Archives</h2></div>
<?php } ?>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php while (have_posts()) : the_post() ?>
<?php global $archive_comic_width; if (in_comic_category()) { ?>
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="post-info">
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small> - By <?php the_author(); ?> on <?php the_time('F jS, Y'); ?></small><br />
</div>
<div class="clear"></div>
</div>
<div class="post-extras">
<div class="tags">
<?php the_tags('&#9492; Tags: ',', ','<br />'); ?> Posted in: <?php the_category(','); ?>
</div>
<div class="clear"></div>
</div>
<div class="comicarchiveframe" style="width:<?php echo $archive_comic_width; ?>px;">
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="Click for full size." width="<?php echo $archive_comic_width ?>" /></a><br />
</div>
<br class="clear-margins" />
</div>
<div class="post-comic-foot"></div>
<?php } else { ?>
<div class="post-head"></div>
<div class="post">
<div class="post-info">
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small> - By <?php the_author(); ?> on <?php the_time('F jS, Y'); ?></small><br />
</div>
<div class="clear"></div>
</div>
<?php the_excerpt() ?>
<br class="clear-margins" />
<div class="post-extras">
<div class="tags">
<?php the_tags('&#9492; Tags: ',',','<br />');?> Posted in: <?php the_category(','); ?>
</div>
<div class="clear"></div>
</div>
</div>
<div class="post-foot"></div>
<?php } ?>
<?php endwhile; ?>
<?php else : ?>
<div class="post-head"></div>
<div class="post">
<h3>No entries found.</h3>
<p>Try another search?</p>
<p><?php include(get_template_directory() . '/searchform.php') ?></p>
<br class="clear-margins" />
</div>
<div class="post-foot"></div>
<?php endif; ?>
<?php if(function_exists('wp_pagenavi')) { ?>
<div class="paginav">
<?php wp_pagenavi(); ?>
</div>
<?php } else { ?>
<div class="pagenav">
<div class="pagenav-right"><?php previous_posts_link('Newer Entries &uarr;') ?></div>
<div class="pagenav-left"><?php next_posts_link('&darr; Previous Entries') ?></div>
<div class="clear"></div>
</div>
<?php } ?>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

53
archives.php Normal file
View File

@ -0,0 +1,53 @@
<?php
/*
Template Name: Archives
*/
?>
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="post-page-head"></div>
<div class="post-page">
<h2>Archives by Month:</h2>
<ul><?php wp_get_archives('type=monthly') ?></ul>
<h2>Archives by Subject:</h2>
<ul><?php wp_list_categories() ?></ul>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

103
author.php Normal file
View File

@ -0,0 +1,103 @@
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php
if(get_query_var('author_name') ) {
// NOTE: 2.0 bug requires: get_userdatabylogin(get_the_author_login());
$curauth = get_userdatabylogin(get_query_var('author_name'));
} else {
$curauth = get_userdata(get_query_var('author'));
}
if (empty($curauth)) { ?>
<h2>No such author.</h2>
<?php } else { ?>
<div class="post-page-head"></div>
<div class="post-page">
<div id="userpage">
<div class="userpage-avatar">
<?php echo str_replace("alt='", "alt='".wp_specialchars($curauth->display_name, 1)."' title='".wp_specialchars($curauth->display_name, 1), get_avatar($curauth->user_email, 64)); ?>
</div>
<div class="userpage-info">
<div class="userpage-bio">
<h2><?php echo $curauth->display_name; ?></h2>
Registered on <?php echo date('l \\t\h\e jS \o\f M, Y',strtotime($curauth->user_registered)); ?><br />
<br />
<?php if (!empty($curauth->user_url)) { ?>Website: <a href="<?php echo $curauth->user_url; ?>" target="_blank"><?php echo $curauth->user_url; ?></a><br /><?php } ?>
<?php if (!empty($curauth->aim)) { ?>AIM: <a href="<?php echo $curauth->user_aim; ?>" target="_blank"><?php echo $curauth->aim; ?></a><br /><?php } ?>
<?php if (!empty($curauth->jabber)) { ?>Jabber/Google Talk: <a href="<?php echo $curauth->jabber; ?>" target="_blank"><?php echo $curauth->jabber; ?></a><br /><?php } ?>
<?php if (!empty($curauth->yim)) { ?>Yahoo IM: <a href="<?php echo $curauth->jabber; ?>" target="_blank"><?php echo $curauth->jabber; ?></a><br /><?php } ?>
</div>
<?php if (!empty($curauth->description)) { ?>
<div class="userpage-desc">
<?php echo $curauth->description; ?>
</div>
<?php } ?>
</div>
<div class="clear"></div>
<div class="userpage-posts">
<?php if (have_posts()) { ?>
<h3>Posts by <?php echo $curauth->nickname; ?> (<?php echo get_usernumposts($curauth->ID); ?>) &not;</h3>
<?php // this area is a loop that shows what posts the person has done. ?>
<ol>
<table class="month-table">
<?php while (have_posts()) : the_post() ?>
<tr><td class="archive-date" align="right"><?php the_time('M j, Y') ?></td><td class="archive-title"><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></td>
<?php endwhile; ?>
</table>
</ol>
<?php if(function_exists('wp_pagenavi')) { ?>
<div class="paginav">
<?php wp_pagenavi(); ?>
</div>
<?php } else { ?>
<div class="pagenav">
<div class="pagenav-right"><?php previous_posts_link('Newer Entries &uarr;') ?></div>
<div class="pagenav-left"><?php next_posts_link('&darr; Previous Entries') ?></div>
<div class="clear"></div>
</div>
<?php } ?>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
</div>
<div class="post-page-foot"></div>
<div class="clear"></div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

71
blog.php Normal file
View File

@ -0,0 +1,71 @@
<?php
/*
Template Name: Blog
*/
?>
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php }
if (have_posts()):
$blog_query = '&cat=-"'.exclude_comic_categories().'"&paged='.$paged;
$posts = query_posts($blog_query);
while (have_posts()) : the_post();
display_blog_post();
endwhile; ?>
<?php if(function_exists('wp_pagenavi')) { ?>
<div class="paginav">
<?php wp_pagenavi(); ?>
</div>
<?php } else { ?>
<div class="pagenav">
<div class="pagenav-right"><?php previous_posts_link('Newer Entries &uarr;') ?></div>
<div class="pagenav-left"><?php next_posts_link('&darr; Previous Entries') ?></div>
<div class="clear"></div>
</div>
<?php } ?>
<div class="clear"></div>
<?php endif; ?>
<?php get_sidebar('underblog'); ?>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

136
buystrip.php Normal file
View File

@ -0,0 +1,136 @@
<?php
/*
Template Name: Buy Print
Templete Author: Philip M. Hofer (Frumph)
Templete URL: http://webcomicplanet.com/forum/
Templete Author Email: philip@frumph.net
*/
if (isset($_REQUEST['comic'])) $comicnum = (int)$_REQUEST['comic'];
?>
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (!empty($comicnum)): ?>
<?php $temppost = $post; ?>
<?php $post = & get_post( $comicnum ); ?>
<div class="post-page-head"></div>
<div class="post-page">
<div style="float:right;">
<br />
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/paypal.png" alt="Powered by Paypal" /><br />
</div>
<div style="float:left;">
<h2 class="pagetitle">Buy Print!</h2>
</div>
<div class="clear"></div>
Comic ID - #<?php echo $comicnum; ?><br />
Title: <?php echo the_title(); ?><br />
<br />
<?php $post = & get_post( $comicnum ); ?>
<center>
<img src="<?php echo the_comic_archive(); ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" width="<?php echo $archive_comic_width; ?>" /><br />
<br />
<table>
<tr>
<td align="left" valign="center">
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="shipping2" value="<?php echo $buy_print_us_amount; ?>">
<input type="hidden" name="cn" value="Special Instructions (optional)">
<input type="hidden" name="cancel_return" value="<?php echo get_bloginfo('url'); ?>">
<input type="hidden" name="item_name" value="Print">
<input type="hidden" name="notify_url" value="<?php echo get_bloginfo('url'); ?>">
<input type="hidden" name="page_style" value="">
<input type="hidden" name="return" value="<?php echo bloginfo('url'); ?>">
<input type="hidden" name="amount" value="<?php echo $buy_print_us_amount; ?>">
<input type="hidden" name="item_number" value="Comic ID (<?php echo $comicnum; ?>) - <?php echo the_title(); ?>">
<input type="hidden" name="business" value="<?php echo $buy_print_email; ?>">
<input type="hidden" name="shipping" value="<?php echo $buy_print_us_ship; ?>">
US/Canada<br>
$<?php echo $buy_print_us_amount; ?> + $<?php echo $buy_print_us_ship; ?> shipping<br />
<input type="image" src="<?php bloginfo('stylesheet_directory'); ?>/images/buynow_paypal.png" name="submit32" alt="Make payments with PayPal - it's fast, free and secure!" />
</form>
</td>
<td width="40">
</td>
<td align="left" valign="center">
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="shipping2" value="<?php echo $buy_print_int_amount; ?>">
<input type="hidden" name="cn" value="Special Instructions (optional)">
<input type="hidden" name="cancel_return" value="<?php echo get_bloginfo('url'); ?>">
<input type="hidden" name="item_name" value="Print">
<input type="hidden" name="notify_url" value="<?php echo get_bloginfo('url'); ?>">
<input type="hidden" name="page_style" value="">
<input type="hidden" name="return" value="<?php echo bloginfo('url'); ?>">
<input type="hidden" name="amount" value="<?php echo $buy_print_int_amount; ?>">
<input type="hidden" name="item_number" value="Comic ID (<?php echo $comicnum; ?>) - <?php echo the_title(); ?>">
<input type="hidden" name="business" value="<?php echo $buy_print_email; ?>">
<input type="hidden" name="shipping" value="<?php echo $buy_print_int_ship; ?>">
International<br>
$<?php echo $buy_print_int_amount; ?> + $<?php echo $buy_print_int_ship; ?> shipping<br />
<input type="image" src="<?php bloginfo('stylesheet_directory'); ?>/images/buynow_paypal.png" name="submit32" alt="Make payments with PayPal - it's fast, free and secure!" />
</form>
</td>
</tr>
</table>
<br />
</center>
The purchase of this strip is based on availability. A Print of this strip is what you are purchasing.<br />
<br />
<?php $post = $temppost; ?>
<div class="clear"></div>
</div>
<?php else: ?>
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
<div class="post-page-head"></div>
<div class="post-page" id="post-<?php the_ID() ?>">
<h2 class="pagetitle"><?php the_title() ?></h2>
<div class="entry">
<?php the_content() ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')) ?>
</div>
<?php edit_post_link('Edit this page.', '<p>', '</p>') ?>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php endwhile; endif; ?>
<?php endif; ?>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer(); ?>

19
chrome_style.css Normal file
View File

@ -0,0 +1,19 @@
/* ComicPress Custom CSS over-rides for [ chrome ]: ComicPress - 2.8 */
html { overflow-y: scroll; }
.comicarchiveframe {
opacity:0.99; /* firefox, opera, safari, chrome */
}
.comicarchiveframe:hover {
opacity:0.70; /* firefox, opera, safari, chrome */
}
.imagenav-link img {
opacity:0.5; /* firefox, opera, safari, chrome */
}
.imagenav-link img:hover {
opacity:0.5; /* firefox, opera, safari, chrome */
}

27
comicpress-config.php Normal file
View File

@ -0,0 +1,27 @@
<?php
//COMIC CATEGORY -the WordPress ID # of your comic category (default "3")
$comiccat = "4";
//BLOG CATEGORY - the WordPress ID of your blog category (default "1")
$blogcat = "3";
//COMIC FOLDER - the folder your comics files are located in (default "comics")
$comic_folder = "comics";
//RSS COMIC FOLDER - the folder your comic files are in for the RSS feed (default "comics")
$rss_comic_folder = "comics-rss";
//ARCHIVE COMIC FOLDER - the folder your comic files are in for your archive pages (default "comics")
$archive_comic_folder = "comics-archive";
//ARCHIVE COMIC WIDTH - the width your comics will appear on archive or search results (default "380")
$archive_comic_width = "380";
//RSS COMIC WIDTH - ComicPress Manager plugin users only - the width your comics appear in the RSS feed (default "600").
$rss_comic_width = "180";
//BLOG POSTCOUNT - the number of blog entries to appear on the home page (default "5").
$blog_postcount = "2";
?>

View File

@ -0,0 +1,139 @@
<?php
// theme options
$options = array (
array("type" => "open"),
array(
"id" => "comicpress-disable_comic_frontpage",
"default" => "no",
"type" => "comicpress-disable_comic_frontpage"),
array(
"id" => "comicpress-disable_comic_blog_frontpage",
"default" => "no",
"type" => "comicpress-disable_comic_blog_frontpage"),
array(
"id" => "comicpress-disable_blog_frontpage",
"default" => "no",
"type" => "comicpress-disable_blog_frontpage"),
array(
"id" => "comicpress-custom_css",
"default" => "",
"type" => "comicpress-custom_css"),
array(
"id" => "comicpress-cp_theme_style",
"default" => "standard",
"type" => "comicpress-cp_theme_style"),
array(
"id" => "comicpress-buy_print_email",
"default" => "youremail@youremail.com",
"type" => "comicpress-buy_print_email"),
array(
"id" => "comicpress-buy_print_url",
"default" => "/shop/",
"type" => "comicpress-buy_print_url"),
array(
"id" => "comicpress-buy_print_us_amount",
"default" => "19.95",
"type" => "comicpress-buy_print_us_amount"),
array(
"id" => "comicpress-buy_print_int_amount",
"default" => "29.95",
"type" => "comicpress-buy_print_int_amount"),
array(
"id" => "comicpress-buy_print_us_ship",
"default" => "4.95",
"type" => "comicpress-buy_print_us_ship"),
array(
"id" => "comicpress-buy_print_int_ship",
"default" => "9.95",
"type" => "comicpress-buy_print_int_ship"),
array(
"id" => "comicpress-transcript_in_posts",
"default" => "no",
"type" => "comicpress-transcript_in_posts"),
array(
"id" => "comicpress-enable_widgetarea_use_sidebar_css",
"default" => "no",
"type" => "comicpress-enable_widgetarea_use_sidebar_css"),
array(
"id" => "comicpress-contact_in_menubar",
"default" => "no",
"type" => "comicpress-contact_in_menubar"),
array(
"id" => "comicpress-disable_extended_comments",
"default" => "no",
"type" => "comicpress-disable_extended_comments"),
array(
"id" => "comicpress-enable_custom_image_header",
"default" => "no",
"type" => "comicpress-enable_custom_image_header"),
array(
"id" => "comicpress-custom_image_header_width",
"default" => "780",
"type" => "comicpress-custom_image_header_width"),
array(
"id" => "comicpress-custom_image_header_height",
"default" => "120",
"type" => "comicpress-custom_image_header_height"),
array(
"id" => "comicpress-enable_numbered_pagination",
"default" => "no",
"type" => "comicpress-enable_numbered_pagination"),
array(
"id" => "comicpress-disable_page_restraints",
"default" => "no",
"type" => "comicpress-disable_page_restraints"),
array(
"id" => "comicpress-enable_dropdown_sidebar",
"default" => "no",
"type" => "comicpress-enable_dropdown_sidebar"),
array(
"id" => "comicpress-enable_related_comics",
"default" => "no",
"type" => "comicpress-enable_related_comics"),
array(
"id" => "comicpress-enable_related_posts",
"default" => "no",
"type" => "comicpress-enable_related_posts"),
array(
"id" => "comicpress-comic_clicks_next",
"default" => "no",
"type" => "comicpress-comic_clicks_next"),
array(
"id" => "comicpress-anomaly_says",
"default" => "no",
"type" => "comicpress-anomaly_says"),
array(
"id" => "comicpress-disable_css_style_editor",
"default" => "no",
"type" => "comicpress-disable_css_style_editor"),
array("type" => "close")
);
?>

481
comicpress-options.php Normal file
View File

@ -0,0 +1,481 @@
<?php
include(get_template_directory() . '/comicpress-options-config.php');
function comicpress_options() {
add_submenu_page('themes.php','comicpress', 'ComicPress Options', 10, 'comicpress-options', 'comicpress_admin');
}
function comicpress_admin() {
global $options, $upload_path, $blogcat;
?>
<div class="wrap">
<h2 class="alignleft">ComicPress Options</h2>
<a class="alignright" style="margin: 20px;" href="http://comicpress.org/"><img src="<?php echo get_bloginfo('stylesheet_directory'); ?>/images/options/comicpress_logo.png" alt="ComicPress" /></a>
<br clear="all" />
<?php
if ( wp_verify_nonce($_POST['_wpnonce'], 'update-options') ) {
if ('comicpress_save'== $_REQUEST['action']) {
foreach ($options as $value) {
if( !isset( $_REQUEST[ $value['id'] ] ) ) { } else { update_option( $value['id'], stripslashes($_REQUEST[ $value['id']])); } } ?>
<div class="updated fade"><p><strong>Options/Settings SAVED!</strong></p></div>
<?php }
if ('comicpress_reset' == $_REQUEST['action'] ) {
foreach ($options as $default) {
delete_option($default['id'],$default['default']);
} ?>
<div class="updated fade"><p><strong>Options/Settings RESET!</strong></p></div>
<?php
}
}
// set default options
foreach ($options as $default) {
if(get_option($default['id'])=="") {
update_option($default['id'],$default['default']);
}
}
include(get_template_directory() . '/comicpress-config.php');
?>
<div id="poststuff" class="metabox-holder">
<script language="javascript">
function showimage(sel,pic)
{
if (!document.images)
return
document.getElementById(pic).src = '<?php echo get_bloginfo('stylesheet_directory'); ?>/images/options/'+sel.options[sel.selectedIndex].value+'.png'
}
</script>
<div class="stuffbox">
<h3><label for="link_url">Theme Style</label></h3>
<div class="inside">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto">
<?php
foreach ($options as $value) {
switch ( $value['type'] ) {
case "comicpress-cp_theme_style": ?>
<tr>
<th scope="row"><strong>Choose which theme style you want to use.</strong><br /><br />This is the style in which your theme will be presented.<br /><br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" class="code" onchange="showimage(this,'cpthemestyle')">
<option class="level-0" value="standard" <?php if (get_option($value['id'])=='standard') {?>selected="selected" <?php } ?>>Standard</option>
<option class="level-0" value="3c" <?php if (get_option($value['id'])=='3c') {?>selected="selected" <?php } ?>>3C</option>
<option class="level-0" value="gn" <?php if (get_option($value['id'])=='gn') {?>selected="selected" <?php } ?>>GN</option>
<option class="level-0" value="v" <?php if (get_option($value['id'])=='v') {?>selected="selected" <?php } ?>>V</option>
<option class="level-0" value="v3c" <?php if (get_option($value['id'])=='v3c') {?>selected="selected" <?php } ?>>V3C</option>
</select>
</label>
</td>
<td valign="top">
<img id="cpthemestyle" src="<?php echo get_bloginfo('stylesheet_directory'); ?>/images/options/<?php echo get_option($value['id']); ?>.png" alt="ComicPress Theme Style" />
</td>
<td valign="bottom" colspan="2">
<p><em>(Check the vaildity of your theme's HTML &amp; CSS using the links below. Stock ComicPress is XHTML 1.0 and CSS 2 compliant.)</em></p>
<a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss"
alt="Valid CSS!" />
</a>
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Style" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?>
<div class="stuffbox">
<h3><label for="link_url">Settings - Extras / Addons</label></h3>
<div class="inside">
<table class="form-table" style="width: auto">
<?php
foreach ($options as $value) {
switch ( $value['type'] ) {
case "comicpress-disable_comic_frontpage": ?>
<tr>
<th scope="row"><strong>Disable Comic On Frontpage?</strong><br /><br />Set to &quot;Yes&quot; and the comic will not display on the index page/front page of your site.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label><br />
</td>
<td valign="top" width="400">
Note: You can use the Latest Thumbnail widget to display your comic in a sidebar. Make sure you set the archive-thumbnail size to under 200px.
Turning this off and using the GN style turns ComicPress into a Blog.
</td>
</tr>
<?php break;
case "comicpress-disable_comic_blog_frontpage": ?>
<tr>
<th scope="row"><strong>Disable Comic Blog On Frontpage?</strong><br /><br />Set to &quot;Yes&quot; and the blog portion of the comic will not display on the index page/front page of your site.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label><br />
</td>
</tr>
<?php break;
case "comicpress-disable_blog_frontpage": ?>
<tr>
<th scope="row"><strong>Disable Blog On Frontpage?</strong><br /><br />Set to &quot;Yes&quot; and the blog area will not display on the index page/front page of your site.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label><br />
</td>
</tr>
<?php break;
case "comicpress-disable_extended_comments": ?>
<tr>
<th scope="row"><strong>Disable Extra Comment Code?</strong><br /><br />Set to &quot;Yes&quot; and the extended comment code will be disabled.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label><br />
</td>
</tr>
<?php break;
case "comicpress-transcript_in_posts": ?>
<tr>
<th scope="row"><strong>Show transcript in post area?</strong><br /><br />When enabled, if the comic has a transcript, the transcript will be displayed inside the post for the comic.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-disable_showing_comic_post_area": ?>
<tr>
<th scope="row"><strong>Disable showing the post for the comic?</strong><br /><br />Setting to &quot;Yes&quot; will disable showing the blog post of the comic on the home page and single pages.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-contact_in_menubar": ?>
<tr>
<th scope="row"><strong>Contact Link in Menubar</strong><br /><br />Setting to &quot;Yes&quot will put [&nbsp;CONTACT&nbsp;] in the menubar and associate it with your admin's email.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-enable_widgetarea_use_sidebar_css": ?>
<tr>
<th scope="row"><strong>Enable Sidebar CSS?</strong><br /><br />Enabling this will use the standard CSS styling of the sidebars for all the widget areas.<br /><br />If not enabled it will use the .customwidgetarea user made styling only and only the Sidebar-left and Sidebar-right will use sidebar styling.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-enable_custom_image_header": ?>
<tr>
<th scope="row"><strong>Enable Custom Image Header panel?</strong><br /><br />Setting to &quot;Yes&quot; will set a new option in your Dashboard -> Appearance menu.<br /><br />After saving the settings 2 new options will appear to set the height and width of the image that you want to use.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-enable_numbered_pagination": ?>
<tr>
<th scope="row"><strong>Enable numbered pagination?</strong><br /><br />Setting to &quot;Yes&quot; will make the Previous Entries and Next Entries turn into numbered pages to click on.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-disable_page_restraints": ?>
<tr>
<th scope="row"><strong>Disable the #page / #page-wide restraints?</strong><br />
<br />
Turning this option to Yes will make it so that the divs for #page and #page-wide will not load.<br />
<br />
What you can do with this is use the entire *page* for your canvas instead of the 780px/980px that the two elements keep you in.</th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-enable_dropdown_sidebar": ?>
<tr>
<th scope="row"><strong>Enable the Dropbar Widget area?</strong><br /></th>
<br />
To enable the drop down widget area choose [yes] here.<br />
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-enable_related_comics": ?>
<tr>
<th scope="row"><strong>Put Related Comics in comic posts?</strong><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-enable_related_posts": ?>
<tr>
<th scope="row"><strong>Put Related Posts in blog posts?</strong><br /><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-comic_clicks_next": ?>
<tr>
<th scope="row"><strong>Make the comic an Href that goes to next comic?</strong><br /><br />In doing this if someone clicks the comic it will go to the next comic (if possible)<br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-anomaly_says": ?>
<tr>
<th scope="row"><strong>Request Anomaly to comment?</strong><br /><br />Enabling this option will summon Anomaly to your comic's universe and say what you request Anomaly to say by modifying the "Hovertext" in the comic post.<br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
case "comicpress-disable_css_style_editor": ?>
<tr>
<th scope="row"><strong>Disable the styling in ComicPress CSS Editor?</strong><br /><br />This will let you disable the colored, styling CSS editor and be a normal form.<br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label>
</td>
</tr>
<?php break;
}
}
?>
</table>
</div>
</div>
<div class="stuffbox">
<h3><label for="link_url">Settings - Custom Header</label></h3>
<div class="inside">
<table class="form-table" style="width: auto">
<?php
foreach ($options as $value) {
switch ( $value['type'] ) {
case "comicpress-custom_image_header_height": ?>
<tr>
<th scope="row"><b>Header Image Height</b><br /><br />Set the <b>height</b> of the image you want to use in the Custom Image Header panel.</th>
<td valign="top">
<label>
<input type="text" size="5" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br />
</label>
</td>
</tr>
<?php break;
case "comicpress-custom_image_header_width": ?>
<tr>
<th scope="row"><b>Header Image Width</b><br /><br />Set the <b>width</b> of the image you want to use in the Custom Image Header panel.</th>
<td valign="top">
<label>
<input type="text" size="5" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br />
</label>
</td>
<td valign="top" rowspawn="5">
The Standard and V styles use <b>760</b> px width, while the 3C, GN and V3C use <b>980</b> px width. This is configurable in case you set the #page, #page-width widths in the CSS to something different than the default while using the Custom Header panel.
</td>
</tr>
<?php break;
}
}
?>
</table>
</div>
</div>
<div class="stuffbox">
<h3><label for="link_url">Settings - Buy Print</label></h3>
<div class="inside">
<table class="form-table" style="width: auto">
<?php
foreach ($options as $value) {
switch ( $value['type'] ) {
case "comicpress-buy_print_email": ?>
<tr>
<th scope="row"><b>Paypal Email Address</b><span style="color: #ff0000;">*</span><br /><br />The Email address you registered with Paypal and that your store is associated with.</th>
<td valign="top">
<label>
<input type="text" size="45" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br />
<span style="color: #ff0000;">* This must be correct, you don't want other people getting your money.</span>
</label>
</td>
</tr>
<?php break;
case "comicpress-buy_print_url": ?>
<tr>
<th scope="row"><b>Url Page of the Template</b><span style="color: #ff0000;">*</span><br /><br />The URL address to which you associated the buy print template.</th>
<td valign="top">
<label>
<input type="text" size="45" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br />
<span style="color: #ff0000;">* This must be correct, the form needs some place to go.</span><br />
<b>Examples</b>:<br />
http://yourdomain.com/?p=233<br />
http://yourdomain.com/shop/<br />
/?p=233<br />
/shop/<br />
</label>
</td>
</tr>
<?php break;
case "comicpress-buy_print_us_amount": ?>
<tr>
<th scope="row"><b>Print Cost (US/Canada)</b><br /><br />How much does a print cost for people in the United State and Canada?</th>
<td valign="top">
<label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label>
</td>
</tr>
<?php break;
case "comicpress-buy_print_us_ship": ?>
<tr>
<th scope="row"><b>Shipping Cost (US/Canada)</b><br /><br /></th>
<td valign="top">
<label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label>
</td>
</tr>
<?php break;
case "comicpress-buy_print_int_amount": ?>
<tr>
<th scope="row"><b>Print Cost (International)</b><br /><br />How much does a print cost for people *NOT* in the United States and Canda (International)</th>
<td valign="top">
<label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label>
</td>
</tr>
<?php break;
case "comicpress-buy_print_int_ship": ?>
<tr>
<th scope="row"><b>Shipping Cost (International)</b><br /><br /></th>
<td valign="top">
<label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label>
</td>
</tr>
<?php break;
}
}
?>
</table>
</div>
</div>
<div style="float: left">
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
<div style="float: right">
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options'); ?>
<input name="comicpress_reset" type="submit" class="button-primary" value="Reset Settings" />
<input type="hidden" name="action" value="comicpress_reset" />
</form>
</div>
<div style="clear:both;"></div>
<div style="width: 680px;margin: 10px auto; text-align:center;padding: 5px; background: #ddd; -moz-border-radius: 10px;-khtml-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;border: solid 1px #000;">
<a href="http://comicpress.org/">ComicPress</a>, created by <a href="http://mindfaucet.com/">Tyler Martin</a>, with <a href="http://www.coswellproductions.com/">John Bintz</a> and <a href="http://webcomicplanet.com/">Philip M. Hofer</a> (<a href="http://frumph.webcomicplanet.com/">Frumph</a>)<br />
If you like the ComicPress theme, please donate. It will help in creating new versions.<br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal-wrap">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="3142149">
<input type="submit" border="0" name="submit" alt="" value="Donate" id="paypal">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
</div>
</div>
<?php
}
add_action('admin_menu', 'comicpress_options');
?>

BIN
comicpress.zip Normal file

Binary file not shown.

134
comments.php Normal file
View File

@ -0,0 +1,134 @@
<div <?php comment_class(); ?>>
<?php
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;
}
if ( have_comments() ) : ?>
<?php if ( ! empty($comments_by_type['comment']) ) : ?>
<div class="commentsrsslink">[ <?php comments_rss_link('Comments RSS'); ?> ]</div>
<h3 id="comments"><?php comments_number('Discussion &not;', 'Discussion &not;', 'Discussion (%) &not;' );?></h3>
<ol class="commentlist">
<?php
if (function_exists('comicpress_comments_callback')) {
wp_list_comments(array(
'type' => 'comment',
'reply_text' => 'Reply to %s&not;',
'callback' => 'comicpress_comments_callback',
'end-callback' => 'comicpress_comments_end_callback',
'avatar_size'=>64
)
);
} else {
wp_list_comments(array('type' => 'comment', 'avatar_size'=>64));
}?>
</ol>
<?php endif; ?>
<?php if ( ! empty($comments_by_type['pings']) ) : ?>
<h4 id="comments">Pings & Trackbacks &not;</h4>
<ol class="commentlist">
<ul>
<?php
if (function_exists('comicpress_comments_callback')) {
wp_list_comments(array(
'type' => 'pings',
'callback' => 'comicpress_comments_callback',
'end-callback' => 'comicpress_comments_end_callback',
'avatar_size'=>32
)
);
} else {
wp_list_comments(array('type' => 'pings', 'avatar_size'=>64));
}?>
</ul>
</ol>
<?php endif; ?>
<?php global $enable_numbered_pagination; if ($enable_numbered_pagination == 'yes') { ?>
<div class="paginav">
<?php paginate_comments_links( $args ) ?>
</div>
<?php } else { ?>
<div class="commentnav">
<div class="commentnav-right"><?php next_comments_link('Newer Comments &uarr;') ?></div>
<div class="commentnav-left"><?php previous_comments_link('&darr; Previous Comments') ?></div>
<div class="clear"></div>
</div>
<?php } ?>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?>
<!-- If comments are open, but there are no comments. -->
<?php else : // comments are closed ?>
<!-- If comments are closed. -->
<p class="nocomments">Comments are closed.</p>
<?php endif; ?>
<?php endif; ?>
<?php if ('open' == $post->comment_status) : ?>
<div id="respond">
<h3><?php comment_form_title( 'Comment &not;', 'Reply to %s &not;' ); ?></h3>
<div class="cancel-comment-reply">
<small><?php cancel_comment_reply_link(); ?></small>
</div>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
<?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>
<?php else : ?>
<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
<label for="author"><small>NAME &mdash; <a href="http://gravatar.com">Get an avatar</a></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>EMAIL <?php if ($req) echo "&mdash; Required / not published"; ?> </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; ?>
<?php do_action('comment_form', $post->ID); ?>
<p><textarea name="comment" id="comment" cols="50" rows="6" tabindex="4"></textarea>
<button type="submit" class="button">Submit Comment</button>
<p><small><strong>NOTE - You can use these tags:</strong><br /><?php echo allowed_tags(); ?></small></p>
<?php comment_id_fields(); ?>
</p>
<div class="clear"></div>
</form>
<?php endif; // If registration required and not logged in ?>
</div>
<?php endif; ?>
</div>

28
footer.php Normal file
View File

@ -0,0 +1,28 @@
<div class="clear"></div><!-- Clears floated columns and sidebars -->
<div id="footer">
<?php if (function_exists('the_project_wonderful_ad')) { ?>
<div class="footerpwad">
<center>
<?php the_project_wonderful_ad('footer'); ?>
</center>
</div>
<?php } ?>
<?php get_sidebar('footer'); ?>
<p>
&copy; <?php echo date('Y'); ?> <?php echo the_author('nickname',0); ?>. <?php bloginfo('name') ?> is powered by <a href="http://wordpress.org/">WordPress</a> with <a href="http://comicpress.org/">ComicPress</a>
| Subscribe: <a href="<?php bloginfo('rss2_url') ?>">RSS Feed</a> | <a href="#outside" onclick="scrollup(); return false;">Return to Top &nbsp;</a><br />
<a href="http://english-156752579142.spampoison.com"><img src="http://pics4.inxhost.com/images/sticker.gif" alt="Spam Poison" border="0" width="80" height="15"/></a><br />
<!-- <?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds. -->
</p>
</div>
<?php global $disable_page_restraints; if ($disable_page_restraints == 'no') { ?>
</div><!-- Ends "page" -->
<?php } ?>
<?php wp_footer() ?>
</body>
</html>

689
functions.php Normal file
View File

@ -0,0 +1,689 @@
<?php
global $wpmu_version;
if (!empty($wpmu_version)) {
require_once(get_template_directory() . '/wpmu-functions.php');
if (get_option('upload_path') !== false) {
$variables_to_extract = array();
foreach (array(
'comiccat' => 'comiccat',
'blogcat' => 'blogcat',
'comics_path' => 'comic_folder',
'comicsrss_path' => 'rss_comic_folder',
'comicsarchive_path' => 'archive_comic_folder',
'archive_comic_width' => 'archive_comic_width',
'rss_comic_width' => 'rss_comic_width',
'blog_postcount' => 'blog_postcount') as $option => $variable_name) {
$variables_to_extract[$variable_name] = get_option("comicpress-${option}");
}
extract($variables_to_extract);
}
} else {
require_once(get_template_directory() . '/comicpress-config.php');
}
if (get_option('upload_path') !== false) {
$variables_to_extract = array();
foreach (array(
'disable_comic_frontpage' => 'disable_comic_frontpage',
'disable_comic_blog_frontpage' => 'disable_comic_blog_frontpage',
'disable_blog_frontpage' => 'disable_blog_frontpage',
'disable_extended_comments' => 'disable_extended_comments',
'buy_print_email' => 'buy_print_email',
'buy_print_url' => 'buy_print_url',
'buy_print_us_amount' => 'buy_print_us_amount',
'buy_print_int_amount' => 'buy_print_int_amount',
'buy_print_us_ship' => 'buy_print_us_ship',
'buy_print_int_ship' => 'buy_print_int_ship',
'custom_css' => 'custom_css',
'cp_theme_style' => 'cp_theme_style',
'transcript_in_posts' => 'transcript_in_posts',
'enable_widgetarea_use_sidebar_css' => 'enable_widgetarea_use_sidebar_css',
'enable_custom_image_header' => 'enable_custom_image_header',
'custom_image_header_width' => 'custom_image_header_width',
'custom_image_header_height' => 'custom_image_header_height',
'enable_numbered_pagination' => 'enable_numbered_pagination',
'disable_page_restraints' => 'disable_page_restraints',
'enable_dropdown_sidebar' => 'enable_dropdown_sidebar',
'enable_related_comics' => 'enable_related_comics',
'enable_related_posts' => 'enable_related_posts',
'comic_clicks_next' => 'comic_clicks_next',
'anomaly_says' => 'anomaly_says',
'disable_css_style_editor' => 'disable_css_style_editor',
'contact_in_menubar' => 'contact_in_menubar' ) as $options => $variable_name) {
$variables_to_extract[$variable_name] = get_option("comicpress-${options}");
}
extract($variables_to_extract);
}
function is_cp_theme_style($choices) {
global $cp_theme_style;
$choices = explode(",", $choices);
foreach ($choices as $choice) {
if ($choice == $cp_theme_style) {
return true;
}
}
return false;
}
require_once(get_template_directory() . '/functions/userpages.php');
// WIDGETS WP 2.8 compatible ONLY, no backwards compatibility here.
require_once(get_template_directory() . '/widgets/control-panel.php');
require_once(get_template_directory() . '/widgets/graphical-navigation.php');
require_once(get_template_directory() . '/widgets/buythisprint.php');
require_once(get_template_directory() . '/widgets/bookmark.php');
require_once(get_template_directory() . '/widgets/transcription.php');
require_once(get_template_directory() . '/widgets/latestthumb.php');
require_once(get_template_directory() . '/widgets/latestcomics.php');
require_once(get_template_directory() . '/widgets/scheduledposts.php');
require_once(get_template_directory() . '/widgets/calendar.php');
require_once(get_template_directory() . '/widgets/randomcomic.php');
require_once(get_template_directory() . '/widgets/randompost.php');
require_once(get_template_directory() . '/widgets/searchtranscript.php');
require_once(get_template_directory() . '/widgets/latestcomicjump.php');
require_once(get_template_directory() . '/widgets/permalink.php');
require_once(get_template_directory() . '/widgets/comicdate.php');
require_once(get_template_directory() . '/widgets/comictitle.php');
require_once(get_template_directory() . '/widgets/comiccomments.php');
require_once(get_template_directory() . '/widgets/menubar.php');
require_once(get_template_directory() . '/widgets/keenspotnewsbox.php');
// FUNCTIONS & Extra's
require_once(get_template_directory() . '/functions/displaycomic.php');
require_once(get_template_directory() . '/functions/displaycomicpost.php');
require_once(get_template_directory() . '/functions/displayblogpost.php');
require_once(get_template_directory() . '/functions/adminnotes.php');
require_once(get_template_directory() . '/functions/checkbrowser.php');
require_once(get_template_directory() . '/functions/searchcustomfields.php');
require_once(get_template_directory() . '/functions/multicomics.php');
require_once(get_template_directory() . '/functions/rawformatting.php');
require_once(get_template_directory() . '/functions/relatedposts.php');
require_once(get_template_directory() . '/functions/relatedcomics.php');
require_once(get_template_directory() . '/functions/membersonly.php');
require_once(get_template_directory() . '/functions/syndication.php');
if ($enable_dropdown_sidebar == 'yes') {
require_once(get_template_directory() . '/functions/dropbar.php');
}
if ($enable_numbered_pagination == 'yes') {
require_once(get_template_directory() . '/functions/wp-pagenavi.php');
}
if ($disable_extended_comments == 'no') {
require_once(get_template_directory() . '/functions/comment-functions.php');
}
// Dashboard Menu Comicpress Options and ComicPress CSS
require_once(get_template_directory() . '/comicpress-options.php');
if ($enable_custom_image_header == 'yes') {
require_once(get_template_directory() . '/functions/custom-image-header.php');
}
// If any errors occur while searching for a comic file, the error messages will be pushed into here.
$comic_pathfinding_errors = array();
// If ComicPress Manager is installed, use the date format defined there. If not, default to
// Y-m-d.. It's best to use CPM's date definition for improved operability between theme and plugin.
if (defined("CPM_DATE_FORMAT")) {
define("CP_DATE_FORMAT", CPM_DATE_FORMAT);
} else {
define("CP_DATE_FORMAT", "Y-m-d");
}
// If you want to run multiple comics on a single day, define your additional filters here.
// Example: you want to run an additional comic with the filename 2008-01-01-a-my-new-years-comic.jpg.
// Define an additional filter in the list below:
//
// $comic_filename_filters['secondary'] = "{date}-a*.*";
//
// Then show the second comic on your page by calling the_comic with your filter name (PHP tags munged
// to maintain valid file syntax):
//
// < ?php the_comic('secondary'); ? >
//
// Note that it's quite possible to slurp up the wrong file if your expressions are too broad.
$comic_filename_filters = array();
$comic_filename_filters['default'] = "{date}*.*";
// load all of the comic & non-comic category information
add_action('init', 'get_all_comic_categories');
function get_first_comic() {
return get_terminal_post_in_category(get_all_comic_categories_as_cat_string());
}
function get_last_comic() {
return get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), false);
}
/**
* Get the hyperlink to the first comic post in the database.
* @return string The hyperlink to the first comic post, or false.
*/
function get_first_comic_permalink() {
$terminal = get_first_comic();
return !empty($terminal) ? get_permalink($terminal->ID) : false;
}
/**
* Get the hyperlink to the last comic post in the database.
* @return string The hyperlink to the first comic post, or false.
*/
function get_last_comic_permalink() {
$terminal = get_last_comic();
return !empty($terminal) ? get_permalink($terminal->ID) : false;
}
/**
* Given a category ID or an array of category IDs, create an exclusion string that will
* filter out every category but the provided ones.
*/
function get_string_to_exclude_all_but_provided_categories($category) {
$category_ids = array_keys(get_all_category_objects_by_id());
if (!is_array($category)) { $category = array($category); }
return implode(" and ", array_diff($category_ids, $category));
}
/**
* Get the link to the previous comic from the current one.
*/
function previous_comic_link($format, $link) {
global $non_comic_categories;
previous_post_link($format, $link, false, $non_comic_categories);
}
/**
* Get the link to the next comic from the current one.
*/
function next_comic_link($format, $link) {
global $non_comic_categories;
next_post_link($format, $link, false, $non_comic_categories);
}
/**
* Get the previous comic from the current one.
*/
function get_previous_comic($category = null) { return get_adjacent_comic($category,true); }
/**
* Get the next comic from the current one.
*/
function get_next_comic($category = null) { return get_adjacent_comic($category); }
/**
* This is function get_next_comic_permalink
*
* @return mixed false if no next comic permalink, else return the permalink
*
*/
function get_next_comic_permalink() {
$next_comic = get_next_comic();
if (is_object($next_comic)) {
if (isset($next_comic->ID)) {
return get_permalink($next_comic->ID);
}
}
return false;
}
/**
* This is function get_previous_comic_permalink
*
* @return mixed false if there is no permalink or next previous comic
*
*/
function get_previous_comic_permalink() {
$prev_comic = get_previous_comic();
if (is_object($prev_comic)) {
if (isset($prev_comic->ID)) {
return get_permalink($prev_comic->ID);
}
}
return false;
}
/**
* Get the adjacent comic from the current one.
* @param int $category The category to use.
* @param boolean $next True if the next chronological comic should be retrieved.
* @return array The WordPress post object for the comic post.
*/
function get_adjacent_comic($category, $next = false) {
global $non_comic_categories;
// get_all_comic_categories();
$categories_to_exclude = $non_comic_categories;
if (!empty($category)) {
$categories_to_exclude = get_string_to_exclude_all_but_provided_categories($category);
}
return get_adjacent_post(false, $categories_to_exclude, $next);
}
/**
* Find the terminal post in a specific category.
*/
function get_terminal_post_in_category($categoryID, $first = true) {
global $post;
$temp = $wp_query; $wp_query = null;
$sortOrder = $first ? "asc" : "desc";
$terminalComicQuery = new WP_Query(); $terminalComicQuery->query("showposts=1&order=${sortOrder}&cat=${categoryID}");
$terninalPost = false;
if ($terminalComicQuery->have_posts()) {
$terminalPost = reset($terminalComicQuery->posts);
}
$wp_query = null; $wp_query = $temp;
return $terminalPost;
}
/**
* Find a comic file in the filesystem.
* @param string $folder The folder name to search.
* @param string $override_post A WP Post object to use in place of global $post.
* @param string $filter The $comic_filename_filters to use.
* @return string The relative path to the comic file, or false if not found.
*/
if (!function_exists('get_comic_path')) {
function get_comic_path($folder = 'comic', $override_post = null, $filter = 'default', $multi = null) {
global $post, $comic_filename_filters, $comic_folder, $archive_comic_folder, $rss_comic_folder, $comic_pathfinding_errors;
if (isset($comic_filename_filters[$filter])) {
$filter_to_use = $comic_filename_filters[$filter];
} else {
$filter_to_use = '{date}*.*';
}
switch ($folder) {
case "rss": $folder_to_use = $rss_comic_folder; break;
case "archive": $folder_to_use = $archive_comic_folder; break;
case "comic": default: $folder_to_use = $comic_folder; break;
}
$post_to_use = (is_object($override_post)) ? $override_post : $post;
$post_date = mysql2date(CP_DATE_FORMAT, $post_to_use->post_date);
$filter_with_date = str_replace('{date}', $post_date, $filter_to_use);
$results = array();
if (count($results = glob("${folder_to_use}/${filter_with_date}")) > 0) {
if (!empty($multi)) {
return $results;
} else {
return reset($results);
}
}
$comic_pathfinding_errors[] = sprintf(__("Unable to find the file in the <strong>%s</strong> folder that matched the pattern <strong>%s</strong>. Check your WordPress and ComicPress settings.", 'comicpress'), $folder, $filter_with_date);
return false;
}
}
/**
* Find a comic file in the filesystem and return an absolute URL to that file.
* @param string $folder The folder name to search.
* @param string $override_post A WP Post object to use in place of global $post.
* @param string $filter The $comic_filename_filters to use.
* @return string The absolute URL to the comic file, or false if not found.
*/
function get_comic_url($folder = 'comic', $override_post = null, $filter = 'default') {
if (($result = get_comic_path($folder, $override_post, $filter)) !== false) {
return get_option('home') . '/' . $result;
} else {
if (($folder == 'archive' || $folder == 'rss')) {
if (($result = get_comic_path('comic', $override_post, $filter)) !== false) {
return get_option('home') . '/' . $result;
}
}
}
return false;
}
/**
* get_comic_filename
* returns the filename of the comic for the individual date.
*
*/
function get_comic_filename($folder = 'comic', $override_post = null, $filter = 'default') {
if (($result = get_comic_path($folder, $override_post, $filter)) !== false) {
return $result;
}
}
/**
* Return a list of the comic categories with a negative value for exclusions
* NOTE: need a pre - negative for the first one
*/
function exclude_comic_categories() {
global $all_comic_categories_as_string;
if (empty($all_comic_categories_as_string)) get_all_comic_categories_as_cat_string();
$returnstring = str_replace(",",",-",$all_comic_categories_as_string);
return $returnstring;
}
/**
* Turn the tree of comics categories into a string to be fed into wp_query functions.
*/
function get_all_comic_categories_as_cat_string() {
global $all_comic_categories_as_string, $category_tree;
if (empty($all_comic_categories_as_string)) {
$categories = array();
foreach ($category_tree as $node) {
$parts = explode("/", $node);
$categories[] = end($parts);
}
$all_comic_categories_as_string = implode(",", $categories);
}
return $all_comic_categories_as_string;
}
/**
* Turn the list of categories into a hash table of category objects.
*/
function get_all_category_objects_by_id() {
global $categories_by_id;
if (empty($categories_by_id)) {
$categories_by_id = array();
foreach (get_categories("hide_empty=0") as $category_object) {
$categories_by_id[$category_object->term_id] = $category_object;
}
}
return $categories_by_id;
}
/**
* Parse all categories and sort them into comics and non-comics categories.
*/
function get_all_comic_categories() {
global $comiccat, $category_tree, $non_comic_categories;
$categories_by_id = get_all_category_objects_by_id();
foreach (array_keys($categories_by_id) as $category_id) {
$category_tree[] = $categories_by_id[$category_id]->parent . '/' . $category_id;
}
do {
$all_ok = true;
for ($i = 0; $i < count($category_tree); ++$i) {
$current_parts = explode("/", $category_tree[$i]);
if (reset($current_parts) != 0) {
$all_ok = false;
for ($j = 0; $j < count($category_tree); ++$j) {
$j_parts = explode("/", $category_tree[$j]);
if (end($j_parts) == reset($current_parts)) {
$category_tree[$i] = implode("/", array_merge($j_parts, array_slice($current_parts, 1)));
break;
}
}
}
}
} while (!$all_ok);
$non_comic_tree = array();
if (get_option('comicpress-enable-storyline-support') == 1) {
$result = get_option("comicpress-storyline-category-order");
if (!empty($result)) {
$category_tree = explode(",", $result);
}
$non_comic_tree = array_keys($categories_by_id);
foreach ($category_tree as $node) {
$parts = explode("/", $node);
$category_id = end($parts);
if ($parts[1] == $comiccat) {
if (($index = array_search($category_id, $non_comic_tree)) !== false) {
array_splice($non_comic_tree, $index, 1);
}
}
}
} else {
$new_category_tree = array();
foreach ($category_tree as $node) {
$parts = explode("/", $node);
if ($parts[1] == $comiccat) {
$new_category_tree[] = $node;
} else {
$non_comic_tree[] = end($parts);
}
}
$category_tree = $new_category_tree;
}
$non_comic_categories = implode(" and ", $non_comic_tree);
}
/**
* Return true if the current post is in the comics category or a child category.
*/
function in_comic_category() {
global $post, $category_tree;
$comic_categories = array();
foreach ($category_tree as $node) {
$comic_categories[] = end(explode("/", $node));
}
return (count(array_intersect($comic_categories, wp_get_post_categories($post->ID))) > 0);
}
// ComicPress Template Functions
function the_comic_filename($filter = 'default') { return get_comic_filename('comic',null, $filter); }
function the_comic($filter = 'default') { echo get_comic_url('comic', null, $filter); }
//The following is deprecated...
function comic_display($filter = 'default') { echo get_comic_url('comic', null, $filter); }
function the_comic_archive($filter = 'default') { echo get_comic_url('archive', null, $filter); }
//The following is deprecated...
function comic_archive($filter = 'default') { echo get_comic_url('archive', null, $filter); }
function the_comic_rss($filter = 'default') { echo get_comic_url('rss', null, $filter); }
//The following is deprecated...
function comic_rss($filter = 'default') { echo get_comic_url('rss', null, $filter); }
/**
* Display the list of Storyline categories.
*/
function comicpress_list_storyline_categories($args = "") {
global $category_tree;
$defaults = array(
'style' => 'list', 'title_li' => __('Storyline')
);
$r = wp_parse_args($args, $defaults);
extract($r);
$categories_by_id = get_all_category_objects_by_id();
$output = '';
if ($style == "list") { $output .= '<li class="categories storyline">'; }
if ($title_li && ($style == "list")) { $output .= $title_li; }
if ($style == "list") { $output .= "<ul>"; }
$current_depth = 0;
foreach ($category_tree as $node) {
$parts = explode("/", $node);
$category_id = end($parts);
$target_depth = count($parts) - 2;
if ($target_depth > $current_depth) {
$output .= str_repeat("<li><ul>", ($target_depth - $current_depth));
}
if ($target_depth < $current_depth) {
$output .= str_repeat("</ul></li>", ($current_depth - $target_depth));
}
$output .= '<li><a href="' . get_category_link($category_id) . '">';
$output .= $categories_by_id[$category_id]->cat_name;
$output .= "</a></li>";
$current_depth = $target_depth;
}
if ($current_depth > 0) {
$output .= str_repeat("</ul></li>", $current_depth);
}
if ($style == "list") { $output .= "</ul></li>"; }
echo $output;
}
/**
* Display text when image (comic) is hovered
* Text is taken from a custom field named "hovertext"
*/
function the_hovertext() {
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
echo (empty($hovertext)) ? get_the_title() : $hovertext;
}
/**
* Display the comic transcript
* Transcript must be entered into a custom field named "transcript"
* @param string $displaymode, "raw" (straight from the field), "br" (includes html line breaks), "styled" (fully css styled with JavaScript expander)
*/
function the_transcript($displaymode = 'raw') {
$transcript = get_post_meta( get_the_ID(), "transcript", true );
switch ($displaymode) {
case "raw":
echo $transcript;
break;
case "br":
echo nl2br($transcript);
break;
case "styled":
if (!empty($transcript)) { ?>
<script type='text/javascript'>
<!--
function toggle_expander(id) {
var e = document.getElementById(id);
if(e.style.height == 'auto')
e.style.height = '1px';
else
e.style.height = 'auto';
}
//-->
</script>
<div class="transcript-border"><div id="transcript"><a href="javascript:toggle_expander('transcript-content');" class="transcript-title">&darr; Transcript</a><div id="transcript-content"><?php echo nl2br($transcript); ?><br /><br /></div></div></div>
<script type='text/javascript'>
<!--
document.getElementById('transcript-content').style.height = '1px';
//-->
</script><?php
}
break;
}
}
//Insert the comic image into the RSS feed
function comic_feed() { ?>
<p><a href="<?php the_permalink() ?>"><img src="<?php the_comic_rss() ?>" border="0" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a></p><?php
}
function insert_comic_feed($content) {
if (is_feed() && in_comic_category()) {
return comic_feed() . $content;
} else {
return $content;
}
}
add_filter('the_content','insert_comic_feed');
// Register Sidebar and Define Widgets
if ( function_exists('register_sidebar') ) {
register_sidebar(array('name'=>'Left Sidebar','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Right Sidebar','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Above Header','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Header','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Menubar','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Over Comic','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Left of Comic','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Right of Comic','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Under Comic','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Over Blog','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Blog','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Under Blog','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Footer','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
register_sidebar(array('name'=>'Drop Bar','before_widget' => '<ul><li id="%1$s" class="widget %2$s">','after_widget' => '</li></ul>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ));
}
function widget_comicpress_archive_dropdown() { ?>
<ul>
<li class="archive-dropdown-wrap">
<select name="archive-dropdown" class="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'>
<option value=""><?php echo attribute_escape(__('Archives...')); ?></option>
<?php wp_get_archives('type=monthly&format=option&show_post_count=1'); ?> </select>
</li>
</ul>
<?php } if ( function_exists('register_sidebar_widget') )
register_sidebar_widget(__('Archive Dropdown'), 'widget_comicpress_archive_dropdown');
function storyline_category_list() {
$listcats = wp_list_categories('echo=0&title_li=&include='.get_all_comic_categories_as_cat_string());
$listcats = str_replace("<ul class='children'>", "<ul class='children'> &raquo; ", $listcats);
echo $listcats;
}
/**
* This is function comicpress_current_theme_version
*
* @return mixed return straight current theme version #
*
*/
function comicpress_current_theme_version() {
$themes = get_themes();
$current_theme = get_current_theme();
return $themes[$current_theme]['Version'];
}
/**
* This is function comicpress_is_active_sidebar
*
* @param $name - sidebar name made with register_sidebar(array('name'=>'Name of Sidebar'),
* use 'Sidebar 1' .. # if no sidebar names specified.
* @return true if sidebar with $name has widgets, false if not.
*
*/
function comicpress_is_active_sidebar( $name ) {
global $wp_registered_sidebars, $_wp_sidebars_widgets;
$i = 1;
foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
if ( $name == $registered_sidebar['name'] && !empty($_wp_sidebars_widgets[sanitize_title("sidebar-$i")]) )
return true;
$i++;
}
return false;
}
?>

20
functions/adminnotes.php Normal file
View File

@ -0,0 +1,20 @@
<?php
/**
* Admin Notes
* Displays a note that only users with publishing rights can see.
*
* example: [note]Only the admins can read this.[/note]
*
* This is useful if you have multiple people posting on articles, etc.
*/
add_shortcode( 'note', 'sc_note' );
function sc_note( $atts, $content = null ) {
if ( current_user_can( 'publish_posts' ) )
return '<div class="note">'.$content.'</div>';
return '';
}
?>

View File

@ -0,0 +1,37 @@
<?php
/**
* Check Browser
* function browser_body_class
*
* This has two functions, the first being it adds the browser type as a class
* in the <body> tag where you can then do .ie #page and do things specific
* for each browser type.
*
* The second is you can write code specific for a particular browser.
*
* example: if (reset(browser_body_class()) == 'ie') {
*
* the reset() portion resets the array to a string.
*
*/
add_filter('body_class','browser_body_class');
function browser_body_class($classes = '') {
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
if($is_lynx) $classes[] = 'lynx';
elseif($is_gecko) $classes[] = 'gecko';
elseif($is_opera) $classes[] = 'opera';
elseif($is_NS4) $classes[] = 'ns4';
elseif($is_safari) $classes[] = 'safari';
elseif($is_chrome) $classes[] = 'chrome';
elseif($is_IE) $classes[] = 'ie';
else $classes[] = 'unknown';
if($is_iphone) $classes[] = 'iphone';
return $classes;
}
?>

View File

@ -0,0 +1,242 @@
<?php
/**
* Better display of avatars in comments
* Should only be used in comment sections (may update in future)
* Checks for false empty commenter URLs 'http://' w/registered users
* Adds the class 'photo' to the image
* Adds a call to 'images/trackback.jpg' for trackbacks
* Adds a call to 'images/pingback.jpg' for pingbacks
*
* Filters should only return a string for an image URL for the avatar with class $avatar
* They should not get the avatar as this is done after the filter
*
* @since 0.2
* @filter
*/
function comicpress_avatar() {
global $comment;
$url = get_comment_author_url();
$comment_type = get_comment_type();
if($comment_type == 'trackback') :
$avatar = '/images/trackback.png';
elseif($comment_type == 'pingback') :
$avatar = '/images/pingback.png';
elseif(get_settings('avatar_default')):
$avatar = get_settings('avatar_default');
endif;
// $avatar = apply_filters('comicpress_avatar', $avatar);
if($url == true && $url != 'http://')
echo '<a href="' . $url . '" rel="external nofollow" title="' . wp_specialchars(get_comment_author(), 1) . '">';
if(function_exists('get_avatar') && $comment_type != 'pingback' && $comment_type != 'trackback' ) {
echo str_replace("alt='", "alt='".wp_specialchars(get_comment_author(), 1)."' title='".wp_specialchars(get_comment_author(), 1), get_avatar(get_comment_author_email(), 64));
} else {
if ($comment_type == 'pingback' || $comment_type == 'trackback') {
echo '<img src="'.get_bloginfo('stylesheet_directory').$avatar.'" class="photo trackping" />';
} else {
echo '<img src="'.get_bloginfo('stylesheet_directory').$avatar.'" class="avatar photo" />';
}
}
if($url == true && $url != 'http://')
echo '</a>';
}
/**
* Properly displays comment author name/link
* bbPress and other external systems sometimes don't set a display name for registrations
* WP has problems if no display name is set
* WP gives registered users URL of 'http://' if none is set
*
* @since 0.2.2
*/
function comicpress_comment_author() {
global $comment;
$author = get_comment_author();
$url = get_comment_author_url();
/*
* Registered members w/o URL defaults to 'http://'
*/
if($url == 'http://')
$url = false;
/*
* Registered through bbPress sometimes leaves no display name
* Bug with bbPress 0.9 series and WP 2.5 (no later testing)
* 'Anonymous' should be localized according to WP, not the theme
*/
if($comment->user_id > 0) :
$user = get_userdata($comment->user_id);
if($user->display_name)
$author = $user->display_name;
elseif($user->user_nickname)
$author = $user->nickname;
elseif($user->user_nicename)
$author = $user->user_nicename;
else
$author = $user->user_login;
endif;
/*
* Display link and cite if URL is set
* Also properly cites trackbacks/pingbacks
*/
if($url) :
$output = '<cite title="' . $url . '">';
$output .= '<a href="' . $url . '" title="' . wp_specialchars($author, 1) . '" class="external nofollow">' . $author . '</a>';
$output .= '</cite>';
else :
$output = '<cite>';
$output .= $author;
$output .= '</cite>';
endif;
echo $output;
}
/**
* Displays individual comments
* Uses the callback parameter for wp_list_comments
* Overwrites the default display of comments
*
* @since 0.2.3
*
* @param $comment The comment variable
* @param $args Array of arguments passed from wp_list_comments
* @param $depth What level the particular comment is
*/
function comicpress_comments_callback($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
$GLOBALS['comment_depth'] = $depth;
?>
<li id="comment-<?php comment_ID(); ?>" class="<?php comicpress_comment_class(); ?>">
<?php comicpress_avatar(); // Avatar filter ?>
<div class="comment-meta-data">
<div class="comment-author vcard">
<?php comicpress_comment_author(); ?><br />
</div>
<abbr class="comment-time" title="<?php comment_date(__('l, F jS, Y, g:i a','comicpress')); ?>">
<?php printf(__('%1$s at %2$s','comicpress'), get_comment_date(), get_comment_time()); ?>
</abbr>
<span class="separator">|</span> <a class="permalink" href="#comment-<?php echo str_replace('&', '&amp;', get_comment_ID()); ?>" title="<?php _e('Permalink to comment','comicpress'); ?>"><?php _e('Permalink','comicpress'); ?></a>
<?php
if((get_option('thread_comments')) && ($args['type'] == 'all' || get_comment_type() == 'comment')) :
$max_depth = get_option('thread_comments_depth');
echo comment_reply_link(array(
'reply_text' => __('Reply','comicpress'),
'login_text' => __('Log in to reply.','comicpress'),
'depth' => $depth,
'max_depth' => $max_depth,
'before' => '<span class="separator">|</span> <span class="comment-reply-link">',
'after' => '</span>'
));
endif;
?>
<?php edit_comment_link('<span class="edit">'.__('Edit','comicpress').'</span>',' <span class="separator">|</span> ',''); ?>
<?php if($comment->comment_approved == '0') : ?>
<br /><em><?php _e('Your comment is awaiting moderation.','comicpress'); ?></em>
<?php endif; ?>
</div>
<?php if (get_comment_type() == 'comment') { ?>
<div class="comment-text">
<?php comment_text(); ?>
</div>
<?php } else { ?>
<div class="clear"></div>
<?php }
}
/**
* Ends the display of individual comments
* Uses the callback parameter for wp_list_comments
* Needs to be used in conjunction with comicpress_comments_callback
* Not needed but used just in case something is changed
*
* @since 0.2.3
*/
function comicpress_comments_end_callback() {
echo '</li>';
}
/**
* Sets a class for each comment
* Sets alt, odd/even, and author/user classes
* Adds author, user, and reader classes
*
* @since 0.2
*/
function comicpress_comment_class() {
global $comment;
static $comment_alt;
$classes = array();
if(function_exists('get_comment_class'))
$classes = get_comment_class();
$classes[] = get_comment_type();;
/*
* User classes
*/
if($comment->user_id > 0 && $user = get_userdata($comment->user_id)) :
$classes[] = 'user user-' . $user->user_nicename;
if($post = get_post($post_id)) :
if($comment->user_id === $post->post_author)
$classes[] = 'author author-' . $user->user_nicename;
endif;
else :
$classes[] = 'reader';
endif;
/*
* Alt classes
*/
if($comment_alt++ % 2) :
$classes[] = 'even';
$classes[] = 'alt';
else :
$classes[] = 'odd';
endif;
/*
* http://microid.org
*/
$email = get_comment_author_email();
$url = get_comment_author_url();
if(!empty($email) && !empty($url)) {
$microid = 'microid-mailto+http:sha1:' . sha1(sha1('mailto:'.$email).sha1($url));
$classes[] = $microid;
}
$classes = join(' ', $classes);
echo $classes;
}
function list_pings($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
<li id="comment-<?php comment_ID(); ?>">
<?php comicpress_comment_author(); ?></li>
<?php }
?>

View File

@ -0,0 +1,68 @@
<?php
// Custom Image Header
define('HEADER_TEXTCOLOR', '000');
// define('HEADER_IMAGE', '%s/images/header-blank.png'); // %s is theme dir uri
define('HEADER_IMAGE_WIDTH', $custom_image_header_width);
define('HEADER_IMAGE_HEIGHT', $custom_image_header_height);
function theme_admin_header_style() {
?>
<style type="text/css">
#headimg {
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
background: url(<?php header_image(); ?>) no-repeat center;
}
#headimg h1, #headimg .description
{
text-decoration: none;
<?php
if ( 'blank' == get_header_textcolor() ) { ?>
display: none;
<?php } else {
// Otherwise, set the color to be the user selected one
?>
color: #<?php header_textcolor();?>;
<?php } ?>
}
</style>
<?php
}
function theme_header_style() {
?>
<style type="text/css">
#header
{
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
background: url(<?php header_image(); ?>) no-repeat center;
}
<?php
// Has the text been hidden?
// If so, set display to equal none
if ( 'blank' == get_header_textcolor() ) { ?>
#header h1, #header .description {
display: none;
}
<?php } else {
// Otherwise, set the color to be the user selected one
?>
#header *
{
color: #<?php header_textcolor();?>;
}
}
<?php } ?>
</style>
<?php
}
if ( function_exists('add_custom_image_header') ) {
add_custom_image_header('theme_header_style', 'theme_admin_header_style');
}
?>

View File

@ -0,0 +1,51 @@
<?php
/**
* Display post
* Displays the post info
*
*
*/
function display_blog_post() {
global $post, $wp_query, $authordata, $enable_related_posts;
if (is_single()) { ?>
<div class="nav-blog">
<div class="nav-blog-previous"><?php previous_post_link('%link','&lsaquo; Previous', TRUE) ?></div>
<div class="nav-blog-next"><?php next_post_link('%link','Next &rsaquo;', TRUE) ?></div>
</div>
<div class="clear"></div>
<?php } ?>
<div class="post-head"></div>
<div class="post" id="post-<?php the_ID() ?>">
<div class="post-info">
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small> - By <?php the_author_posts_link(); ?> on <?php the_time('F jS, Y'); ?></small><br />
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
</div>
<div class="clear"></div>
</div>
<div class="entry">
<?php if (!is_single()) { global $more; $more = 0; } ?>
<?php the_content('&darr; Read the rest of this entry...') ?>
</div>
<div class="post-extras">
<div class="tags">
<?php the_tags('&#9492; Tags: ', ', ', '<br />'); ?> Posted in: <?php the_category(','); ?> <?php edit_post_link('Edit Post', ' [ ', ' ] '); ?>
</div>
<div class="comment-link">
<?php if ('open' == $post->comment_status) { comments_popup_link('&ldquo;Comment!&rdquo;', '&ldquo;1 Comment&rdquo;', '&ldquo;% Comments&rdquo;'); } ?>
</div>
<div class="clear"></div>
<?php if ($enable_related_posts == 'yes') echo related_posts_shortcode(); ?>
</div>
<br class="clear-margins" />
</div>
<div class="post-foot"></div>
<?php
}
?>

View File

@ -0,0 +1,47 @@
<?php
/**
* Display Comic
* Displays the comic.
*
*
*/
function display_comic() {
global $post, $wp_query, $anomaly_says, $comic_clicks_next;
$next_comic = get_next_comic_permalink();
$comic = explode(".", the_comic_filename());
if ($comic[1] == 'swf') { ?>
<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?php echo get_post_meta( get_the_ID(), "fwidth", true ); ?>" height="<?php echo get_post_meta( get_the_ID(), "fheight", true ); ?>">
<param name="movie" value="/<?php echo the_comic_filename(); ?>" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="/<?php echo the_comic_filename(); ?>" width="<?php echo get_post_meta( get_the_ID(), "fwidth", true ); ?>" height="<?php echo get_post_meta( get_the_ID(), "fheight", true ); ?>">
<!--<![endif]-->
<div>
<h1>Get Flash!</h1>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<?php } else {
if ($comic_clicks_next == 'yes') {
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
if ($anomaly_says == 'yes' && !empty($hovertext)) { ?>
<a href="<?php echo $next_comic; ?>" class="tt"><span class="tooltip"><span class="top"></span><span class="middle"><strong>Anomaly Says, </strong>"<?php the_hovertext() ?>"</span><span class="bottom"></span></span><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_title(); ?>" /></a>
<?php } else { ?>
<a href="<?php echo $next_comic; ?>"><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a>
<?php } ?>
<?php } else {
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
if ($anomaly_says == 'yes' && !empty($hovertext)) { ?>
<a href="#" class="tt"><span class="tooltip"><span class="top"></span><span class="middle"><strong>Anomaly Says, </strong>"<?php the_hovertext() ?>"</span><span class="bottom"></span></span><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_title(); ?>" /></a>
<?php } else { ?>
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" />
<?php }
}
}
}
?>

View File

@ -0,0 +1,55 @@
<?php
/**
* Display comic post
* Displays the post info for the comic
*
*
*/
function display_comic_post() {
global $post, $wp_query, $transcript_in_posts, $enable_related_comics;
$first_comic = get_first_comic_permalink(); $last_comic = get_last_comic_permalink();
?>
<div class="nav">
<?php if ( get_permalink() != $first_comic ) { ?><div class="nav-first"><a href="<?php echo $first_comic ?>">&lsaquo;&lsaquo; First</a></div><?php } ?>
<div class="nav-previous"><?php $temp_query = $wp_query->is_single; $wp_query->is_single = true; previous_comic_link('%link', '&lsaquo; Previous'); $wp_query->is_single = $temp_query;$temp_query = null; ?></div>
<div class="nav-next"><?php next_comic_link('%link', 'Next &rsaquo;') ?></div>
<?php if ( get_permalink() != $last_comic ) { ?><div class="nav-last"><a href="<?php echo $last_comic ?>">Last &rsaquo;&rsaquo;</a></div><?php } ?>
</div>
<div class="clear"></div>
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="post-info">
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small> - By <?php the_author_posts_link(); ?> on <?php the_time('F jS, Y'); ?></small><br />
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
</div>
<div class="clear"></div>
</div>
<div class="entry">
<?php if (!is_single()) { global $more; $more = 0; } ?>
<?php the_content('&darr; Read More..') ?>
</div>
<?php if ($transcript_in_posts == 'yes') the_transcript('styled'); ?>
<div class="post-extras">
<div class="tags">
<?php the_tags('&#9492; Tags: ', ', ', '<br />'); ?> <?php edit_post_link('Edit Post', ' [ ', ' ] '); ?>
</div>
<div class="comment-link">
<?php if ('open' == $post->comment_status) { comments_popup_link('&ldquo;Comment!&rdquo;', '&ldquo;1 Comment&rdquo;', '&ldquo;% Comments&rdquo;'); } ?>
</div>
<div class="clear"></div>
<?php if ($enable_related_comics == 'yes') echo related_comics_shortcode(); ?>
</div>
<br class="clear-margins" />
</div>
<div class="post-comic-foot"></div>
<?php
}
?>

33
functions/dropbar.php Normal file
View File

@ -0,0 +1,33 @@
<?php
/*
Widget Name: Drop Bar
Widget URI: http://comicpress.org/
Description: Creates a Drop Bar with a widget area for it.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
function comicpress_dropbar() { ?>
<div onmouseover="DropBarMover.mouseOver(event)" onmouseout="DropBarMover.mouseOut(event)" style="zoom:1;top: -100px;height:110px;position:absolute;width:100%;z-index:10000;left:0;" id="DropBar">
<div class="dropbar">
<div style="margin: 0 auto;">
<?php get_sidebar('dropbar'); ?>
<div style="clear:both;"></div>
</div>
<div class="droptab"></div>
</div>
</div>
<?php }
function comicpress_dropbar_load() { ?>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/dropbar.js"></script>
<?php }
add_action('wp_head', 'comicpress_dropbar_load');
add_action('comicpress-header', 'comicpress_dropbar', 10);
?>

73
functions/membersonly.php Normal file
View File

@ -0,0 +1,73 @@
<?php
/**
* Members Only
* by Philip M. Hofer (Frumph)
* http://webcomicplanet.com/
*
* Displays content that only registered users that are marked members can see.
*
* example: [members]Only members can read this.[/members]
*
*
* Still need to do, make it a way to flag someone a site_member TRUE
*
*/
add_shortcode( 'members', 'shortcode_for_comicpress_members_only' );
add_shortcode( 'member', 'shortcode_for_comicpress_members_only' );
add_action('show_user_profile', 'comicpress_profile_members_only');
add_action('edit_user_profile', 'comicpress_profile_members_only');
add_action('profile_update', 'comicpress_profile_members_only_save');
function shortcode_for_comicpress_members_only( $atts, $content = null ) {
global $post, $userdata, $profileuser, $current_user, $errormsg;
if ( !empty($userdata->ID) ) {
$is_member = get_usermeta($current_user->ID,'comicpress-is-member');
if ( ( $is_member == 'yes' || current_user_can( 'publish_posts' ) ) && !is_feed() ) {
return '<div class="members-only">'.$content.'</div>';
}
}
return '';
}
function comicpress_profile_members_only() {
global $profileuser, $current_user, $errormsg;
$comicpress_is_member = get_usermeta($profileuser->ID,'comicpress-is-member');
if (empty($comicpress_is_member)) $comicpress_is_member = 'no';
?>
<h3>Member of <?php bloginfo('name'); ?></h3>
<table class="form-table">
<tr>
<th><label for="Memberflag">Member?</label></th>
<td>
<?php
if (current_user_can('manage_options')) { ?>
<label><input name="comicpress-is-member" id="comicpress-is-member-yes" type="radio" value="yes"<?php if ( get_usermeta($profileuser->ID,'comicpress-is-member') == "yes") { echo " checked"; } ?> />Yes</label>
&nbsp;&nbsp;
<label><input name="comicpress-is-member" id="comicpress-is-member-no" type="radio" value="no"<?php if ( get_usermeta($profileuser->ID,'comicpress-is-member') != "yes" ) { echo " checked"; } ?> />No</label>
<?php } else {
if ($comicpress_is_member == 'yes') {
echo 'Yes';
} else {
echo 'No';
}
}
?>
</td>
</tr>
</table>
<?php }
function comicpress_profile_members_only_save() {
$id = $_POST['user_id'];
$comicpress_is_member = $_POST['comicpress-is-member'];
if (!empty($comicpress_is_member)) {
update_usermeta($id, 'comicpress-is-member', $comicpress_is_member);
}
}
?>

34
functions/multicomics.php Normal file
View File

@ -0,0 +1,34 @@
<?php
/**
* function display_comics_multi
* July 26th, 2009
* Philip M. Hofer (Frumph)
*
* Displays multiple comics based on the array return with get_comic_path ($folder, $override_post, $filter, #) 0=no array, 1=array;
*/
function display_comics_multi() {
global $post;
if (($result = get_comic_path($folder, $override_post, $filter, 1)) !== false) {
foreach ($result as $pathto_comic) { ?>
<div class="comicdisp">
<img src="<?php echo get_option('home'). '/' .$pathto_comic; ?>" alt="<?php the_title(); ?>" title="<?php the_hovertext(); ?>" />
</div>
<?php }
} else {
if (($folder == 'archive' || $folder == 'rss')) {
if (($result = get_comic_path('comic', $override_post, $filter, 1)) !== false) {
foreach ($result as $pathto_comic) { ?>
<div class="comicdisp">
<img src="<?php echo get_option('home'). '/' .$pathto_comic; ?>" alt="<?php the_title(); ?>" title="<?php the_hovertext(); ?>" />
</div>
<?php }
}
}
}
return false;
}
?>

View File

@ -0,0 +1,35 @@
<?php
/**
* Raw Format Shortcode
* Displays formatting in a raw output that bypasses the post formatting.
*
* example: [raw]This portion of text will not be automatically formatted by WP.[/raw]
*
* This is useful if you want to paste in your post code and other things.
*/
function my_formatter($content) {
$new_content = '';
$pattern_full = '{(\[raw\].*?\[/raw\])}is';
$pattern_contents = '{\[raw\](.*?)\[/raw\]}is';
$pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);
foreach ($pieces as $piece) {
if (preg_match($pattern_contents, $piece, $matches)) {
$new_content .= $matches[1];
} else {
$new_content .= wptexturize(wpautop($piece));
}
}
return $new_content;
}
remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
add_filter('the_content', 'my_formatter', 99);
?>

View File

@ -0,0 +1,72 @@
<?php
/**
* Related comics
* Displays a list of comic links that are related to this current one using shortcode.
*
* Usage: [related_comics]
*
*/
function related_comics_shortcode( $atts = '' ) {
extract(shortcode_atts(array(
'limit' => '5',
), $atts));
global $wpdb, $post, $table_prefix, $category_tree;
if ($post->ID) {
// Get tags
$tags = wp_get_post_tags($post->ID);
$tagsarray = array();
foreach ($tags as $tag) {
$tagsarray[] = $tag->term_id;
}
$tagslist = implode(',', $tagsarray);
if (empty($tagslist)) return;
if (empty($limit)) $limit = 5;
// Do the query
$q = "SELECT p.*, count(tr.object_id) as count
FROM $wpdb->term_taxonomy AS tt, $wpdb->term_relationships AS tr, $wpdb->posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post->ID
AND p.post_status = 'publish'
AND p.post_date_gmt < NOW()
GROUP BY tr.object_id
ORDER BY count DESC, p.post_date_gmt DESC
LIMIT $limit;";
$related = $wpdb->get_results($q);
if ( $related ) {
$retval = '
<div class="related_posts">
Related Comics &not;';
$retval .= '
<ul>';
$comic_categories = array();
foreach ($category_tree as $node) {
$comic_categories[] = end(explode("/", $node));
}
$in_comic_cat = 0;
$retval .= '
<table class="month-table">';
foreach($related as $r) :
if (count(array_intersect($comic_categories, wp_get_post_categories($r->ID))) > 0)
$retval .= '
<tr><td class="archive-date" align="right">'.date('M j, y',strtotime($r->post_date)).'</td><td class="archive-title"><a title="'.wptexturize($r->post_title).'" href="'.get_permalink($r->ID).'">'.wptexturize($r->post_title).'</a></td></tr>';
endforeach;
$retval .= '
</table>';
} else {
$retval .= '
<li>No related comics found</li>';
}
$retval .= '
</ul>';
$retval .= '
</div>';
return $retval;
}
return;
}
add_shortcode('related_comics', 'related_comics_shortcode');
?>

112
functions/relatedposts.php Normal file
View File

@ -0,0 +1,112 @@
<?php
/**
* Related posts
* Displays a list of blog links that are related to this current one using shortcode.
*
* Usage: [related_posts]
*
*/
function related_posts_shortcode( $atts = '' ) {
extract(shortcode_atts(array(
'limit' => '5',
), $atts));
global $wpdb, $post, $table_prefix, $category_tree;
if ($post->ID) {
// Get tags
$tags = wp_get_post_tags($post->ID);
$tagsarray = array();
foreach ($tags as $tag) {
$tagsarray[] = $tag->term_id;
}
$tagslist = implode(',', $tagsarray);
if (empty($tagslist)) return;
if (empty($limit)) $limit = 5;
// Do the query
$q = "SELECT p.*, count(tr.object_id) as count
FROM $wpdb->term_taxonomy AS tt, $wpdb->term_relationships AS tr, $wpdb->posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post->ID
AND p.post_status = 'publish'
AND p.post_date_gmt < NOW()
GROUP BY tr.object_id
ORDER BY count DESC, p.post_date_gmt DESC
LIMIT $limit;";
$related = $wpdb->get_results($q);
$retval = '
<div class="related_posts">
Related Posts &not;';
$retval .= '
<ul>';
if ( $related ) {
$comic_categories = array();
foreach ($category_tree as $node) {
$comic_categories[] = end(explode("/", $node));
}
$in_comic_cat = 0;
$counter = 0;
$retval .= '
<table class="month-table">';
foreach($related as $r) :
if (count(array_intersect($comic_categories, wp_get_post_categories($r->ID))) == 0)
$retval .= '
<tr><td class="archive-date" align="right">'.date('M j, y',strtotime($r->post_date)).'</td><td class="archive-title"><a title="'.wptexturize($r->post_title).'" href="'.get_permalink($r->ID).'">'.wptexturize($r->post_title).'</a></td></tr>';
endforeach;
$retval .= '
</table>';
} else {
$retval .= '
<li>No related posts found</li>';
}
$retval .= '
</ul>';
$retval .= '
</div>';
return $retval;
}
return;
}
/*
function related_posts_shortcode( $atts = '' ) {
extract(shortcode_atts(array(
'limit' => '5',
), $atts));
global $wp_query, $wpdb, $post, $non_comic_categories;
if ($post->ID) {
if (empty($limit)) $limit = 5;
//for use in the loop, list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post->ID);
$tagIDs = array();
if ($tags) {
$tagcount = count($tags);
for ($i = 0; $i < $tagcount; $i++) {
$tagIDs[$i] = $tags[$i]->term_id;
}
$args=array(
'category__in' => array(1,3,31),
'tag__and' => $tagIDs,
'showposts'=>5,
'post__not_in' => array($post->ID),
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
$temp_query = $wp_query;
$wp_query->in_the_loop = true;
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile;
}
$wp_query = $temp_query;
$temp_query = null;
}
}
}
*/
add_shortcode('related_posts', 'related_posts_shortcode');
?>

View File

@ -0,0 +1,58 @@
<?php
/*
Plugin Name: Search Custom Fields
Plugin URI: http://guff.szub.net/search-custom-fields/
Description: Search post custom field values. Also provides for an alternative theme 'search' template: search-custom.php.
Author: Kaf Oseo
Version: R1.beta1
Author URI: http://szub.net
Copyright (c) 2006 Kaf Oseo (http://szub.net)
Search Custom Fields is released under the GNU General Public License
(GPL) http://www.gnu.org/licenses/gpl.txt
This is a WordPress 2 plugin (http://wordpress.org).
*/
function szub_search_custom_join($join) {
global $wpdb;
if( is_search() && szub_is_search_key() ) {
$join = " LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id ";
}
return $join;
}
add_filter('posts_join', 'szub_search_custom_join');
function szub_search_custom_where($where) {
global $wp_query, $wp_version, $wpdb;
if( !empty($wp_query->query_vars['s']) && szub_is_search_key() ) {
$search = $wp_query->query_vars['s'];
$key = $_GET['key'];
$status = ($wp_version >= 2.1) ? 'post_type = \'post\' AND post_status = \'publish\'' : 'post_status = \'publish\'';
$where = " AND $wpdb->postmeta.meta_key = '$key' AND $wpdb->postmeta.meta_value LIKE '%$search%' AND $status ";
}
return $where;
}
add_filter('posts_where', 'szub_search_custom_where');
function szub_search_custom_template($template) {
if( is_search() && szub_is_search_key() && file_exists(get_template_directory() . '/search-transcript.php') )
$template = get_template_directory() . '/search-transcript.php';
if( !$template )
$template = get_query_template('search');
return $template;
}
add_filter('search_template', 'szub_search_custom_template');
function szub_is_search_key($key='') {
if( isset($_GET['key']) ) {
if( !empty($_GET['key']) || (!empty($key) && ($key = $_GET['key'])) )
return true;
}
return false;
}
?>

59
functions/syndication.php Normal file
View File

@ -0,0 +1,59 @@
<?php
/**
* Syndication - Feed Count Capturing & adding comic to feed.
* Author: Philip M. Hofer (Frumph)
*
*/
/*
function cp_add_to_feed_count_rss() {
$feedcount = get_option('comicpress_feed_count_rss');
if (!empty($feedcount)) {
$feedcount = $feedcount + 1;
update_option('comicpress_feed_count_rss', $feedcount);
} else {
add_option('comicpress_feed_count_rss', 1, ' ', 'yes');
}
}
add_action('do_feed_rss', 'cp_add_to_feed_count_rss',5);
function cp_add_to_feed_count_rdf() {
$feedcount = get_option('comicpress_feed_count_rdf');
if (!empty($feedcount)) {
$feedcount = $feedcount + 1;
update_option('comicpress_feed_count_rdf', $feedcount);
} else {
add_option('comicpress_feed_count_rdf', 1, ' ', 'yes');
}
}
add_action('do_feed_rdf', 'cp_add_to_feed_count_rdf',5);
function cp_add_to_feed_count_atom() {
$feedcount = get_option('comicpress_feed_count_atom');
if (!empty($feedcount)) {
$feedcount = $feedcount + 1;
update_option('comicpress_feed_count_atom', $feedcount);
} else {
add_option('comicpress_feed_count_atom', 1, ' ', 'yes');
}
}
add_action('do_feed_atom', 'cp_add_to_feed_count_atom',5);
function cp_add_to_feed_count_rss2() {
$feedcount = get_option('comicpress_feed_count_rss2');
if (!empty($feedcount)) {
$feedcount = $feedcount + 1;
update_option('comicpress_feed_count_rss2', $feedcount);
} else {
add_option('comicpress_feed_count_rss2', 1, ' ', 'yes');
}
}
add_action('do_feed_rss2', 'cp_add_to_feed_count_rss2',5);
*/
?>

46
functions/userpages.php Normal file
View File

@ -0,0 +1,46 @@
<?php
/**
* User Pages
* Allows view of user profiles for each user including admins/
*
* Fun stuff.
*/
// add_action('init','cp_rewrite_user_to_author');
/*
function cp_rewrite_author_to_user() {
global $wp_rewrite;
$wp_rewrite->author_base = 'user';
$wp_rewrite->flush_rules();
}
function cp_rewrite_user_to_author() {
global $wp_rewrite;
$wp_rewrite->author_base = 'author';
$wp_rewrite->init();
$wp_rewrite->flush_rules();
}
function cp_theme_switch() {
global $wp_rewrite;
if ($wp_rewrite->author_base != 'user') {
add_action('init','cp_rewrite_author_to_user',1);
} else {
add_action('init','cp_rewrite_user_to_author',1);
}
}
*/
// Flush the rules if someone switchs the theme.
add_action('switch_themes', array(&$GLOBALS['wp_rewrite'], 'init') );
/*
add_action('init','cp_reset_rules');
function cp_reset_rules() {
global $wp_rewrite;
$wp_rewrite->init();
$wp_rewrite->flush_rules();
}
*/
?>

158
functions/wp-pagenavi.php Normal file
View File

@ -0,0 +1,158 @@
<?php
/*
Plugin Name: WP-PageNavi
Plugin URI: http://lesterchan.net/portfolio/programming/php/
Description: Adds a more advanced paging navigation to your WordPress blog.
Version: 2.40
Author: Lester 'GaMerZ' Chan
Author URI: http://lesterchan.net
*/
/*
Copyright 2008 Lester Chan (email : lesterchan@gmail.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
### Function: Page Navigation: Boxed Style Paging
function wp_pagenavi($before = '', $after = '') {
global $wpdb, $wp_query;
pagenavi_init(); //Calling the pagenavi_init() function
if (!is_single()) {
$request = $wp_query->request;
$posts_per_page = intval(get_query_var('posts_per_page'));
$paged = intval(get_query_var('paged'));
$pagenavi_options = get_option('pagenavi_options');
$numposts = $wp_query->found_posts;
$max_page = $wp_query->max_num_pages;
/*
$numposts = 0;
if(strpos(get_query_var('tag'), " ")) {
preg_match('#^(.*)\sLIMIT#siU', $request, $matches);
$fromwhere = $matches[1];
$results = $wpdb->get_results($fromwhere);
$numposts = count($results);
} else {
preg_match('#FROM\s*+(.+?)\s+(GROUP BY|ORDER BY)#si', $request, $matches);
$fromwhere = $matches[1];
$numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere");
}
$max_page = ceil($numposts/$posts_per_page);
*/
if(empty($paged) || $paged == 0) {
$paged = 1;
}
$pages_to_show = intval($pagenavi_options['num_pages']);
$pages_to_show_minus_1 = $pages_to_show-1;
$half_page_start = floor($pages_to_show_minus_1/2);
$half_page_end = ceil($pages_to_show_minus_1/2);
$start_page = $paged - $half_page_start;
if($start_page <= 0) {
$start_page = 1;
}
$end_page = $paged + $half_page_end;
if(($end_page - $start_page) != $pages_to_show_minus_1) {
$end_page = $start_page + $pages_to_show_minus_1;
}
if($end_page > $max_page) {
$start_page = $max_page - $pages_to_show_minus_1;
$end_page = $max_page;
}
if($start_page <= 0) {
$start_page = 1;
}
if($max_page > 1 || intval($pagenavi_options['always_show']) == 1) {
$pages_text = str_replace("%CURRENT_PAGE%", number_format_i18n($paged), $pagenavi_options['pages_text']);
$pages_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pages_text);
echo $before.'<div class="wp-pagenavi">'."\n";
switch(intval($pagenavi_options['style'])) {
case 1:
if(!empty($pages_text)) {
echo '<span class="pages">&#8201;'.$pages_text.'&#8201;</span>';
}
if ($start_page >= 2 && $pages_to_show < $max_page) {
$first_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['first_text']);
echo '<a href="'.clean_url(get_pagenum_link()).'" title="'.$first_page_text.'">&#8201;'.$first_page_text.'&#8201;</a>';
if(!empty($pagenavi_options['dotleft_text'])) {
echo '<span class="extend">&#8201;'.$pagenavi_options['dotleft_text'].'&#8201;</span>';
}
}
previous_posts_link($pagenavi_options['prev_text']);
for($i = $start_page; $i <= $end_page; $i++) {
if($i == $paged) {
$current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
echo '<span class="current">&#8201;'.$current_page_text.'&#8201;</span>';
} else {
$page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']);
echo '<a href="'.clean_url(get_pagenum_link($i)).'" title="'.$page_text.'">&#8201;'.$page_text.'&#8201;</a>';
}
}
next_posts_link($pagenavi_options['next_text'], $max_page);
if ($end_page < $max_page) {
if(!empty($pagenavi_options['dotright_text'])) {
echo '<span class="extend">&#8201;'.$pagenavi_options['dotright_text'].'&#8201;</span>';
}
$last_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['last_text']);
echo '<a href="'.clean_url(get_pagenum_link($max_page)).'" title="'.$last_page_text.'">&#8201;'.$last_page_text.'&#8201;</a>';
}
break;
case 2;
echo '<form action="'.htmlspecialchars($_SERVER['PHP_SELF']).'" method="get">'."\n";
echo '<select size="1" onchange="document.location.href = this.options[this.selectedIndex].value;">'."\n";
for($i = 1; $i <= $max_page; $i++) {
$page_num = $i;
if($page_num == 1) {
$page_num = 0;
}
if($i == $paged) {
$current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
echo '<option value="'.clean_url(get_pagenum_link($page_num)).'" selected="selected" class="current">'.$current_page_text."</option>\n";
} else {
$page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']);
echo '<option value="'.clean_url(get_pagenum_link($page_num)).'">'.$page_text."</option>\n";
}
}
echo "</select>\n";
echo "</form>\n";
break;
}
echo '</div>'.$after."\n";
}
}
}
### Function: Page Navigation Options
add_action('activate_wp-pagenavi/wp-pagenavi.php', 'pagenavi_init');
function pagenavi_init() {
// Add Options
$pagenavi_options = array();
$pagenavi_options['pages_text'] = __('Page %CURRENT_PAGE% of %TOTAL_PAGES%','wp-pagenavi');
$pagenavi_options['current_text'] = '%PAGE_NUMBER%';
$pagenavi_options['page_text'] = '%PAGE_NUMBER%';
$pagenavi_options['first_text'] = __('&laquo; First','wp-pagenavi');
$pagenavi_options['last_text'] = __('Last &raquo;','wp-pagenavi');
$pagenavi_options['next_text'] = __('&raquo;','wp-pagenavi');
$pagenavi_options['prev_text'] = __('&laquo;','wp-pagenavi');
$pagenavi_options['dotright_text'] = __('...','wp-pagenavi');
$pagenavi_options['dotleft_text'] = __('...','wp-pagenavi');
$pagenavi_options['style'] = 1;
$pagenavi_options['num_pages'] = 5;
$pagenavi_options['always_show'] = 0;
add_option('pagenavi_options', $pagenavi_options, 'PageNavi Options');
}
?>

29
gecko_style.css Normal file
View File

@ -0,0 +1,29 @@
/* ComicPress Custom CSS over-rides for [ gecko ]: ComicPress - 2.8 */
html { overflow-y: scroll; }
a:focus { outline: 0; }
.comicarchiveframe {
-moz-opacity: 0.99; /* mozilla, netscape */
opacity:0.99; /* firefox, opera, safari, chrome */
}
.comicarchiveframe:hover {
-moz-opacity: 0.7; /* mozilla, netscape */
opacity:0.70; /* firefox, opera, safari, chrome */
}
.imagenav-link img {
-moz-opacity: 0.5; /* mozilla, netscape, gecko */
opacity:0.5; /* firefox, opera, safari, chrome */
}
.imagenav-link img:hover {
-moz-opacity: 0; /* mozilla, netscape */
opacity:0.5; /* firefox, opera, safari, chrome */
}
::-moz-selection {
background: #a1c0d9; /* Firefox */
}

54
header.php Normal file
View File

@ -0,0 +1,54 @@
<!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">
<title><?php
bloginfo('name');
if (is_home () ) {
echo " - "; bloginfo('description');
} elseif (is_category() ) {
echo " - "; single_cat_title();
} elseif (is_single() || is_page() ) {
echo " - "; single_post_title();
} elseif (is_search() ) {
echo " search results: "; echo wp_specialchars($s);
} else {
echo " - "; wp_title('',true);
}
?></title>
<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 rel="alternate" type="application/rss+xml" title="<?php bloginfo('name') ?> RSS2 Feed" href="<?php bloginfo('rss2_url') ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name') ?> Atom Feed" href="<?php bloginfo('atom_url') ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url') ?>" />
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/scroll.js"></script>
<meta name="ComicPress" content="<?php echo comicpress_current_theme_version(); ?>" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); global $disable_page_restraints; ?>
</head>
<body <?php if (function_exists('body_class')) { body_class(); } ?>>
<?php do_action('comicpress-header'); ?>
<?php get_sidebar('above'); ?>
<?php if ($disable_page_restraints != 'yes') {
if (is_cp_theme_style('standard,v')) { ?>
<div id="page"><!-- Defines entire site width - Ends in Footer -->
<?php } else { ?>
<div id="page-wide">
<?php }
} ?>
<div id="header">
<?php if (function_exists('the_project_wonderful_ad')) { ?>
<div class="headerpwad">
<?php the_project_wonderful_ad('header'); ?>
</div>
<?php } ?>
<h1><a href="<?php echo get_settings('home') ?>"><?php bloginfo('name') ?></a></h1>
<div class="description"><?php bloginfo('description') ?></div>
<?php get_sidebar('header'); ?>
<div class="clear"></div>
</div>
<?php get_sidebar('menubar'); ?>

13
ie_style.css Normal file
View File

@ -0,0 +1,13 @@
/* These overrides are for the IE browser, fixes and what not to make it work. */
html { overflow-y: scroll; }
#menubar {
zoom: 1; /* IE fix, allows for variable height menu */
}
tt a:hover
{
z-index:1000; color: #aaaaff;
background-color: Transparent;
}

96
image.php Normal file
View File

@ -0,0 +1,96 @@
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
<div class="post-page-head"></div>
<div class="post-page" id="post-<?php the_ID() ?>">
<h2 class="pagetitle">
<a href="<?php echo get_permalink($post->post_parent) ?>" rev="attachment"><?php echo get_the_title($post->post_parent) ?></a>
</h2>
<div class="gallery-image">
<a href="<?php echo wp_get_attachment_url($post->ID) ?>" target="_blank" title="Click for full size." ><img src="<?php echo wp_get_attachment_url($post->ID) ?>" alt="<?php the_title() ?>" /></a>
</div>
<div class="gallery-caption">
<?php the_excerpt() ?>
</div>
<div class="imagenav-wrap">
<div class="imagenav">
<div class="imagenav-bg">
<?php previous_image_link() ?>
</div>
<div class="imagenav-arrow">
&lsaquo;
</div>
<div class="imagenav-link">
<?php previous_image_link() ?>
</div>
</div>
<div class="imagenav-center">
<a href="<?php echo wp_get_attachment_url($post->ID) ?>" target="_blank" title="Click for full size." class="imagetitle"><?php the_title() ?></a><br />
<a href="<?php echo get_permalink($post->post_parent) ?>" rev="attachment">&larr; Back to Gallery</a>
</div>
<div class="imagenav">
<div class="imagenav-bg">
<?php next_image_link() ?>
</div>
<div class="imagenav-arrow">
&rsaquo;
</div>
<div class="imagenav-link">
<?php next_image_link() ?>
</div>
</div>
<div class="clear"></div>
</div>
<?php the_content() ?>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php endwhile; else: ?>
<div class="post-page-head"></div>
<div class="post-page">
<p>Sorry, no image matched your criteria.</p>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php endif; ?>
<div class="clear">
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

BIN
images/1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

BIN
images/2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

BIN
images/2a.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

BIN
images/3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

BIN
images/3a.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

BIN
images/4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

BIN
images/anomaly.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

BIN
images/bubble.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/bubble_filler.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 B

BIN
images/buynow_paypal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/buythis.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
images/calendar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/comicpress-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
images/data_rss.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

BIN
images/dropbar.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

BIN
images/dropbar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

BIN
images/gradient.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

BIN
images/header-blank.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

BIN
images/menubarbgdark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

BIN
images/nav/firstroll.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/nav/lastroll.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/nav/nextroll.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
images/nav/prevroll.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
images/nav/randomroll.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
images/options/3c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/options/blog.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
images/options/gn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
images/options/standard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/options/v.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/options/v3c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/paypal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/pingback.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

BIN
images/slid-paper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
images/trackback.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

119
index.php Normal file
View File

@ -0,0 +1,119 @@
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (!(is_paged())) { ?>
<?php if ($disable_comic_frontpage != 'yes') { ?>
<?php $wp_query ->in_the_loop = true; $comicFrontpage = new WP_Query(); $comicFrontpage->query('showposts=1&cat='.get_all_comic_categories_as_cat_string());
while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post() ?>
<div id="comic-head"><?php get_sidebar('over'); ?></div>
<div id="comic">
<div class="comic-left"><?php get_sidebar('comicleft'); ?></div>
<div class="comic-content">
<?php display_comic(); ?>
</div>
<div class="comic-right"><?php get_sidebar('comicright'); ?></div>
<div class="clear"></div>
</div>
<div id="comic-foot"><?php get_sidebar('under'); ?></div>
<?php endwhile; ?>
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if ($disable_comic_frontpage != 'yes' && $disable_comic_blog_frontpage != 'yes') {
while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post();
display_comic_post();
endwhile; ?>
<div id="blogheader"><!-- This area can be used for a heading above your main page blog posts --></div>
<?php }
if (function_exists('the_project_wonderful_ad')) { ?>
<div class="blogpwad">
<center>
<?php the_project_wonderful_ad('blog'); ?>
</center>
</div>
<?php } ?>
<?php get_sidebar('blog'); ?>
<?php } else { ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php }
}
if ($disable_blog_frontpage == 'no') {
if (have_posts()):
$blog_query = '&cat=-"'.exclude_comic_categories().'"&paged='.$paged;
$posts = query_posts($blog_query);
while (have_posts()) : the_post();
display_blog_post();
endwhile; ?>
<?php if(function_exists('wp_pagenavi')) { ?>
<div class="paginav">
<?php wp_pagenavi(); ?>
</div>
<?php } else { ?>
<div class="pagenav">
<div class="pagenav-right"><?php previous_posts_link('Newer Entries &uarr;') ?></div>
<div class="pagenav-left"><?php next_posts_link('&darr; Previous Entries') ?></div>
<div class="clear"></div>
</div>
<?php } ?>
<div class="clear"></div>
<?php endif; } ?>
<?php get_sidebar('underblog'); ?>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right'); ?>
<?php } ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

68
js/dropbar.js Normal file
View File

@ -0,0 +1,68 @@
var DropBarMover = new Object();
DropBarMover.isMouseOver = false;
DropBarMover.isFocus = false;
DropBarMover.timerID = null;
DropBarMover.DropBarInstance = null;
DropBarMover.mouseOver = function (e)
{
this.isMouseOver = true;
this.adjustDropBar();
}
DropBarMover.mouseOut = function (e)
{
this.isMouseOver = false;
this.adjustDropBar();
}
DropBarMover.focus = function (e)
{
this.isFocus = true;
this.adjustDropBar();
}
DropBarMover.blur = function (e)
{
this.isFocus = false;
this.adjustDropBar();
}
DropBarMover.adjustDropBar = function()
{
if ( this.timerID == null )
{
if ( !this.DropBarInstance )
this.DropBarInstance = document.getElementById('DropBar');
this.timerID = window.setInterval(function(){
var Location = DropBarMover.DropBarInstance.style.top;
Location = parseInt(Location.substr(0,Location.length-2));
if ( DropBarMover.isMouseOver || DropBarMover.isFocus )
{
if ( Location < 0 )
{
Location+=5;
DropBarMover.DropBarInstance.style.top = Location + 'px';
}
else
{
window.clearInterval(DropBarMover.timerID);
DropBarMover.timerID = null;
}
}
else
{
if ( Location > -100 )
{
Location-=5;
DropBarMover.DropBarInstance.style.top = Location + 'px';
}
else
{
window.clearInterval(DropBarMover.timerID);
DropBarMover.timerID = null;
}
}
}, 20);
}
}

15
js/equalheight.js Normal file
View File

@ -0,0 +1,15 @@
function equalHeight(group) {
tallest = 0;
group.each(function() {
thisHeight = $(this).height();
if (thisHeight > tallest) {
tallest = thisHeight;
}
});
group.height(tallest);
}
$(document).ready(function() {
equalHeight($(".sidebar"));
});

14
js/ie6submenus.js Normal file
View File

@ -0,0 +1,14 @@
//Suckerfish Dropdown for IE6
sfHover = function() {
var sfEls = document.getElementById("menu").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

11
js/jquery-1.2.6-packed.js Normal file

File diff suppressed because one or more lines are too long

28
js/scroll.js Normal file
View File

@ -0,0 +1,28 @@
// JavaScript Document
var up_timer
function getPosition(){
yoko = document.body.scrollLeft || document.documentElement.scrollLeft;
tate = document.body.scrollTop || document.documentElement.scrollTop;
}
function pageup(x,y){
if(up_timer) clearTimeout(up_timer);
if(y >= 1){
getPosition();
var divisionY = (tate-(tate/5));
var Y = Math.floor(divisionY);
window.scrollTo(yoko,Y);
up_timer = setTimeout("pageup("+yoko+","+Y+")",2);
}else{
window.scrollTo(yoko,0);
clearTimeout(up_timer);
}
}
function scrollup(){
getPosition();
pageup(yoko,tate)
}

62
links.php Normal file
View File

@ -0,0 +1,62 @@
<?php
/*
Template Name: Links
*/
?>
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php }
$bookmarks = wp_list_bookmarks('echo=0');
$bookmarks = preg_replace('#<li ([^>]*)>#', '<li>', $bookmarks);
$bookmarks = preg_replace('#<ul ([^>]*)>#', '<ul>', $bookmarks);
?>
<div class="post-page-head">
<?php while (have_posts()) : the_post() ?>
<div class="post-page">
<h2 class="pagetitle"><?php the_title() ?></h2>
<div id="linkspage">
<ul>
<?php echo $bookmarks; ?>
</ul>
</div>
<br class="clear-margins" />
</div>
<?php endwhile; ?>
<div class="post-page-foot"></div>
</div>
<div class="clear"></div>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

3
lynx_style.css Normal file
View File

@ -0,0 +1,3 @@
/* ComicPress Custom CSS over-rides for [ lynx ]: ComicPress - 2.8 */
html { overflow-y: scroll; }

42
notie_style.css Normal file
View File

@ -0,0 +1,42 @@
/* ComicPress Custom CSS over-rides for [ gecko ]: ComicPress - 2.8 */
html { overflow-y: scroll; }
.comicarchiveframe
{
-moz-opacity: 0.99; /* mozilla, netscape */
opacity:0.99; /* firefox, opera, safari, chrome */
-khtml-opacity: 0.99; /* khtml, old safari */
}
.comicarchiveframe:hover {
-moz-opacity: 0.7; /* mozilla, netscape */
opacity:0.70; /* firefox, opera, safari, chrome */
-khtml-opacity: 0.7; /* khtml, old safari */
}
.imagenav-link img {
-moz-opacity: 0.5; /* mozilla, netscape, gecko */
opacity:0.5; /* firefox, opera, safari, chrome */
-khtml-opacity: 0.5; /* khtml, old safari */
}
.imagenav-link img:hover {
-moz-opacity: 0; /* mozilla, netscape */
opacity:0.5; /* firefox, opera, safari, chrome */
-khtml-opacity: 0.5; /* khtml, old safari */
}
::-moz-selection {
background: #a1c0d9; /* Firefox */
}
textarea {
resize: none;
}
/* selection colors */
::selection {
background: #ffb7b7; /* Safari */
}

23
ns4_style.css Normal file
View File

@ -0,0 +1,23 @@
/* ComicPress Custom CSS over-rides for [ ns4 ]: ComicPress - 2.8 */
html { overflow-y: scroll; }
.comicarchiveframe {
-moz-opacity: 0.99; /* mozilla, netscape */
opacity:0.99; /* firefox, opera, safari, chrome */
}
.comicarchiveframe:hover {
-moz-opacity: 0.7; /* mozilla, netscape */
opacity:0.70; /* firefox, opera, safari, chrome */
}
.imagenav-link img {
-moz-opacity: 0.5; /* mozilla, netscape, gecko */
opacity:0.5; /* firefox, opera, safari, chrome */
}
.imagenav-link img:hover {
-moz-opacity: 0; /* mozilla, netscape */
opacity:0.5; /* firefox, opera, safari, chrome */
}

20
opera_style.css Normal file
View File

@ -0,0 +1,20 @@
/* ComicPress Custom CSS over-rides for [ opera ]: ComicPress - 2.8 */
html { overflow-y: scroll; }
.comicarchiveframe {
opacity:0.99; /* firefox, opera, safari, chrome */
}
.comicarchiveframe:hover {
opacity:0.70; /* firefox, opera, safari, chrome */
}
.imagenav-link img {
opacity:0.5; /* firefox, opera, safari, chrome */
}
.imagenav-link img:hover {
opacity:0.5; /* firefox, opera, safari, chrome */
}

55
page.php Normal file
View File

@ -0,0 +1,55 @@
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
<div class="post-page-head"></div>
<div class="post-page" id="post-<?php the_ID() ?>">
<h2 class="pagetitle"><?php the_title() ?></h2>
<div class="entry">
<?php the_content() ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')) ?>
</div>
<?php edit_post_link('Edit this page.', '<p>', '</p>') ?>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php if ('open' == $post->comment_status) {
comments_template('', true);
} ?>
<?php endwhile; endif; ?>
<div class="clear"></div>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

34
safari_style.css Normal file
View File

@ -0,0 +1,34 @@
/* ComicPress Custom CSS over-rides for [ safari ]: ComicPress - 2.8 */
html { overflow-y: scroll; }
.comicarchiveframe {
-khtml-opacity: 0.99; /* khtml, old safari */
}
.comicarchiveframe:hover {
opacity:0.70; /* firefox, opera, safari, chrome */
-khtml-opacity: 0.7; /* khtml, old safari */
}
.imagenav-link img {
opacity:0.5; /* firefox, opera, safari, chrome */
-khtml-opacity: 0.5; /* khtml, old safari */
}
.imagenav-link img:hover {
opacity:0.5; /* firefox, opera, safari, chrome */
-khtml-opacity: 0.5; /* khtml, old safari */
}
/* Supports: car, both, horizontal, none, vertical */
textarea {
resize: none;
}
/* selection colors */
::selection {
background: #ffb7b7; /* Safari */
}

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

135
search-transcript.php Normal file
View File

@ -0,0 +1,135 @@
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="post-page-head"></div>
<div class="post-page">
<?php
$tmp_search = new WP_Query('s=' . wp_specialchars($_GET['s']) . '&show_posts=-1&posts_per_page=-1');
$count = $tmp_search->post_count;
if (!$count) $count = "no";
?>
<div class="searchresults">Found <?php echo $count; ?> result<?php if ($count !== 1) { echo "s"; } ?>.</div>
<h2 class="pagetitle">Transcript search for &lsquo;<?php the_search_query() ?>&rsquo;</h2>
<?php if (have_posts()) : ?>
<?php $posts = query_posts($query_string.'&order=asc');
while (have_posts()) : the_post() ?>
<?php if (in_comic_category()) { ?>
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="post-info">
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small> - By <?php the_author(); ?> on <?php the_time('F jS, Y'); ?></small><br />
</div>
<div class="clear"></div>
</div>
<div class="post-extras">
<div class="tags">
<?php the_tags('&#9492; Tags: ',', ','<br />'); ?> Posted in: <?php the_category(','); ?>
</div>
<div class="clear"></div>
</div>
<div class="comicarchiveframe" style="width:<?php echo $archive_comic_width; ?>px;">
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="Click for full size." width="<?php echo $archive_comic_width ?>" /></a><br />
</div>
<br class="clear-margins" />
</div>
<div class="post-comic-foot"></div>
<?php } else { ?>
<div class="post-head"></div>
<div class="post">
<div class="post-info">
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small> - By <?php the_author(); ?> on <?php the_time('F jS, Y'); ?></small><br />
</div>
<div class="clear"></div>
</div>
<div class="post-extras">
<div class="tags">
<?php the_tags('&#9492; Tags: ',', ','<br />'); ?> Posted in: <?php the_category(','); ?>
</div>
<div class="clear"></div>
</div>
<?php the_excerpt() ?>
<br class="clear-margins" />
</div>
<div class="post-foot"></div>
<?php } ?>
<?php endwhile; ?>
<?php else : ?>
<div class="post-page-head"></div>
<div class="post-page">
<h3>No transcripts found.</h3>
<p>Try another search?</p>
<p><?php include(get_template_directory() . '/searchform-transcript.php') ?></p>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php endif; ?>
<?php if(function_exists('wp_pagenavi')) { ?>
<div class="paginav">
<?php wp_pagenavi(); ?>
</div>
<?php } else { ?>
<div class="pagenav">
<div class="pagenav-right"><?php previous_posts_link('Newer Entries &uarr;') ?></div>
<div class="pagenav-left"><?php next_posts_link('&darr; Previous Entries') ?></div>
<div class="clear"></div>
</div>
<?php } ?>
<div class="clear"></div>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

137
search.php Normal file
View File

@ -0,0 +1,137 @@
<?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right">
<?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper">
<?php } ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="post-page-head"></div>
<div class="post-page">
<?php
// $tmp_search = new WP_Query('s=' . wp_specialchars($_GET['s']) . '&show_posts=-1&posts_per_page=-1');
// $count = $tmp_search->post_count;
// if (!$count) $count = "no";
?>
<div class="searchresults">Found <?php echo $count; ?> result<?php if ($count !== 1) { echo "s"; } ?>.</div>
<h2 class="pagetitle">Search for &lsquo;<?php the_search_query() ?>&rsquo;</h2>
<?php if (have_posts()) : ?>
<?php $posts = query_posts($query_string.'&order=asc');
while (have_posts()) : the_post() ?>
<?php global $archive_comic_width; if (in_comic_category()) { ?>
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="post-info">
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small> - By <?php the_author(); ?> on <?php the_time('F jS, Y'); ?></small><br />
</div>
<div class="clear"></div>
</div>
<div class="post-extras">
<div class="tags">
<?php the_tags('&#9492; Tags: ',', ','<br />'); ?> Posted in: <?php the_category(','); ?>
</div>
<div class="clear"></div>
</div>
<div class="comicarchiveframe" style="width:<?php echo $archive_comic_width; ?>px;">
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="Click for full size." width="<?php echo $archive_comic_width ?>" /></a><br />
</div>
<br class="clear-margins" />
</div>
<div class="post-comic-foot"></div>
<?php } else { ?>
<div class="post-head"></div>
<div class="post">
<div class="post-info">
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<div class="post-text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small> - By <?php the_author(); ?> on <?php the_time('F jS, Y'); ?></small><br />
</div>
<div class="clear"></div>
</div>
<div class="post-extras">
<div class="tags">
<?php the_tags('&#9492; Tags: ',', ','<br />'); ?> Posted in: <?php the_category(','); ?>
</div>
<div class="clear"></div>
</div>
<?php the_excerpt() ?>
<br class="clear-margins" />
</div>
<div class="post-foot"></div>
<?php } ?>
<?php endwhile; ?>
<?php else : ?>
<div class="post-page-head"></div>
<div class="post-page">
<h3>No entries found.</h3>
<p>Try another search?</p>
<p><?php include (get_template_directory() . '/searchform.php') ?></p>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php endif; ?>
</div>
<div class="post-page-foot"></div>
<?php if(function_exists('wp_pagenavi')) { ?>
<div class="paginav">
<?php wp_pagenavi(); ?>
</div>
<?php } else { ?>
<div class="pagenav">
<div class="pagenav-right"><?php previous_posts_link('Newer Entries &uarr;') ?></div>
<div class="pagenav-left"><?php next_posts_link('&darr; Previous Entries') ?></div>
<div class="clear"></div>
</div>
<?php } ?>
<div class="clear"></div>
</div>
</div>
<?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right');
} ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?>
<?php get_footer() ?>

View File

@ -0,0 +1,6 @@
<form method="get" id="searchform-transcript" action="<?php bloginfo('url'); ?>/">
<div>
<input type="text" value="Search Transcripts..." name="s" id="s-transcript" onfocus="this.value=(this.value=='Search Transcripts...') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'Search Transcripts...' : this.value;" /><input type="hidden" name="key" value="transcript" />
<button type="submit" class="button">&#9658;</button>
</div>
</form>

6
searchform.php Normal file
View File

@ -0,0 +1,6 @@
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
<div>
<input type="text" value="Search Site..." name="s" id="s-search" onfocus="this.value=(this.value=='Search Site...') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'Search Site...' : this.value;" />
<button type="submit" class="button">&#9658;</button>
</div>
</form>

7
sidebar-above.php Normal file
View File

@ -0,0 +1,7 @@
<?php if (comicpress_is_active_sidebar('Above Header')) { ?>
<div id="sidebar-aboveheader">
<div class="customsidebar <?php global $enable_if_widgetarea_use_sidebar_css; if ($enable_widgetarea_use_sidebar_css == 'yes') { ?> sidebar<?php } ?>">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Above Header') ) : ?><?php endif; ?>
</div>
</div>
<?php } ?>

Some files were not shown because too many files have changed in this diff Show More