Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-09-19 03:11:37 -07:00
parent efee24cff9
commit 57afce8c1c
47 changed files with 1953 additions and 1108 deletions

10
404.php
View File

@ -1,15 +1,7 @@
<?php get_header(); ?>
<?php include(get_template_directory() . '/layout-head.php'); ?>
<?php get_sidebar('overblog'); ?>
<?php if (is_cp_theme_layout('3c')) get_sidebar('left'); ?>
<?php if (!is_cp_theme_layout('v3c,v')) { ?>
<div id="content" class="narrowcolumn">
<div class="column">
<?php } ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<h2 class="pagetitle">Page Not Found</h2>

View File

@ -5,7 +5,7 @@ Template Name: Comic Calendar Archive
?>
<?php get_header(); ?>
<?php include(get_template_directory() . '/layout-head.php'); ?>
<?php remove_filter('pre_get_posts','comicpress_members_filter'); ?>
<?php
$dayWidth = 22; //set to .cpcal-day total width in pixels including: width, left & right border, left & right margin, left & right padding
@ -67,7 +67,7 @@ $month['11'] = array('month' => 'November', 'days' => '30');
$month['12'] = array('month' => 'December', 'days' => '31');
?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>

View File

@ -6,7 +6,7 @@ Template Name: Comic Storyline with Thumbs
<?php get_header(); ?>
<?php include(get_template_directory() . '/layout-head.php'); ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>
@ -27,7 +27,7 @@ Template Name: Comic Storyline with Thumbs
$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_in_category = get_terminal_post_in_category($category_id,true);
$first_comic_permalink = get_permalink($first_comic_in_category->ID);
$archive_image = null;
foreach (array("archive", "rss", "comic") as $type) {

View File

@ -6,7 +6,7 @@ Template Name: Comic Storyline Archive
<?php get_header(); ?>
<?php include(get_template_directory() . '/layout-head.php'); ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>

View File

@ -3,19 +3,23 @@
Template Name: Comic Year Archive
*/
?>
<?
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 get_header(); ?>
<?php remove_filter('pre_get_posts','comicpress_members_filter'); ?>
<?php include(get_template_directory() . '/layout-head.php'); ?>
<?php
if (isset($_REQUEST['archive_year'])) {
$archive_year = $_REQUEST['archive_year'];
} else {
$latest_comic = get_terminal_post_in_category(get_all_comic_categories_as_cat_string(),true);
$archive_year = get_post_time('Y', false, $latest_comic, true);
}
if (empty($archive_year) || $archive_year == '') $archive_year = date('Y');
?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>
@ -24,7 +28,6 @@ Template Name: Comic Year Archive
<?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 ) {
@ -34,7 +37,7 @@ Template Name: Comic Year Archive
</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);
<?php $comicArchive = new WP_Query(); $comicArchive->query('&showposts=-1&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; ?>

View File

@ -6,7 +6,7 @@ Template Name: Comic Archive
<?php get_header(); ?>
<?php include(get_template_directory() . '/layout-head.php'); ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<?php while (have_posts()) : the_post() ?>

View File

@ -1,18 +1,24 @@
<?php get_header(); ?>
<?php get_header(); global $category_thumbnail_postcount; ?>
<?php remove_filter('pre_get_posts','comicpress_members_filter'); ?>
<?php include(get_template_directory() . '/layout-head.php'); ?>
<?php
global $archive_display_order;
if (empty($archive_display_order)) $archive_display_order = 'desc';
$tmp_search = new WP_Query($query_string.'&order='.$archive_display_order.'&show_posts=-1&posts_per_page=-1');
$tmp_search = new WP_Query($query_string.'&order='.$archive_display_order.'&show_posts=-1&posts_per_page=-1&cat=-'.$members_post_category);
$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='.$archive_display_order); ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<?php
if (is_category() && in_comic_category()) {
$posts = query_posts($query_string.'&showposts='.$category_thumbnail_postcount.'&order='.$archive_display_order);
} else {
$posts = query_posts($query_string.'&order='.$archive_display_order);
} ?>
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
@ -39,17 +45,54 @@
<?php while (have_posts()) : the_post() ?>
<?php if (is_category() && in_comic_category()) { ?>
<?php global $archive_comic_width; if (in_comic_category()) { ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="comicthumbwrap">
<div class="comicarchiveframe" style="width:120px;">
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="Click for full size." width="120" /></a><br />
</div>
</div>
<?php } else { ?>
<?php global $archive_comic_width; if (in_comic_category()) { ?>
<div class="<?php comicpress_post_class(); ?>">
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="post-info">
<?php if ($enable_comic_post_author_gravatar == 'yes') { ?>
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),get_avatar(get_the_author_meta('email'), 64)); ?></div>
<?php } ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php if ($enable_comic_post_calendar == 'yes') { ?>
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<?php } ?>
<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'); ?> <?php edit_post_link('Edit Post', ' [ ', ' ] '); ?></small><br />
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
</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>
</div>
<?php } else { ?>
<div class="<?php comicpress_post_class(); ?>">
<div class="post-head"></div>
<div class="post">
<div class="post-info">
<?php if ($enable_comic_post_author_gravatar == 'yes') { ?>
<?php if ($enable_post_author_gravatar == 'yes') { ?>
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),get_avatar(get_the_author_meta('email'), 64)); ?></div>
<?php } ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php if ($enable_comic_post_calendar == 'yes') { ?>
<?php if ($enable_post_calendar == 'yes') { ?>
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
@ -57,63 +100,35 @@
<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'); ?> <?php edit_post_link('Edit Post', ' [ ', ' ] '); ?></small><br />
<?php if ($disable_categories_in_posts != 'yes') { ?>
<small> Posted In: <?php the_category(','); ?></small><br />
<?php } ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
</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>
</div>
<?php } else { ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="post-head"></div>
<div class="post">
<div class="post-info">
<?php if ($enable_post_author_gravatar == 'yes') { ?>
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),get_avatar(get_the_author_meta('email'), 64)); ?></div>
<?php } ?>
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
<?php if ($enable_post_calendar == 'yes') { ?>
<div class="post-date">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
<?php global $excerpt_or_content_archive;
if ($excerpt_or_content_archive != 'excerpt') {
the_content('&darr; Read the rest of this entry...');
} else {
the_excerpt();
} ?>
<br class="clear-margins" />
<div class="post-extras">
<div class="tags">
<?php the_tags('&#9492; Tags: ',',','<br />');?>
</div>
<div class="clear"></div>
</div>
<?php } ?>
<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'); ?> <?php edit_post_link('Edit Post', ' [ ', ' ] '); ?></small><br />
<?php if ($disable_categories_in_posts != 'yes') { ?>
<small> Posted In: <?php the_category(','); ?></small><br />
<?php } ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
</div>
<div class="clear"></div>
<div class="post-foot"></div>
</div>
<?php global $excerpt_or_content_archive;
if ($excerpt_or_content_archive != 'excerpt') {
the_content('&darr; Read the rest of this entry...');
} else {
the_excerpt();
} ?>
<br class="clear-margins" />
<div class="post-extras">
<div class="tags">
<?php the_tags('&#9492; Tags: ',',','<br />');?>
</div>
<div class="clear"></div>
</div>
</div>
<div class="post-foot"></div>
</div>
<?php } ?>
<?php } ?>
<?php } ?>
<?php endwhile; ?>
<?php else : ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-head"></div>
<div class="post">
<h3>No entries found.</h3>

View File

@ -6,7 +6,7 @@ Template Name: Archives
<?php get_header(); ?>
<?php include(get_template_directory() . '/layout-head.php'); ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<div id="archivepage">

View File

@ -11,7 +11,7 @@
if (empty($curauth)) { ?>
<h2>No such author.</h2>
<?php } else { ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<div class="userpage-avatar">

View File

@ -13,7 +13,7 @@ Templete Author Email: philip@frumph.net
<?php if (!empty($comicnum)): ?>
<?php $temppost = $post; ?>
<?php $post = & get_post( $comicnum ); ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<div style="float:right;">
@ -88,7 +88,7 @@ Templete Author Email: philip@frumph.net
</div>
<?php else: ?>
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page" id="post-<?php the_ID() ?>">
<h2 class="pagetitle"><?php the_title() ?></h2>

View File

@ -238,6 +238,17 @@ $options = array (
"id" => "comicpress-excerpt_or_content_search",
"default" => "excerpt",
"type" => "comicpress-excerpt_or_content_search"),
array(
"id" => "comicpress-category_thumbnail_postcount",
"default" => "30",
"type" => "comicpress-category_thumbnail_postcount"),
array(
"id" => "comicpress-members_post_category",
"default" => "",
"type" => "comicpress-members_post_category"),
array("type" => "close")
);

View File

