commiting 2.8.0.4

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-08-21 12:29:45 -07:00
parent 87bd6a2f55
commit ddfac19be2
77 changed files with 8133 additions and 8133 deletions

92
404.php
View File

@ -1,47 +1,47 @@
<?php get_header(); ?> <?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?> <?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?> <?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('gn')) { ?> <?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right"> <div id="pagewrap-right">
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?> <?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper"> <div id="content-wrapper">
<?php } ?> <?php } ?>
<?php get_sidebar('overblog'); ?> <?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?> <?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?> <?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<div class="post-page-head"></div> <div class="post-page-head"></div>
<div class="post-page"> <div class="post-page">
<h2 class="pagetitle">Page Not Found</h2> <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><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> <p><?php include (get_template_directory() . '/searchform.php') ?></p>
<br class="clear-margins" /> <br class="clear-margins" />
</div> </div>
<div class="post-page-foot"></div> <div class="post-page-foot"></div>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<?php <?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) { if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right'); ?> get_sidebar('right'); ?>
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?> <?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div> <div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper --> </div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?> <?php } ?>
<?php get_footer() ?> <?php get_footer() ?>

View File

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

View File

@ -1,82 +1,82 @@
<?php <?php
/* /*
Template Name: Blog Year Archive Template Name: Blog Year Archive
*/ */
?> ?>
<?php get_header(); ?> <?php get_header(); ?>
<?php <?php
if (isset($_GET['archive_year'])) { if (isset($_GET['archive_year'])) {
$archive_year = (int)$_GET['archive_year']; $archive_year = (int)$_GET['archive_year'];
} else { } else {
$latest_comic = get_terminal_post_in_category(get_all_comic_categories_as_cat_string(),false); $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); $archive_year = get_post_time('Y', false, $latest_comic, true);
if (empty($archive_year)) $archive_year = date('Y'); 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('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?> <?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('gn')) { ?> <?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right"> <div id="pagewrap-right">
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?> <?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper"> <div id="content-wrapper">
<?php } ?> <?php } ?>
<?php get_sidebar('overblog'); ?> <?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?> <?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?> <?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<div class="post-page-head"></div> <div class="post-page-head"></div>
<div class="post-page"> <div class="post-page">
<?php while (have_posts()) : the_post() ?> <?php while (have_posts()) : the_post() ?>
<div class="entry"> <div class="entry">
<h2 class="pagetitle"><?php the_title() ?></h2> <h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?> <?php the_content(); ?>
</div> </div>
<?php endwhile; ?> <?php endwhile; ?>
<div class="archive-yearlist">| <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"); <?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 ) { foreach ( $years as $year ) {
if ($year != (0) ) { ?> if ($year != (0) ) { ?>
<a href="<?php echo add_query_arg('archive_year', $year) ?>"><strong><?php echo $year ?></strong></a> | <a href="<?php echo add_query_arg('archive_year', $year) ?>"><strong><?php echo $year ?></strong></a> |
<?php } } ?> <?php } } ?>
</div> </div>
<table class="month-table"> <table class="month-table">
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat=-'.exclude_comic_categories().'&year='.$archive_year); <?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat=-'.exclude_comic_categories().'&year='.$archive_year);
while ($comicArchive->have_posts()) : $comicArchive->the_post() ?> 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> <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; ?> <?php endwhile; ?>
</table> </table>
<br class="clear-margins" /> <br class="clear-margins" />
</div> </div>
<div class="post-page-foot"></div> <div class="post-page-foot"></div>
</div> </div>
</div> </div>
<?php <?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) { if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right'); get_sidebar('right');
} ?> } ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?> <?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div> <div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper --> </div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?> <?php } ?>
<?php get_footer() ?> <?php get_footer() ?>

View File

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

View File

@ -1,105 +1,105 @@
<?php <?php
/* /*
Template Name: Comic Storyline with Thumbs Template Name: Comic Storyline with Thumbs
*/ */
?> ?>
<?php get_header(); ?> <?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?> <?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?> <?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('gn')) { ?> <?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right"> <div id="pagewrap-right">
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?> <?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper"> <div id="content-wrapper">
<?php } ?> <?php } ?>
<?php get_sidebar('overblog'); ?> <?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?> <?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?> <?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<div class="post-page-head"></div> <div class="post-page-head"></div>
<div class="post-page"> <div class="post-page">
<?php while (have_posts()) : the_post() ?> <?php while (have_posts()) : the_post() ?>
<div class="entry"> <div class="entry">
<h2 class="pagetitle"><?php the_title() ?></h2> <h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?> <?php the_content(); ?>
</div> </div>
<?php endwhile; ?> <?php endwhile; ?>
<ul id="storyline" class="level-0"> <ul id="storyline" class="level-0">
<?php if (get_option('comicpress-enable-storyline-support') == 1) { <?php if (get_option('comicpress-enable-storyline-support') == 1) {
if (($result = get_option("comicpress-storyline-category-order")) !== false) { if (($result = get_option("comicpress-storyline-category-order")) !== false) {
$categories_by_id = get_all_category_objects_by_id(); $categories_by_id = get_all_category_objects_by_id();
$current_depth = 0; $current_depth = 0;
$storyline_root = " class=\"storyline-root\""; $storyline_root = " class=\"storyline-root\"";
foreach (explode(",", $result) as $node) { foreach (explode(",", $result) as $node) {
$parts = explode("/", $node); $parts = explode("/", $node);
$target_depth = count($parts) - 2; $target_depth = count($parts) - 2;
$category_id = end($parts); $category_id = end($parts);
$category = $categories_by_id[$category_id]; $category = $categories_by_id[$category_id];
$description = $category->description; $description = $category->description;
$first_comic_in_category = get_terminal_post_in_category($category_id); $first_comic_in_category = get_terminal_post_in_category($category_id);
$first_comic_permalink = get_permalink($first_comic_in_category->ID); $first_comic_permalink = get_permalink($first_comic_in_category->ID);
$archive_image = null; $archive_image = null;
foreach (array("archive", "rss", "comic") as $type) { foreach (array("archive", "rss", "comic") as $type) {
if (($requested_archive_image = get_comic_url("archive", $first_comic_in_category)) !== false) { if (($requested_archive_image = get_comic_url("archive", $first_comic_in_category)) !== false) {
$archive_image = $requested_archive_image; break; $archive_image = $requested_archive_image; break;
} }
} }
if ($target_depth < $current_depth) { if ($target_depth < $current_depth) {
echo str_repeat("</ul></li>", ($current_depth - $target_depth)); echo str_repeat("</ul></li>", ($current_depth - $target_depth));
} }
if ($target_depth > $current_depth) { if ($target_depth > $current_depth) {
for ($i = $current_depth; $i < $target_depth; ++$i) { for ($i = $current_depth; $i < $target_depth; ++$i) {
$next_i = $i + 1; $next_i = $i + 1;
echo "<li><ul class=\"level-${next_i}\">"; echo "<li><ul class=\"level-${next_i}\">";
} }
} ?> } ?>
<li id="storyline-<?php echo $category->category_nicename ?>"<?php echo $storyline_root; $storyline_root = null ?>> <li id="storyline-<?php echo $category->category_nicename ?>"<?php echo $storyline_root; $storyline_root = null ?>>
<?php if (!empty($first_comic_in_category)) { ?> <?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> <a href="<?php echo $first_comic_permalink ?>" title="First comic in <?php echo $category->cat_name ?>."><img src="<?php echo $archive_image ?>" /></a>
<?php } ?> <?php } ?>
<a href="<?php echo get_category_link($category_id) ?>" class="storyline-title"><?php echo $category->cat_name ?></a> <a href="<?php echo get_category_link($category_id) ?>" class="storyline-title"><?php echo $category->cat_name ?></a>
<?php if (!empty($description)) { ?> <?php if (!empty($description)) { ?>
<div class="storyline-description"><?php echo $description ?></div> <div class="storyline-description"><?php echo $description ?></div>
<?php } ?> <?php } ?>
<div class="storyline-foot"></div> <div class="storyline-foot"></div>
</li> </li>
<?php $current_depth = $target_depth; <?php $current_depth = $target_depth;
} }
if ($current_depth > 0) { if ($current_depth > 0) {
echo str_repeat("</ul></li>", $current_depth); echo str_repeat("</ul></li>", $current_depth);
} }
} }
} else { ?> } 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> <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 } ?> <?php } ?>
</ul> </ul>
<br class="clear-margins" /> <br class="clear-margins" />
</div> </div>
<div class="post-page-foot"></div> <div class="post-page-foot"></div>
</div> </div>
</div> </div>
<?php <?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) { if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right'); get_sidebar('right');
} ?> } ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?> <?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div> <div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper --> </div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?> <?php } ?>
<?php get_footer() ?> <?php get_footer() ?>

View File

@ -1,107 +1,107 @@
<?php <?php
/* /*
Template Name: Comic Storyline Archive Template Name: Comic Storyline Archive
*/ */
?> ?>
<?php get_header(); ?> <?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?> <?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?> <?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('gn')) { ?> <?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right"> <div id="pagewrap-right">
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?> <?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper"> <div id="content-wrapper">
<?php } ?> <?php } ?>
<?php get_sidebar('overblog'); ?> <?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?> <?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?> <?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<div class="post-page-head"></div> <div class="post-page-head"></div>
<div class="post-page"> <div class="post-page">
<?php while (have_posts()) : the_post() ?> <?php while (have_posts()) : the_post() ?>
<div class="entry"> <div class="entry">
<h2 class="pagetitle"><?php the_title() ?></h2> <h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?> <?php the_content(); ?>
</div> </div>
<?php endwhile; ?> <?php endwhile; ?>
<ul id="storyline" class="level-0"> <ul id="storyline" class="level-0">
<?php if (get_option('comicpress-enable-storyline-support') == 1) { <?php if (get_option('comicpress-enable-storyline-support') == 1) {
if (($result = get_option("comicpress-storyline-category-order")) !== false) { if (($result = get_option("comicpress-storyline-category-order")) !== false) {
$categories_by_id = get_all_category_objects_by_id(); $categories_by_id = get_all_category_objects_by_id();
$current_depth = 0; $current_depth = 0;
$storyline_root = " class=\"storyline-root\""; $storyline_root = " class=\"storyline-root\"";
foreach (explode(",", $result) as $node) { foreach (explode(",", $result) as $node) {
$parts = explode("/", $node); $parts = explode("/", $node);
$target_depth = count($parts) - 2; $target_depth = count($parts) - 2;
$category_id = end($parts); $category_id = end($parts);
$category = $categories_by_id[$category_id]; $category = $categories_by_id[$category_id];
$description = $category->description; $description = $category->description;
$first_comic_in_category = get_terminal_post_in_category($category_id); $first_comic_in_category = get_terminal_post_in_category($category_id);
$first_comic_permalink = get_permalink($first_comic_in_category->ID); $first_comic_permalink = get_permalink($first_comic_in_category->ID);
$archive_image = null; $archive_image = null;
foreach (array("archive", "rss", "comic") as $type) { foreach (array("archive", "rss", "comic") as $type) {
if (($requested_archive_image = get_comic_url("archive", $first_comic_in_category)) !== false) { if (($requested_archive_image = get_comic_url("archive", $first_comic_in_category)) !== false) {
$archive_image = $requested_archive_image; break; $archive_image = $requested_archive_image; break;
} }
} }
if ($target_depth < $current_depth) { if ($target_depth < $current_depth) {
echo str_repeat("</ul></li>", ($current_depth - $target_depth)); echo str_repeat("</ul></li>", ($current_depth - $target_depth));
} }
if ($target_depth > $current_depth) { if ($target_depth > $current_depth) {
for ($i = $current_depth; $i < $target_depth; ++$i) { for ($i = $current_depth; $i < $target_depth; ++$i) {
$next_i = $i + 1; $next_i = $i + 1;
echo "<li><ul class=\"level-${next_i}\">"; echo "<li><ul class=\"level-${next_i}\">";
} }
} ?> } ?>
<li id="storyline-<?php echo $category->category_nicename ?>"<?php echo $storyline_root; $storyline_root = null ?>> <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> <a href="<?php echo get_category_link($category_id) ?>" class="storyline-title"><?php echo $category->cat_name ?></a>
<div class="storyline-description"> <div class="storyline-description">
<?php if (!empty($description)) { ?> <?php if (!empty($description)) { ?>
<?php echo $description ?> <?php echo $description ?>
<?php } ?> <?php } ?>
<?php if (!empty($first_comic_in_category)) { ?> <?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;. Begins with &ldquo;<a href="<?php echo $first_comic_permalink ?>"><?php echo $first_comic_in_category->post_title ?></a>&rdquo;.
<?php } ?> <?php } ?>
</div> </div>
<div class="storyline-foot"></div> <div class="storyline-foot"></div>
</li> </li>
<?php $current_depth = $target_depth; <?php $current_depth = $target_depth;
} }
if ($current_depth > 0) { if ($current_depth > 0) {
echo str_repeat("</ul></li>", $current_depth); echo str_repeat("</ul></li>", $current_depth);
} }
} }
} else { ?> } 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> <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 } ?> <?php } ?>
</ul> </ul>
<br class="clear-margins" /> <br class="clear-margins" />
</div> </div>
<div class="post-page-foot"></div> <div class="post-page-foot"></div>
</div> </div>
</div> </div>
<?php <?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) { if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right'); get_sidebar('right');
} ?> } ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?> <?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div> <div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper --> </div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?> <?php } ?>
<?php get_footer() ?> <?php get_footer() ?>

View File

