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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

140
blog.php
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

190
image.php
View File

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

236
index.php
View File

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

View File

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

View File

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

122
links.php
View File

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

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; }

View File

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

View File

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

View File

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

108
page.php
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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>
Express Install Copyright (c) 2007-2008 Adobe Systems Incorporated and its licensors. All Rights Reserved.
*/
System.security.allowDomain("fpdownload.macromedia.com");
var time = 0;
var timeOut = 5; // in seconds
var delay = 10; // in milliseconds
var int_id = setInterval(checkLoaded, delay);
var old_si = null;
var loaderClip = this.createEmptyMovieClip("loaderClip", 0);
var updateSWF = "http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + Math.random();
loaderClip.loadMovie(updateSWF);
function checkLoaded(){
time += delay / 1000;
if (time > timeOut) {
// updater did not load in time, abort load and force alternative content
clearInterval(int_id);
loaderClip.unloadMovie();
loadTimeOut();
}
else if (loaderClip.startInstall.toString() == "[type Function]") {
// updater has loaded successfully AND has determined that it can do the express install
if (old_si == null) {
old_si = loaderClip.startInstall;
loaderClip.startInstall = function() {
clearInterval(int_id);
old_si();
}
loadComplete();
}
}
}
function loadTimeOut() {
callbackSWFObject();
}
function callbackSWFObject() {
getURL("javascript:swfobject.expressInstallCallback();");
}
function loadComplete() {
loaderClip.redirectURL = _level0.MMredirectURL;
loaderClip.MMplayerType = _level0.MMplayerType;
loaderClip.MMdoctitle = _level0.MMdoctitle;
loaderClip.startUpdate();
}
function installStatus(statusValue) {
switch (statusValue) {
case "Download.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.
// The Adobe Flash installer will attempt to reopen the browser window and reload the page containing the SWF.
break;
case "Download.Cancelled":
// The end user chose "NO" when prompted to install the new player.
// By default the SWFObject callback function is called to force alternative content.
callbackSWFObject();
break;
case "Download.Failed":
// 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.
callbackSWFObject();
break;
}
}
/* 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.
*/
System.security.allowDomain("fpdownload.macromedia.com");
var time = 0;
var timeOut = 5; // in seconds
var delay = 10; // in milliseconds
var int_id = setInterval(checkLoaded, delay);
var old_si = null;
var loaderClip = this.createEmptyMovieClip("loaderClip", 0);
var updateSWF = "http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + Math.random();
loaderClip.loadMovie(updateSWF);
function checkLoaded(){
time += delay / 1000;
if (time > timeOut) {
// updater did not load in time, abort load and force alternative content
clearInterval(int_id);
loaderClip.unloadMovie();
loadTimeOut();
}
else if (loaderClip.startInstall.toString() == "[type Function]") {
// updater has loaded successfully AND has determined that it can do the express install
if (old_si == null) {
old_si = loaderClip.startInstall;
loaderClip.startInstall = function() {
clearInterval(int_id);
old_si();
}
loadComplete();
}
}
}
function loadTimeOut() {
callbackSWFObject();
}
function callbackSWFObject() {
getURL("javascript:swfobject.expressInstallCallback();");
}
function loadComplete() {
loaderClip.redirectURL = _level0.MMredirectURL;
loaderClip.MMplayerType = _level0.MMplayerType;
loaderClip.MMdoctitle = _level0.MMdoctitle;
loaderClip.startUpdate();
}
function installStatus(statusValue) {
switch (statusValue) {
case "Download.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.
// The Adobe Flash installer will attempt to reopen the browser window and reload the page containing the SWF.
break;
case "Download.Cancelled":
// The end user chose "NO" when prompted to install the new player.
// By default the SWFObject callback function is called to force alternative content.
callbackSWFObject();
break;
case "Download.Failed":
// 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.
callbackSWFObject();
break;
}
}

View File

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

View File