@ -8,13 +8,12 @@ function comicpress_options() {
}
function comicpress_admin_page_head() {
global $is_IE;
if ($is_IE) {
?>
global $is_IE;
if ($is_IE) { ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/js/tabbed/tabbed_pages_ie.css" type="text/css" media="screen" />
<?php } else { ?>
<?php } else { ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/js/tabbed/tabbed_pages.css" type="text/css" media="screen" />
<?php } ?>
<?php } ?>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/tabbed/tabbed_pages.js"></script>
<?php }
@ -44,14 +43,14 @@ function comicpress_admin() {
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>
<div id="message" 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>
<div id="message" class="updated fade"><p><strong>Options/Settings RESET!</strong></p></div>
<?php
}
}
@ -67,896 +66,46 @@ function comicpress_admin() {
?>
<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 id="cpadmin">
<div class="on" title="themestyle"><span>Theme Style</span></div>
<div class="off" title="generaloptions"><span>General</span></div>
<div class="off" title="indexoptions"><span>Index Page</span></div>
<div class="off" title="postoptions"><span>Post</span></div>
<div class="off" title="menubaroptions"><span>Menubar</span></div>
<div class="off" title="customheader"><span>Custom Header</span></div>
<div class="off" title="buyprintoptions"><span>Buy Print</span></div>
</div>
<div id="themestyle" class="show">
<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_layout": ?>
<tr>
<th scope="row"><strong>Choose which theme layout you want to use.</strong><br /><br />This is the layout 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 } ?>>3-Column</option>
<option class="level-0" value="gn" <?php if (get_option($value['id'])=='gn') {?>selected="selected" <?php } ?>>Graphic Novel</option>
<option class="level-0" value="v" <?php if (get_option($value['id'])=='v') {?>selected="selected" <?php } ?>>Vertical</option>
<option class="level-0" value="v3c" <?php if (get_option($value['id'])=='v3c') {?>selected="selected" <?php } ?>>Vertical 3-Column</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>
</tr>
<?php break;
case "comicpress-themepack_directory":
$current_themepack_directory = get_option($value['id']);
if (empty($current_themepack_directory)) $current_themepack_directory = 'silver';
$count = count($results = glob(get_template_directory() . '/themepack/'.$current_themepack_directory.'/*'));
$themepack_directories = glob(get_template_directory() . '/themepack/*');
?>
<tr>
<th scope="row"><strong>Themepack</strong><br /><br />Choose a Themepack to use.<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="none" <?php if ($current_themepack_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($themepack_directories as $themepack_dirs) {
if (is_dir($themepack_dirs)) {
$themepack_dir_name = basename($themepack_dirs); ?>
<option class="level-0" value="<?php echo $themepack_dir_name; ?>" <?php if ($current_themepack_directory == $themepack_dir_name) { ?>selected="selected"<?php } ?>><?php echo $themepack_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
</tr>
<tr>
<td></td>
<td valign="top" colspan="5">
<?php
foreach ($themepack_directories as $themepack_dirs) {
if (is_dir($themepack_dirs)) {
$themepack_dir_name = basename($themepack_dirs); ?>
<div style="width: 100%; padding: 2px;">
<div style="width: 180px; float: left;">
<?php if (file_exists(get_template_directory() .'/themepack/'.$themepack_dir_name.'/screenshot.png')) { ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/themepack/<?php echo $themepack_dir_name; ?>/screenshot.png" width="180" alt="<?php echo $themepack_dir_name; ?>" />
<?php } ?>
</div>
<?php if (file_exists(get_template_directory() .'/themepack/'.$themepack_dir_name.'/notes.php')) { ?>
<div style="float: left; margin-left: 10px;">
<?php include(get_template_directory() . '/themepack/'.$themepack_dir_name.'/notes.php'); ?>
</div>
<?php } ?>
<div style="clear:both;"></div>
</div>
<?php }
}
?>
</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 id="cpadmin">
<div class="on" title="themestyle"><span>Theme Style</span></div>
<div class="off" title="generaloptions"><span>General</span></div>
<div class="off" title="indexoptions"><span>Index Page</span></div>
<div class="off" title="postoptions"><span>Post</span></div>
<div class="off" title="archivesearch"><span>Archive &amp; Search</span></div>
<div class="off" title="menubaroptions"><span>Menubar</span></div>
<div class="off" title="customheader"><span>Custom Header</span></div>
<div class="off" title="buyprintoptions"><span>Buy Print</span></div>
<div class="off" title="membersoptions"><span>Members</span></div>
</div>
<div id="generaloptions" class="hide">
<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-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 /></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>
<td valign="top">
If not enabled it will use the .customwidgetarea user made styling only and only the Sidebar-left and Sidebar-right will use sidebar styling.<br />
</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>
<td valign="top">
Numbered pagination appears on the home(index) page, the authors page the blog template and comments/single when there are more then the set # of comments per page. It's default is off, it is styled like the menubar.
</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 />
<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>
<td valign="top">
What you can do with this is use the entire browser for your canvas instead of the 780px/980px that the two elements keep you in.</th>
</td>
</tr>
<?php break;
<?php include(get_template_directory() . '/options/themestyle.php'); ?>
<?php include(get_template_directory() . '/options/generaloptions.php'); ?>
<?php include(get_template_directory() . '/options/indexoptions.php'); ?>
<?php include(get_template_directory() . '/options/postoptions.php'); ?>
<?php include(get_template_directory() . '/options/archivesearchoptions.php'); ?>
<?php include(get_template_directory() . '/options/menubaroptions.php'); ?>
<?php include(get_template_directory() . '/options/customheaderoptions.php'); ?>
<?php include(get_template_directory() . '/options/buyprintoptions.php'); ?>
<?php include(get_template_directory() . '/options/membersoptions.php'); ?>
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>
<td valign="top">
When a user or yourself puts their mouse cursor over the comic that is displayed on either the index or single page the action that happens next is the first step in the larger, bigger, more astonishing consequence of actually having any the other things you place your mouse cursor over and click. You click, it goes to the next comic.
</td>
</tr>
<?php break;
case "comicpress-rascal_says": ?>
<tr>
<th scope="row"><strong>Enable Rascal the ComicPress Mascot?</strong><br /><br />Enabling this option will make a comic bubble appear over the comic and write out what you put in the hovertext.<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>
<td valign="top">
You can add hovertext when uploading your comic with ComicPress Manager. To change the graphics for this you should probably know CSS quite well. If you don't good luck with it.
</td>
</tr>
<?php break;
case "comicpress-graphicnav_directory":
$current_gnav_directory = get_option($value['id']);
if (empty($current_gnav_directory)) $current_gnav_directory = 'default';
$count = count($results = glob(get_template_directory() . '/images/nav/'.$current_gnav_directory.'/*'));
$gnav_directories = glob(get_template_directory() . '/images/nav/*');
?>
<tr>
<th scope="row"><strong>Graphic Navigation Directory</strong><br /><br />Choose a directory to get the graphic navigation styling from.<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<?php
foreach ($gnav_directories as $gnav_dirs) {
if (is_dir($gnav_dirs)) {
$gnav_dir_name = basename($gnav_dirs); ?>
<option class="level-0" value="<?php echo $gnav_dir_name; ?>" <?php if ($current_gnav_directory == $gnav_dir_name) { ?>selected="selected"<?php } ?>><?php echo $gnav_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
<td valign="top">
<br />
<?php echo get_template_directory() . '/images/nav/'; ?>
Graphic Navigation directories are found in your theme directory/images/nav/* to create your own custom graphic navigation menu buttons just create a directory
under images/nav/ and place your image files inside of it and create a navstyle.css file to determine the style of your navigation display.
</td>
</tr>
<?php break;
case "comicpress-calendar_directory":
$current_cal_directory = get_option($value['id']);
if (empty($current_cal_directory)) $current_cal_directory = 'default';
$count = count($results = glob(get_template_directory() . '/images/cal/'.$current_cal_directory.'/*'));
$cal_directories = glob(get_template_directory() . '/images/cal/*');
?>
<tr>
<th scope="row"><strong>Calendar Directory</strong><br /><br />Choose a directory to get the Archive Calendar styling from.<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="none" <?php if ($current_cal_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($cal_directories as $cal_dirs) {
if (is_dir($cal_dirs)) {
$cal_dir_name = basename($cal_dirs); ?>
<option class="level-0" value="<?php echo $cal_dir_name; ?>" <?php if ($current_cal_directory == $cal_dir_name) { ?>selected="selected"<?php } ?>><?php echo $cal_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
<td valign="top">
To not have calendar graphics, set this as "none".<br />
<br />
<?php echo get_template_directory() . '/images/cal/'; ?>
Calendar directories are found in your theme directory/images/cal/* to create your own custom archive calendar images just create a directory
under images/cal/ and place your image files inside of it.
</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.<br /><br /></th>
<td valign="top" width="100">
<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">
Extra Comment code is advanced code for how your comments are used. Turning this off might increase the speed of your site but doubt it. If turned off it will revert to the ComicPress 2.7 styling.
</td>
</tr>
<?php break;
case "comicpress-disable_footer_text": ?>
<tr>
<th scope="row"><strong>Disable the default text in the footer?</strong><br /><br />Set to &quot;Yes&quot; and the text in the footer will not show.<br /><br /></th>
<td valign="top" width="100">
<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">
Footer text that shows up in the #footer area can be simply removed this way.
</td>
</tr>
<?php break;
case "comicpress-avatar_directory":
$current_avatar_directory = get_option($value['id']);
if (empty($current_avatar_directory)) $current_avatar_directory = 'default';
$count = count($results = glob(get_template_directory() . '/images/avatars/'.$current_avatar_directory.'/*'));
$avatar_directories = glob(get_template_directory() . '/images/avatars/*');
?>
<tr>
<th scope="row"><strong>Avatar (no Gravatar) Directory</strong><br /><br />Choose a directory to get the avatars for default gravatars if someone doesnt have one.<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="none" <?php if ($current_cal_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($avatar_directories as $avatar_dirs) {
if (is_dir($avatar_dirs)) {
$avatar_dir_name = basename($avatar_dirs); ?>
<option class="level-0" value="<?php echo $avatar_dir_name; ?>" <?php if ($current_avatar_directory == $avatar_dir_name) { ?>selected="selected"<?php } ?>><?php echo $avatar_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
</tr>
<?php break;
case "comicpress-archive_display_order":
?>
<tr>
<th scope="row"><strong>Display Archive in Ascending or Descending order?</strong><br /><br />Long time ago or most recent displays first?<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="asc" <?php if ($value['id'] == "asc") { ?>selected="selected"<?php } ?>>Ascending</option>
<option class="level-0" value="desc" <?php if ($value['id'] == "desc") { ?>selected="selected"<?php } ?>>Descending</option>
</select>
</label>
</td>
</tr>
<?php break;
case "comicpress-disable_comment_note": ?>
<tr>
<th scope="row"><strong>Disable the comment notes?</strong><br /><br />Disabling this will remove the note text that displays with more options for adding to comments (html).<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>
<td valign="top">
</td>
</tr>
<?php break;
case "comicpress-excerpt_or_content_archive": ?>
<tr>
<th scope="row"><strong>Would you like to have users see the entire content or just an excerpt when viewing the archives?</strong><br /><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-excerpt" type="radio" value="excerpt"<?php if ( get_option( $value['id'] ) == "excerpt") { echo " checked"; } ?> />Excerpt</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-content" type="radio" value="content"<?php if ( get_option( $value['id'] ) == "content") { echo " checked"; } ?> />Content</label>
</td>
<td valign="top">
</td>
</tr>
<?php break;
case "comicpress-excerpt_or_content_search": ?>
<tr>
<th scope="row"><strong>Would you like to have users see the entire content or just an excerpt when searching?</strong><br /><br /></th>
<td valign="top" width="160">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-excerpt" type="radio" value="excerpt"<?php if ( get_option( $value['id'] ) == "excerpt") { echo " checked"; } ?> />Excerpt</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-content" type="radio" value="content"<?php if ( get_option( $value['id'] ) == "content") { echo " checked"; } ?> />Content</label>
</td>
<td valign="top">
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
<div id="indexoptions" class="hide">
<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-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" width="100">
<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 the comic blog on the index and single pages?</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.<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><br />
</td>
<td valign="top">
*Some* people,.. not naming names ..do not like to have a comic post let alone showing on the index page. You can use the comic blog post widget and place it anywhere around the comic. IF there is no content in the post it will not display.
</td>
</tr>
<?php break;
case "comicpress-disable_blog_frontpage": ?>
<tr>
<th scope="row"><strong>Disable the blog on the index page?</strong><br /><br />Set to &quot;Yes&quot; and the blog area will not display on the index page/front page of your site.<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><br />
</td>
<td valign="top">
This feature is quite handy actually. If you disable this you can add a page to your menubar and associate it to the "blog" template, still keeping your blog, .. just not on the index page.
</td>
</tr>
<?php break;
case "comicpress-disable_lrsidebars_frontpage": ?>
<tr>
<th scope="row"><strong>Disable the left and right sidebars on the index page?</strong><br /><br />Set to &quot;Yes&quot; and the index page/front page of your site will not display the left and right sidebars.<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><br />
</td>
<td valign="top">
Minimalists dream. Best not to use with theme styles that have one of the styles that are to the side of the comic.
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
<div id="postoptions" class="hide">
<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-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" width="100">
<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>
<td valign="top">
The transcript is text that that you can have of your comic's speech. When you add a transcript of the comic to the post-edit or when you upload your comic you can enable this and a transcript box will appear *in* that comic's post area, alternatively you can set the transcript widget and have it placed anywhere *in* the same area of the comic.
</td>
</tr>
<?php break;
case "comicpress-moods_directory":
$current_directory = get_option($value['id']);
if (empty($current_directory)) $current_directory = 'default';
$count = count($results = glob(get_template_directory() . '/images/moods/'.$current_directory.'/*'));
$mood_directories = glob(get_template_directory() . '/images/moods/*');
?>
<tr>
<th scope="row"><strong>Moods Directory</strong><br /><br />Choose a directory to get the post moods from.<br /><br />Set this to 'none' to turn off use.<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="none" <?php if ($current_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($mood_directories as $mood_dirs) {
if (is_dir($mood_dirs)) {
$mood_dir_name = basename($mood_dirs); ?>
<option class="level-0" value="<?php echo $mood_dir_name; ?>" <?php if ($current_directory == $mood_dir_name) { ?>selected="selected"<?php } ?>><?php echo $mood_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
<td valign="top">
Found: <?php echo $count; ?> moods in the "<?php echo $current_directory; ?>" directory.<br />
<br />
Mood directories are found in your theme directory/images/moods/* to create your own custom moods just create a directory
under images/moods/ and place ONLY image files inside of it. The name of the image file represents what the mood is.
</td>
</tr>
<?php break;
case "comicpress-enable_related_comics": ?>
<tr>
<th scope="row"><strong>Put Related Comics in comic posts?</strong><br /><br />Related comics on the list will be related by 'tags' that you create for each comic post.</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>
<td valign="top">
When creating tags for your comics, include *only* the subject material and possibly cast. Do not use tags that can relate to the entire archive or storyline the post is on.
</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>
<td valign="top">
Like the related posts for comics, the related posts for blog post checked with other blog posts comparing the tags. Do no use tags that relate to a massive amount of other things, make sure you stick to only using 1-5 tags total, the less the better.
</td>
</tr>
<?php break;
case "comicpress-enable_post_calendar": ?>
<tr>
<th scope="row"><strong>Add graphic calendar to blog posts?</strong><br /><br />Enabling this option will display a calendar image on your posts.</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>
<td valign="top">
The graphic calendar is an image that has the date of the post overlayed on top of it. This option is for the blog posts.
</td>
</tr>
<?php break;
case "comicpress-enable_post_author_gravatar": ?>
<tr>
<th scope="row"><strong>Display a gravatar of the post author on blog posts?</strong><br /><br />Enabling this option will show a gravatar of the post author based on the authors 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>
<td valign="top">
Gravatar's are associated by your email address and you can create them at <a href="http://gravatar.com/">http://gravatar.com</a>. They are pictures of you, your cat of whatever you want to represent yourself.
</td>
</tr>
<?php break;
case "comicpress-enable_comic_post_calendar": ?>
<tr>
<th scope="row"><strong>Add graphic calendar to comic posts?</strong><br /><br />Enabling this option will display a calendar image on your posts.</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>
<td valign="top">
The graphic calendar is an image that has the date of the post overlayed on top of it. This option is for the comic posts, and yes this was cut and pasted from the other one just the word "blog" was changed to "comic".
</td>
</tr>
<?php break;
case "comicpress-enable_comic_post_author_gravatar": ?>
<tr>
<th scope="row"><strong>Display a gravatar of the post author on comic posts?</strong><br /><br />Enabling this option will show a gravatar of the post author based on the authors 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>
<td valign="top">
Gravatar's are associated by your email address and you can create them at <a href="http://gravatar.com/">http://gravatar.com</a>. They are pictures of you, your cat of whatever you want to represent yourself. I didn't cut and paste this one, I just wasn't clever enough to change the text.
</td>
</tr>
<?php break;
case "comicpress-disable_categories_in_posts": ?>
<tr>
<th scope="row"><strong>Disable showing categories in posts?</strong><br /><br />The categories that are shown by default are the ones the post in set to.</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>
<td valign="top">
Categores != Tags
</td>
</tr>
<?php break;
case "comicpress-disable_tags_in_posts": ?>
<tr>
<th scope="row"><strong>Disable showing tags in posts?</strong><br /><br />Tags are 'descriptive keywords' describing the content of the post.</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>
<td valign="top">
Tags != Categories
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
<div id="menubaroptions" class="hide">
<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-enable_search_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable Search Form in Menubar?</strong><br /><br /></th>
<td valign="top" width="100">
<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>
<td valign="top">
Searchforms can be fun when you have something to search for.
</td>
</tr>
<?php break;
case "comicpress-enable_rss_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable RSS Link in Menubar?</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>
<td valign="top">
It's a link, it links to the RSS. It does *not* link to your the winning lottory numbers.
</td>
</tr>
<?php break;
case "comicpress-enable_navigation_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable mini navigation buttons in the Menubar?</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>
<td valign="top">
Mini Navigation arrows reside on the right side of the menubar, just the previous and next arrows.
</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>
<td valign="top">
You can also create a links category called "menulinks" and whatever link you add to that will appear in the menubar.
</td>
</tr>
<?php break;
case "comicpress-disable_dynamic_menubar_links": ?>
<tr>
<th scope="row"><strong>Disable the dynamically generated wordpress links?</strong><br /><br />Setting this to Yes will turn off the dynamic links in your menubar.<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>
<td valign="top">
Setting this to yes will allow you to use the links category menulinks to create specific menu links for customizing the menubar, mostly used for making graphic images as links.
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
<div id="customheader" class="hide">
<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-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 /></th>
<td valign="top" width="100">
<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>
<td valign="top">
Setting to "Yes" will set a new option in your Dashboard -> Appearance menu. Setting to "Yes" will set a new option in your Dashboard -> Appearance menu. Setting to "No" will not set a new option in your Dashboard -> Appearance menu. Setting to "Yes" will set a new option in your Dashboard -> Appearance menu.
</td>
</tr>
<?php break;
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>
<td valign="top">
This area intentionally left blank.
</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>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
<div id="buyprintoptions" class="hide">
<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-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>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>
</div>
<div style="margin-top: 10px; text-align:center;padding: 5px; background: #eee; -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 2.8 (<?php global $comicpress_version; echo $comicpress_version; ?>)</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.net/">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">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="7827910">
<input type="image"
src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif"
border="0" name="submit" alt="PayPal - The safer, easier way to pay
online!">
<img alt="" border="0"
src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1"
height="1">
</form>
<a href="http://comicpress.org/">ComicPress 2.8 (<?php global $comicpress_version; echo $comicpress_version; ?>)</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.net/">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">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="7827910">
<input type="image"
src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif"
border="0" name="submit" alt="PayPal - The safer, easier way to pay
online!">
<img alt="" border="0"
src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1"
height="1">
</form>
</div>
</div>

View File

@ -5,17 +5,17 @@ if (function_exists('id_get_comment_number')) {
remove_filter('comments_number','id_get_comment_number');
}
$comicpress_version = '2.8.1.9';
$comicpress_version = '2.8.1.10';
// Remove the wptexturizer from changing the quotes and squotes.
// remove_filter('the_content', 'wpautop');
// remove_filter('the_title', 'wptexturize');
// remove_filter('the_content', 'wptexturize');
remove_filter('the_content', 'wptexturize');
// remove_filter('the_excerpt', 'wptexturize');
// remove_filter('comment_text', 'wptexturize');
global $wpmu_version;
if (!empty($wpmu_version)) {
require_once(get_template_directory() . '/wpmu-functions.php');
if (get_option('upload_path') !== false) {
$variables_to_extract = array();
@ -46,14 +46,12 @@ if (get_option('upload_path') !== false) {
'disable_comic_frontpage' => 'disable_comic_frontpage',
'disable_comic_blog_frontpage' => 'disable_comic_blog_frontpage',
'disable_blog_frontpage' => 'disable_blog_frontpage',
'disable_extended_comments' => 'disable_extended_comments',
'buy_print_email' => 'buy_print_email',
'buy_print_url' => 'buy_print_url',
'buy_print_us_amount' => 'buy_print_us_amount',
'buy_print_int_amount' => 'buy_print_int_amount',
'buy_print_us_ship' => 'buy_print_us_ship',
'buy_print_int_ship' => 'buy_print_int_ship',
'custom_css' => 'custom_css',
'cp_theme_layout' => 'cp_theme_layout',
'transcript_in_posts' => 'transcript_in_posts',
'enable_widgetarea_use_sidebar_css' => 'enable_widgetarea_use_sidebar_css',
@ -62,7 +60,6 @@ if (get_option('upload_path') !== false) {
'custom_image_header_height' => 'custom_image_header_height',
'enable_numbered_pagination' => 'enable_numbered_pagination',
'disable_page_restraints' => 'disable_page_restraints',
'enable_dropdown_sidebar' => 'enable_dropdown_sidebar',
'enable_related_comics' => 'enable_related_comics',
'enable_related_posts' => 'enable_related_posts',
'comic_clicks_next' => 'comic_clicks_next',
@ -89,7 +86,9 @@ if (get_option('upload_path') !== false) {
'archive_display_order' => 'archive_display_order',
'disable_comment_note' => 'disable_comment_note',
'excerpt_or_content_archive' => 'excerpt_or_content_archive',
'excerpt_or_content_search' => 'excerpt_or_content_search' ) as $options => $variable_name) {
'excerpt_or_content_search' => 'excerpt_or_content_search',
'category_thumbnail_postcount' => 'category_thumbnail_postcount',
'members_post_category' => 'members_post_category' ) as $options => $variable_name) {
$variables_to_extract[$variable_name] = get_option("comicpress-${options}");
}
@ -129,10 +128,6 @@ if ($enable_numbered_pagination == 'yes') {
require_once(get_template_directory() . '/options/wp-pagenavi.php');
}
if ($disable_extended_comments != 'yes') {
require_once(get_template_directory() . '/options/comment-functions.php');
}
if ($enable_custom_image_header == 'yes') {
require_once(get_template_directory() . '/options/custom-image-header.php');
}
@ -172,7 +167,7 @@ $comic_filename_filters['default'] = "{date}*.*";
add_action('init', 'get_all_comic_categories');
function get_first_comic() {
return get_terminal_post_in_category(get_all_comic_categories_as_cat_string());
return get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), true);
}
function get_last_comic() {
@ -227,7 +222,7 @@ function next_comic_link($format, $link) {
/**
* Get the previous comic from the current one.
*/
function get_previous_comic($category = null) { return get_adjacent_comic($category,true); }
function get_previous_comic($category = null) { return get_adjacent_comic($category, true); }
/**
* Get the next comic from the current one.
@ -272,10 +267,10 @@ function get_previous_comic_permalink() {
/**
* Get the adjacent comic from the current one.
* @param int $category The category to use.
* @param boolean $next True if the next chronological comic should be retrieved.
* @param boolean $previous True if the previous chronological comic should be retrieved.
* @return array The WordPress post object for the comic post.
*/
function get_adjacent_comic($category, $next = false) {
function get_adjacent_comic($category, $previous = false) {
global $non_comic_categories;
// get_all_comic_categories();
@ -285,7 +280,7 @@ function get_adjacent_comic($category, $next = false) {
$categories_to_exclude = get_string_to_exclude_all_but_provided_categories($category);
}
return get_adjacent_post(false, $categories_to_exclude, $next);
return get_adjacent_post(false, $categories_to_exclude, $previous);
}
/**
@ -379,9 +374,9 @@ function get_adjacent_storyline_category_id($next = false) {
* @param string $filter The $comic_filename_filters to use.
* @return string The relative path to the comic file, or false if not found.
*/
if (!function_exists('get_comic_path')) {
function get_comic_path($folder = 'comic', $override_post = null, $filter = 'default', $multi = null) {
global $post, $comic_filename_filters, $comic_folder, $archive_comic_folder, $rss_comic_folder, $comic_pathfinding_errors;
function get_comic_path($folder = 'comic', $override_post = null, $filter = 'default', $multi = null) {
global $post, $comic_filename_filters, $comic_folder, $archive_comic_folder, $rss_comic_folder, $comic_pathfinding_errors, $wpmu_version;
if (isset($comic_filename_filters[$filter])) {
$filter_to_use = $comic_filename_filters[$filter];
@ -395,6 +390,12 @@ if (!function_exists('get_comic_path')) {
case "comic": default: $folder_to_use = $comic_folder; break;
}
if (!empty($wpmu_version)) {
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);
@ -403,6 +404,13 @@ if (!function_exists('get_comic_path')) {
$results = array();
if (count($results = glob("${folder_to_use}/${filter_with_date}")) > 0) {
if (!empty($wpmu_version)) {
$comic = reset($results);
if ($wpmu_path !== false) { $comic = str_replace($wpmu_path, "files", $comic); }
return $comic;
}
if (!empty($multi)) {
return $results;
} else {
@ -412,9 +420,9 @@ if (!function_exists('get_comic_path')) {
$comic_pathfinding_errors[] = sprintf(__("Unable to find the file in the <strong>%s</strong> folder that matched the pattern <strong>%s</strong>. Check your WordPress and ComicPress settings.", 'comicpress'), $folder, $filter_with_date);
return false;
}
}
/**
* Find a comic file in the filesystem and return an absolute URL to that file.
* @param string $folder The folder name to search.
@ -728,25 +736,6 @@ function comicpress_is_active_sidebar( $name ) {
return false;
}
function copyrightDate() {
global $wpdb;
$copyright_dates = $wpdb->get_results("
SELECT
YEAR(min(post_date_gmt)) AS firstdate,
YEAR(max(post_date_gmt)) AS lastdate
FROM
$wpdb->posts
");
if($copyright_dates) {
$copyright = "&copy; " . $copyright_dates[0]->firstdate;
if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {
$copyright .= '-' . $copyright_dates[0]->lastdate;
}
echo $copyright . "&nbsp;" . get_bloginfo('name');
}
return false;
}
function cp_copyright_year() {
global $wpdb;
$copyright_dates = $wpdb->get_results("
@ -755,6 +744,8 @@ function cp_copyright_year() {
YEAR(max(post_date_gmt)) AS lastdate
FROM
$wpdb->posts
WHERE
post_status = 'publish'
");
$output = '';
if($copyright_dates) {

View File

@ -3,16 +3,15 @@
* Body Classes
* function function comicpress_body_class
*
* This has two functions, the first being it adds the browser type as a class
* Author: Philip M. Hofer (Frumph)
* Author URI: http://webcomicplanet.com/ http://frumph.net/
* Version: 1.0.1
*
* This function 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 as well as a few other classes that the normal body_class
* does not yet support.
*
* 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.
*
*/
@ -21,7 +20,6 @@ add_filter('body_class','comicpress_body_class');
function comicpress_body_class($classes = '') {
global $current_user, $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $post, $wp_query, $cp_theme_layout;
$current_user = get_currentuserinfo();
if (!empty($current_user)) {
$user_login = addslashes($current_user->user_login);
$classes[] = 'user-'.$user_login;
@ -29,6 +27,12 @@ function comicpress_body_class($classes = '') {
$classes[] = 'user-guest';
}
if (comicpress_is_member()) {
$classes[] = 'member';
} else {
$classes[] = 'non-member';
}
if($is_lynx) $classes[] = 'lynx';
elseif($is_gecko) $classes[] = 'gecko';
elseif($is_opera) $classes[] = 'opera';
@ -81,7 +85,7 @@ function comicpress_body_class($classes = '') {
return $classes;
}
function comicpress_blogpost_class($class = '') {
function comicpress_post_class($class = '') {
global $post;
static $post_alt;
@ -122,7 +126,7 @@ function comicpress_blogpost_class($class = '') {
/* Join all the classes into one string and echo them. */
$class = join( ' ', $classes );
echo apply_filters( 'comicpress_blogpost_class', $class );
echo apply_filters( 'comicpress_post_class', $class );
}
?>

View File

@ -0,0 +1,233 @@
<?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) . '">';
$id_or_email = get_comment_author_email();
if (empty($id_or_email)) $id_or_email = get_comment_author();
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), comicpress_get_avatar($id_or_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>
<span 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()); ?>
</span>
<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;
/*
* 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

@ -8,7 +8,7 @@
function display_blog_post() {
global $post, $wp_query, $authordata, $enable_related_posts, $enable_post_author_gravatar, $enable_post_calendar, $themepack_directory; ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-head"></div>
<div class="post" id="post-<?php the_ID() ?>">
<div class="post-info">

View File

@ -17,7 +17,7 @@ function display_comic_post() {
<?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="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="post-info">

View File

@ -20,17 +20,41 @@ 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>';
add_filter('pre_get_posts','comicpress_members_filter');
function comicpress_members_filter($query) {
global $members_post_category, $current_user;
if ($members_post_category != 'none' && !empty($members_post_category) && !$query->is_search && !$query->is_page && !$query->is_archive) {
$oldset = $query->get('cat');
$is_member = '';
if (!empty($oldset)) {
$excludeset = $oldset.',-'.$members_post_category;
} else {
return '<div class="non-member">There is Members Only content here.</div>';
$excludeset = '-'.$members_post_category;
}
if ( !empty($current_user->ID) ) {
$is_member = get_usermeta($current_user->ID,'comicpress-is-member');
}
if ($is_member != 'yes' || empty($is_member)) {
$query->set('cat',$excludeset);
}
}
return '';
return $query;
}
function shortcode_for_comicpress_members_only( $atts, $content = null ) {
global $post, $userdata, $profileuser, $current_user, $errormsg;
$returninfo = '<div class="non-member">There is Members Only content here. To view this content you need to be a member of this site.</div>';
if ( !empty($current_user->ID) ) {
$is_member = get_usermeta($current_user->ID,'comicpress-is-member');
if ( ( $is_member == 'yes' ) ) {
$returninfo = '<div class="members-only">'.$content.'</div>';
}
}
return $returninfo;
}
function comicpress_profile_members_only() {
@ -72,4 +96,27 @@ function comicpress_profile_members_only_save() {
}
}
/**
* Return true if the current post is in the members category.
*/
function in_members_category() {
global $post, $category_tree, $members_post_category;
$members_post_category_array = array();
$members_post_category_array = explode($members_post_category);
return (count(array_intersect($members_post_category, wp_get_post_categories($post->ID))) > 0);
}
function comicpress_is_member() {
global $current_user;
if (!empty($current_user)) {
$is_member = get_usermeta($current_user->ID,'comicpress-is-member');
if ($is_member == 'yes' || current_user_can('publish_post')) {
return true;
}
}
return false;
}
?>

View File

@ -26,9 +26,6 @@ function my_formatter($content) {
return $new_content;
}
remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
add_filter('the_content', 'my_formatter', 99);

View File

@ -2,7 +2,7 @@
<?php include(get_template_directory() . '/layout-head.php'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page" id="post-<?php the_ID() ?>">
<h2 class="pagetitle">
@ -52,7 +52,7 @@
<div class="post-page-foot"></div>
</div>
<?php endwhile; else: ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<p>Sorry, no image matched your criteria.</p>

View File

@ -13,7 +13,7 @@ Template Name: Links
?>
<?php while (have_posts()) : the_post() ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<h2 class="pagetitle"><?php the_title() ?></h2>

30
members-blog.php Normal file
View File

@ -0,0 +1,30 @@
<?php
/*
Template Name: Members Only Blog
*/
?>
<?php get_header(); global $members_post_category; ?>
<?php remove_filter('pre_get_posts','comicpress_members_filter'); ?>
<?php include(get_template_directory() . '/layout-head.php'); ?>
<?php if (have_posts()):
$blog_query = '&cat='.$members_post_category.'&paged='.$paged;
$posts = query_posts($blog_query);
while (have_posts()) : the_post();
display_blog_post();
endwhile;
comicpress_pagination();
endif; ?>
<?php get_sidebar('underblog'); ?>
</div>
</div>
<?php include(get_template_directory() . '/layout-foot.php'); ?>
<?php get_footer() ?>

View File

@ -0,0 +1,67 @@
<div id="archivesearch" class="hide">
<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-excerpt_or_content_archive": ?>
<tr>
<th scope="row"><strong>Would you like to have users see the entire content or just an excerpt when viewing the archives?</strong><br /><br /></th>
<td valign="top">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-excerpt" type="radio" value="excerpt"<?php if ( get_option( $value['id'] ) == "excerpt") { echo " checked"; } ?> />Excerpt</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-content" type="radio" value="content"<?php if ( get_option( $value['id'] ) == "content") { echo " checked"; } ?> />Content</label>
</td>
<td valign="top">
</td>
</tr>
<?php break;
case "comicpress-excerpt_or_content_search": ?>
<tr>
<th scope="row"><strong>Would you like to have users see the entire content or just an excerpt when searching?</strong><br /><br /></th>
<td valign="top" width="160">
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-excerpt" type="radio" value="excerpt"<?php if ( get_option( $value['id'] ) == "excerpt") { echo " checked"; } ?> />Excerpt</label>
&nbsp;&nbsp;
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-content" type="radio" value="content"<?php if ( get_option( $value['id'] ) == "content") { echo " checked"; } ?> />Content</label>
</td>
<td valign="top">
</td>
</tr>
<?php break;
case "comicpress-archive_display_order": ?>
<tr>
<th scope="row"><strong>Display Archive in Ascending or Descending order?</strong><br /><br />Long time ago or most recent displays first?<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="asc" <?php if ($value['id'] == "asc") { ?>selected="selected"<?php } ?>>Ascending</option>
<option class="level-0" value="desc" <?php if ($value['id'] == "desc") { ?>selected="selected"<?php } ?>>Descending</option>
</select>
</label>
</td>
</tr>
<?php break;
case "comicpress-category_thumbnail_postcount": ?>
<tr>
<th scope="row"><b>Thumbnail PostCount (Archive)</b><br /><br />How many images in the comic category would you like to see in the archive page?</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">
If you set this to -1 it will display *all* available thumbnails for the comic category that is chosen to view.
</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>

View File

@ -0,0 +1,91 @@
<div id="buyprintoptions" class="hide">
<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-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>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>

View File

@ -0,0 +1,59 @@
<div id="customheader" class="hide">
<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-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 /></th>
<td valign="top" width="100">
<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>
<td valign="top">
Setting to "Yes" will set a new option in your Dashboard -> Appearance menu. Setting to "Yes" will set a new option in your Dashboard -> Appearance menu. Setting to "No" will not set a new option in your Dashboard -> Appearance menu. Setting to "Yes" will set a new option in your Dashboard -> Appearance menu.
</td>
</tr>
<?php break;
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>
<td valign="top">
This area intentionally left blank.
</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>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>

212
options/generaloptions.php Normal file
View File

@ -0,0 +1,212 @@
<div id="generaloptions" class="hide">
<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-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 /></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>
<td valign="top">
If not enabled it will use the .customwidgetarea user made styling only and only the Sidebar-left and Sidebar-right will use sidebar styling.<br />
</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>
<td valign="top">
Numbered pagination appears on the home(index) page, the authors page the blog template and comments/single when there are more then the set # of comments per page. It's default is off, it is styled like the menubar.
</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 />
<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>
<td valign="top">
What you can do with this is use the entire browser for your canvas instead of the 780px/980px that the two elements keep you in.</th>
</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>
<td valign="top">
When a user or yourself puts their mouse cursor over the comic that is displayed on either the index or single page the action that happens next is the first step in the larger, bigger, more astonishing consequence of actually having any the other things you place your mouse cursor over and click. You click, it goes to the next comic.
</td>
</tr>
<?php break;
case "comicpress-rascal_says": ?>
<tr>
<th scope="row"><strong>Enable Rascal the ComicPress Mascot?</strong><br /><br />Enabling this option will make a comic bubble appear over the comic and write out what you put in the hovertext.<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>
<td valign="top">
You can add hovertext when uploading your comic with ComicPress Manager. To change the graphics for this you should probably know CSS quite well. If you don't good luck with it.
</td>
</tr>
<?php break;
case "comicpress-graphicnav_directory":
$current_gnav_directory = get_option($value['id']);
if (empty($current_gnav_directory)) $current_gnav_directory = 'default';
$count = count($results = glob(get_template_directory() . '/images/nav/'.$current_gnav_directory.'/*'));
$gnav_directories = glob(get_template_directory() . '/images/nav/*');
?>
<tr>
<th scope="row"><strong>Graphic Navigation Directory</strong><br /><br />Choose a directory to get the graphic navigation styling from.<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<?php
foreach ($gnav_directories as $gnav_dirs) {
if (is_dir($gnav_dirs)) {
$gnav_dir_name = basename($gnav_dirs); ?>
<option class="level-0" value="<?php echo $gnav_dir_name; ?>" <?php if ($current_gnav_directory == $gnav_dir_name) { ?>selected="selected"<?php } ?>><?php echo $gnav_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
<td valign="top">
<br />
<?php echo get_template_directory() . '/images/nav/'; ?>
Graphic Navigation directories are found in your theme directory/images/nav/* to create your own custom graphic navigation menu buttons just create a directory
under images/nav/ and place your image files inside of it and create a navstyle.css file to determine the style of your navigation display.
</td>
</tr>
<?php break;
case "comicpress-calendar_directory":
$current_cal_directory = get_option($value['id']);
if (empty($current_cal_directory)) $current_cal_directory = 'default';
$count = count($results = glob(get_template_directory() . '/images/cal/'.$current_cal_directory.'/*'));
$cal_directories = glob(get_template_directory() . '/images/cal/*');
?>
<tr>
<th scope="row"><strong>Calendar Directory</strong><br /><br />Choose a directory to get the Archive Calendar styling from.<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="none" <?php if ($current_cal_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($cal_directories as $cal_dirs) {
if (is_dir($cal_dirs)) {
$cal_dir_name = basename($cal_dirs); ?>
<option class="level-0" value="<?php echo $cal_dir_name; ?>" <?php if ($current_cal_directory == $cal_dir_name) { ?>selected="selected"<?php } ?>><?php echo $cal_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
<td valign="top">
To not have calendar graphics, set this as "none".<br />
<br />
<?php echo get_template_directory() . '/images/cal/'; ?>
Calendar directories are found in your theme directory/images/cal/* to create your own custom archive calendar images just create a directory
under images/cal/ and place your image files inside of it.
</td>
</tr>
<?php break;
case "comicpress-disable_footer_text": ?>
<tr>
<th scope="row"><strong>Disable the default text in the footer?</strong><br /><br />Set to &quot;Yes&quot; and the text in the footer will not show.<br /><br /></th>
<td valign="top" width="100">
<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">
Footer text that shows up in the #footer area can be simply removed this way.
</td>
</tr>
<?php break;
case "comicpress-avatar_directory":
$current_avatar_directory = get_option($value['id']);
if (empty($current_avatar_directory)) $current_avatar_directory = 'default';
$count = count($results = glob(get_template_directory() . '/images/avatars/'.$current_avatar_directory.'/*'));
$avatar_directories = glob(get_template_directory() . '/images/avatars/*');
?>
<tr>
<th scope="row"><strong>Avatar (no Gravatar) Directory</strong><br /><br />Choose a directory to get the avatars for default gravatars if someone doesnt have one.<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="none" <?php if ($current_cal_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($avatar_directories as $avatar_dirs) {
if (is_dir($avatar_dirs)) {
$avatar_dir_name = basename($avatar_dirs); ?>
<option class="level-0" value="<?php echo $avatar_dir_name; ?>" <?php if ($current_avatar_directory == $avatar_dir_name) { ?>selected="selected"<?php } ?>><?php echo $avatar_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
</tr>
<?php break;
case "comicpress-disable_comment_note": ?>
<tr>
<th scope="row"><strong>Disable the comment notes?</strong><br /><br />Disabling this will remove the note text that displays with more options for adding to comments (html).<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>
<td valign="top">
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>

75
options/indexoptions.php Normal file
View File

@ -0,0 +1,75 @@
<div id="indexoptions" class="hide">
<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-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" width="100">
<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 the comic blog on the index and single pages?</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.<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><br />
</td>
<td valign="top">
*Some* people,.. not naming names ..do not like to have a comic post let alone showing on the index page. You can use the comic blog post widget and place it anywhere around the comic. IF there is no content in the post it will not display.
</td>
</tr>
<?php break;
case "comicpress-disable_blog_frontpage": ?>
<tr>
<th scope="row"><strong>Disable the blog on the index page?</strong><br /><br />Set to &quot;Yes&quot; and the blog area will not display on the index page/front page of your site.<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><br />
</td>
<td valign="top">
This feature is quite handy actually. If you disable this you can add a page to your menubar and associate it to the "blog" template, still keeping your blog, .. just not on the index page.
</td>
</tr>
<?php break;
case "comicpress-disable_lrsidebars_frontpage": ?>
<tr>
<th scope="row"><strong>Disable the left and right sidebars on the index page?</strong><br /><br />Set to &quot;Yes&quot; and the index page/front page of your site will not display the left and right sidebars.<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><br />
</td>
<td valign="top">
Minimalists dream. Best not to use with theme styles that have one of the styles that are to the side of the comic.
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>

View File

@ -0,0 +1,32 @@
<div id="membersoptions" class="hide">
<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-members_post_category": ?>
<tr>
<th scope="row"><strong>Members Category</strong><br /><br />The category that is disignated to show members only content.<br /><br /></th>
<td valign="top">
<label>
<?php
$select = wp_dropdown_categories('show_option_none=Select category&show_count=1&orderby=name&echo=0&selected='.get_option( $value['id'] ));
$select = preg_replace('#<select([^>]*)>#', '<select name="'.$value['id'].'" id="'.$value['id'].'">', $select);
echo $select;
?>
</label>
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>

View File

@ -0,0 +1,87 @@
<div id="menubaroptions" class="hide">
<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-enable_search_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable Search Form in Menubar?</strong><br /><br /></th>
<td valign="top" width="100">
<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>
<td valign="top">
Searchforms can be fun when you have something to search for.
</td>
</tr>
<?php break;
case "comicpress-enable_rss_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable RSS Link in Menubar?</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>
<td valign="top">
It's a link, it links to the RSS. It does *not* link to your the winning lottory numbers.
</td>
</tr>
<?php break;
case "comicpress-enable_navigation_in_menubar": ?>
<tr>
<th scope="row"><strong>Enable mini navigation buttons in the Menubar?</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>
<td valign="top">
Mini Navigation arrows reside on the right side of the menubar, just the previous and next arrows.
</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>
<td valign="top">
You can also create a links category called "menulinks" and whatever link you add to that will appear in the menubar.
</td>
</tr>
<?php break;
case "comicpress-disable_dynamic_menubar_links": ?>
<tr>
<th scope="row"><strong>Disable the dynamically generated wordpress links?</strong><br /><br />Setting this to Yes will turn off the dynamic links in your menubar.<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>
<td valign="top">
Setting this to yes will allow you to use the links category menulinks to create specific menu links for customizing the menubar, mostly used for making graphic images as links.
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>

182
options/postoptions.php Normal file
View File

@ -0,0 +1,182 @@
<div id="postoptions" class="hide">
<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-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" width="100">
<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>
<td valign="top">
The transcript is text that that you can have of your comic's speech. When you add a transcript of the comic to the post-edit or when you upload your comic you can enable this and a transcript box will appear *in* that comic's post area, alternatively you can set the transcript widget and have it placed anywhere *in* the same area of the comic.
</td>
</tr>
<?php break;
case "comicpress-moods_directory":
$current_directory = get_option($value['id']);
if (empty($current_directory)) $current_directory = 'default';
$count = count($results = glob(get_template_directory() . '/images/moods/'.$current_directory.'/*'));
$mood_directories = glob(get_template_directory() . '/images/moods/*');
?>
<tr>
<th scope="row"><strong>Moods Directory</strong><br /><br />Choose a directory to get the post moods from.<br /><br />Set this to 'none' to turn off use.<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="none" <?php if ($current_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($mood_directories as $mood_dirs) {
if (is_dir($mood_dirs)) {
$mood_dir_name = basename($mood_dirs); ?>
<option class="level-0" value="<?php echo $mood_dir_name; ?>" <?php if ($current_directory == $mood_dir_name) { ?>selected="selected"<?php } ?>><?php echo $mood_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
<td valign="top">
Found: <?php echo $count; ?> moods in the "<?php echo $current_directory; ?>" directory.<br />
<br />
Mood directories are found in your theme directory/images/moods/* to create your own custom moods just create a directory
under images/moods/ and place ONLY image files inside of it. The name of the image file represents what the mood is.
</td>
</tr>
<?php break;
case "comicpress-enable_related_comics": ?>
<tr>
<th scope="row"><strong>Put Related Comics in comic posts?</strong><br /><br />Related comics on the list will be related by 'tags' that you create for each comic post.</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>
<td valign="top">
When creating tags for your comics, include *only* the subject material and possibly cast. Do not use tags that can relate to the entire archive or storyline the post is on.
</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>
<td valign="top">
Like the related posts for comics, the related posts for blog post checked with other blog posts comparing the tags. Do no use tags that relate to a massive amount of other things, make sure you stick to only using 1-5 tags total, the less the better.
</td>
</tr>
<?php break;
case "comicpress-enable_post_calendar": ?>
<tr>
<th scope="row"><strong>Add graphic calendar to blog posts?</strong><br /><br />Enabling this option will display a calendar image on your posts.</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>
<td valign="top">
The graphic calendar is an image that has the date of the post overlayed on top of it. This option is for the blog posts.
</td>
</tr>
<?php break;
case "comicpress-enable_post_author_gravatar": ?>
<tr>
<th scope="row"><strong>Display a gravatar of the post author on blog posts?</strong><br /><br />Enabling this option will show a gravatar of the post author based on the authors 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>
<td valign="top">
Gravatar's are associated by your email address and you can create them at <a href="http://gravatar.com/">http://gravatar.com</a>. They are pictures of you, your cat of whatever you want to represent yourself.
</td>
</tr>
<?php break;
case "comicpress-enable_comic_post_calendar": ?>
<tr>
<th scope="row"><strong>Add graphic calendar to comic posts?</strong><br /><br />Enabling this option will display a calendar image on your posts.</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>
<td valign="top">
The graphic calendar is an image that has the date of the post overlayed on top of it. This option is for the comic posts, and yes this was cut and pasted from the other one just the word "blog" was changed to "comic".
</td>
</tr>
<?php break;
case "comicpress-enable_comic_post_author_gravatar": ?>
<tr>
<th scope="row"><strong>Display a gravatar of the post author on comic posts?</strong><br /><br />Enabling this option will show a gravatar of the post author based on the authors 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>
<td valign="top">
Gravatar's are associated by your email address and you can create them at <a href="http://gravatar.com/">http://gravatar.com</a>. They are pictures of you, your cat of whatever you want to represent yourself. I didn't cut and paste this one, I just wasn't clever enough to change the text.
</td>
</tr>
<?php break;
case "comicpress-disable_categories_in_posts": ?>
<tr>
<th scope="row"><strong>Disable showing categories in posts?</strong><br /><br />The categories that are shown by default are the ones the post in set to.</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>
<td valign="top">
Categores != Tags
</td>
</tr>
<?php break;
case "comicpress-disable_tags_in_posts": ?>
<tr>
<th scope="row"><strong>Disable showing tags in posts?</strong><br /><br />Tags are 'descriptive keywords' describing the content of the post.</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>
<td valign="top">
Tags != Categories
</td>
</tr>
<?php break;
}
}
?>
</table>
<input name="comicpress_save" type="submit" class="button-primary" value="Save Settings" />
<input type="hidden" name="action" value="comicpress_save" />
</form>
</div>
</div>

100
options/themestyle.php Normal file
View File

@ -0,0 +1,100 @@
<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 id="themestyle" class="show">
<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_layout": ?>
<tr>
<th scope="row"><strong>Choose which theme layout you want to use.</strong><br /><br />This is the layout 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 } ?>>3-Column</option>
<option class="level-0" value="gn" <?php if (get_option($value['id'])=='gn') {?>selected="selected" <?php } ?>>Graphic Novel</option>
<option class="level-0" value="v" <?php if (get_option($value['id'])=='v') {?>selected="selected" <?php } ?>>Vertical</option>
<option class="level-0" value="v3c" <?php if (get_option($value['id'])=='v3c') {?>selected="selected" <?php } ?>>Vertical 3-Column</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>
</tr>
<?php break;
case "comicpress-themepack_directory":
$current_themepack_directory = get_option($value['id']);
if (empty($current_themepack_directory)) $current_themepack_directory = 'silver';
$count = count($results = glob(get_template_directory() . '/themepack/'.$current_themepack_directory.'/*'));
$themepack_directories = glob(get_template_directory() . '/themepack/*');
?>
<tr>
<th scope="row"><strong>Themepack</strong><br /><br />Choose a Themepack to use.<br /></th>
<td valign="top">
<label>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<option class="level-0" value="none" <?php if ($current_themepack_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
<?php
foreach ($themepack_directories as $themepack_dirs) {
if (is_dir($themepack_dirs)) {
$themepack_dir_name = basename($themepack_dirs); ?>
<option class="level-0" value="<?php echo $themepack_dir_name; ?>" <?php if ($current_themepack_directory == $themepack_dir_name) { ?>selected="selected"<?php } ?>><?php echo $themepack_dir_name; ?></option>
<?php }
}
?>
</select>
</label>
</td>
</tr>
<tr>
<td></td>
<td valign="top" colspan="5">
<?php
foreach ($themepack_directories as $themepack_dirs) {
if (is_dir($themepack_dirs)) {
$themepack_dir_name = basename($themepack_dirs); ?>
<div style="width: 100%; padding: 2px;">
<div style="width: 180px; float: left;">
<?php if (file_exists(get_template_directory() .'/themepack/'.$themepack_dir_name.'/screenshot.png')) { ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/themepack/<?php echo $themepack_dir_name; ?>/screenshot.png" width="180" alt="<?php echo $themepack_dir_name; ?>" />
<?php } ?>
</div>
<?php if (file_exists(get_template_directory() .'/themepack/'.$themepack_dir_name.'/notes.php')) { ?>
<div style="float: left; margin-left: 10px;">
<?php include(get_template_directory() . '/themepack/'.$themepack_dir_name.'/notes.php'); ?>
</div>
<?php } ?>
<div style="clear:both;"></div>
</div>
<?php }
}
?>
</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>

View File

@ -2,7 +2,7 @@
<?php include(get_template_directory() . '/layout-head.php'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page" id="post-<?php the_ID() ?>">
<h2 class="pagetitle"><?php the_title() ?></h2>

View File

@ -1,4 +1,5 @@
<?php get_header(); ?>
<?php get_header(); ?>
<?php remove_filter('pre_get_posts','comicpress_members_filter'); ?>
<?php include(get_template_directory() . '/layout-head.php'); ?>
<?php
@ -15,7 +16,7 @@ $count = $tmp_search->post_count;
while (have_posts()) : the_post() ?>
<?php if (in_comic_category()) { ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="post-info">
@ -48,7 +49,7 @@ $count = $tmp_search->post_count;
<div class="post-comic-foot"></div>
</div>
<?php } else { ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-head"></div>
<div class="post">
<div class="post-info">
@ -86,7 +87,7 @@ $count = $tmp_search->post_count;
<?php endwhile; ?>
<?php else : ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<h3>No transcripts found.</h3>

View File

@ -1,4 +1,5 @@
<?php get_header(); ?>
<?php get_header(); ?>
<?php remove_filter('pre_get_posts','comicpress_members_filter'); ?>
<?php include(get_template_directory() . '/layout-head.php'); ?>
<?php
@ -16,7 +17,7 @@ $count = $tmp_search->post_count;
<?php global $archive_comic_width; if (in_comic_category()) { ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="post-info">
@ -45,7 +46,7 @@ $count = $tmp_search->post_count;
<?php } else { ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-head"></div>
<div class="post">
<div class="post-info">
@ -93,7 +94,7 @@ $count = $tmp_search->post_count;
<?php endwhile; ?>
<?php else : ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page">
<h3>No entries found.</h3>

View File

@ -63,7 +63,7 @@
<?php get_sidebar('underblog'); ?>
</center>
<?php endwhile; else: ?>
<div class="<?php comicpress_blogpost_class(); ?>">
<div class="<?php comicpress_post_class(); ?>">
<div class="post-head"></div>
<div class="post">
<p>Sorry, no posts matched your criteria.</p>

View File

@ -583,8 +583,14 @@ a.navi-comments:hover span {
}
.members-only {
border: solid 1px #000;
background: #eee;
border: dotted 1px #000;
background: #fafafa;
padding: 3px;
}
.non-member {
border: dotted 1px #000;
background: #fafafa;
padding: 3px;
}
@ -737,11 +743,18 @@ ul.children {
/* ARCHIVE */
/* For the built-in WordPress archive pages (by month or category) as well as search result pages */
.comicthumbwrap {
overflow: hidden;
float: left;
height: 140px;
margin: 2px 2px 16px 2px;
}
.comicarchiveframe {
padding: 5px;
border: 1px solid #000;
background: #fff;
margin-bottom: 20px;
margin-bottom: 2px;
}
.comicarchiveframe:hover {

View File

@ -15,7 +15,7 @@ http://www.opensource.org/licenses/gpl-3.0.html
body {
margin: 0;
font-family: 'Arial', sans-serif;
font-family: 'Verdana', sans-serif;
background: #00344f url('background.jpg') top repeat-x;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1 @@
<?php if ('open' == $post->comment_status) { ?><div class="comment-link"><?php comments_popup_link('<span class="comment-balloon comment-balloon-empty">&rdquo;</span>Comment ', '<span class="comment-balloon">1</span>Comment ', '<span class="comment-balloon">%</span>Comment '); ?></div><?php } ?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
themepack/silver/menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

View File

@ -0,0 +1,7 @@
<strong>ThemePack (default)</strong>: Silver<br />
<strong>Author</strong>: Tyler Martin<br />
<strong>Layouts</strong>: standard, 3c, gn, v, v3c<br />
<br />
<strong>Installation Notes</strong>:<br />
None.
<br />

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

497
themepack/silver/style.css Normal file
View File

@ -0,0 +1,497 @@
/*
ThemePack Name: Silver
ThemePack URI: http://comicpress.org
Description:
Author: Tyler Martin
Author URI: http://mindfaucet.com/
Version: 0.1.0
.
The CSS, XHTML and design is released under GPL v3:
http://www.opensource.org/licenses/gpl-3.0.html
.
*/
/* STANDARD TAGS */
body {
margin: 0;
font-family: 'Arial', sans-serif;
color: #333;
background: #fff url('background.png') top repeat-x;
}
.button {
background: #aaa url('menu.png');
color: #000;
font-family: 'Arial', sans-serif;
font-size: 13px;
line-height: 13px;
border: 1px solid #999;
cursor: pointer;
}
.button:hover {
color: #fff;
background: #f00 url('menu.png') 0 -75px;
}
/* THE HEADER */
#header {
text-align: center;
}
#header a {
color: #eee;
}
#header .description {
color: #555;
padding: 0 0 10px 0;
font-size: 14px;
font-style: italic;
letter-spacing: 2px;
}
/* THE MENU */
#menubar {
background: url('menu.png');
border-width: 1px 1px 1px 0;
border-style: solid;
border-color: #999;
}
.menunav-rss {
width: 25px;
height: 25px;
margin: 0 0 0 4px;
padding: 0;
display: block;
float: left;
text-indent: -9999px;
overflow: hidden;
background: url('menu-nav.png') no-repeat;
}
.menunav-rss:hover {
background: Transparent url('menu-nav.png') 0 -25px no-repeat;
}
.menunav-prev, .menunav-next {
display: block;
float: left;
}
.menunav a:hover {
background: #fff;
}
.menunav-prev {
margin: 0 0 0 5px;
}
.menunav-prev a, .menunav-next a {
width: 25px;
height: 25px;
display: block;
text-indent: -9999px;
overflow: hidden;
}
.menunav-prev a {
background: transparent url('menu-nav.png') -25px 0 no-repeat;
}
.menunav-prev a:hover {
background: transparent url('menu-nav.png') -25px -25px no-repeat;
}
.menunav-next a {
background: url('menu-nav.png') -50px 0 no-repeat;
}
.menunav-next a:hover {
background: transparent url('menu-nav.png') -50px -25px no-repeat;
}
#menu {
padding: 0;
margin: 0;
list-style: none;
float: left;
line-height: 25px;
font-size: 13px;
border-right: 1px solid #aaa;
}
#menu a {
padding: 0px 10px 0 10px;
display: block;
color: #000;
text-decoration: none;
}
#menu li .rss {
padding: 5px 0 5px 0;
}
#menu li {
float: left;
cursor:pointer;
}
#menu li a {
border-left: 1px solid #aaa;
border-right: 1px solid #fff;
}
#menu li:hover a, #menu li.sfhover a {
border-left: 1px solid #8b160f;
border-right: 1px solid #c28380;
color: #fff; /* Main menu highlighted text color */
background: url('menu.png') 0 -75px;
}
#menu li:hover, #menu li.sfhover {
/* Main menu highlighted background color */
}
/* For submenu dropdowns - this order must be maintained */
#menu ul {
padding: 0;
margin: 0;
list-style: none;
position: absolute;
left: -9999px;
width: 175px;
line-height: 1;
}
#menu li li {
width: 165px;
padding: 4px 5px;
color: #fff;
}
#menu li li a {
width: 174px;
padding: 0;
color: #fff;
border: none;
}
#menu li ul ul {
margin: -17px 0 0 170px;
}
#menu li ul li:hover a, #menu li ul li li:hover a, #menu li ul li li li:hover a, #menu li ul li li li:hover a {
color: #fff; /*Submenu highlighted text color */
}
#menu li:hover li a, #menu li li:hover li a, #menu li li li:hover li a, #menu li li li li:hover li a {
color: #fff; /*Submenu text color */
border: none;
background: none;
}
#menu li li:hover {
background: #f00; /*Submenu highlighted background color */
}
#menu li:hover ul ul, #menu li:hover ul ul ul, #menu li:hover ul ul ul ul, #menu li.sfhover ul ul, #menu li.sfhover ul ul ul, #menu li.sfhover ul ul ul ul {
left: -9999px;
}
#menu li:hover ul, #menu li li:hover ul, #menu li li li:hover ul, #menu li li li li:hover ul, #menu li.sfhover ul, #menu li li.sfhover ul, #menu li li li.sfhover ul, #menu li li li li.sfhover ul {
left: auto;
background: #000; /* Submenu background color */
text-transform: none;
}
#menu .current_page_item a {
color: #fff;
border-left: 1px solid #555;
border-right: 1px solid #555;
background: url('menu.png') 0 -50px;
}
/* THE COMIC */
#comic {
background: #fff;
border: 1px solid #999;
text-align: center;
z-index: 100;
padding: 5px;
}
/* COMMENT LINK */
.comment-link {
height: 25px;
line-height: 20px;
font-family: 'Arial', sans-serif;
font-weight: bold;
text-align: right;
}
.comment-link a {
color: #333;
}
.comment-link a:hover {
color: #800;
}
.comment-balloon {
width: 30px;
height: 25px;
display: block;
margin: 0 0 0 5px;
float: right;
overflow: hidden;
text-align: center;
line-height: 16px;
font-family: 'Georgia', serif;
font-size: 16px;
font-weight: normal;
background: url('comment-balloon.png') no-repeat;
}
.comment-link a:hover .comment-balloon {
color: #fff;
background-position: 0 -25px;
}
.comment-balloon-empty {
font-size: 20px;
line-height: 30px;
}
/* WIDGETS */
.archive-dropdown-wrap {
background: url('browse-search.png') no-repeat;
}
.archive-dropdown-wrap:hover {
background-position: 0 -23px;
}
.archive-dropdown {
margin: 0;
padding: 0;
width: 166px;
height: 23px;
font-size: 12px;
font-family: 'Arial' , sans-serif;
border: none;
opacity: 0;
filter: alpha(opacity=0);
cursor: pointer;
}
/* SEARCH */
#s-search, #s-transcript {
width: 138px;
padding: 4px 0 0 5px;
font-size: 12px;
height: 19px;
font-family: 'Arial' , sans-serif;
color: #000;
border: none;
float: left;
background: url('browse-search.png') 0 -46px no-repeat;
}
#s-search:hover, #s-search:focus, #s-transcript:hover, #s-transcript:focus {
color: #550000;
background-position: 0 -69px;
}
#searchform button, #searchform-transcript button {
padding: 0;
margin: 0;
border: none;
height: 23px;
width: 23px;
line-height: 0;
font-size: 0;
cursor: pointer;
text-indent: -9999px;
background: url('browse-search.png') -143px -46px no-repeat;
}
#searchform button:hover, #searchform-transcript button:hover {
background-position: -143px -69px;
}
#searchform button:hover, #searchform-transcript button:-moz-focus-inner {
border: 0;
}
.searchresults {
float: right;
padding: 5px;
}
/* GALLERY */
.gallery-image {
width: 518px;
border: 1px solid #000;
overflow: hidden;
background: #000;
text-align: center;
}
.gallery-caption {
font-size: 11px;
}
.gallery-caption p {
width: 510px;
padding: 5px;
margin: 0;
text-align: center;
color: #fff;
background: #000;
}
.imagenav-wrap {
margin: 5px 0 0 0;
}
.imagenav {
width: 77px;
height: 77px;
float: left;
overflow: hidden;
}
.imagenav-center {
width: 344px;
height: 65px;
margin: 0 5px;
padding: 10px 5px 0 5px;
float: left;
color: #000;
text-align: center;
border: 1px solid #000;
overflow: hidden;
}
.imagetitle {
color: #000;
font-size: 18px;
}
.imagenav-bg {
width: 75px;
height: 75px;
position: absolute;
z-index: 0;
background: #ddd;
border: 1px solid #000;
overflow: hidden;
}
.imagenav-bg img {
width: 75px;
height: 75px;
}
.imagenav-arrow {
width: 75px;
height: 75px;
position: absolute;
z-index: 1;
color: #fff;
font-size: 80px;
font-weight: bold;
line-height: 75px;
text-align: center;
border: 1px solid #000;
float: left;
}
.imagenav-link {
width: 75px;
height: 75px;
position: absolute;
z-index: 2;
border: 1px solid #000;
float: left;
overflow: hidden;
}
.imagenav-link img {
width: 75px;
height: 75px;
/* opacity: 0.50; filter: alpha(opacity=50); */
}
.imagenav-link img:hover {
/* opacity: 0.00; filter: alpha(opacity=0); */
}
/* Pagination */
#wp-paginav {
background: url('menu.png');
text-align: left;
border: 1px solid #999;
}
#paginav {
padding: 0;
margin: 0;
list-style: none;
float: left;
line-height: 25px;
font-size: 13px;
border-right: 1px solid #aaa;
}
#paginav .paginav-pages, #paginav .paginav-extend {
padding: 0 15px 0 15px;
}
#paginav a {
padding: 0px 10px 0 10px;
display: block;
color: #000;
text-decoration: none;
}
#paginav ul {
margin: 0;
padding: 0;
list-style: none;
}
#paginav li {
float: left;
}
#paginav li a {
border-left: 1px solid #aaa;
border-right: 1px solid #ccc;
}
#paginav .paginav-next, #paginav .paginav-previous {
font-size: 20px;
}
#paginav .paginav-current, #paginav .current {
padding: 0px 10px 0 10px;
color: #fff;
border-left: 1px solid #aaa;
background: url('menu.png') 0 -150px;
}
#paginav li:hover a {
border-left: 1px solid #8b160f;
border-right: 1px solid #c28380;
color: #fff;
background: url('menu.png') 0 -75px;
}

View File

@ -1,52 +0,0 @@
<?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;
}
}
?>