@ -1,82 +1,82 @@
<?php <?php
/* /*
Template Name: Comic Year Archive Template Name: Comic Year Archive
*/ */
?> ?>
<?php get_header(); ?> <?php get_header(); ?>
<?php <?php
if (isset($_GET['archive_year'])) { if (isset($_GET['archive_year'])) {
$archive_year = (int)$_GET['archive_year']; $archive_year = (int)$_GET['archive_year'];
} else { } else {
$latest_comic = get_terminal_post_in_category(get_all_comic_categories_as_cat_string(),false); $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); $archive_year = get_post_time('Y', false, $latest_comic, true);
if (empty($archive_year)) $archive_year = date('Y'); 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('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?> <?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('gn')) { ?> <?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right"> <div id="pagewrap-right">
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('3c,standard')) { ?> <?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper"> <div id="content-wrapper">
<?php } ?> <?php } ?>
<?php get_sidebar('overblog'); ?> <?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?> <?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?> <?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<div class="post-page-head"></div> <div class="post-page-head"></div>
<div class="post-page"> <div class="post-page">
<?php while (have_posts()) : the_post() ?> <?php while (have_posts()) : the_post() ?>
<div class="entry"> <div class="entry">
<h2 class="pagetitle"><?php the_title() ?></h2> <h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?> <?php the_content(); ?>
</div> </div>
<?php endwhile; ?> <?php endwhile; ?>
<div class="archive-yearlist">| <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"); <?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 ) { foreach ( $years as $year ) {
if ($year != (0) ) { ?> if ($year != (0) ) { ?>
<a href="<?php echo add_query_arg('archive_year', $year) ?>"><strong><?php echo $year ?></strong></a> | <a href="<?php echo add_query_arg('archive_year', $year) ?>"><strong><?php echo $year ?></strong></a> |
<?php } } ?> <?php } } ?>
</div> </div>
<table class="month-table"> <table class="month-table">
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$archive_year); <?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() ?> 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> <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; ?> <?php endwhile; ?>
</table> </table>
<br class="clear-margins" /> <br class="clear-margins" />
</div> </div>
<div class="post-page-foot"></div> <div class="post-page-foot"></div>
</div> </div>
</div> </div>
<?php <?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) { if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right'); get_sidebar('right');
} ?> } ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?> <?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div> <div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper --> </div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?> <?php } ?>
<?php get_footer() ?> <?php get_footer() ?>

View File

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

View File

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

View File

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

View File

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

140
blog.php
View File

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

View File

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

View File

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

View File

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

View File

@ -1,481 +1,481 @@
<?php <?php
include(get_template_directory() . '/comicpress-options-config.php'); include(get_template_directory() . '/comicpress-options-config.php');
function comicpress_options() { function comicpress_options() {
add_submenu_page('themes.php','comicpress', 'ComicPress Options', 10, 'comicpress-options', 'comicpress_admin'); add_submenu_page('themes.php','comicpress', 'ComicPress Options', 10, 'comicpress-options', 'comicpress_admin');
} }
function comicpress_admin() { function comicpress_admin() {
global $options, $upload_path, $blogcat; global $options, $upload_path, $blogcat;
?> ?>
<div class="wrap"> <div class="wrap">
<h2 class="alignleft">ComicPress Options</h2> <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> <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" /> <br clear="all" />
<?php <?php
if ( wp_verify_nonce($_POST['_wpnonce'], 'update-options') ) { if ( wp_verify_nonce($_POST['_wpnonce'], 'update-options') ) {
if ('comicpress_save'== $_REQUEST['action']) { if ('comicpress_save'== $_REQUEST['action']) {
foreach ($options as $value) { foreach ($options as $value) {
if( !isset( $_REQUEST[ $value['id'] ] ) ) { } else { update_option( $value['id'], stripslashes($_REQUEST[ $value['id']])); } } ?> 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> <div class="updated fade"><p><strong>Options/Settings SAVED!</strong></p></div>
<?php } <?php }
if ('comicpress_reset' == $_REQUEST['action'] ) { if ('comicpress_reset' == $_REQUEST['action'] ) {
foreach ($options as $default) { foreach ($options as $default) {
delete_option($default['id'],$default['default']); delete_option($default['id'],$default['default']);
} ?> } ?>
<div class="updated fade"><p><strong>Options/Settings RESET!</strong></p></div> <div class="updated fade"><p><strong>Options/Settings RESET!</strong></p></div>
<?php <?php
} }
} }
// set default options // set default options
foreach ($options as $default) { foreach ($options as $default) {
if(get_option($default['id'])=="") { if(get_option($default['id'])=="") {
update_option($default['id'],$default['default']); update_option($default['id'],$default['default']);
} }
} }
include(get_template_directory() . '/comicpress-config.php'); include(get_template_directory() . '/comicpress-config.php');
?> ?>
<div id="poststuff" class="metabox-holder"> <div id="poststuff" class="metabox-holder">
<script language="javascript"> <script language="javascript">
function showimage(sel,pic) function showimage(sel,pic)
{ {
if (!document.images) if (!document.images)
return return
document.getElementById(pic).src = '<?php echo get_bloginfo('stylesheet_directory'); ?>/images/options/'+sel.options[sel.selectedIndex].value+'.png' document.getElementById(pic).src = '<?php echo get_bloginfo('stylesheet_directory'); ?>/images/options/'+sel.options[sel.selectedIndex].value+'.png'
} }
</script> </script>
<div class="stuffbox"> <div class="stuffbox">
<h3><label for="link_url">Theme Style</label></h3> <h3><label for="link_url">Theme Style</label></h3>
<div class="inside"> <div class="inside">
<form method="post" id="myForm" name="template" enctype="multipart/form-data"> <form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?> <?php wp_nonce_field('update-options') ?>
<table class="form-table" style="width: auto"> <table class="form-table" style="width: auto">
<?php <?php
foreach ($options as $value) { foreach ($options as $value) {
switch ( $value['type'] ) { switch ( $value['type'] ) {
case "comicpress-cp_theme_style": ?> case "comicpress-cp_theme_style": ?>
<tr> <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> <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"> <td valign="top">
<label> <label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" class="code" onchange="showimage(this,'cpthemestyle')"> <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="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="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="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="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> <option class="level-0" value="v3c" <?php if (get_option($value['id'])=='v3c') {?>selected="selected" <?php } ?>>V3C</option>
</select> </select>
</label> </label>
</td> </td>
<td valign="top"> <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" /> <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>
<td valign="bottom" colspan="2"> <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> <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 <a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10" src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a> alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer"> <a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px" <img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss" src="http://jigsaw.w3.org/css-validator/images/vcss"
alt="Valid CSS!" /> alt="Valid CSS!" />
</a> </a>
</td> </td>
</tr> </tr>
<?php break; <?php break;
} }
} }
?> ?>
</table> </table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Style" /> <input name="comicpress_save" type="submit" class="button-primary" value="Save Style" />
<input type="hidden" name="action" value="comicpress_save" /> <input type="hidden" name="action" value="comicpress_save" />
</form> </form>
</div> </div>
</div> </div>
<form method="post" id="myForm" name="template" enctype="multipart/form-data"> <form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options') ?> <?php wp_nonce_field('update-options') ?>
<div class="stuffbox"> <div class="stuffbox">
<h3><label for="link_url">Settings - Extras / Addons</label></h3> <h3><label for="link_url">Settings - Extras / Addons</label></h3>
<div class="inside"> <div class="inside">
<table class="form-table" style="width: auto"> <table class="form-table" style="width: auto">
<?php <?php
foreach ($options as $value) { foreach ($options as $value) {
switch ( $value['type'] ) { switch ( $value['type'] ) {
case "comicpress-disable_comic_frontpage": ?> case "comicpress-disable_comic_frontpage": ?>
<tr> <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> <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"> <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> <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; &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 /> <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>
<td valign="top" width="400"> <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. 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. Turning this off and using the GN style turns ComicPress into a Blog.
</td> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-disable_comic_blog_frontpage": ?> case "comicpress-disable_comic_blog_frontpage": ?>
<tr> <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> <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"> <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> <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; &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 /> <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>
</tr> </tr>
<?php break; <?php break;
case "comicpress-disable_blog_frontpage": ?> case "comicpress-disable_blog_frontpage": ?>
<tr> <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> <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"> <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> <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; &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 /> <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>
</tr> </tr>
<?php break; <?php break;
case "comicpress-disable_extended_comments": ?> case "comicpress-disable_extended_comments": ?>
<tr> <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> <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"> <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> <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; &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 /> <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>
</tr> </tr>
<?php break; <?php break;
case "comicpress-transcript_in_posts": ?> case "comicpress-transcript_in_posts": ?>
<tr> <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> <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"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-disable_showing_comic_post_area": ?> case "comicpress-disable_showing_comic_post_area": ?>
<tr> <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> <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"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-contact_in_menubar": ?> case "comicpress-contact_in_menubar": ?>
<tr> <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> <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"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-enable_widgetarea_use_sidebar_css": ?> case "comicpress-enable_widgetarea_use_sidebar_css": ?>
<tr> <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> <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"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-enable_custom_image_header": ?> case "comicpress-enable_custom_image_header": ?>
<tr> <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> <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"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-enable_numbered_pagination": ?> case "comicpress-enable_numbered_pagination": ?>
<tr> <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> <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"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-disable_page_restraints": ?> case "comicpress-disable_page_restraints": ?>
<tr> <tr>
<th scope="row"><strong>Disable the #page / #page-wide restraints?</strong><br /> <th scope="row"><strong>Disable the #page / #page-wide restraints?</strong><br />
<br /> <br />
Turning this option to Yes will make it so that the divs for #page and #page-wide will not load.<br /> Turning this option to Yes will make it so that the divs for #page and #page-wide will not load.<br />
<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> 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"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-enable_dropdown_sidebar": ?> case "comicpress-enable_dropdown_sidebar": ?>
<tr> <tr>
<th scope="row"><strong>Enable the Dropbar Widget area?</strong><br /></th> <th scope="row"><strong>Enable the Dropbar Widget area?</strong><br /></th>
<br /> <br />
To enable the drop down widget area choose [yes] here.<br /> To enable the drop down widget area choose [yes] here.<br />
<td valign="top"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-enable_related_comics": ?> case "comicpress-enable_related_comics": ?>
<tr> <tr>
<th scope="row"><strong>Put Related Comics in comic posts?</strong><br /></th> <th scope="row"><strong>Put Related Comics in comic posts?</strong><br /></th>
<td valign="top"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-enable_related_posts": ?> case "comicpress-enable_related_posts": ?>
<tr> <tr>
<th scope="row"><strong>Put Related Posts in blog posts?</strong><br /><br /></th> <th scope="row"><strong>Put Related Posts in blog posts?</strong><br /><br /></th>
<td valign="top"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-comic_clicks_next": ?> case "comicpress-comic_clicks_next": ?>
<tr> <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> <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"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-anomaly_says": ?> case "comicpress-anomaly_says": ?>
<tr> <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> <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"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-disable_css_style_editor": ?> case "comicpress-disable_css_style_editor": ?>
<tr> <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> <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"> <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> <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; &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> <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> </td>
</tr> </tr>
<?php break; <?php break;
} }
} }
?> ?>
</table> </table>
</div> </div>
</div> </div>
<div class="stuffbox"> <div class="stuffbox">
<h3><label for="link_url">Settings - Custom Header</label></h3> <h3><label for="link_url">Settings - Custom Header</label></h3>
<div class="inside"> <div class="inside">
<table class="form-table" style="width: auto"> <table class="form-table" style="width: auto">
<?php <?php
foreach ($options as $value) { foreach ($options as $value) {
switch ( $value['type'] ) { switch ( $value['type'] ) {
case "comicpress-custom_image_header_height": ?> case "comicpress-custom_image_header_height": ?>
<tr> <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> <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"> <td valign="top">
<label> <label>
<input type="text" size="5" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br /> <input type="text" size="5" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br />
</label> </label>
</td> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-custom_image_header_width": ?> case "comicpress-custom_image_header_width": ?>
<tr> <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> <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"> <td valign="top">
<label> <label>
<input type="text" size="5" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br /> <input type="text" size="5" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br />
</label> </label>
</td> </td>
<td valign="top" rowspawn="5"> <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. 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> </td>
</tr> </tr>
<?php break; <?php break;
} }
} }
?> ?>
</table> </table>
</div> </div>
</div> </div>
<div class="stuffbox"> <div class="stuffbox">
<h3><label for="link_url">Settings - Buy Print</label></h3> <h3><label for="link_url">Settings - Buy Print</label></h3>
<div class="inside"> <div class="inside">
<table class="form-table" style="width: auto"> <table class="form-table" style="width: auto">
<?php <?php
foreach ($options as $value) { foreach ($options as $value) {
switch ( $value['type'] ) { switch ( $value['type'] ) {
case "comicpress-buy_print_email": ?> case "comicpress-buy_print_email": ?>
<tr> <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> <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"> <td valign="top">
<label> <label>
<input type="text" size="45" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br /> <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> <span style="color: #ff0000;">* This must be correct, you don't want other people getting your money.</span>
</label> </label>
</td> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-buy_print_url": ?> case "comicpress-buy_print_url": ?>
<tr> <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> <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"> <td valign="top">
<label> <label>
<input type="text" size="45" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /><br /> <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 /> <span style="color: #ff0000;">* This must be correct, the form needs some place to go.</span><br />
<b>Examples</b>:<br /> <b>Examples</b>:<br />
http://yourdomain.com/?p=233<br /> http://yourdomain.com/?p=233<br />
http://yourdomain.com/shop/<br /> http://yourdomain.com/shop/<br />
/?p=233<br /> /?p=233<br />
/shop/<br /> /shop/<br />
</label> </label>
</td> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-buy_print_us_amount": ?> case "comicpress-buy_print_us_amount": ?>
<tr> <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> <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"> <td valign="top">
<label> <label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /> <input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label> </label>
</td> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-buy_print_us_ship": ?> case "comicpress-buy_print_us_ship": ?>
<tr> <tr>
<th scope="row"><b>Shipping Cost (US/Canada)</b><br /><br /></th> <th scope="row"><b>Shipping Cost (US/Canada)</b><br /><br /></th>
<td valign="top"> <td valign="top">
<label> <label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /> <input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label> </label>
</td> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-buy_print_int_amount": ?> case "comicpress-buy_print_int_amount": ?>
<tr> <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> <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"> <td valign="top">
<label> <label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /> <input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label> </label>
</td> </td>
</tr> </tr>
<?php break; <?php break;
case "comicpress-buy_print_int_ship": ?> case "comicpress-buy_print_int_ship": ?>
<tr> <tr>
<th scope="row"><b>Shipping Cost (International)</b><br /><br /></th> <th scope="row"><b>Shipping Cost (International)</b><br /><br /></th>
<td valign="top"> <td valign="top">
<label> <label>
<input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" /> <input type="text" size="7" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php print get_option($value['id']); ?>" />
</label> </label>
</td> </td>
</tr> </tr>
<?php break; <?php break;
} }
} }
?> ?>
</table> </table>
</div> </div>
</div> </div>
<div style="float: left"> <div style="float: left">
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" /> <input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" /> <input type="hidden" name="action" value="comicpress_save" />
</form> </form>
</div> </div>
<div style="float: right"> <div style="float: right">
<form method="post" id="myForm" name="template" enctype="multipart/form-data"> <form method="post" id="myForm" name="template" enctype="multipart/form-data">
<?php wp_nonce_field('update-options'); ?> <?php wp_nonce_field('update-options'); ?>
<input name="comicpress_reset" type="submit" class="button-primary" value="Reset Settings" /> <input name="comicpress_reset" type="submit" class="button-primary" value="Reset Settings" />
<input type="hidden" name="action" value="comicpress_reset" /> <input type="hidden" name="action" value="comicpress_reset" />
</form> </form>
</div> </div>
<div style="clear:both;"></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;"> <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 /> <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 /> 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"> <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="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="3142149"> <input type="hidden" name="hosted_button_id" value="3142149">
<input type="submit" border="0" name="submit" alt="" value="Donate" id="paypal"> <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"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form> </form>
</div> </div>
</div> </div>
</div> </div>
<?php <?php
} }
add_action('admin_menu', 'comicpress_options'); add_action('admin_menu', 'comicpress_options');
?> ?>

View File

@ -1,134 +1,134 @@
<div <?php comment_class(); ?>> <div <?php comment_class(); ?>>
<?php <?php
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!'); die ('Please do not load this page directly. Thanks!');
if ( post_password_required() ) { ?> if ( post_password_required() ) { ?>
<p class="nocomments">This post is password protected. Enter the password to view comments.</p> <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
<?php <?php
return; return;
} }
if ( have_comments() ) : ?> if ( have_comments() ) : ?>
<?php if ( ! empty($comments_by_type['comment']) ) : ?> <?php if ( ! empty($comments_by_type['comment']) ) : ?>
<div class="commentsrsslink">[ <?php comments_rss_link('Comments RSS'); ?> ]</div> <div class="commentsrsslink">[ <?php comments_rss_link('Comments RSS'); ?> ]</div>
<h3 id="comments"><?php comments_number('Discussion &not;', 'Discussion &not;', 'Discussion (%) &not;' );?></h3> <h3 id="comments"><?php comments_number('Discussion &not;', 'Discussion &not;', 'Discussion (%) &not;' );?></h3>
<ol class="commentlist"> <ol class="commentlist">
<?php <?php
if (function_exists('comicpress_comments_callback')) { if (function_exists('comicpress_comments_callback')) {
wp_list_comments(array( wp_list_comments(array(
'type' => 'comment', 'type' => 'comment',
'reply_text' => 'Reply to %s&not;', 'reply_text' => 'Reply to %s&not;',
'callback' => 'comicpress_comments_callback', 'callback' => 'comicpress_comments_callback',
'end-callback' => 'comicpress_comments_end_callback', 'end-callback' => 'comicpress_comments_end_callback',
'avatar_size'=>64 'avatar_size'=>64
) )
); );
} else { } else {
wp_list_comments(array('type' => 'comment', 'avatar_size'=>64)); wp_list_comments(array('type' => 'comment', 'avatar_size'=>64));
}?> }?>
</ol> </ol>
<?php endif; ?> <?php endif; ?>
<?php if ( ! empty($comments_by_type['pings']) ) : ?> <?php if ( ! empty($comments_by_type['pings']) ) : ?>
<h4 id="comments">Pings & Trackbacks &not;</h4> <h4 id="comments">Pings & Trackbacks &not;</h4>
<ol class="commentlist"> <ol class="commentlist">
<ul> <ul>
<?php <?php
if (function_exists('comicpress_comments_callback')) { if (function_exists('comicpress_comments_callback')) {
wp_list_comments(array( wp_list_comments(array(
'type' => 'pings', 'type' => 'pings',
'callback' => 'comicpress_comments_callback', 'callback' => 'comicpress_comments_callback',
'end-callback' => 'comicpress_comments_end_callback', 'end-callback' => 'comicpress_comments_end_callback',
'avatar_size'=>32 'avatar_size'=>32
) )
); );
} else { } else {
wp_list_comments(array('type' => 'pings', 'avatar_size'=>64)); wp_list_comments(array('type' => 'pings', 'avatar_size'=>64));
}?> }?>
</ul> </ul>
</ol> </ol>
<?php endif; ?> <?php endif; ?>
<?php global $enable_numbered_pagination; if ($enable_numbered_pagination == 'yes') { ?> <?php global $enable_numbered_pagination; if ($enable_numbered_pagination == 'yes') { ?>
<div class="paginav"> <div class="paginav">
<?php paginate_comments_links( $args ) ?> <?php paginate_comments_links( $args ) ?>
</div> </div>
<?php } else { ?> <?php } else { ?>
<div class="commentnav"> <div class="commentnav">
<div class="commentnav-right"><?php next_comments_link('Newer Comments &uarr;') ?></div> <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="commentnav-left"><?php previous_comments_link('&darr; Previous Comments') ?></div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<?php } ?> <?php } ?>
<?php else : // this is displayed if there are no comments so far ?> <?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?> <?php if ('open' == $post->comment_status) : ?>
<!-- If comments are open, but there are no comments. --> <!-- If comments are open, but there are no comments. -->
<?php else : // comments are closed ?> <?php else : // comments are closed ?>
<!-- If comments are closed. --> <!-- If comments are closed. -->
<p class="nocomments">Comments are closed.</p> <p class="nocomments">Comments are closed.</p>
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
<?php if ('open' == $post->comment_status) : ?> <?php if ('open' == $post->comment_status) : ?>
<div id="respond"> <div id="respond">
<h3><?php comment_form_title( 'Comment &not;', 'Reply to %s &not;' ); ?></h3> <h3><?php comment_form_title( 'Comment &not;', 'Reply to %s &not;' ); ?></h3>
<div class="cancel-comment-reply"> <div class="cancel-comment-reply">
<small><?php cancel_comment_reply_link(); ?></small> <small><?php cancel_comment_reply_link(); ?></small>
</div> </div>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?> <?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> <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 : ?> <?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?> <?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> <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 : ?> <?php else : ?>
<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" /> <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> <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" /> <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> <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" /> <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> <label for="url"><small>WEBSITE</small></label></p>
<?php endif; ?> <?php endif; ?>
<?php do_action('comment_form', $post->ID); ?> <?php do_action('comment_form', $post->ID); ?>
<p><textarea name="comment" id="comment" cols="50" rows="6" tabindex="4"></textarea> <p><textarea name="comment" id="comment" cols="50" rows="6" tabindex="4"></textarea>
<button type="submit" class="button">Submit Comment</button> <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> <p><small><strong>NOTE - You can use these tags:</strong><br /><?php echo allowed_tags(); ?></small></p>
<?php comment_id_fields(); ?> <?php comment_id_fields(); ?>
</p> </p>
<div class="clear"></div> <div class="clear"></div>
</form> </form>
<?php endif; // If registration required and not logged in ?> <?php endif; // If registration required and not logged in ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>

View File

@ -1,28 +1,28 @@
<div class="clear"></div><!-- Clears floated columns and sidebars --> <div class="clear"></div><!-- Clears floated columns and sidebars -->
<div id="footer"> <div id="footer">
<?php if (function_exists('the_project_wonderful_ad')) { ?> <?php if (function_exists('the_project_wonderful_ad')) { ?>
<div class="footerpwad"> <div class="footerpwad">
<center> <center>
<?php the_project_wonderful_ad('footer'); ?> <?php the_project_wonderful_ad('footer'); ?>
</center> </center>
</div> </div>
<?php } ?> <?php } ?>
<?php get_sidebar('footer'); ?> <?php get_sidebar('footer'); ?>
<p> <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> &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 /> | 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 /> <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. --> <!-- <?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds. -->
</p> </p>
</div> </div>
<?php global $disable_page_restraints; if ($disable_page_restraints == 'no') { ?> <?php global $disable_page_restraints; if ($disable_page_restraints == 'no') { ?>
</div><!-- Ends "page" --> </div><!-- Ends "page" -->
<?php } ?> <?php } ?>
<?php wp_footer() ?> <?php wp_footer() ?>
</body> </body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,47 +1,47 @@
<?php <?php
/** /**
* Display Comic * Display Comic
* Displays the comic. * Displays the comic.
* *
* *
*/ */
function display_comic() { function display_comic() {
global $post, $wp_query, $anomaly_says, $comic_clicks_next; global $post, $wp_query, $anomaly_says, $comic_clicks_next;
$next_comic = get_next_comic_permalink(); $next_comic = get_next_comic_permalink();
$comic = explode(".", the_comic_filename()); $comic = explode(".", the_comic_filename());
if ($comic[1] == 'swf') { ?> 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 ); ?>"> <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(); ?>" /> <param name="movie" value="/<?php echo the_comic_filename(); ?>" />
<!--[if !IE]>--> <!--[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 ); ?>"> <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]--> <!--<![endif]-->
<div> <div>
<h1>Get Flash!</h1> <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> <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> </div>
<!--[if !IE]>--> <!--[if !IE]>-->
</object> </object>
<!--<![endif]--> <!--<![endif]-->
</object> </object>
<?php } else { <?php } else {
if ($comic_clicks_next == 'yes') { if ($comic_clicks_next == 'yes') {
$hovertext = get_post_meta( get_the_ID(), "hovertext", true ); $hovertext = get_post_meta( get_the_ID(), "hovertext", true );
if ($anomaly_says == 'yes' && !empty($hovertext)) { ?> 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> <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 { ?> <?php } else { ?>
<a href="<?php echo $next_comic; ?>"><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a> <a href="<?php echo $next_comic; ?>"><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a>
<?php } ?> <?php } ?>
<?php } else { <?php } else {
$hovertext = get_post_meta( get_the_ID(), "hovertext", true ); $hovertext = get_post_meta( get_the_ID(), "hovertext", true );
if ($anomaly_says == 'yes' && !empty($hovertext)) { ?> 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> <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 { ?> <?php } else { ?>
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /> <img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" />
<?php } <?php }
} }
} }
} }
?> ?>