@ -1,154 +1,154 @@
<?php
/*
Widget Name: Bookmark
Widget URI: http://comicpress.org/
Description: Adds a bookmark set of icons to save the page your own.
Author: Tyler Martin
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
function comicpress_comic_bookmark() {
global $post, $wp_query; ?>
<div class="comic-bookmark">
<script language="javascript" type="text/javascript">
<!--
/* Bookmark Config Settings */
var cl = 31;
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 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 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 comicDir = '/'; //alter this if you run multiple comics in different directories on your site.
/* Now write out the applicable links */
createCookie('t', 1);
var c = readCookie('t');
if(c && document.getElementById) {
var l = readCookie('bm');
var gt = imgGotoOff;
var ct = imgClearOff;
if(l) {
gt = imgGotoOn;
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>');
<?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="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="#" 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()) { ?>
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="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>');
<?php } ?>
}
/* Below are our functions for this little script */
function bmhome() {
if(document.getElementById) {
document.getElementById('gtc').src = imgGotoOn;
document.getElementById('rmc').src = imgClearOn;
}
createCookie("bm", "<?php the_permalink(); ?>", cl);
}
function bm() {
if(document.getElementById) {
document.getElementById('gtc').src = imgGotoOn;
document.getElementById('rmc').src = imgClearOn;
}
createCookie("bm", window.location, cl);
}
function bmc() {
if(document.getElementById) {
document.getElementById('gtc').src = imgGotoOff;
document.getElementById('rmc').src = imgClearOff;
}
createCookie("bm","",-1);
}
function gto() {
var g = readCookie('bm');
if(g) {
window.location = g;
}
}
/* The follow functions have been borrowed from Peter-Paul Koch. Please find them here: http://www.quirksmode.org */
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
} else var expires = "";
document.cookie = name+"="+value+expires+"; path="+comicDir;
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
//-->
</script>
</div>
<?php }
class widget_comicpress_bookmark extends WP_Widget {
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.' );
$this->WP_Widget('comicpress_bookmark', 'ComicPress Bookmark', $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
comicpress_comic_bookmark();
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_bookmark');
function widget_comicpress_bookmark_init() {
new widget_comicpress_bookmark();
}
add_action('widgets_init', 'widget_comicpress_bookmark_init');
<?php
/*
Widget Name: Bookmark
Widget URI: http://comicpress.org/
Description: Adds a bookmark set of icons to save the page your own.
Author: Tyler Martin
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
function comicpress_comic_bookmark() {
global $post, $wp_query; ?>
<div class="comic-bookmark">
<script language="javascript" type="text/javascript">
<!--
/* Bookmark Config Settings */
var cl = 31;
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 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 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 comicDir = '/'; //alter this if you run multiple comics in different directories on your site.
/* Now write out the applicable links */
createCookie('t', 1);
var c = readCookie('t');
if(c && document.getElementById) {
var l = readCookie('bm');
var gt = imgGotoOff;
var ct = imgClearOff;
if(l) {
gt = imgGotoOn;
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>');
<?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="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="#" 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()) { ?>
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="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>');
<?php } ?>
}
/* Below are our functions for this little script */
function bmhome() {
if(document.getElementById) {
document.getElementById('gtc').src = imgGotoOn;
document.getElementById('rmc').src = imgClearOn;
}
createCookie("bm", "<?php the_permalink(); ?>", cl);
}
function bm() {
if(document.getElementById) {
document.getElementById('gtc').src = imgGotoOn;
document.getElementById('rmc').src = imgClearOn;
}
createCookie("bm", window.location, cl);
}
function bmc() {
if(document.getElementById) {
document.getElementById('gtc').src = imgGotoOff;
document.getElementById('rmc').src = imgClearOff;
}
createCookie("bm","",-1);
}
function gto() {
var g = readCookie('bm');
if(g) {
window.location = g;
}
}
/* The follow functions have been borrowed from Peter-Paul Koch. Please find them here: http://www.quirksmode.org */
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
} else var expires = "";
document.cookie = name+"="+value+expires+"; path="+comicDir;
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
//-->
</script>
</div>
<?php }
class widget_comicpress_bookmark extends WP_Widget {
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.' );
$this->WP_Widget('comicpress_bookmark', 'ComicPress Bookmark', $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
comicpress_comic_bookmark();
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_bookmark');
function widget_comicpress_bookmark_init() {
new widget_comicpress_bookmark();
}
add_action('widgets_init', 'widget_comicpress_bookmark_init');
?>

View File

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

View File

@ -1,53 +1,53 @@
<?php
/*
Widget Name: Calendar
Widget URI: http://comicpress.org/
Description: Display a calendar of this months posts.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_calendar extends WP_Widget {
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.)' );
$this->WP_Widget('comicpress_calendar', 'Comicpress Calendar', $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
get_calendar();
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_calendar');
function widget_comicpress_calendar_init() {
new widget_comicpress_calendar();
}
add_action('widgets_init', 'widget_comicpress_calendar_init');
<?php
/*
Widget Name: Calendar
Widget URI: http://comicpress.org/
Description: Display a calendar of this months posts.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_calendar extends WP_Widget {
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.)' );
$this->WP_Widget('comicpress_calendar', 'Comicpress Calendar', $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
get_calendar();
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_calendar');
function widget_comicpress_calendar_init() {
new widget_comicpress_calendar();
}
add_action('widgets_init', 'widget_comicpress_calendar_init');
?>

View File

@ -1,53 +1,53 @@
<?php
/*
Widget Name: Comic Comments
Widget URI: http://comicpress.org/
Description: Display a comments link to put inside the comic area.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_comments extends WP_Widget {
function widget_comicpress_comments() {
$widget_ops = array('classname' => 'widget_comicpress_comments', 'description' => 'Displays a comments link.' );
$this->WP_Widget('comic_comments', 'Comic Comments', $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$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
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_comments');
function widget_comicpress_comments_init() {
new widget_comicpress_comments();
}
add_action('widgets_init', 'widget_comicpress_comments_init');
<?php
/*
Widget Name: Comic Comments
Widget URI: http://comicpress.org/
Description: Display a comments link to put inside the comic area.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_comments extends WP_Widget {
function widget_comicpress_comments() {
$widget_ops = array('classname' => 'widget_comicpress_comments', 'description' => 'Displays a comments link.' );
$this->WP_Widget('comic_comments', 'Comic Comments', $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$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
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_comments');
function widget_comicpress_comments_init() {
new widget_comicpress_comments();
}
add_action('widgets_init', 'widget_comicpress_comments_init');
?>

View File

@ -1,53 +1,53 @@
<?php
/*
Widget Name: Comic Date
Widget URI: http://comicpress.org/
Description: Display's the date of post of the comic.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_comic_date extends WP_Widget {
function widget_comicpress_comic_date() {
$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);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $title; } ?> <?php the_time('F jS, Y'); ?>
<?php echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_comic_date');
function widget_comicpress_comic_date_init() {
new widget_comicpress_comic_date();
}
add_action('widgets_init', 'widget_comicpress_comic_date_init');
<?php
/*
Widget Name: Comic Date
Widget URI: http://comicpress.org/
Description: Display's the date of post of the comic.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_comic_date extends WP_Widget {
function widget_comicpress_comic_date() {
$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);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $title; } ?> <?php the_time('F jS, Y'); ?>
<?php echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_comic_date');
function widget_comicpress_comic_date_init() {
new widget_comicpress_comic_date();
}
add_action('widgets_init', 'widget_comicpress_comic_date_init');
?>

View File

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

View File

@ -1,99 +1,99 @@
<?php
/*
Widget Name: Control Panel
Widget URI: http://comicpress.org/
Description: Display an area for login and logout, forgot password and register.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
// The Control Panel function
function comicpress_show_control_panel() {
global $wpmu_version; ?>
<ul><li>
<?php if (!is_user_logged_in()) { ?>
<form action="<?php bloginfo('url') ?>/wp-login.php" method="post">
UserName:<br />
<input type="text" name="log" id="sname" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="22" /><br /><br />
Password:<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 />
<br />
<button type="submit" class="button">Login</button>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
</form>
<br />
<?php if (!empty($wpmu_version)) { ?>
<a href="<?php bloginfo('url') ?>/wp-signup.php">Register</a><br />
<?php } else { ?>
<a href="<?php bloginfo('url') ?>/wp-register.php">Register</a><br />
<?php } ?>
<a href="<?php bloginfo('url') ?>/wp-login.php?action=lostpassword">Recover password</a>
<?php } else { ?>
<?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' ); ?>
<li><a href="<?php echo $uri; ?>">Logout</a></li>
<?php wp_register(); ?>
<?php
if (function_exists('pm_inbox_new_count')) {
$newmsgs = 0;
$newmsgs = pm_inbox_new_count($current_user->ID);
if (!$newmsgs) $newmsgs=0;
}
?>
<?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?profile=user">Profile</a></li>
<?php } else { ?>
<li><a href="/wp-admin/profile.php">Profile</a></li>
<?php }
} ?>
</li></ul>
<?php
}
class widget_comicpress_show_control_panel extends WP_Widget {
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.' );
$this->WP_Widget('control_panel', 'Control Panel', $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? 'Control Panel' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
comicpress_show_control_panel();
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_show_control_panel');
function widget_comicpress_show_control_panel_init() {
new widget_comicpress_show_control_panel();
}
add_action('widgets_init', 'widget_comicpress_show_control_panel_init');
<?php
/*
Widget Name: Control Panel
Widget URI: http://comicpress.org/
Description: Display an area for login and logout, forgot password and register.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
// The Control Panel function
function comicpress_show_control_panel() {
global $wpmu_version; ?>
<ul><li>
<?php if (!is_user_logged_in()) { ?>
<form action="<?php bloginfo('url') ?>/wp-login.php" method="post">
UserName:<br />
<input type="text" name="log" id="sname" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="22" /><br /><br />
Password:<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 />
<br />
<button type="submit" class="button">Login</button>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
</form>
<br />
<?php if (!empty($wpmu_version)) { ?>
<a href="<?php bloginfo('url') ?>/wp-signup.php">Register</a><br />
<?php } else { ?>
<a href="<?php bloginfo('url') ?>/wp-register.php">Register</a><br />
<?php } ?>
<a href="<?php bloginfo('url') ?>/wp-login.php?action=lostpassword">Recover password</a>
<?php } else { ?>
<?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' ); ?>
<li><a href="<?php echo $uri; ?>">Logout</a></li>
<?php wp_register(); ?>
<?php
if (function_exists('pm_inbox_new_count')) {
$newmsgs = 0;
$newmsgs = pm_inbox_new_count($current_user->ID);
if (!$newmsgs) $newmsgs=0;
}
?>
<?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?profile=user">Profile</a></li>
<?php } else { ?>
<li><a href="/wp-admin/profile.php">Profile</a></li>
<?php }
} ?>
</li></ul>
<?php
}
class widget_comicpress_show_control_panel extends WP_Widget {
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.' );
$this->WP_Widget('control_panel', 'Control Panel', $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? 'Control Panel' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
comicpress_show_control_panel();
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_show_control_panel');
function widget_comicpress_show_control_panel_init() {
new widget_comicpress_show_control_panel();
}
add_action('widgets_init', 'widget_comicpress_show_control_panel_init');
?>

View File

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

View File

@ -1,51 +1,51 @@
<?php
/*
Plugin Name: Keenspot Newsbox Widget
Plugin URI: http://shivae.net/
Description: Newsbox Widget
Author: Tiffany Ross
Version: 1
Author URI: http://shivae.net
*/
class widget_keenspot_newsbox extends WP_Widget {
function widget_keenspot_newsbox() {
$widget_ops = array('classname' => 'widget_keenspot_newsbox', 'description' => 'Displays the keenspot newsbox.' );
$this->WP_Widget('keenspotnewsbox', 'Keenspot Newsbox', $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['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 $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_keenspot_newsbox');
function widget_keenspot_newsbox_init() {
new widget_keenspot_newsbox();
}
add_action('widgets_init', 'widget_keenspot_newsbox_init');
?>
<?php
/*
Plugin Name: Keenspot Newsbox Widget
Plugin URI: http://shivae.net/
Description: Newsbox Widget
Author: Tiffany Ross
Version: 1
Author URI: http://shivae.net
*/
class widget_keenspot_newsbox extends WP_Widget {
function widget_keenspot_newsbox() {
$widget_ops = array('classname' => 'widget_keenspot_newsbox', 'description' => 'Displays the keenspot newsbox.' );
$this->WP_Widget('keenspotnewsbox', 'Keenspot Newsbox', $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['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 $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_keenspot_newsbox');
function widget_keenspot_newsbox_init() {
new widget_keenspot_newsbox();
}
add_action('widgets_init', 'widget_keenspot_newsbox_init');
?>

View File

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

View File

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

View File

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

View File

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

View File

@ -1,57 +1,57 @@
<?php
/*
Widget Name: Permalink
Widget URI: http://comicpress.org/
Description: Display a permalink link that can be used in any area around the comic.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_permalink extends WP_Widget {
function widget_comicpress_permalink() {
$widget_ops = array('classname' => 'widget_comicpress_permalink', 'description' => 'Displays a permalink.' );
$this->WP_Widget('permalink', 'Permalink', $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$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>
<?php
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['comment'] = strip_tags($new_instance['comment']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' , 'comment' => '') );
$title = strip_tags($instance['title']);
$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><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
}
}
register_widget('widget_comicpress_permalink');
function widget_comicpress_permalink_init() {
new widget_comicpress_permalink();
}
add_action('widgets_init', 'widget_comicpress_permalink_init');
<?php
/*
Widget Name: Permalink
Widget URI: http://comicpress.org/
Description: Display a permalink link that can be used in any area around the comic.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_permalink extends WP_Widget {
function widget_comicpress_permalink() {
$widget_ops = array('classname' => 'widget_comicpress_permalink', 'description' => 'Displays a permalink.' );
$this->WP_Widget('permalink', 'Permalink', $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$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>
<?php
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['comment'] = strip_tags($new_instance['comment']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' , 'comment' => '') );
$title = strip_tags($instance['title']);
$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><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
}
}
register_widget('widget_comicpress_permalink');
function widget_comicpress_permalink_init() {
new widget_comicpress_permalink();
}
add_action('widgets_init', 'widget_comicpress_permalink_init');
?>

View File

@ -1,68 +1,68 @@
<?php
/*
Widget Name: Random Comic
Widget URI: http://comicpress.org/
Description: Display a link to click on to go to a random comic.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
//Generate a random comic page - to use simply create a URL link to "/?randomcomic"
function random_comic() {
$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();
$random_comic_id = get_the_ID();
endwhile;
wp_redirect( get_permalink( $random_comic_id ) );
exit;
}
if ( isset( $_GET['randomcomic'] ) )
add_action( 'template_redirect', 'random_comic' );
class widget_comicpress_random_comic extends WP_Widget {
function widget_comicpress_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);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?>
<h2><a href="?randomcomic"><span class="random-comic-icon">?</span> Random Comic</a></h2>
<?php
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_random_comic');
function widget_comicpress_random_comic_init() {
new widget_comicpress_random_comic();
}
add_action('widgets_init', 'widget_comicpress_random_comic_init');
<?php
/*
Widget Name: Random Comic
Widget URI: http://comicpress.org/
Description: Display a link to click on to go to a random comic.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
//Generate a random comic page - to use simply create a URL link to "/?randomcomic"
function random_comic() {
$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();
$random_comic_id = get_the_ID();
endwhile;
wp_redirect( get_permalink( $random_comic_id ) );
exit;
}
if ( isset( $_GET['randomcomic'] ) )
add_action( 'template_redirect', 'random_comic' );
class widget_comicpress_random_comic extends WP_Widget {
function widget_comicpress_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);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?>
<h2><a href="?randomcomic"><span class="random-comic-icon">?</span> Random Comic</a></h2>
<?php
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_random_comic');
function widget_comicpress_random_comic_init() {
new widget_comicpress_random_comic();
}
add_action('widgets_init', 'widget_comicpress_random_comic_init');
?>

View File

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

View File

@ -1,64 +1,64 @@
<?php
/*
Widget Name: Scheduled Posts
Widget URI: http://comicpress.org/
Description: Display a list of posts that are due to be scheduled.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_show_scheduled_posts extends WP_Widget {
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.' );
$this->WP_Widget('show_scheduled_posts', 'Scheduled Posts', $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo '<div class="scheduled-post-wrap">';
echo $before_widget;
$title = empty($instance['title']) ? 'Scheduled Posts' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
$scheduled_posts = get_posts('post_status=future&numberposts=-1');
if (empty($scheduled_posts)) {
echo '<ul><li>None.</li></ul>';
} else {
foreach($scheduled_posts as $post) : ?>
<ul>
<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>
</ul>
<?php endforeach;
}
echo $after_widget;
echo '</div>';
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_show_scheduled_posts');
function widget_comicpress_show_scheduled_posts_init() {
new widget_comicpress_show_scheduled_posts();
}
add_action('widgets_init', 'widget_comicpress_show_scheduled_posts_init');
<?php
/*
Widget Name: Scheduled Posts
Widget URI: http://comicpress.org/
Description: Display a list of posts that are due to be scheduled.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_show_scheduled_posts extends WP_Widget {
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.' );
$this->WP_Widget('show_scheduled_posts', 'Scheduled Posts', $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo '<div class="scheduled-post-wrap">';
echo $before_widget;
$title = empty($instance['title']) ? 'Scheduled Posts' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
$scheduled_posts = get_posts('post_status=future&numberposts=-1');
if (empty($scheduled_posts)) {
echo '<ul><li>None.</li></ul>';
} else {
foreach($scheduled_posts as $post) : ?>
<ul>
<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>
</ul>
<?php endforeach;
}
echo $after_widget;
echo '</div>';
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_show_scheduled_posts');
function widget_comicpress_show_scheduled_posts_init() {
new widget_comicpress_show_scheduled_posts();
}
add_action('widgets_init', 'widget_comicpress_show_scheduled_posts_init');
?>

View File

@ -1,53 +1,53 @@
<?php
/*
Widget Name: Search Transcript
Widget URI: http://comicpress.org/
Description: Link to the form template for searching transcripts.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_search_transcripts extends WP_Widget {
function widget_comicpress_search_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);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
include(get_template_directory() . '/searchform-transcript.php');
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_search_transcripts');
function widget_comicpress_search_transcripts_init() {
new widget_comicpress_search_transcripts();
}
add_action('widgets_init', 'widget_comicpress_search_transcripts_init');
<?php
/*
Widget Name: Search Transcript
Widget URI: http://comicpress.org/
Description: Link to the form template for searching transcripts.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_search_transcripts extends WP_Widget {
function widget_comicpress_search_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);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
include(get_template_directory() . '/searchform-transcript.php');
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( '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>
<?php
}
}
register_widget('widget_comicpress_search_transcripts');
function widget_comicpress_search_transcripts_init() {
new widget_comicpress_search_transcripts();
}
add_action('widgets_init', 'widget_comicpress_search_transcripts_init');
?>

View File

@ -1,62 +1,62 @@
<?php
/*
Widget Name: Show Transcription
Widget URI: http://comicpress.org/
Description: Show the stylized transcription in a widget area.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_show_transcription extends WP_Widget {
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.' );
$this->WP_Widget('transcript', 'Transcript', $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
$transtype = empty($instance['transtype']) ? 'empty' : apply_filters('widget_transtype', $instance['transtype']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
the_transcript($transtype);
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['transtype'] = strip_tags($new_instance['transtype']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'transtype' => '' ) );
$title = strip_tags($instance['title']);
$transtype = strip_tags($instance['transtype']);
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><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'); ?>-raw" type="radio" value="raw"<?php if ( $transtype == "raw") { echo " checked"; } ?> />Raw Output</label>
</p>
<?php
}
}
register_widget('widget_comicpress_show_transcription');
function widget_comicpress_show_transcription_init() {
new widget_comicpress_show_transcription();
}
add_action('widgets_init', 'widget_comicpress_show_transcription_init');
<?php
/*
Widget Name: Show Transcription
Widget URI: http://comicpress.org/
Description: Show the stylized transcription in a widget area.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://webcomicplanet.com/
*/
class widget_comicpress_show_transcription extends WP_Widget {
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.' );
$this->WP_Widget('transcript', 'Transcript', $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
$transtype = empty($instance['transtype']) ? 'empty' : apply_filters('widget_transtype', $instance['transtype']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
the_transcript($transtype);
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['transtype'] = strip_tags($new_instance['transtype']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'transtype' => '' ) );
$title = strip_tags($instance['title']);
$transtype = strip_tags($instance['transtype']);
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><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'); ?>-raw" type="radio" value="raw"<?php if ( $transtype == "raw") { echo " checked"; } ?> />Raw Output</label>
</p>
<?php
}
}
register_widget('widget_comicpress_show_transcription');
function widget_comicpress_show_transcription_init() {
new widget_comicpress_show_transcription();
}
add_action('widgets_init', 'widget_comicpress_show_transcription_init');
?>

View File

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