View File

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

View File

@ -1,33 +1,33 @@
<?php <?php
/* /*
Widget Name: Drop Bar Widget Name: Drop Bar
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Creates a Drop Bar with a widget area for it. Description: Creates a Drop Bar with a widget area for it.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
function comicpress_dropbar() { ?> 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 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 class="dropbar">
<div style="margin: 0 auto;"> <div style="margin: 0 auto;">
<?php get_sidebar('dropbar'); ?> <?php get_sidebar('dropbar'); ?>
<div style="clear:both;"></div> <div style="clear:both;"></div>
</div> </div>
<div class="droptab"></div> <div class="droptab"></div>
</div> </div>
</div> </div>
<?php } <?php }
function comicpress_dropbar_load() { ?> function comicpress_dropbar_load() { ?>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/dropbar.js"></script> <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/dropbar.js"></script>
<?php } <?php }
add_action('wp_head', 'comicpress_dropbar_load'); add_action('wp_head', 'comicpress_dropbar_load');
add_action('comicpress-header', 'comicpress_dropbar', 10); add_action('comicpress-header', 'comicpress_dropbar', 10);
?> ?>

View File

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

View File

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

View File

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

View File

@ -1,72 +1,72 @@
<?php <?php
/** /**
* Related comics * Related comics
* Displays a list of comic links that are related to this current one using shortcode. * Displays a list of comic links that are related to this current one using shortcode.
* *
* Usage: [related_comics] * Usage: [related_comics]
* *
*/ */
function related_comics_shortcode( $atts = '' ) { function related_comics_shortcode( $atts = '' ) {
extract(shortcode_atts(array( extract(shortcode_atts(array(
'limit' => '5', 'limit' => '5',
), $atts)); ), $atts));
global $wpdb, $post, $table_prefix, $category_tree; global $wpdb, $post, $table_prefix, $category_tree;
if ($post->ID) { if ($post->ID) {
// Get tags // Get tags
$tags = wp_get_post_tags($post->ID); $tags = wp_get_post_tags($post->ID);
$tagsarray = array(); $tagsarray = array();
foreach ($tags as $tag) { foreach ($tags as $tag) {
$tagsarray[] = $tag->term_id; $tagsarray[] = $tag->term_id;
} }
$tagslist = implode(',', $tagsarray); $tagslist = implode(',', $tagsarray);
if (empty($tagslist)) return; if (empty($tagslist)) return;
if (empty($limit)) $limit = 5; if (empty($limit)) $limit = 5;
// Do the query // Do the query
$q = "SELECT p.*, count(tr.object_id) as count $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 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_status = 'publish'
AND p.post_date_gmt < NOW() AND p.post_date_gmt < NOW()
GROUP BY tr.object_id GROUP BY tr.object_id
ORDER BY count DESC, p.post_date_gmt DESC ORDER BY count DESC, p.post_date_gmt DESC
LIMIT $limit;"; LIMIT $limit;";
$related = $wpdb->get_results($q); $related = $wpdb->get_results($q);
if ( $related ) { if ( $related ) {
$retval = ' $retval = '
<div class="related_posts"> <div class="related_posts">
Related Comics &not;'; Related Comics &not;';
$retval .= ' $retval .= '
<ul>'; <ul>';
$comic_categories = array(); $comic_categories = array();
foreach ($category_tree as $node) { foreach ($category_tree as $node) {
$comic_categories[] = end(explode("/", $node)); $comic_categories[] = end(explode("/", $node));
} }
$in_comic_cat = 0; $in_comic_cat = 0;
$retval .= ' $retval .= '
<table class="month-table">'; <table class="month-table">';
foreach($related as $r) : foreach($related as $r) :
if (count(array_intersect($comic_categories, wp_get_post_categories($r->ID))) > 0) if (count(array_intersect($comic_categories, wp_get_post_categories($r->ID))) > 0)
$retval .= ' $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>'; <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; endforeach;
$retval .= ' $retval .= '
</table>'; </table>';
} else { } else {
$retval .= ' $retval .= '
<li>No related comics found</li>'; <li>No related comics found</li>';
} }
$retval .= ' $retval .= '
</ul>'; </ul>';
$retval .= ' $retval .= '
</div>'; </div>';
return $retval; return $retval;
} }
return; return;
} }
add_shortcode('related_comics', 'related_comics_shortcode'); add_shortcode('related_comics', 'related_comics_shortcode');
?> ?>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,54 +1,54 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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() ?>> <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes() ?>>
<head profile="http://gmpg.org/xfn/11"> <head profile="http://gmpg.org/xfn/11">
<title><?php <title><?php
bloginfo('name'); bloginfo('name');
if (is_home () ) { if (is_home () ) {
echo " - "; bloginfo('description'); echo " - "; bloginfo('description');
} elseif (is_category() ) { } elseif (is_category() ) {
echo " - "; single_cat_title(); echo " - "; single_cat_title();
} elseif (is_single() || is_page() ) { } elseif (is_single() || is_page() ) {
echo " - "; single_post_title(); echo " - "; single_post_title();
} elseif (is_search() ) { } elseif (is_search() ) {
echo " search results: "; echo wp_specialchars($s); echo " search results: "; echo wp_specialchars($s);
} else { } else {
echo " - "; wp_title('',true); echo " - "; wp_title('',true);
} }
?></title> ?></title>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" /> <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="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/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="alternate" type="application/atom+xml" title="<?php bloginfo('name') ?> Atom Feed" href="<?php bloginfo('atom_url') ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url') ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url') ?>" />
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/scroll.js"></script> <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/scroll.js"></script>
<meta name="ComicPress" content="<?php echo comicpress_current_theme_version(); ?>" /> <meta name="ComicPress" content="<?php echo comicpress_current_theme_version(); ?>" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?> <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); global $disable_page_restraints; ?> <?php wp_head(); global $disable_page_restraints; ?>
</head> </head>
<body <?php if (function_exists('body_class')) { body_class(); } ?>> <body <?php if (function_exists('body_class')) { body_class(); } ?>>
<?php do_action('comicpress-header'); ?> <?php do_action('comicpress-header'); ?>
<?php get_sidebar('above'); ?> <?php get_sidebar('above'); ?>
<?php if ($disable_page_restraints != 'yes') { <?php if ($disable_page_restraints != 'yes') {
if (is_cp_theme_style('standard,v')) { ?> if (is_cp_theme_style('standard,v')) { ?>
<div id="page"><!-- Defines entire site width - Ends in Footer --> <div id="page"><!-- Defines entire site width - Ends in Footer -->
<?php } else { ?> <?php } else { ?>
<div id="page-wide"> <div id="page-wide">
<?php } <?php }
} ?> } ?>
<div id="header"> <div id="header">
<?php if (function_exists('the_project_wonderful_ad')) { ?> <?php if (function_exists('the_project_wonderful_ad')) { ?>
<div class="headerpwad"> <div class="headerpwad">
<?php the_project_wonderful_ad('header'); ?> <?php the_project_wonderful_ad('header'); ?>
</div> </div>
<?php } ?> <?php } ?>
<h1><a href="<?php echo get_settings('home') ?>"><?php bloginfo('name') ?></a></h1> <h1><a href="<?php echo get_settings('home') ?>"><?php bloginfo('name') ?></a></h1>
<div class="description"><?php bloginfo('description') ?></div> <div class="description"><?php bloginfo('description') ?></div>
<?php get_sidebar('header'); ?> <?php get_sidebar('header'); ?>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<?php get_sidebar('menubar'); ?> <?php get_sidebar('menubar'); ?>

View File

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

190
image.php
View File

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

236
index.php
View File

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

View File

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

View File

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

122
links.php
View File

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

View File

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

View File

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

View File

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

View File

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

108
page.php
View File

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

View File

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

View File

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

View File

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

View File

@ -4,4 +4,4 @@
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer') ) : ?><?php endif; ?> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer') ) : ?><?php endif; ?>
</div> </div>
</div> </div>
<?php } ?> <?php } ?>

View File

@ -1,83 +1,83 @@
<?php get_header(); ?> <?php get_header(); ?>
<?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?> <?php if (is_cp_theme_style('gn,v3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('v3c,v')) { ?> <?php if (is_cp_theme_style('v3c,v')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<?php if (is_cp_theme_style('gn')) { ?> <?php if (is_cp_theme_style('gn')) { ?>
<div id="pagewrap-right"> <div id="pagewrap-right">
<?php } ?> <?php } ?>
<?php while (have_posts()) : the_post(); if (in_comic_category()) { ?> <?php while (have_posts()) : the_post(); if (in_comic_category()) { ?>
<div id="comic-head"><?php get_sidebar('over'); ?></div> <div id="comic-head"><?php get_sidebar('over'); ?></div>
<div id="comic"> <div id="comic">
<div class="comic-left"><?php get_sidebar('comicleft'); ?></div> <div class="comic-left"><?php get_sidebar('comicleft'); ?></div>
<div class="comic-content"> <div class="comic-content">
<?php display_comic(); ?> <?php display_comic(); ?>
</div> </div>
<div class="comic-right"><?php get_sidebar('comicright'); ?></div> <div class="comic-right"><?php get_sidebar('comicright'); ?></div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div id="comic-foot"><?php get_sidebar('under'); ?></div> <div id="comic-foot"><?php get_sidebar('under'); ?></div>
<?php } endwhile; ?> <?php } endwhile; ?>
<?php if (is_cp_theme_style('3c,standard')) { ?> <?php if (is_cp_theme_style('3c,standard')) { ?>
<div id="content-wrapper"> <div id="content-wrapper">
<?php } ?> <?php } ?>
<?php get_sidebar('overblog'); ?> <?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?> <?php if (is_cp_theme_style('3c')) get_sidebar('left'); ?>
<?php if (is_cp_theme_style('gn,standard,3c')) { ?> <?php if (is_cp_theme_style('gn,standard,3c')) { ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="column"> <div class="column">
<?php } ?> <?php } ?>
<?php if (function_exists('the_project_wonderful_ad')) { ?> <?php if (function_exists('the_project_wonderful_ad')) { ?>
<div class="blogpwad"> <div class="blogpwad">
<center> <center>
<?php the_project_wonderful_ad('blog'); ?> <?php the_project_wonderful_ad('blog'); ?>
</center> </center>
</div> </div>
<?php } ?> <?php } ?>
<?php get_sidebar('blog'); ?> <?php get_sidebar('blog'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); <?php if (have_posts()) : while (have_posts()) : the_post();
if (in_comic_category()) { if (in_comic_category()) {
display_comic_post(); display_comic_post();
} else { } else {
display_blog_post(); display_blog_post();
} }
comments_template('', true); ?> comments_template('', true); ?>
<center> <center>
<?php get_sidebar('underblog'); ?> <?php get_sidebar('underblog'); ?>
</center> </center>
<?php endwhile; else: ?> <?php endwhile; else: ?>
<div class="post-head"></div> <div class="post-head"></div>
<div class="post"> <div class="post">
<p>Sorry, no posts matched your criteria.</p> <p>Sorry, no posts matched your criteria.</p>
<br class="clear-margins" /> <br class="clear-margins" />
</div> </div>
<div class="post-foot"></div> <div class="post-foot"></div>
<center> <center>
<?php get_sidebar('underblog'); ?> <?php get_sidebar('underblog'); ?>
</center> </center>
<?php endif; ?> <?php endif; ?>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
</div> </div>
<?php <?php
if (is_cp_theme_style('3c,v3c,gn,standard,v')) { if (is_cp_theme_style('3c,v3c,gn,standard,v')) {
get_sidebar('right'); get_sidebar('right');
} ?> } ?>
<?php if (is_cp_theme_style('standard,gn,3c')) { ?> <?php if (is_cp_theme_style('standard,gn,3c')) { ?>
<div class="clear"></div> <div class="clear"></div>
</div> <!-- end pageright-wrapper / content-wrapper --> </div> <!-- end pageright-wrapper / content-wrapper -->
<?php } ?> <?php } ?>
<?php get_footer() ?> <?php get_footer() ?>

3428
style.css

File diff suppressed because it is too large Load Diff

View File

@ -1,70 +1,70 @@
/* SWFObject v2.2 <http://code.google.com/p/swfobject/> is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> /* SWFObject v2.2 <http://code.google.com/p/swfobject/> is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
Express Install Copyright (c) 2007-2008 Adobe Systems Incorporated and its licensors. All Rights Reserved. Express Install Copyright (c) 2007-2008 Adobe Systems Incorporated and its licensors. All Rights Reserved.
*/ */
System.security.allowDomain("fpdownload.macromedia.com"); System.security.allowDomain("fpdownload.macromedia.com");
var time = 0; var time = 0;
var timeOut = 5; // in seconds var timeOut = 5; // in seconds
var delay = 10; // in milliseconds var delay = 10; // in milliseconds
var int_id = setInterval(checkLoaded, delay); var int_id = setInterval(checkLoaded, delay);
var old_si = null; var old_si = null;
var loaderClip = this.createEmptyMovieClip("loaderClip", 0); var loaderClip = this.createEmptyMovieClip("loaderClip", 0);
var updateSWF = "http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + Math.random(); var updateSWF = "http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + Math.random();
loaderClip.loadMovie(updateSWF); loaderClip.loadMovie(updateSWF);
function checkLoaded(){ function checkLoaded(){
time += delay / 1000; time += delay / 1000;
if (time > timeOut) { if (time > timeOut) {
// updater did not load in time, abort load and force alternative content // updater did not load in time, abort load and force alternative content
clearInterval(int_id); clearInterval(int_id);
loaderClip.unloadMovie(); loaderClip.unloadMovie();
loadTimeOut(); loadTimeOut();
} }
else if (loaderClip.startInstall.toString() == "[type Function]") { else if (loaderClip.startInstall.toString() == "[type Function]") {
// updater has loaded successfully AND has determined that it can do the express install // updater has loaded successfully AND has determined that it can do the express install
if (old_si == null) { if (old_si == null) {
old_si = loaderClip.startInstall; old_si = loaderClip.startInstall;
loaderClip.startInstall = function() { loaderClip.startInstall = function() {
clearInterval(int_id); clearInterval(int_id);
old_si(); old_si();
} }
loadComplete(); loadComplete();
} }
} }
} }
function loadTimeOut() { function loadTimeOut() {
callbackSWFObject(); callbackSWFObject();
} }
function callbackSWFObject() { function callbackSWFObject() {
getURL("javascript:swfobject.expressInstallCallback();"); getURL("javascript:swfobject.expressInstallCallback();");
} }
function loadComplete() { function loadComplete() {
loaderClip.redirectURL = _level0.MMredirectURL; loaderClip.redirectURL = _level0.MMredirectURL;
loaderClip.MMplayerType = _level0.MMplayerType; loaderClip.MMplayerType = _level0.MMplayerType;
loaderClip.MMdoctitle = _level0.MMdoctitle; loaderClip.MMdoctitle = _level0.MMdoctitle;
loaderClip.startUpdate(); loaderClip.startUpdate();
} }
function installStatus(statusValue) { function installStatus(statusValue) {
switch (statusValue) { switch (statusValue) {
case "Download.Complete": case "Download.Complete":
// Installation is complete. // Installation is complete.
// In most cases the browser window that this SWF is hosted in will be closed by the installer or otherwise it has to be closed manually by the end user. // In most cases the browser window that this SWF is hosted in will be closed by the installer or otherwise it has to be closed manually by the end user.
// The Adobe Flash installer will attempt to reopen the browser window and reload the page containing the SWF. // The Adobe Flash installer will attempt to reopen the browser window and reload the page containing the SWF.
break; break;
case "Download.Cancelled": case "Download.Cancelled":
// The end user chose "NO" when prompted to install the new player. // The end user chose "NO" when prompted to install the new player.
// By default the SWFObject callback function is called to force alternative content. // By default the SWFObject callback function is called to force alternative content.
callbackSWFObject(); callbackSWFObject();
break; break;
case "Download.Failed": case "Download.Failed":
// The end user failed to download the installer due to a network failure. // The end user failed to download the installer due to a network failure.
// By default the SWFObject callback function is called to force alternative content. // By default the SWFObject callback function is called to force alternative content.
callbackSWFObject(); callbackSWFObject();
break; break;
} }
} }

View File

@ -1,14 +1,14 @@
<?php <?php
/* /*
Widget Name: Widget Name:
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Description:
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
?> ?>

View File

@ -1,154 +1,154 @@
<?php <?php
/* /*
Widget Name: Bookmark Widget Name: Bookmark
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Adds a bookmark set of icons to save the page your own. Description: Adds a bookmark set of icons to save the page your own.
Author: Tyler Martin Author: Tyler Martin
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
function comicpress_comic_bookmark() { function comicpress_comic_bookmark() {
global $post, $wp_query; ?> global $post, $wp_query; ?>
<div class="comic-bookmark"> <div class="comic-bookmark">
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
<!-- <!--
/* Bookmark Config Settings */ /* Bookmark Config Settings */
var cl = 31; var cl = 31;
var imgTag = '<?php bloginfo('template_directory'); ?>/images/1.gif'; //add tag image. var imgTag = '<?php bloginfo('template_directory'); ?>/images/1.gif'; //add tag image.
var imgClearOff = '<?php bloginfo('template_directory'); ?>/images/3a.gif'; //no comic tagged, clear not possible var imgClearOff = '<?php bloginfo('template_directory'); ?>/images/3a.gif'; //no comic tagged, clear not possible
var imgGotoOff = '<?php bloginfo('template_directory'); ?>/images/2a.gif'; //no comic tagged, goto not possible var imgGotoOff = '<?php bloginfo('template_directory'); ?>/images/2a.gif'; //no comic tagged, goto not possible
var imgClearOn = '<?php bloginfo('template_directory'); ?>/images/3.gif'; //clear a tag, shows when comic previously tagged var imgClearOn = '<?php bloginfo('template_directory'); ?>/images/3.gif'; //clear a tag, shows when comic previously tagged
var imgGotoOn = '<?php bloginfo('template_directory'); ?>/images/2.gif'; //shows when a comic is tagged var imgGotoOn = '<?php bloginfo('template_directory'); ?>/images/2.gif'; //shows when a comic is tagged
var imgInfo = '<?php bloginfo('template_directory'); ?>/images/4.gif'; //img that displays the help var imgInfo = '<?php bloginfo('template_directory'); ?>/images/4.gif'; //img that displays the help
var comicDir = '/'; //alter this if you run multiple comics in different directories on your site. var comicDir = '/'; //alter this if you run multiple comics in different directories on your site.
/* Now write out the applicable links */ /* Now write out the applicable links */
createCookie('t', 1); createCookie('t', 1);
var c = readCookie('t'); var c = readCookie('t');
if(c && document.getElementById) { if(c && document.getElementById) {
var l = readCookie('bm'); var l = readCookie('bm');
var gt = imgGotoOff; var gt = imgGotoOff;
var ct = imgClearOff; var ct = imgClearOff;
if(l) { if(l) {
gt = imgGotoOn; gt = imgGotoOn;
ct = imgClearOn; ct = imgClearOn;
} }
document.write('<div id="bmh" style="width: 173px; margin: 15px 0 0 0; padding: 5px; position: absolute; color: #eee; font-size: 11px; background-color:#222; border: 1px solid #ccc; visibility: hidden;"><strong>COMIC BOOKMARK</strong><br />Click "Tag Page" to bookmark a comic page. When you return to the site, click "Goto Tag" to continue where you left off.</div>'); document.write('<div id="bmh" style="width: 173px; margin: 15px 0 0 0; padding: 5px; position: absolute; color: #eee; font-size: 11px; background-color:#222; border: 1px solid #ccc; visibility: hidden;"><strong>COMIC BOOKMARK</strong><br />Click "Tag Page" to bookmark a comic page. When you return to the site, click "Goto Tag" to continue where you left off.</div>');
<?php if (is_home()) { ?> <?php if (is_home()) { ?>
document.write('<a href="#" onClick="bmhome();return false;"><img src="'+imgTag+'" alt="Tag This Page" border="0"></a>'); document.write('<a href="#" onClick="bmhome();return false;"><img src="'+imgTag+'" alt="Tag This Page" border="0"></a>');
document.write('<a href="#" onClick="gto();return false;"><img src="'+gt+'" alt="Goto Tag" border="0" id="gtc"></a>'); document.write('<a href="#" onClick="gto();return false;"><img src="'+gt+'" alt="Goto Tag" border="0" id="gtc"></a>');
document.write('<a href="#" onClick="bmc();return false;"><img src="'+ct+'" alt="Clear Tag" border="0" id="rmc"></a>'); document.write('<a href="#" onClick="bmc();return false;"><img src="'+ct+'" alt="Clear Tag" border="0" id="rmc"></a>');
document.write('<a href="#" onMouseOver="document.getElementById(\'bmh\').style.visibility=\'visible\';" onMouseOut="document.getElementById(\'bmh\').style.visibility=\'hidden\';" onClick="return false;"><img src="'+imgInfo+'" alt="" border="0"></a>'); document.write('<a href="#" onMouseOver="document.getElementById(\'bmh\').style.visibility=\'visible\';" onMouseOut="document.getElementById(\'bmh\').style.visibility=\'hidden\';" onClick="return false;"><img src="'+imgInfo+'" alt="" border="0"></a>');
<?php } elseif (is_single() & in_comic_category()) { ?> <?php } elseif (is_single() & in_comic_category()) { ?>
document.write('<a href="#" onClick="bm();return false;"><img src="'+imgTag+'" alt="Tag This Page" border="0"></a>'); document.write('<a href="#" onClick="bm();return false;"><img src="'+imgTag+'" alt="Tag This Page" border="0"></a>');
document.write('<a href="#" onClick="gto();return false;"><img src="'+gt+'" alt="Goto Tag" border="0" id="gtc"></a>'); document.write('<a href="#" onClick="gto();return false;"><img src="'+gt+'" alt="Goto Tag" border="0" id="gtc"></a>');
document.write('<a href="#" onClick="bmc();return false;"><img src="'+ct+'" alt="Clear Tag" border="0" id="rmc"></a>'); document.write('<a href="#" onClick="bmc();return false;"><img src="'+ct+'" alt="Clear Tag" border="0" id="rmc"></a>');
document.write('<a href="#" onMouseOver="document.getElementById(\'bmh\').style.visibility=\'visible\';" onMouseOut="document.getElementById(\'bmh\').style.visibility=\'hidden\';" onClick="return false;"><img src="'+imgInfo+'" alt="" border="0"></a>'); document.write('<a href="#" onMouseOver="document.getElementById(\'bmh\').style.visibility=\'visible\';" onMouseOut="document.getElementById(\'bmh\').style.visibility=\'hidden\';" onClick="return false;"><img src="'+imgInfo+'" alt="" border="0"></a>');
<?php } ?> <?php } ?>
} }
/* Below are our functions for this little script */ /* Below are our functions for this little script */
function bmhome() { function bmhome() {
if(document.getElementById) { if(document.getElementById) {
document.getElementById('gtc').src = imgGotoOn; document.getElementById('gtc').src = imgGotoOn;
document.getElementById('rmc').src = imgClearOn; document.getElementById('rmc').src = imgClearOn;
} }
createCookie("bm", "<?php the_permalink(); ?>", cl); createCookie("bm", "<?php the_permalink(); ?>", cl);
} }
function bm() { function bm() {
if(document.getElementById) { if(document.getElementById) {
document.getElementById('gtc').src = imgGotoOn; document.getElementById('gtc').src = imgGotoOn;
document.getElementById('rmc').src = imgClearOn; document.getElementById('rmc').src = imgClearOn;
} }
createCookie("bm", window.location, cl); createCookie("bm", window.location, cl);
} }
function bmc() { function bmc() {
if(document.getElementById) { if(document.getElementById) {
document.getElementById('gtc').src = imgGotoOff; document.getElementById('gtc').src = imgGotoOff;
document.getElementById('rmc').src = imgClearOff; document.getElementById('rmc').src = imgClearOff;
} }
createCookie("bm","",-1); createCookie("bm","",-1);
} }
function gto() { function gto() {
var g = readCookie('bm'); var g = readCookie('bm');
if(g) { if(g) {
window.location = g; window.location = g;
} }
} }
/* The follow functions have been borrowed from Peter-Paul Koch. Please find them here: http://www.quirksmode.org */ /* The follow functions have been borrowed from Peter-Paul Koch. Please find them here: http://www.quirksmode.org */
function createCookie(name,value,days) { function createCookie(name,value,days) {
if (days) { if (days) {
var date = new Date(); var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000)); date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString(); var expires = "; expires="+date.toGMTString();
} else var expires = ""; } else var expires = "";
document.cookie = name+"="+value+expires+"; path="+comicDir; document.cookie = name+"="+value+expires+"; path="+comicDir;
} }
function readCookie(name) { function readCookie(name) {
var nameEQ = name + "="; var nameEQ = name + "=";
var ca = document.cookie.split(';'); var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) { for(var i=0;i < ca.length;i++) {
var c = ca[i]; var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length); while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
} }
return null; return null;
} }
//--> //-->
</script> </script>
</div> </div>
<?php } <?php }
class widget_comicpress_bookmark extends WP_Widget { class widget_comicpress_bookmark extends WP_Widget {
function widget_comicpress_bookmark() { function widget_comicpress_bookmark() {
$widget_ops = array('classname' => 'widget_comicpress_bookmark', 'description' => 'Creates a set of buttons that let the user return to the page they tagged.' ); $widget_ops = array('classname' => 'widget_comicpress_bookmark', 'description' => 'Creates a set of buttons that let the user return to the page they tagged.' );
$this->WP_Widget('comicpress_bookmark', 'ComicPress Bookmark', $widget_ops); $this->WP_Widget('comicpress_bookmark', 'ComicPress Bookmark', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
comicpress_comic_bookmark(); comicpress_comic_bookmark();
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_bookmark'); register_widget('widget_comicpress_bookmark');
function widget_comicpress_bookmark_init() { function widget_comicpress_bookmark_init() {
new widget_comicpress_bookmark(); new widget_comicpress_bookmark();
} }
add_action('widgets_init', 'widget_comicpress_bookmark_init'); add_action('widgets_init', 'widget_comicpress_bookmark_init');
?> ?>

View File

@ -1,64 +1,64 @@
<?php <?php
/* /*
Widget Name: Buy Comic Print Widget Name: Buy Comic Print
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Places a button that works with the Buy This template. Description: Places a button that works with the Buy This template.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
function buy_this_print_comic() { function buy_this_print_comic() {
global $buy_print_url; global $buy_print_url;
$buythiscomic = get_post_meta( get_the_ID(), "buythiscomic", true ); $buythiscomic = get_post_meta( get_the_ID(), "buythiscomic", true );
if ( $buythiscomic !== 'sold' ) { ?> if ( $buythiscomic !== 'sold' ) { ?>
<div class="buythis"><form method="post" action="<?php echo $buy_print_url; ?>"> <div class="buythis"><form method="post" action="<?php echo $buy_print_url; ?>">
<input type="hidden" name="comic" value="<?php echo get_the_ID(); ?>" /> <input type="hidden" name="comic" value="<?php echo get_the_ID(); ?>" />
<button class="buythisbutton" type="submit" value="submit" name="submit"></button></form></div> <button class="buythisbutton" type="submit" value="submit" name="submit"></button></form></div>
<div class="clear"></div> <div class="clear"></div>
<?php } <?php }
} }
class widget_comicpress_buy_this_print extends WP_Widget { class widget_comicpress_buy_this_print extends WP_Widget {
function widget_comicpress_buy_this_print() { function widget_comicpress_buy_this_print() {
$widget_ops = array('classname' => 'widget_comicpress_buy_this_print', 'description' => 'Adds a button that goes to the buy print template page.' ); $widget_ops = array('classname' => 'widget_comicpress_buy_this_print', 'description' => 'Adds a button that goes to the buy print template page.' );
$this->WP_Widget('comicpress_buyprint', 'Buy This Print', $widget_ops); $this->WP_Widget('comicpress_buyprint', 'Buy This Print', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $buy_print_url; global $buy_print_url;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
buy_this_print_comic(); buy_this_print_comic();
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_buy_this_print'); register_widget('widget_comicpress_buy_this_print');
function widget_comicpress_buy_this_print_init() { function widget_comicpress_buy_this_print_init() {
new widget_comicpress_buy_this_print(); new widget_comicpress_buy_this_print();
} }
add_action('widgets_init', 'widget_comicpress_buy_this_print_init'); add_action('widgets_init', 'widget_comicpress_buy_this_print_init');
?> ?>

View File

@ -1,53 +1,53 @@
<?php <?php
/* /*
Widget Name: Calendar Widget Name: Calendar
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display a calendar of this months posts. Description: Display a calendar of this months posts.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
class widget_comicpress_calendar extends WP_Widget { class widget_comicpress_calendar extends WP_Widget {
function widget_comicpress_calendar() { function widget_comicpress_calendar() {
$widget_ops = array('classname' => 'widget_comicpress_calendar', 'description' => 'Display a calendar showing this months posts. (this calendar does not drop lines if there is no title given.)' ); $widget_ops = array('classname' => 'widget_comicpress_calendar', 'description' => 'Display a calendar showing this months posts. (this calendar does not drop lines if there is no title given.)' );
$this->WP_Widget('comicpress_calendar', 'Comicpress Calendar', $widget_ops); $this->WP_Widget('comicpress_calendar', 'Comicpress Calendar', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
get_calendar(); get_calendar();
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_calendar'); register_widget('widget_comicpress_calendar');
function widget_comicpress_calendar_init() { function widget_comicpress_calendar_init() {
new widget_comicpress_calendar(); new widget_comicpress_calendar();
} }
add_action('widgets_init', 'widget_comicpress_calendar_init'); add_action('widgets_init', 'widget_comicpress_calendar_init');
?> ?>

View File

@ -1,53 +1,53 @@
<?php <?php
/* /*
Widget Name: Comic Comments Widget Name: Comic Comments
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display a comments link to put inside the comic area. Description: Display a comments link to put inside the comic area.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
class widget_comicpress_comments extends WP_Widget { class widget_comicpress_comments extends WP_Widget {
function widget_comicpress_comments() { function widget_comicpress_comments() {
$widget_ops = array('classname' => 'widget_comicpress_comments', 'description' => 'Displays a comments link.' ); $widget_ops = array('classname' => 'widget_comicpress_comments', 'description' => 'Displays a comments link.' );
$this->WP_Widget('comic_comments', 'Comic Comments', $widget_ops); $this->WP_Widget('comic_comments', 'Comic Comments', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? 'Permalink' : apply_filters('widget_title', $instance['title']); ?> $title = empty($instance['title']) ? 'Permalink' : apply_filters('widget_title', $instance['title']); ?>
<?php if ('open' == $post->comment_status) { comments_popup_link('&ldquo;Comment!&rdquo;', '&ldquo;1 Comment&rdquo;', '&ldquo;% Comments&rdquo;'); } ?> <?php if ('open' == $post->comment_status) { comments_popup_link('&ldquo;Comment!&rdquo;', '&ldquo;1 Comment&rdquo;', '&ldquo;% Comments&rdquo;'); } ?>
<?php <?php
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '') ); $instance = wp_parse_args( (array) $instance, array( 'title' => '') );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">New Link name:<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">New Link name:<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_comments'); register_widget('widget_comicpress_comments');
function widget_comicpress_comments_init() { function widget_comicpress_comments_init() {
new widget_comicpress_comments(); new widget_comicpress_comments();
} }
add_action('widgets_init', 'widget_comicpress_comments_init'); add_action('widgets_init', 'widget_comicpress_comments_init');
?> ?>

View File

@ -1,53 +1,53 @@
<?php <?php
/* /*
Widget Name: Comic Date Widget Name: Comic Date
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display's the date of post of the comic. Description: Display's the date of post of the comic.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
class widget_comicpress_comic_date extends WP_Widget { class widget_comicpress_comic_date extends WP_Widget {
function widget_comicpress_comic_date() { function widget_comicpress_comic_date() {
$widget_ops = array('classname' => 'widget_comicpress_comic_date', 'description' => 'Displays the date of the post of the comic.' ); $widget_ops = array('classname' => 'widget_comicpress_comic_date', 'description' => 'Displays the date of the post of the comic.' );
$this->WP_Widget('comic_date', 'Comic Date', $widget_ops); $this->WP_Widget('comic_date', 'Comic Date', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $title; } ?> <?php the_time('F jS, Y'); ?> if ( !empty( $title ) ) { echo $title; } ?> <?php the_time('F jS, Y'); ?>
<?php echo $after_widget; <?php echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Words to use before date:<br /><input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Words to use before date:<br /><input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_comic_date'); register_widget('widget_comicpress_comic_date');
function widget_comicpress_comic_date_init() { function widget_comicpress_comic_date_init() {
new widget_comicpress_comic_date(); new widget_comicpress_comic_date();
} }
add_action('widgets_init', 'widget_comicpress_comic_date_init'); add_action('widgets_init', 'widget_comicpress_comic_date_init');
?> ?>

View File

@ -1,45 +1,45 @@
<?php <?php
/* /*
Widget Name: comictitle Widget Name: comictitle
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display a Title of the Comic that can be used in any area around the comic. Description: Display a Title of the Comic that can be used in any area around the comic.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
class widget_comicpress_comictitle extends WP_Widget { class widget_comicpress_comictitle extends WP_Widget {
function widget_comicpress_comictitle() { function widget_comicpress_comictitle() {
$widget_ops = array('classname' => 'widget_comicpress_comictitle', 'description' => 'Displays the title of the comic.' ); $widget_ops = array('classname' => 'widget_comicpress_comictitle', 'description' => 'Displays the title of the comic.' );
$this->WP_Widget('comictitle', 'Comic Title', $widget_ops); $this->WP_Widget('comictitle', 'Comic Title', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
the_title(); the_title();
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
} }
} }
register_widget('widget_comicpress_comictitle'); register_widget('widget_comicpress_comictitle');
function widget_comicpress_comictitle_init() { function widget_comicpress_comictitle_init() {
new widget_comicpress_comictitle(); new widget_comicpress_comictitle();
} }
add_action('widgets_init', 'widget_comicpress_comictitle_init'); add_action('widgets_init', 'widget_comicpress_comictitle_init');
?> ?>

View File

@ -1,99 +1,99 @@
<?php <?php
/* /*
Widget Name: Control Panel Widget Name: Control Panel
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display an area for login and logout, forgot password and register. Description: Display an area for login and logout, forgot password and register.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
// The Control Panel function // The Control Panel function
function comicpress_show_control_panel() { function comicpress_show_control_panel() {
global $wpmu_version; ?> global $wpmu_version; ?>
<ul><li> <ul><li>
<?php if (!is_user_logged_in()) { ?> <?php if (!is_user_logged_in()) { ?>
<form action="<?php bloginfo('url') ?>/wp-login.php" method="post"> <form action="<?php bloginfo('url') ?>/wp-login.php" method="post">
UserName:<br /> UserName:<br />
<input type="text" name="log" id="sname" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="22" /><br /><br /> <input type="text" name="log" id="sname" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="22" /><br /><br />
Password:<br /> Password:<br />
<input type="password" name="pwd" id="spassword" size="22" /><br /> <input type="password" name="pwd" id="spassword" size="22" /><br />
<label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label><br /> <label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label><br />
<br /> <br />
<button type="submit" class="button">Login</button> <button type="submit" class="button">Login</button>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/> <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
</form> </form>
<br /> <br />
<?php if (!empty($wpmu_version)) { ?> <?php if (!empty($wpmu_version)) { ?>
<a href="<?php bloginfo('url') ?>/wp-signup.php">Register</a><br /> <a href="<?php bloginfo('url') ?>/wp-signup.php">Register</a><br />
<?php } else { ?> <?php } else { ?>
<a href="<?php bloginfo('url') ?>/wp-register.php">Register</a><br /> <a href="<?php bloginfo('url') ?>/wp-register.php">Register</a><br />
<?php } ?> <?php } ?>
<a href="<?php bloginfo('url') ?>/wp-login.php?action=lostpassword">Recover password</a> <a href="<?php bloginfo('url') ?>/wp-login.php?action=lostpassword">Recover password</a>
<?php } else { ?> <?php } else { ?>
<?php $redirect = '&amp;redirect_to='.urlencode(wp_make_link_relative(get_option('siteurl'))); <?php $redirect = '&amp;redirect_to='.urlencode(wp_make_link_relative(get_option('siteurl')));
$uri = wp_nonce_url( site_url("wp-login.php?action=logout$redirect", 'login'), 'log-out' ); ?> $uri = wp_nonce_url( site_url("wp-login.php?action=logout$redirect", 'login'), 'log-out' ); ?>
<li><a href="<?php echo $uri; ?>">Logout</a></li> <li><a href="<?php echo $uri; ?>">Logout</a></li>
<?php wp_register(); ?> <?php wp_register(); ?>
<?php <?php
if (function_exists('pm_inbox_new_count')) { if (function_exists('pm_inbox_new_count')) {
$newmsgs = 0; $newmsgs = 0;
$newmsgs = pm_inbox_new_count($current_user->ID); $newmsgs = pm_inbox_new_count($current_user->ID);
if (!$newmsgs) $newmsgs=0; if (!$newmsgs) $newmsgs=0;
} }
?> ?>
<?php if (function_exists('pm_inbox_new_count')) { ?> <?php if (function_exists('pm_inbox_new_count')) { ?>
<li><a href="/forum?pmaction=viewinpm&pms=1">Inbox (<?php echo $newmsgs; ?>)</a></li> <li><a href="/forum?pmaction=viewinpm&pms=1">Inbox (<?php echo $newmsgs; ?>)</a></li>
<li><a href="/forum?profile=user">Profile</a></li> <li><a href="/forum?profile=user">Profile</a></li>
<?php } else { ?> <?php } else { ?>
<li><a href="/wp-admin/profile.php">Profile</a></li> <li><a href="/wp-admin/profile.php">Profile</a></li>
<?php } <?php }
} ?> } ?>
</li></ul> </li></ul>
<?php <?php
} }
class widget_comicpress_show_control_panel extends WP_Widget { class widget_comicpress_show_control_panel extends WP_Widget {
function widget_comicpress_show_control_panel() { function widget_comicpress_show_control_panel() {
$widget_ops = array('classname' => 'widget_comicpress_show_control_panel', 'description' => 'Login/Logoff menu with register/lost password links if not logged on.' ); $widget_ops = array('classname' => 'widget_comicpress_show_control_panel', 'description' => 'Login/Logoff menu with register/lost password links if not logged on.' );
$this->WP_Widget('control_panel', 'Control Panel', $widget_ops); $this->WP_Widget('control_panel', 'Control Panel', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? 'Control Panel' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? 'Control Panel' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
comicpress_show_control_panel(); comicpress_show_control_panel();
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_show_control_panel'); register_widget('widget_comicpress_show_control_panel');
function widget_comicpress_show_control_panel_init() { function widget_comicpress_show_control_panel_init() {
new widget_comicpress_show_control_panel(); new widget_comicpress_show_control_panel();
} }
add_action('widgets_init', 'widget_comicpress_show_control_panel_init'); add_action('widgets_init', 'widget_comicpress_show_control_panel_init');
?> ?>

View File

@ -1,101 +1,101 @@
<?php <?php
/* /*
Widget Name: Graphical Navigation Widget Name: Graphical Navigation
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: You can place graphical navigation buttons on your comic, for ComicPress 2.8 Description: You can place graphical navigation buttons on your comic, for ComicPress 2.8
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
function comic_navigation() { function comic_navigation() {
global $post,$wp_query; global $post,$wp_query;
$this_permalink = get_permalink(); $this_permalink = get_permalink();
$temp_query = $wp_query->is_single; $temp_query = $wp_query->is_single;
$wp_query->is_single = true; $wp_query->is_single = true;
$prev_comic = get_previous_comic_permalink(); $prev_comic = get_previous_comic_permalink();
$next_comic = get_next_comic_permalink(); $next_comic = get_next_comic_permalink();
$wp_query->is_single = $temp_query; $wp_query->is_single = $temp_query;
$temp_query = null; $temp_query = null;
$first_comic = get_first_comic_permalink(); $first_comic = get_first_comic_permalink();
$last_comic = get_last_comic_permalink(); $last_comic = get_last_comic_permalink();
echo '<div id="comic_navi_wrapper">'; echo '<div id="comic_navi_wrapper">';
echo ' <div class="comic_navi">'; echo ' <div class="comic_navi">';
echo ' <div class="comic_navi_left">'; echo ' <div class="comic_navi_left">';
if (!empty($first_comic) && ($first_comic != $this_permalink)) { if (!empty($first_comic) && ($first_comic != $this_permalink)) {
echo ' <a href="'.$first_comic.'" class="rollfirst" title="First">&nbsp;</a>'; echo ' <a href="'.$first_comic.'" class="rollfirst" title="First">&nbsp;</a>';
} else { } else {
echo ' <div class="rollfirst rollagain"></div>'; echo ' <div class="rollfirst rollagain"></div>';
} }
if (!empty($prev_comic)) { if (!empty($prev_comic)) {
echo ' <a href="'.$prev_comic.'" class="rollprev" title="Previous">&nbsp;</a>'; echo ' <a href="'.$prev_comic.'" class="rollprev" title="Previous">&nbsp;</a>';
} else { } else {
echo ' <div class="rollprev rollagain"></div>'; echo ' <div class="rollprev rollagain"></div>';
} }
echo ' <div class="clear"></div>'; echo ' <div class="clear"></div>';
echo ' </div>'; echo ' </div>';
echo ' <div class="comic_navi_right">'; echo ' <div class="comic_navi_right">';
if (!empty($next_comic)) { if (!empty($next_comic)) {
echo ' <a href="'.$next_comic.'" class="rollnext" title="Next">&nbsp;</a>'; echo ' <a href="'.$next_comic.'" class="rollnext" title="Next">&nbsp;</a>';
} else { } else {
echo ' <div class="rollnext rollagain"></div>'; echo ' <div class="rollnext rollagain"></div>';
} }
if (!empty($last_comic) && ($last_comic != $this_permalink)) { if (!empty($last_comic) && ($last_comic != $this_permalink)) {
echo ' <a href="'.$last_comic.'" class="rolllast" title="Last">&nbsp;</a>'; echo ' <a href="'.$last_comic.'" class="rolllast" title="Last">&nbsp;</a>';
} else { } else {
echo ' <div class="rolllast rollagain"></div>'; echo ' <div class="rolllast rollagain"></div>';
} }
echo ' <div class="clear"></div>'; echo ' <div class="clear"></div>';
echo ' </div>'; echo ' </div>';
echo ' <div class="comic_navi_center_spacer">'; echo ' <div class="comic_navi_center_spacer">';
echo ' <div class="comic_navi_center">'; echo ' <div class="comic_navi_center">';
echo ' <a href="'.get_bloginfo('url').'?randomcomic" class="rollrandom" title="Random Comic">&nbsp;</a>'; echo ' <a href="'.get_bloginfo('url').'?randomcomic" class="rollrandom" title="Random Comic">&nbsp;</a>';
echo ' </div>'; echo ' </div>';
echo ' </div>'; echo ' </div>';
echo ' <div class="clear"></div>'; echo ' <div class="clear"></div>';
echo ' </div>'; echo ' </div>';
echo '</div>'; echo '</div>';
} }
class widget_comicpress_graphical_navigation extends WP_Widget { class widget_comicpress_graphical_navigation extends WP_Widget {
function widget_comicpress_graphical_navigation() { function widget_comicpress_graphical_navigation() {
$widget_ops = array('classname' => 'widget_comicpress_graphical_navigation', 'description' => 'Displays Graphical Navigation Buttons.' ); $widget_ops = array('classname' => 'widget_comicpress_graphical_navigation', 'description' => 'Displays Graphical Navigation Buttons.' );
$this->WP_Widget('graphicalnavigation', 'Comic Navigation', $widget_ops); $this->WP_Widget('graphicalnavigation', 'Comic Navigation', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $wp_query, $post; global $wp_query, $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
comic_navigation(); comic_navigation();
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
} }
function form($instance) { function form($instance) {
} }
} }
register_widget('widget_comicpress_graphical_navigation'); register_widget('widget_comicpress_graphical_navigation');
function widget_comicpress_graphical_navigation_init() { function widget_comicpress_graphical_navigation_init() {
new widget_comicpress_graphical_navigation(); new widget_comicpress_graphical_navigation();
} }
add_action('widgets_init', 'widget_comicpress_graphical_navigation_init'); add_action('widgets_init', 'widget_comicpress_graphical_navigation_init');
?> ?>

View File

@ -1,51 +1,51 @@
<?php <?php
/* /*
Plugin Name: Keenspot Newsbox Widget Plugin Name: Keenspot Newsbox Widget
Plugin URI: http://shivae.net/ Plugin URI: http://shivae.net/
Description: Newsbox Widget Description: Newsbox Widget
Author: Tiffany Ross Author: Tiffany Ross
Version: 1 Version: 1
Author URI: http://shivae.net Author URI: http://shivae.net
*/ */
class widget_keenspot_newsbox extends WP_Widget { class widget_keenspot_newsbox extends WP_Widget {
function widget_keenspot_newsbox() { function widget_keenspot_newsbox() {
$widget_ops = array('classname' => 'widget_keenspot_newsbox', 'description' => 'Displays the keenspot newsbox.' ); $widget_ops = array('classname' => 'widget_keenspot_newsbox', 'description' => 'Displays the keenspot newsbox.' );
$this->WP_Widget('keenspotnewsbox', 'Keenspot Newsbox', $widget_ops); $this->WP_Widget('keenspotnewsbox', 'Keenspot Newsbox', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
echo '<center><script language="javascript" src="http://www.keenspot.com/ks_Gnewsbox.js"></script></center>'; echo '<center><script language="javascript" src="http://www.keenspot.com/ks_Gnewsbox.js"></script></center>';
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_keenspot_newsbox'); register_widget('widget_keenspot_newsbox');
function widget_keenspot_newsbox_init() { function widget_keenspot_newsbox_init() {
new widget_keenspot_newsbox(); new widget_keenspot_newsbox();
} }
add_action('widgets_init', 'widget_keenspot_newsbox_init'); add_action('widgets_init', 'widget_keenspot_newsbox_init');
?> ?>

View File

@ -1,63 +1,63 @@
<?php <?php
/* /*
Widget Name: Latest Comic Jump Widget Name: Latest Comic Jump
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Creates a link to the latest Comic Description: Creates a link to the latest Comic
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
if ( isset( $_GET['latestcomic'] ) ) if ( isset( $_GET['latestcomic'] ) )
add_action( 'template_redirect', 'latest_comic_jump' ); add_action( 'template_redirect', 'latest_comic_jump' );
//Generate a random comic page - to use simply create a URL link to "/?randomcomic" //Generate a random comic page - to use simply create a URL link to "/?randomcomic"
function latest_comic_jump() { function latest_comic_jump() {
wp_redirect( get_permalink( get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), false) ) ); wp_redirect( get_permalink( get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), false) ) );
exit; exit;
} }
class widget_comicpress_latest_comic_jump extends WP_Widget { class widget_comicpress_latest_comic_jump extends WP_Widget {
function widget_comicpress_latest_comic_jump() { function widget_comicpress_latest_comic_jump() {
$widget_ops = array('classname' => 'widget_comicpress_latest_comic_jump', 'description' => 'Displays a link to click to go to the latest comic.' ); $widget_ops = array('classname' => 'widget_comicpress_latest_comic_jump', 'description' => 'Displays a link to click to go to the latest comic.' );
$this->WP_Widget('latest_comic_jump', 'Latest Comic Link', $widget_ops); $this->WP_Widget('latest_comic_jump', 'Latest Comic Link', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?> if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?>
<h2><a href="?latestcomic"><span class="latest-comic-icon">?</span> Latest Comic</a></h2> <h2><a href="?latestcomic"><span class="latest-comic-icon">?</span> Latest Comic</a></h2>
<?php <?php
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_latest_comic_jump'); register_widget('widget_comicpress_latest_comic_jump');
function widget_comicpress_latest_comic_jump_init() { function widget_comicpress_latest_comic_jump_init() {
new widget_comicpress_latest_comic_jump(); new widget_comicpress_latest_comic_jump();
} }
add_action('widgets_init', 'widget_comicpress_latest_comic_jump_init'); add_action('widgets_init', 'widget_comicpress_latest_comic_jump_init');
?> ?>

View File

@ -1,74 +1,74 @@
<?php <?php
/* /*
Widget Name: Latest Comics Widget Name: Latest Comics
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display a list of links of the latest comics. Description: Display a list of links of the latest comics.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
function comicpress_latest_comics() { ?> function comicpress_latest_comics() { ?>
<ul> <ul>
<li> <li>
<h2>Latest Comics</h2> <h2>Latest Comics</h2>
<ul> <ul>
<?php global $post; <?php global $post;
$latestcomics = get_posts('numberposts=5&category='.get_all_comic_categories_as_cat_string()); $latestcomics = get_posts('numberposts=5&category='.get_all_comic_categories_as_cat_string());
foreach($latestcomics as $post) : ?> foreach($latestcomics as $post) : ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
</li> </li>
</ul> </ul>
<?php <?php
} }
class widget_comicpress_latest_comics extends WP_Widget { class widget_comicpress_latest_comics extends WP_Widget {
function widget_comicpress_latest_comics() { function widget_comicpress_latest_comics() {
$widget_ops = array('classname' => 'widget_comicpress_latest_comics', 'description' => 'Display a list of the latest comics available.' ); $widget_ops = array('classname' => 'widget_comicpress_latest_comics', 'description' => 'Display a list of the latest comics available.' );
$this->WP_Widget('latest_comics', 'Latest Comics', $widget_ops); $this->WP_Widget('latest_comics', 'Latest Comics', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? 'Latest Comics' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? 'Latest Comics' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
$latestcomics = get_posts('numberposts=5&category='.get_all_comic_categories_as_cat_string()); ?> $latestcomics = get_posts('numberposts=5&category='.get_all_comic_categories_as_cat_string()); ?>
<ul> <ul>
<?php foreach($latestcomics as $post) : ?> <?php foreach($latestcomics as $post) : ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
<?php echo $after_widget; <?php echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_latest_comics'); register_widget('widget_comicpress_latest_comics');
function widget_comicpress_latest_comics_init() { function widget_comicpress_latest_comics_init() {
new widget_comicpress_latest_comics(); new widget_comicpress_latest_comics();
} }
add_action('widgets_init', 'widget_comicpress_latest_comics_init'); add_action('widgets_init', 'widget_comicpress_latest_comics_init');
?> ?>

View File

@ -1,58 +1,58 @@
<?php <?php
/* /*
Widget Name: Latest Thumbnail Widget Name: Latest Thumbnail
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display a thumbnail of the latest comic. Description: Display a thumbnail of the latest comic.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
class widget_comicpress_latest_thumbnail extends WP_Widget { class widget_comicpress_latest_thumbnail extends WP_Widget {
function widget_comicpress_latest_thumbnail() { function widget_comicpress_latest_thumbnail() {
$widget_ops = array('classname' => 'widget_comicpress_latest_thumbnail', 'description' => 'Display a thumbnail of the latest comic, clickable to go to the comic post.' ); $widget_ops = array('classname' => 'widget_comicpress_latest_thumbnail', 'description' => 'Display a thumbnail of the latest comic, clickable to go to the comic post.' );
$this->WP_Widget('latest_thumbnail', 'Latest Comic', $widget_ops); $this->WP_Widget('latest_thumbnail', 'Latest Comic', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? 'Latest Comic' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? 'Latest Comic' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
$latestcomics = get_posts('numberposts=1&category='.get_all_comic_categories_as_cat_string()); $latestcomics = get_posts('numberposts=1&category='.get_all_comic_categories_as_cat_string());
foreach($latestcomics as $post) : ?> foreach($latestcomics as $post) : ?>
<center> <center>
<a href="<?php the_permalink(); ?>"><img src="<?php the_comic_rss() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a><br /> <a href="<?php the_permalink(); ?>"><img src="<?php the_comic_rss() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a><br />
</center> </center>
<?php endforeach; <?php endforeach;
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_latest_thumbnail'); register_widget('widget_comicpress_latest_thumbnail');
function widget_comicpress_latest_thumbnail_init() { function widget_comicpress_latest_thumbnail_init() {
new widget_comicpress_latest_thumbnail(); new widget_comicpress_latest_thumbnail();
} }
add_action('widgets_init', 'widget_comicpress_latest_thumbnail_init'); add_action('widgets_init', 'widget_comicpress_latest_thumbnail_init');
?> ?>

View File

@ -1,115 +1,115 @@
<?php <?php
/* /*
Widget Name: Menubar Widget Name: Menubar
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display a calendar of this months posts. Description: Display a calendar of this months posts.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
function comicpress_menubar() { function comicpress_menubar() {
if (file_exists(get_template_directory() . '/custom-menubar.php') || function_exists('suckerfish')) { if (file_exists(get_template_directory() . '/custom-menubar.php') || function_exists('suckerfish')) {
if (function_exists('suckerfish')) { if (function_exists('suckerfish')) {
suckerfish(); suckerfish();
} else { } else {
include(get_template_directory() . '/custom-menubar.php'); include(get_template_directory() . '/custom-menubar.php');
} }
} else { ?> } else { ?>
<div id="menubar"> <div id="menubar">
<div id="menunav"> <div id="menunav">
<?php if (is_home()) { <?php if (is_home()) {
$comicFrontpage = new WP_Query(); $comicFrontpage->query('showposts=1&cat='.get_all_comic_categories_as_cat_string()); $comicFrontpage = new WP_Query(); $comicFrontpage->query('showposts=1&cat='.get_all_comic_categories_as_cat_string());
while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post(); while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post();
global $wp_query; $wp_query->is_single = true; global $wp_query; $wp_query->is_single = true;
previous_comic_link('%link', '&lsaquo;'); previous_comic_link('%link', '&lsaquo;');
$wp_query->is_single = false; $wp_query->is_single = false;
endwhile; endwhile;
} elseif (is_single() & in_comic_category()) { } elseif (is_single() & in_comic_category()) {
previous_comic_link('%link', '&lsaquo;'); previous_comic_link('%link', '&lsaquo;');
next_comic_link('%link', '&rsaquo;'); next_comic_link('%link', '&rsaquo;');
} ?> } ?>
</div> </div>
<?php <?php
$menulinks = wp_list_bookmarks('echo=0&title_li=&categorize=0&title_before=&title_after=&category_name=menubar'); $menulinks = wp_list_bookmarks('echo=0&title_li=&categorize=0&title_before=&title_after=&category_name=menubar');
$menulinks = preg_replace('#<li ([^>]*)>#', '<li class="page-item link">', $menulinks); $menulinks = preg_replace('#<li ([^>]*)>#', '<li class="page-item link">', $menulinks);
$menulinks = preg_replace('#<ul ([^>]*)>#', '', $menulinks); $menulinks = preg_replace('#<ul ([^>]*)>#', '', $menulinks);
$menulinks = str_replace('</ul>', '', $menulinks); $menulinks = str_replace('</ul>', '', $menulinks);
$bookmarks = wp_list_bookmarks('echo=0&title_li=&categorize=0&title_before=&title_after=&category_name=menulinks'); $bookmarks = wp_list_bookmarks('echo=0&title_li=&categorize=0&title_before=&title_after=&category_name=menulinks');
$bookmarks = preg_replace('#<li ([^>]*)>#', '<li class="page-item link">', $bookmarks); $bookmarks = preg_replace('#<li ([^>]*)>#', '<li class="page-item link">', $bookmarks);
$bookmarks = preg_replace('#<ul ([^>]*)>#', '<ul>', $bookmarks); $bookmarks = preg_replace('#<ul ([^>]*)>#', '<ul>', $bookmarks);
$listpages = wp_list_pages('echo=0&sort_column=menu_order&depth=4&title_li='); $listpages = wp_list_pages('echo=0&sort_column=menu_order&depth=4&title_li=');
if (!empty($bookmarks)) { if (!empty($bookmarks)) {
$listpages = str_replace('Links</a></li>', 'Links</a> $listpages = str_replace('Links</a></li>', 'Links</a>
<ul> <ul>
'.$bookmarks.' '.$bookmarks.'
</ul> </ul>
</li> </li>
', $listpages); ', $listpages);
$listpages .= $menulinks; $listpages .= $menulinks;
} else { } else {
$listpages = str_replace('Links</a></li>', 'Links</a> $listpages = str_replace('Links</a></li>', 'Links</a>
</li> </li>
', $listpages); ', $listpages);
$listpages .= $menulinks; $listpages .= $menulinks;
} }
?> ?>
<ul id="menu"> <ul id="menu">
<li class="page_item page-item-home<?php if (is_home()) { ?> current_page_item<?php } ?>"><a href="<?php bloginfo('url'); ?>">Home</a></li> <li class="page_item page-item-home<?php if (is_home()) { ?> current_page_item<?php } ?>"><a href="<?php bloginfo('url'); ?>">Home</a></li>
<?php echo $listpages; ?> <?php echo $listpages; ?>
<?php if ($contact_in_menubar == 'yes') { ?> <?php if ($contact_in_menubar == 'yes') { ?>
<li class="page_item page-item-contact"><a href="mailto:<?php bloginfo('admin_email'); ?>">Contact</a></li> <li class="page_item page-item-contact"><a href="mailto:<?php bloginfo('admin_email'); ?>">Contact</a></li>
<?php } ?> <?php } ?>
<li><a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/data_rss.gif" class="rss" alt="RSS" /></a></li> <li><a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/data_rss.gif" class="rss" alt="RSS" /></a></li>
</ul> </ul>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<?php } <?php }
} }
class widget_comicpress_menubar extends WP_Widget { class widget_comicpress_menubar extends WP_Widget {
function widget_comicpress_menubar() { function widget_comicpress_menubar() {
$widget_ops = array('classname' => 'widget_comicpress_menubar', 'description' => 'Displays a menubar.' ); $widget_ops = array('classname' => 'widget_comicpress_menubar', 'description' => 'Displays a menubar.' );
$this->WP_Widget('comicpress_menubar', 'Comicpress Menubar', $widget_ops); $this->WP_Widget('comicpress_menubar', 'Comicpress Menubar', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
comicpress_menubar(); comicpress_menubar();
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_menubar'); register_widget('widget_comicpress_menubar');
function widget_comicpress_menubar_init() { function widget_comicpress_menubar_init() {
new widget_comicpress_menubar(); new widget_comicpress_menubar();
} }
add_action('widgets_init', 'widget_comicpress_menubar_init'); add_action('widgets_init', 'widget_comicpress_menubar_init');
?> ?>

View File

@ -1,57 +1,57 @@
<?php <?php
/* /*
Widget Name: Permalink Widget Name: Permalink
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display a permalink link that can be used in any area around the comic. Description: Display a permalink link that can be used in any area around the comic.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
class widget_comicpress_permalink extends WP_Widget { class widget_comicpress_permalink extends WP_Widget {
function widget_comicpress_permalink() { function widget_comicpress_permalink() {
$widget_ops = array('classname' => 'widget_comicpress_permalink', 'description' => 'Displays a permalink.' ); $widget_ops = array('classname' => 'widget_comicpress_permalink', 'description' => 'Displays a permalink.' );
$this->WP_Widget('permalink', 'Permalink', $widget_ops); $this->WP_Widget('permalink', 'Permalink', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? 'Permalink' : apply_filters('widget_title', $instance['title']); ?> $title = empty($instance['title']) ? 'Permalink' : apply_filters('widget_title', $instance['title']); ?>
<a href="<?php the_permalink(); ?><?php if ($instance['comment'] == 'yes') { ?>#comment<?php } ?>" class="widget_permalink_href"><?php echo $title; ?></a> <a href="<?php the_permalink(); ?><?php if ($instance['comment'] == 'yes') { ?>#comment<?php } ?>" class="widget_permalink_href"><?php echo $title; ?></a>
<?php <?php
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
$instance['comment'] = strip_tags($new_instance['comment']); $instance['comment'] = strip_tags($new_instance['comment']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' , 'comment' => '') ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' , 'comment' => '') );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
$comment = strip_tags($instance['comment']); $comment = strip_tags($instance['comment']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">New Link name:<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">New Link name:<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<p><label><input name="<?php echo $this->get_field_name('comment'); ?>" id="<?php echo $this->get_field_id('comment'); ?>-comment" type="radio" value="yes"<?php if ( $comment == "yes") { echo " checked"; } ?> />Yes <input name="<?php echo $this->get_field_name('comment'); ?>" id="<?php echo $this->get_field_id('comment'); ?>-comment" type="radio" value="no"<?php if ( $comment == "no") { echo " checked"; } ?> />No<br />Add #comment to href?</label></p> <p><label><input name="<?php echo $this->get_field_name('comment'); ?>" id="<?php echo $this->get_field_id('comment'); ?>-comment" type="radio" value="yes"<?php if ( $comment == "yes") { echo " checked"; } ?> />Yes <input name="<?php echo $this->get_field_name('comment'); ?>" id="<?php echo $this->get_field_id('comment'); ?>-comment" type="radio" value="no"<?php if ( $comment == "no") { echo " checked"; } ?> />No<br />Add #comment to href?</label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_permalink'); register_widget('widget_comicpress_permalink');
function widget_comicpress_permalink_init() { function widget_comicpress_permalink_init() {
new widget_comicpress_permalink(); new widget_comicpress_permalink();
} }
add_action('widgets_init', 'widget_comicpress_permalink_init'); add_action('widgets_init', 'widget_comicpress_permalink_init');
?> ?>

View File

@ -1,68 +1,68 @@
<?php <?php
/* /*
Widget Name: Random Comic Widget Name: Random Comic
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display a link to click on to go to a random comic. Description: Display a link to click on to go to a random comic.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
//Generate a random comic page - to use simply create a URL link to "/?randomcomic" //Generate a random comic page - to use simply create a URL link to "/?randomcomic"
function random_comic() { function random_comic() {
$randomComicQuery = new WP_Query(); $randomComicQuery->query('showposts=1&orderby=rand&cat='.get_all_comic_categories_as_cat_string()); $randomComicQuery = new WP_Query(); $randomComicQuery->query('showposts=1&orderby=rand&cat='.get_all_comic_categories_as_cat_string());
while ($randomComicQuery->have_posts()) : $randomComicQuery->the_post(); while ($randomComicQuery->have_posts()) : $randomComicQuery->the_post();
$random_comic_id = get_the_ID(); $random_comic_id = get_the_ID();
endwhile; endwhile;
wp_redirect( get_permalink( $random_comic_id ) ); wp_redirect( get_permalink( $random_comic_id ) );
exit; exit;
} }
if ( isset( $_GET['randomcomic'] ) ) if ( isset( $_GET['randomcomic'] ) )
add_action( 'template_redirect', 'random_comic' ); add_action( 'template_redirect', 'random_comic' );
class widget_comicpress_random_comic extends WP_Widget { class widget_comicpress_random_comic extends WP_Widget {
function widget_comicpress_random_comic() { function widget_comicpress_random_comic() {
$widget_ops = array('classname' => 'widget_comicpress_random_comic', 'description' => 'Displays a link to click to trigger a random comic.' ); $widget_ops = array('classname' => 'widget_comicpress_random_comic', 'description' => 'Displays a link to click to trigger a random comic.' );
$this->WP_Widget('random_comic', 'Random Comic', $widget_ops); $this->WP_Widget('random_comic', 'Random Comic', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?> if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?>
<h2><a href="?randomcomic"><span class="random-comic-icon">?</span> Random Comic</a></h2> <h2><a href="?randomcomic"><span class="random-comic-icon">?</span> Random Comic</a></h2>
<?php <?php
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_random_comic'); register_widget('widget_comicpress_random_comic');
function widget_comicpress_random_comic_init() { function widget_comicpress_random_comic_init() {
new widget_comicpress_random_comic(); new widget_comicpress_random_comic();
} }
add_action('widgets_init', 'widget_comicpress_random_comic_init'); add_action('widgets_init', 'widget_comicpress_random_comic_init');
?> ?>

View File

@ -1,67 +1,67 @@
<?php <?php
/* /*
Widget Name: Random Post Widget Name: Random Post
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display a link to click on to go to a random blog post (not comic). Description: Display a link to click on to go to a random blog post (not comic).
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
//Generate a random post page - to use simply create a URL link to "/?randompost" //Generate a random post page - to use simply create a URL link to "/?randompost"
function random_post() { function random_post() {
$randomComicQuery = new WP_Query(); $randomComicQuery->query('showposts=1&orderby=rand&cat=-'.exclude_comic_categories()); $randomComicQuery = new WP_Query(); $randomComicQuery->query('showposts=1&orderby=rand&cat=-'.exclude_comic_categories());
while ($randomComicQuery->have_posts()) : $randomComicQuery->the_post(); while ($randomComicQuery->have_posts()) : $randomComicQuery->the_post();
$random_comic_id = get_the_ID(); $random_comic_id = get_the_ID();
endwhile; endwhile;
wp_redirect( get_permalink( $random_comic_id ) ); wp_redirect( get_permalink( $random_comic_id ) );
exit; exit;
} }
if ( isset( $_GET['randompost'] ) ) if ( isset( $_GET['randompost'] ) )
add_action( 'template_redirect', 'random_post' ); add_action( 'template_redirect', 'random_post' );
class widget_comicpress_random_post extends WP_Widget { class widget_comicpress_random_post extends WP_Widget {
function widget_comicpress_random_post() { function widget_comicpress_random_post() {
$widget_ops = array('classname' => 'widget_comicpress_random_post', 'description' => 'Displays a link to click to trigger a random blog post.' ); $widget_ops = array('classname' => 'widget_comicpress_random_post', 'description' => 'Displays a link to click to trigger a random blog post.' );
$this->WP_Widget('random_post', 'Random Post', $widget_ops); $this->WP_Widget('random_post', 'Random Post', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?> if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?>
<h2><a href="?randompost"><span class="random-comic-icon">?</span> Random Post</a></h2> <h2><a href="?randompost"><span class="random-comic-icon">?</span> Random Post</a></h2>
<?php <?php
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_random_post'); register_widget('widget_comicpress_random_post');
function widget_comicpress_random_post_init() { function widget_comicpress_random_post_init() {
new widget_comicpress_random_post(); new widget_comicpress_random_post();
} }
add_action('widgets_init', 'widget_comicpress_random_post_init'); add_action('widgets_init', 'widget_comicpress_random_post_init');
?> ?>

View File

@ -1,64 +1,64 @@
<?php <?php
/* /*
Widget Name: Scheduled Posts Widget Name: Scheduled Posts
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Display a list of posts that are due to be scheduled. Description: Display a list of posts that are due to be scheduled.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
class widget_comicpress_show_scheduled_posts extends WP_Widget { class widget_comicpress_show_scheduled_posts extends WP_Widget {
function widget_comicpress_show_scheduled_posts() { function widget_comicpress_show_scheduled_posts() {
$widget_ops = array('classname' => 'widget_comicpress_show_scheduled_posts', 'description' => 'Display a list of posts that are scheduled to be published.' ); $widget_ops = array('classname' => 'widget_comicpress_show_scheduled_posts', 'description' => 'Display a list of posts that are scheduled to be published.' );
$this->WP_Widget('show_scheduled_posts', 'Scheduled Posts', $widget_ops); $this->WP_Widget('show_scheduled_posts', 'Scheduled Posts', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo '<div class="scheduled-post-wrap">'; echo '<div class="scheduled-post-wrap">';
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? 'Scheduled Posts' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? 'Scheduled Posts' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
$scheduled_posts = get_posts('post_status=future&numberposts=-1'); $scheduled_posts = get_posts('post_status=future&numberposts=-1');
if (empty($scheduled_posts)) { if (empty($scheduled_posts)) {
echo '<ul><li>None.</li></ul>'; echo '<ul><li>None.</li></ul>';
} else { } else {
foreach($scheduled_posts as $post) : ?> foreach($scheduled_posts as $post) : ?>
<ul> <ul>
<li><span class="scheduled-post-title"><?php echo $post->post_title; ?></span> <li><span class="scheduled-post-title"><?php echo $post->post_title; ?></span>
<span class="scheduled-post-date"><?php echo date('d/m/Y',$post->post_date); ?></span> </li> <span class="scheduled-post-date"><?php echo date('d/m/Y',$post->post_date); ?></span> </li>
</ul> </ul>
<?php endforeach; <?php endforeach;
} }
echo $after_widget; echo $after_widget;
echo '</div>'; echo '</div>';
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_show_scheduled_posts'); register_widget('widget_comicpress_show_scheduled_posts');
function widget_comicpress_show_scheduled_posts_init() { function widget_comicpress_show_scheduled_posts_init() {
new widget_comicpress_show_scheduled_posts(); new widget_comicpress_show_scheduled_posts();
} }
add_action('widgets_init', 'widget_comicpress_show_scheduled_posts_init'); add_action('widgets_init', 'widget_comicpress_show_scheduled_posts_init');
?> ?>

View File

@ -1,53 +1,53 @@
<?php <?php
/* /*
Widget Name: Search Transcript Widget Name: Search Transcript
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Link to the form template for searching transcripts. Description: Link to the form template for searching transcripts.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
class widget_comicpress_search_transcripts extends WP_Widget { class widget_comicpress_search_transcripts extends WP_Widget {
function widget_comicpress_search_transcripts() { function widget_comicpress_search_transcripts() {
$widget_ops = array('classname' => 'widget_comicpress_search_transcripts', 'description' => 'Displays a form input box for searching transcripts.' ); $widget_ops = array('classname' => 'widget_comicpress_search_transcripts', 'description' => 'Displays a form input box for searching transcripts.' );
$this->WP_Widget('comicpress_search_transcripts', 'Search Transcripts', $widget_ops); $this->WP_Widget('comicpress_search_transcripts', 'Search Transcripts', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
include(get_template_directory() . '/searchform-transcript.php'); include(get_template_directory() . '/searchform-transcript.php');
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php <?php
} }
} }
register_widget('widget_comicpress_search_transcripts'); register_widget('widget_comicpress_search_transcripts');
function widget_comicpress_search_transcripts_init() { function widget_comicpress_search_transcripts_init() {
new widget_comicpress_search_transcripts(); new widget_comicpress_search_transcripts();
} }
add_action('widgets_init', 'widget_comicpress_search_transcripts_init'); add_action('widgets_init', 'widget_comicpress_search_transcripts_init');
?> ?>

View File

@ -1,62 +1,62 @@
<?php <?php
/* /*
Widget Name: Show Transcription Widget Name: Show Transcription
Widget URI: http://comicpress.org/ Widget URI: http://comicpress.org/
Description: Show the stylized transcription in a widget area. Description: Show the stylized transcription in a widget area.
Author: Philip M. Hofer (Frumph) Author: Philip M. Hofer (Frumph)
Version: 1.01 Version: 1.01
Author URI: http://webcomicplanet.com/ Author URI: http://webcomicplanet.com/
*/ */
class widget_comicpress_show_transcription extends WP_Widget { class widget_comicpress_show_transcription extends WP_Widget {
function widget_comicpress_show_transcription() { function widget_comicpress_show_transcription() {
$widget_ops = array('classname' => 'widget_comicpress_show_transcription', 'description' => 'Display the transcription of the current post if there is one.' ); $widget_ops = array('classname' => 'widget_comicpress_show_transcription', 'description' => 'Display the transcription of the current post if there is one.' );
$this->WP_Widget('transcript', 'Transcript', $widget_ops); $this->WP_Widget('transcript', 'Transcript', $widget_ops);
} }
function widget($args, $instance) { function widget($args, $instance) {
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
$transtype = empty($instance['transtype']) ? 'empty' : apply_filters('widget_transtype', $instance['transtype']); $transtype = empty($instance['transtype']) ? 'empty' : apply_filters('widget_transtype', $instance['transtype']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
the_transcript($transtype); the_transcript($transtype);
echo $after_widget; echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {
$instance = $old_instance; $instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); $instance['title'] = strip_tags($new_instance['title']);
$instance['transtype'] = strip_tags($new_instance['transtype']); $instance['transtype'] = strip_tags($new_instance['transtype']);
return $instance; return $instance;
} }
function form($instance) { function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'transtype' => '' ) ); $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'transtype' => '' ) );
$title = strip_tags($instance['title']); $title = strip_tags($instance['title']);
$transtype = strip_tags($instance['transtype']); $transtype = strip_tags($instance['transtype']);
if (empty($transtype)) $transtype = 'styled'; if (empty($transtype)) $transtype = 'styled';
?> ?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<p> <p>
<label><input name="<?php echo $this->get_field_name('transtype'); ?>" id="<?php echo $this->get_field_id('transtype'); ?>-styled" type="radio" value="styled"<?php if ( $transtype == "styled") { echo " checked"; } ?> />Styled</label><br /> <label><input name="<?php echo $this->get_field_name('transtype'); ?>" id="<?php echo $this->get_field_id('transtype'); ?>-styled" type="radio" value="styled"<?php if ( $transtype == "styled") { echo " checked"; } ?> />Styled</label><br />
<label><input name="<?php echo $this->get_field_name('transtype'); ?>" id="<?php echo $this->get_field_id('transtype'); ?>-br" type="radio" value="br"<?php if ( $transtype == "br") { echo " checked"; } ?> />Add BR's</label><br /> <label><input name="<?php echo $this->get_field_name('transtype'); ?>" id="<?php echo $this->get_field_id('transtype'); ?>-br" type="radio" value="br"<?php if ( $transtype == "br") { echo " checked"; } ?> />Add BR's</label><br />
<label><input name="<?php echo $this->get_field_name('transtype'); ?>" id="<?php echo $this->get_field_id('transtype'); ?>-raw" type="radio" value="raw"<?php if ( $transtype == "raw") { echo " checked"; } ?> />Raw Output</label> <label><input name="<?php echo $this->get_field_name('transtype'); ?>" id="<?php echo $this->get_field_id('transtype'); ?>-raw" type="radio" value="raw"<?php if ( $transtype == "raw") { echo " checked"; } ?> />Raw Output</label>
</p> </p>
<?php <?php
} }
} }
register_widget('widget_comicpress_show_transcription'); register_widget('widget_comicpress_show_transcription');
function widget_comicpress_show_transcription_init() { function widget_comicpress_show_transcription_init() {
new widget_comicpress_show_transcription(); new widget_comicpress_show_transcription();
} }
add_action('widgets_init', 'widget_comicpress_show_transcription_init'); add_action('widgets_init', 'widget_comicpress_show_transcription_init');
?> ?>

View File

@ -1,52 +1,52 @@
<?php <?php
function has_wpmu() { function has_wpmu() {
return true; return true;
} }
/** /**
* Find a comic file in the filesystem. * Find a comic file in the filesystem.
* @param string $folder The folder name to search. * @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 $override_post A WP Post object to use in place of global $post.
* @param string $filter The $comic_filename_filters to use. * @param string $filter The $comic_filename_filters to use.
* @return string The relative path to the comic file, or false if not found. * @return string The relative path to the comic file, or false if not found.
*/ */
if (!function_exists('get_comic_path')) { if (!function_exists('get_comic_path')) {
function get_comic_path($folder = 'comic', $override_post = null, $filter = 'default') { function get_comic_path($folder = 'comic', $override_post = null, $filter = 'default') {
global $post, $comic_filename_filters, $comic_folder, $archive_comic_folder, $rss_comic_folder, $comic_pathfinding_errors; global $post, $comic_filename_filters, $comic_folder, $archive_comic_folder, $rss_comic_folder, $comic_pathfinding_errors;
if (isset($comic_filename_filters[$filter])) { if (isset($comic_filename_filters[$filter])) {
$filter_to_use = $comic_filename_filters[$filter]; $filter_to_use = $comic_filename_filters[$filter];
} else { } else {
$filter_to_use = '{date}*.*'; $filter_to_use = '{date}*.*';
} }
switch ($folder) { switch ($folder) {
case "rss": $folder_to_use = $rss_comic_folder; break; case "rss": $folder_to_use = $rss_comic_folder; break;
case "archive": $folder_to_use = $archive_comic_folder; break; case "archive": $folder_to_use = $archive_comic_folder; break;
case "comic": default: $folder_to_use = $comic_folder; break; case "comic": default: $folder_to_use = $comic_folder; break;
} }
if (($wpmu_path = get_option('upload_path')) !== false) { if (($wpmu_path = get_option('upload_path')) !== false) {
$folder_to_use = $wpmu_path . '/' . $folder_to_use; $folder_to_use = $wpmu_path . '/' . $folder_to_use;
} }
$post_to_use = (is_object($override_post)) ? $override_post : $post; $post_to_use = (is_object($override_post)) ? $override_post : $post;
$post_date = mysql2date(CP_DATE_FORMAT, $post_to_use->post_date); $post_date = mysql2date(CP_DATE_FORMAT, $post_to_use->post_date);
$filter_with_date = str_replace('{date}', $post_date, $filter_to_use); $filter_with_date = str_replace('{date}', $post_date, $filter_to_use);
if (count($results = glob("${folder_to_use}/${filter_with_date}")) > 0) { if (count($results = glob("${folder_to_use}/${filter_with_date}")) > 0) {
$comic = reset($results); $comic = reset($results);
if ($wpmu_path !== false) { $comic = str_replace($wpmu_path, "files", $comic); } if ($wpmu_path !== false) { $comic = str_replace($wpmu_path, "files", $comic); }
return $comic; return $comic;
} }
$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); $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; return false;
} }
} }
?> ?>