Compare commits
No commits in common. "master" and "media-handling" have entirely different histories.
master
...
media-hand
10
404.php
|
@ -1,14 +1,14 @@
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<div class="post page post-404">
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<h2 class="pagetitle"><?php _e('Page Not Found','comicpress'); ?></h2>
|
||||
<p><a href="<?php bloginfo('wpurl') ?>"><?php _e('Click here to return to the home page','comicpress'); ?></a> <?php _e('or try a search:','comicpress'); ?></p>
|
||||
<p><?php the_widget('WP_Widget_Search'); ?></p>
|
||||
<p><?php include (get_template_directory() . '/searchform.php') ?></p>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
|
|
6
README
|
@ -1,8 +1,8 @@
|
|||
ComicPress is the WordPress Comic Pubishing Theme.
|
||||
|
||||
Copyright 2005-2010 Tyler Martin
|
||||
Copyright 2008-2010 John Bintz
|
||||
Copyright 2009-2010 Philip M. Hofer
|
||||
Copyright 2005-2009 Tyler Martin
|
||||
Copyright 2008-2009 John Bintz
|
||||
Copyright 2009 Philip M. Hofer
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -67,16 +67,25 @@ $month['11'] = array('month' => __('November','comicpress'), 'days' => '30');
|
|||
$month['12'] = array('month' => __('December','comicpress'), 'days' => '31');
|
||||
|
||||
?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?> <span class="page-archive-year"> <?php echo $archive_year; ?></span></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
|
||||
<?php comicpress_display_post(); ?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<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 ) {
|
||||
|
@ -86,7 +95,7 @@ foreach ( $years as $year ) {
|
|||
</div>
|
||||
<div class="cpcal-cals">
|
||||
<?php $i=1; while($i<=12) {
|
||||
$calendar_directory = $comicpress_options['calendar_directory'];
|
||||
$calendar_directory = $comicpress_calendar['calendar_directory'];
|
||||
if (!empty($calendar_directory) && $calendar_directory != 'none') { ?>
|
||||
<div class="cpcal-month" style="height: 257px;" id="<?php echo $month[$i]['month'] ?>">
|
||||
<?php if (file_exists(get_stylesheet_directory() . '/images/cal') && $calendar_directory != 'default') { ?>
|
||||
|
@ -152,9 +161,10 @@ foreach ( $years as $year ) {
|
|||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
|
|
@ -1,18 +1,31 @@
|
|||
<?php
|
||||
/*
|
||||
Template Name: This Month of Comics
|
||||
Template Name: Month at a glance
|
||||
*/
|
||||
?>
|
||||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php
|
||||
//based on Austin Matzko's code from wp-hackers email list
|
||||
function filter_where($where = '') {
|
||||
//posts in the last 30 days
|
||||
|
@ -24,25 +37,18 @@ add_filter('posts_where', 'filter_where');
|
|||
$posts = query_posts('&show_posts=-1&posts_per_page=-1&cat='.get_all_comic_categories_as_cat_string());
|
||||
|
||||
?>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
|
||||
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
|
||||
<div class="comicthumbwrap">
|
||||
<div class="comicarchiveframe">
|
||||
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_mini() ?>" alt="<?php the_title() ?>" title="<?php the_title() ?>" style="width: <?php echo $mini_comic_width; ?>px" /></a><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endwhile; endif; ?>
|
||||
<?php endwhile; endif; ?>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
|
@ -6,17 +6,24 @@ Template Name: Comic Storyline with Thumbs
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<ul id="storyline" class="level-0">
|
||||
<?php if (get_option('comicpress-enable-storyline-support') == 1) {
|
||||
if (($result = get_option("comicpress-storyline-category-order")) !== false) {
|
||||
|
@ -31,6 +38,12 @@ if (have_posts()) {
|
|||
$description = $category->description;
|
||||
$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("mini", "archive", "rss", "comic") as $type) {
|
||||
if (($requested_archive_image = get_comic_url($type, $first_comic_in_category)) !== false) {
|
||||
$archive_image = $requested_archive_image; break;
|
||||
}
|
||||
}
|
||||
if ($target_depth < $current_depth) {
|
||||
echo str_repeat("</ul></li>", ($current_depth - $target_depth));
|
||||
}
|
||||
|
@ -43,7 +56,7 @@ if (have_posts()) {
|
|||
|
||||
<li id="storyline-<?php echo $category->category_nicename ?>"<?php echo $storyline_root; $storyline_root = null ?>>
|
||||
<?php if (!empty($first_comic_in_category)) { ?>
|
||||
<a href="<?php echo $first_comic_permalink ?>" title="<?php _e('First comic in','comicpress'); ?> <?php echo $category->cat_name ?>."><?php echo comicpress_display_comic_image('mini,archive,rss,comic', false, $first_comic_in_category, __('First comic in','comicpress').' '.$category->cat_name); ?></a>
|
||||
<a href="<?php echo $first_comic_permalink ?>" title="<?php _e('First comic in','comicpress'); ?> <?php echo $category->cat_name ?>."><img src="<?php echo $archive_image ?>" style="width: <?php echo $mini_comic_width; ?>px" /></a>
|
||||
<?php } ?>
|
||||
<a href="<?php echo get_category_link($category_id) ?>" class="storyline-title"><?php echo $category->cat_name ?></a>
|
||||
<?php if (!empty($description)) { ?>
|
||||
|
@ -64,10 +77,8 @@ if (have_posts()) {
|
|||
</ul>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
|
@ -6,17 +6,24 @@ Template Name: Comic Storyline Archive
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<ul id="storyline" class="level-0">
|
||||
<?php if (get_option('comicpress-enable-storyline-support') == 1) {
|
||||
if (($result = get_option("comicpress-storyline-category-order")) !== false) {
|
||||
|
@ -31,6 +38,12 @@ if (have_posts()) {
|
|||
$description = $category->description;
|
||||
$first_comic_in_category = get_terminal_post_in_category($category_id);
|
||||
$first_comic_permalink = get_permalink($first_comic_in_category->ID);
|
||||
$archive_image = null;
|
||||
foreach (array("mini", "archive", "rss", "comic") as $type) {
|
||||
if (($requested_archive_image = get_comic_url($type, $first_comic_in_category)) !== false) {
|
||||
$archive_image = $requested_archive_image; break;
|
||||
}
|
||||
}
|
||||
if ($target_depth < $current_depth) {
|
||||
echo str_repeat("</ul></li>", ($current_depth - $target_depth));
|
||||
}
|
||||
|
@ -66,10 +79,8 @@ if (have_posts()) {
|
|||
</ul>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
|
@ -17,17 +17,26 @@ if (isset($_REQUEST['archive_year'])) {
|
|||
if (empty($archive_year) || $archive_year == '') $archive_year = date('Y');
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?> <span class="page-archive-year"> <?php echo $archive_year; ?></span></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
<?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 ) {
|
||||
|
@ -42,12 +51,12 @@ if (have_posts()) {
|
|||
<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="<?php _e('Permanent Link:','comicpress'); ?> <?php the_title() ?>"><?php the_title() ?></a></td></tr>
|
||||
<?php endwhile; ?>
|
||||
</table>
|
||||
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
|
@ -5,38 +5,43 @@ Template Name: Comic Archive
|
|||
?>
|
||||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date DESC");
|
||||
foreach ( $years as $year ) {
|
||||
if ($year != (0) ) {
|
||||
?>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date DESC");
|
||||
foreach ( $years as $year ) {
|
||||
if ($year != (0) ) { ?>
|
||||
<h3><?php echo $year ?></h3>
|
||||
<table class="month-table">
|
||||
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$year);
|
||||
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$year);
|
||||
while ($comicArchive->have_posts()) : $comicArchive->the_post() ?>
|
||||
<tr><td class="archive-date"><?php the_time('M j') ?></td><td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="<?php _e('Permanent Link:','comicpress'); ?> <?php the_title() ?>"><?php the_title() ?></a></td></tr>
|
||||
<?php endwhile; ?>
|
||||
</table>
|
||||
<?php } } ?>
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
156
archive.php
|
@ -17,9 +17,10 @@
|
|||
} else {
|
||||
$posts = query_posts($query_string.'&order='.$archive_display_order);
|
||||
} ?>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<div class="content">
|
||||
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
|
||||
<?php /* Category Archive */ if (is_category()) { ?>
|
||||
<h2 class="pagetitle"><?php _e('Archive for ‘','comicpress'); ?><?php single_cat_title() ?>’</h2>
|
||||
|
@ -36,56 +37,111 @@
|
|||
<?php /* Paged Archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
|
||||
<h2 class="pagetitle"><?php _e('Archives','comicpress'); ?></h2>
|
||||
<?php } ?>
|
||||
<div class="searchresults"><?php printf(_n("%d item.", "%d items.", $count,'comicpress'),$count); ?></div>
|
||||
<br class="clear-margins" />
|
||||
<div class="searchresults"><?php printf(__ngettext("%d item.", "%d items.", $count,'comicpress'),$count); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
|
||||
<?php if (is_category() && in_comic_category()) { ?>
|
||||
|
||||
<div class="comicthumbwrap">
|
||||
<div class="comicarchiveframe" style="width: <?php echo $mini_comic_width; ?>px">
|
||||
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_mini() ?>" alt="<?php the_title() ?>" title="<?php the_title() ?>" /></a>
|
||||
</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 ($comicpress_options['enable_comic_post_author_gravatar']) { ?>
|
||||
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_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 ($comicpress_options['enable_comic_post_calendar']) { ?>
|
||||
<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> <?php _e('By','comicpress'); ?> <?php the_author_posts_link(); ?> <?php _e('on','comicpress'); ?> <?php the_time('F jS, Y'); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></small><br />
|
||||
<?php if (get_option('comicpress-enable-storyline-support') == 1) { ?>
|
||||
<ul class="storyline-cats"><li class="storyline-root"><?php the_category(' » </li><li>', multiple) ?></li></ul>
|
||||
<?php } else { ?>
|
||||
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
|
||||
<small> <?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></small><br />
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="comicarchiveframe" style="max-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." style="max-width: <?php echo $archive_comic_width ?>px" /></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-comic-foot"></div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-head"></div>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-info">
|
||||
<?php if ($comicpress_options['enable_post_author_gravatar']) { ?>
|
||||
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_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 ($comicpress_options['enable_post_calendar']) { ?>
|
||||
<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="<?php _e('Permanent Link to','comicpress'); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<small> <?php _e('By','comicpress'); ?> <?php the_author_posts_link(); ?> <?php _e('on','comicpress'); ?> <?php the_time('F jS, Y'); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></small><br />
|
||||
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
|
||||
<small> <?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></small><br />
|
||||
<?php } ?>
|
||||
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php
|
||||
if ($comicpress_options['excerpt_or_content_archive'] != 'excerpt') {
|
||||
the_content(__('↓ Read the rest of this entry...','comicpress'));
|
||||
} else {
|
||||
the_excerpt();
|
||||
} ?>
|
||||
<div class="post-extras">
|
||||
<div class="post-tags">
|
||||
<?php the_tags(__('└ Tags:','comicpress'),', ','<br />'); ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php endwhile; ?>
|
||||
<div class="clear"></div>
|
||||
<?php else : ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-head"></div>
|
||||
<div class="post">
|
||||
<h3><?php _e('No posts found.','comicpress'); ?></h3>
|
||||
<p><?php _e('Try another search?','comicpress'); ?></p>
|
||||
<p><?php include(get_template_directory() . '/searchform.php') ?></p>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if (is_category() && in_comic_category()) { ?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
|
||||
<?php } ?>
|
||||
<?php while (have_posts()) : the_post();
|
||||
|
||||
if (is_category() && in_comic_category()) { ?>
|
||||
|
||||
<div class="comicthumbwrap">
|
||||
<?php global $mini_comic_width; ?>
|
||||
<div class="comicarchiveframe" style="width: <?php echo $mini_comic_width; ?>px">
|
||||
<a href="<?php the_permalink() ?>"><?php echo comicpress_display_comic_image("mini,rss,archive,comic", false); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } else {
|
||||
comicpress_display_post();
|
||||
}
|
||||
|
||||
endwhile;
|
||||
|
||||
if (is_category() && in_comic_category()) { ?>
|
||||
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
<?php else : ?>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post">
|
||||
<h3><?php _e('No entries found.','comicpress'); ?></h3>
|
||||
<p><?php _e('Try another search?','comicpress'); ?></p>
|
||||
<p><?php the_widget('WP_Widget_Search'); ?></p>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php comicpress_pagination(); ?>
|
||||
|
|
46
archives.php
|
@ -5,40 +5,20 @@ Template Name: Archives
|
|||
?>
|
||||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div id="archivepage">
|
||||
<h2><?php _e('Archives by Month:','comicpress'); ?></h2>
|
||||
<ul><?php wp_get_archives('type=monthly') ?></ul>
|
||||
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<div id="archivepage">
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<ul><?php wp_get_archives('type=monthly') ?></ul>
|
||||
<h2><?php _e('Archives by Subject:','comicpress'); ?></h2>
|
||||
<ul><?php wp_list_categories() ?></ul>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div id="archivepage">
|
||||
<h2><?php _e('Archives by Subject:','comicpress'); ?></h2>
|
||||
<ul><?php wp_list_categories() ?></ul>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
15
author.php
|
@ -3,16 +3,17 @@
|
|||
|
||||
<?php
|
||||
if(get_query_var('author_name') ) {
|
||||
$curauth = get_user_by('slug', get_query_var('author_name'));
|
||||
// NOTE: 2.0 bug requires: get_userdatabylogin(get_the_author_login());
|
||||
$curauth = get_userdatabylogin(get_query_var('author_name'));
|
||||
} else {
|
||||
$curauth = get_userdata(get_query_var('author'));
|
||||
}
|
||||
if (empty($curauth)) { ?>
|
||||
<h2><?php _e('No such author.','comicpress'); ?></h2>
|
||||
<?php } else { ?>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<div class="userpage-avatar">
|
||||
<?php echo str_replace("alt='", "alt='".wp_specialchars($curauth->display_name, 1)."' title='".wp_specialchars($curauth->display_name, 1), comicpress_get_avatar($curauth->user_email, 64)); ?>
|
||||
</div>
|
||||
|
@ -48,12 +49,12 @@
|
|||
<h3><?php _e('Posts by','comicpress'); ?> <?php echo $authorname; ?> (<?php echo get_usernumposts($curauth->ID); ?>) ¬</h3>
|
||||
<?php // this area is a loop that shows what posts the person has done. ?>
|
||||
<ol>
|
||||
<li><table class="month-table">
|
||||
<table class="month-table">
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<tr><td class="archive-date" align="right"><?php the_time('M j, Y') ?></td><td class="archive-title"><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></td>
|
||||
|
||||
<?php endwhile; ?>
|
||||
</table></li>
|
||||
</table>
|
||||
</ol>
|
||||
|
||||
<?php comicpress_pagination(); ?>
|
||||
|
@ -61,7 +62,7 @@
|
|||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
|
8
blog.php
|
@ -6,16 +6,16 @@ Template Name: Blog
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php
|
||||
if (!$comicpress_options['split_column_in_two']) {
|
||||
$blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
|
||||
<?php global $blog_postcount;
|
||||
if (!$comicpress['split_column_in_two']) {
|
||||
$blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
|
||||
|
||||
$posts = query_posts($blog_query);
|
||||
if (have_posts()) {
|
||||
|
||||
while (have_posts()) : the_post();
|
||||
|
||||
comicpress_display_post();
|
||||
display_blog_post();
|
||||
|
||||
endwhile;
|
||||
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
$pear_ok = true;
|
||||
if (!extension_loaded('zip')) { $pear_ok = false; }
|
||||
|
||||
if (!$pear_ok) {
|
||||
echo "This script requires the zip PECL extension\n. Please install it before proceeding.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!file_exists('comicpress-config.php.dist')) {
|
||||
echo "Must be run from the root ComicPress theme directory!\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (empty($argv[1])) {
|
||||
echo "Usage: {$argv[0]} <name of destination file>\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!$zip_file = tempnam('', 'comicpress')) {
|
||||
echo "A temp directory could not be created!\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$zip_file .= '.zip';
|
||||
|
||||
$ignore_filters = array(
|
||||
'#~$#', '#^\.#', '#^test$#', '#^build$#', '#^Makefile$#', '#^phpunit.xml$#'
|
||||
);
|
||||
|
||||
$renames = array(
|
||||
'#^(.*)\.dist$#' => '\1'
|
||||
);
|
||||
|
||||
$zip = new ZipArchive();
|
||||
$result = $zip->open($zip_file, ZipArchive::CREATE);
|
||||
if ($result === true) {
|
||||
$dir_stack = array('.');
|
||||
while (!empty($dir_stack)) {
|
||||
$dir = array_shift($dir_stack);
|
||||
$zip_dir = preg_replace('#^.#', 'comicpress', $dir);
|
||||
$zip->addEmptyDir($zip_dir);
|
||||
if ($dh = opendir($dir)) {
|
||||
while ($file = readdir($dh)) {
|
||||
$ok = true;
|
||||
foreach ($ignore_filters as $filter) {
|
||||
if (preg_match($filter, $file) > 0) { $ok = false; break; }
|
||||
}
|
||||
if ($ok) {
|
||||
$target = $dir . '/' . $file;
|
||||
if (is_dir($target)) {
|
||||
$dir_stack[] = $target;
|
||||
} else {
|
||||
$zip_target = $file;
|
||||
foreach ($renames as $filter => $replacement) {
|
||||
$zip_target = preg_replace($filter, $replacement, $zip_target);
|
||||
}
|
||||
$zip_target = $zip_dir . '/' . $zip_target;
|
||||
echo $zip_target . "\n";
|
||||
$zip->addFile($target, $zip_target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
$zip->close();
|
||||
rename($zip_file, $argv[1]);
|
||||
}
|
130
buystrip.php
|
@ -11,40 +11,57 @@ Template Version: 2.14
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php
|
||||
if (!empty($comicnum)):
|
||||
$this_post = & get_post( $comicnum );
|
||||
?>
|
||||
<div <?php post_class(); ?>>
|
||||
<?php comicpress_display_post_thumbnail(); ?>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<?php if (!empty($comicnum)): ?>
|
||||
<?php $temppost = $post; ?>
|
||||
<?php $post = & get_post( $comicnum ); ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<div style="float:right;">
|
||||
<br />
|
||||
<img src="<?php echo get_template_directory_uri(); ?>/images/paypal.png" alt="<?php _e('Powered by Paypal','comicpress'); ?>" /><br />
|
||||
</div>
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title(); ?></h2>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<?php _e('Comic ID','comicpress'); ?> - #<?php echo $comicnum; ?><br />
|
||||
<?php _e('Title:','comicpress'); ?> <?php echo get_the_title($this_post); ?><br />
|
||||
<?php _e('Title:','comicpress'); ?> <?php echo the_title(); ?><br />
|
||||
<br />
|
||||
<?php
|
||||
echo comicpress_display_comic_image("archive,comic", false, $this_post, get_the_title($this_post));
|
||||
<?php $post = & get_post( $comicnum ); ?>
|
||||
<?php
|
||||
foreach (array("archive", "rss", "comic", "mini") as $type) {
|
||||
if (($requested_image = get_comic_url($type, $post)) !== false) {
|
||||
$image = $requested_image; break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<center>
|
||||
<img src="<?php echo $image; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" /><br />
|
||||
<br />
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<td align="left" valign="center">
|
||||
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||
<input type="hidden" name="add" value="1" />
|
||||
<input type="hidden" name="cmd" value="_cart" />
|
||||
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>" />
|
||||
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>" />
|
||||
<input type="hidden" name="amount" value="<?php echo $comicpress_options['buy_print_us_amount']; ?>" />
|
||||
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo get_the_title($this_post); ?>" />
|
||||
<input type="hidden" name="business" value="<?php echo $comicpress_options['buy_print_email']; ?>" />
|
||||
<input type="hidden" name="add" value="1">
|
||||
<input type="hidden" name="cmd" value="_cart">
|
||||
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>">
|
||||
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>">
|
||||
<input type="hidden" name="amount" value="<?php echo $comicpress_options['buy_print_us_amount']; ?>">
|
||||
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo the_title(); ?>">
|
||||
<input type="hidden" name="business" value="<?php echo $comicpress_options['buy_print_email']; ?>">
|
||||
<?php if ($comicpress_options['buy_print_add_shipping']) { ?>
|
||||
<input type="hidden" name="shipping" value="<?php echo $comicpress_options['buy_print_us_ship']; ?>" />
|
||||
US/Canada<br />
|
||||
<input type="hidden" name="shipping" value="<?php echo $comicpress_options['buy_print_us_ship']; ?>">
|
||||
US/Canada<br>
|
||||
$<?php echo $comicpress_options['buy_print_us_amount']; ?> + $<?php echo $comicpress_options['buy_print_us_ship']; ?> <?php _e('shipping','comicpress'); ?><br />
|
||||
<?php } else { ?>
|
||||
US/Canada<br />
|
||||
US/Canada<br>
|
||||
$<?php echo $comicpress_options['buy_print_us_amount']; ?><br />
|
||||
<?php } ?>
|
||||
<input type="image" src="<?php echo get_template_directory_uri(); ?>/images/buynow_paypal.png" name="submit32" alt="<?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?>" />
|
||||
|
@ -52,21 +69,21 @@ Template Version: 2.14
|
|||
</td>
|
||||
<td width="40">
|
||||
</td>
|
||||
<td align="left">
|
||||
<td align="left" valign="center">
|
||||
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||
<input type="hidden" name="add" value="1" />
|
||||
<input type="hidden" name="cmd" value="_cart" />
|
||||
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>" />
|
||||
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>" />
|
||||
<input type="hidden" name="amount" value="<?php echo $comicpress_options['buy_print_int_amount']; ?>" />
|
||||
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo get_the_title($this_post); ?>" />
|
||||
<input type="hidden" name="business" value="<?php echo $comicpress_options['buy_print_email']; ?>" />
|
||||
<input type="hidden" name="add" value="1">
|
||||
<input type="hidden" name="cmd" value="_cart">
|
||||
<input type="hidden" name="item_name" value="<?php _e('Print','comicpress'); ?>">
|
||||
<input type="hidden" name="return" value="<?php echo bloginfo('wpurl'); ?>">
|
||||
<input type="hidden" name="amount" value="<?php echo $comicpress_options['buy_print_int_amount']; ?>">
|
||||
<input type="hidden" name="item_number" value="<?php _e('Comic ID','comicpress'); ?> (<?php echo $comicnum; ?>) - <?php echo the_title(); ?>">
|
||||
<input type="hidden" name="business" value="<?php echo $comicpress_options['buy_print_email']; ?>">
|
||||
<?php if ($comicpress_options['buy_print_add_shipping']) { ?>
|
||||
<input type="hidden" name="shipping" value="<?php echo $buy_print_int_ship; ?>" />
|
||||
International<br />
|
||||
<input type="hidden" name="shipping" value="<?php echo $buy_print_int_ship; ?>">
|
||||
International<br>
|
||||
$<?php echo $comicpress_options['buy_print_int_amount']; ?> + $<?php echo $comicpress_options['buy_print_int_ship']; ?> <?php _e('shipping','comicpress'); ?><br />
|
||||
<?php } else { ?>
|
||||
International<br />
|
||||
International<br>
|
||||
$<?php echo $comicpress_options['buy_print_int_amount']; ?><br />
|
||||
<?php } ?>
|
||||
<input type="image" src="<?php echo get_template_directory_uri(); ?>/images/buynow_paypal.png" name="submit32" alt="<?php _e('Make payments with PayPal - it is fast, free and secure!','comicpress'); ?>" />
|
||||
|
@ -77,36 +94,29 @@ Template Version: 2.14
|
|||
<br />
|
||||
<?php _e('The purchase of this strip is based on availability. A Print of this strip is what you are purchasing.','comicpress'); ?><br />
|
||||
</center>
|
||||
<br class="clear-margins" />
|
||||
<br />
|
||||
<?php $post = $temppost; ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<?php comicpress_display_post_thumbnail(); ?>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
|
||||
<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>
|
||||
<div class="entry">
|
||||
<?php the_content() ?>
|
||||
<?php wp_link_pages(array('before' => '<p><strong>'.__('Pages:','comicpress').'</strong> ', 'after' => '</p>', 'next_or_number' => 'number')) ?>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endwhile; endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
/* ComicPress Custom CSS over-rides for [ chrome ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
.comicarchiveframe {
|
||||
opacity:0.99; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
|
@ -106,19 +106,6 @@ class ComicPressDBInterface {
|
|||
function get_next_post($categories = null, $override_post = null) { return $this->get_adjacent_post($categories, true, $override_post); }
|
||||
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
function get_parent_child_category_ids() {
|
||||
global $wpdb;
|
||||
|
||||
$parent_child_categories = array();
|
||||
|
||||
$result = $wpdb->get_results("SELECT term_id, parent FROM $wpdb->term_taxonomy", ARRAY_A);
|
||||
if (!empty($result)) {
|
||||
foreach ($result as $row) {
|
||||
$parent_child_categories[$row['term_id']] = $row['parent'];
|
||||
}
|
||||
}
|
||||
|
||||
return $parent_child_categories;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -24,15 +24,12 @@ class ComicPressMediaHandling {
|
|||
|
||||
function _get_filter($filter_to_use = null) {
|
||||
global $comic_filename_filters;
|
||||
|
||||
if (!is_null($filter_to_use)) {
|
||||
if (is_string($filter_to_use)) {
|
||||
if (isset($comic_filename_filters[$filter_to_use])) {
|
||||
return $this->_convert_to_percent_filter($comic_filename_filters[$filter_to_use]);
|
||||
}
|
||||
$options = get_option('comicpress_options');
|
||||
// if (isset($options['comic_filename_filters'][$filter_to_use])) {
|
||||
// return $this->_convert_to_percent_filter($options['comic_filename_filters'][$filter_to_use]);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,6 +39,7 @@ class ComicPressMediaHandling {
|
|||
} else {
|
||||
$filter = str_replace('{date}', $this->default_filename_filter, $filter);
|
||||
}
|
||||
|
||||
return $filter;
|
||||
}
|
||||
|
||||
|
@ -74,7 +72,7 @@ class ComicPressMediaHandling {
|
|||
|
||||
function _get_regex_filename($input) {
|
||||
$input = preg_replace('#\\\(?![.])#', '/', $input);
|
||||
return preg_replace('#^.*\/([^\/]+)$#', '$1', $input);
|
||||
return basename($input);
|
||||
}
|
||||
|
||||
function _resolve_regex_path($input) {
|
||||
|
@ -85,7 +83,7 @@ class ComicPressMediaHandling {
|
|||
|
||||
// @codeCoverageIgnoreStart
|
||||
function _abspath() {
|
||||
return trailingslashit($this->_resolve_regex_path(ABSPATH));
|
||||
return trailingslashit($this->_resolve_regex_path(realpath(ABSPATH)));
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
|
|
|
@ -1,35 +1,37 @@
|
|||
<?php
|
||||
|
||||
class ComicPressPostMediaHandlingMetabox {
|
||||
// @codeCoverageIgnoreStart
|
||||
function __comicpress_init() {
|
||||
add_action('admin_menu', array('ComicPressPostMediaHandlingMetabox', 'admin_menu'));
|
||||
}
|
||||
|
||||
function handle_update() {}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
function _get_valid_types() {
|
||||
return array_keys(ComicPressMediaHandling::_bundle_global_variables());
|
||||
}
|
||||
|
||||
function _verify_nonce() { return __comicpress_verify_nonce(); }
|
||||
|
||||
function save_post($post_id) {
|
||||
if ($this->_verify_nonce() == 'post-media-update') {
|
||||
$info = $_REQUEST['cp'];
|
||||
$result = array();
|
||||
if (isset($info['urls'])) {
|
||||
if (is_array($info['urls'])) {
|
||||
$valid_types = ComicPressPostMediaHandlingMetabox::_get_valid_types();
|
||||
foreach ($info['urls'] as $field => $value) {
|
||||
if (in_array($field, $valid_types)) {
|
||||
$result[$field] = strip_tags($value);
|
||||
function handle_post_media_update($info) {
|
||||
if (isset($info['post_id'])) {
|
||||
if (is_numeric($info['post_id'])) {
|
||||
$result = array();
|
||||
if (isset($info['urls'])) {
|
||||
if (is_array($info['urls'])) {
|
||||
$valid_types = ComicPressPostMediaHandlingMetabox::_get_valid_types();
|
||||
foreach ($info['urls'] as $field => $value) {
|
||||
if (in_array($field, $valid_types)) {
|
||||
$result[$field] = strip_tags($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
update_post_meta($info['post_id'], 'backend_url_images', $result);
|
||||
}
|
||||
update_post_meta($post_id, 'backend_url_images', $result);
|
||||
}
|
||||
}
|
||||
|
||||
function _save_post($post_id) {
|
||||
$mb = new ComicPressPostMediaHandlingMetabox();
|
||||
$mb->save_post($post_id);
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
function admin_menu() {
|
||||
add_meta_box('comicpress-post-media-handling', __('ComicPress Post Media', 'comicpress'), array('ComicPressPostMediaHandlingMetabox', 'metabox'), 'post', 'normal', 'low');
|
||||
|
@ -49,6 +51,3 @@ class ComicPressPostMediaHandlingMetabox {
|
|||
include('partials/post-media-handling/metabox.inc');
|
||||
}
|
||||
}
|
||||
|
||||
add_action('admin_menu', array('ComicPressPostMediaHandlingMetabox', 'admin_menu'));
|
||||
add_action('save_post', array('ComicPressPostMediaHandlingMetabox', '_save_post'));
|
||||
|
|
|
@ -1,125 +0,0 @@
|
|||
<?php
|
||||
|
||||
require_once('ComicPressStoryline.inc');
|
||||
|
||||
class ComicPressRelatedPosts {
|
||||
var $related_categories;
|
||||
|
||||
function display_related_comics($attrs = '') {
|
||||
$rp = new ComicPressRelatedPosts();
|
||||
return $rp->_handle_shortcode(
|
||||
extract(ComicPressRelatedPosts::_handle_shortcode_attrs($attrs)),
|
||||
__('Related Comics ¬', 'comicpress'), true
|
||||
);
|
||||
}
|
||||
|
||||
function display_related_posts($attrs = '') {
|
||||
$rp = new ComicPressRelatedPosts();
|
||||
return $rp->_handle_shortcode(
|
||||
extract(ComicPressRelatedPosts::_handle_shortcode_attrs($attrs)),
|
||||
__('Related Posts ¬', 'comicpress'), false
|
||||
);
|
||||
}
|
||||
|
||||
function _handle_shortcode($attrs, $title, $is_in_storyline) {
|
||||
global $post;
|
||||
|
||||
if (is_object($post)) {
|
||||
if (isset($post->ID)) {
|
||||
$this->_setup_categories($is_in_storyline);
|
||||
$tags = $this->_extract_tag_ids($post->ID);
|
||||
|
||||
if (!empty($tags)) {
|
||||
$posts = $this->_do_tags_query($post->ID, $tags, $attrs['limit']);
|
||||
if (!empty($posts)) {
|
||||
return $this->build_post_table($title, $posts);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function _handle_shortcode_attrs($attrs) {
|
||||
return shortcode_atts(array(
|
||||
'limit' => '5',
|
||||
), $attrs);
|
||||
}
|
||||
|
||||
function _new_comicpressstoryline() { return new ComicPressStoryline(); }
|
||||
|
||||
function _setup_categories($is_in_storyline = true) {
|
||||
$storyline = new ComicPressStoryline();
|
||||
$storyline->read_from_options();
|
||||
$storyline_categories = $storyline->build_from_restrictions();
|
||||
|
||||
if ($is_in_storyline) {
|
||||
$this->related_categories = $storyline_categories;
|
||||
} else {
|
||||
$this->related_categories = array_diff(get_all_category_ids(), $storyline_categories);
|
||||
}
|
||||
}
|
||||
|
||||
function build_post_table($title, $posts) {
|
||||
$output = array();
|
||||
if (!empty($posts)) {
|
||||
$output[] = '<div class="related_posts">';
|
||||
$output[] = '<h4>' . $title . '</h4>';
|
||||
$output[] = '<ul>';
|
||||
foreach ($posts as $post) {
|
||||
if (array_intersect($this->related_categories, wp_get_post_categories($post->ID))) {
|
||||
$output[] = '<li><a title="' . esc_attr(get_the_title($post)) . '" href="' . esc_attr(get_permalink($post)) . '">' . esc_html(get_the_title($post)) . '</a></li>';
|
||||
}
|
||||
}
|
||||
$output[] = '</ul>';
|
||||
$output[] = '</div>';
|
||||
}
|
||||
return implode('', $output);
|
||||
}
|
||||
|
||||
function _extract_tag_ids($post_id) {
|
||||
$output = array();
|
||||
foreach (wp_get_post_tags($post_id) as $tag) {
|
||||
$output[] = $tag->term_id;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
function _do_tags_query($post_id, $tags = array(), $limit = 5) {
|
||||
global $wpdb;
|
||||
|
||||
if (!empty($tags)) {
|
||||
if (empty($limit)) {
|
||||
$limit = 5;
|
||||
}
|
||||
|
||||
// Do the query
|
||||
$q = "SELECT p.*, count(tr.object_id) as count
|
||||
FROM
|
||||
$wpdb->term_taxonomy AS tt,
|
||||
$wpdb->term_relationships AS tr,
|
||||
$wpdb->posts AS p
|
||||
WHERE
|
||||
tt.taxonomy ='post_tag' AND
|
||||
tt.term_taxonomy_id = tr.term_taxonomy_id AND
|
||||
tr.object_id = p.ID AND
|
||||
tt.term_id IN (%s) AND
|
||||
p.ID != %d AND
|
||||
p.post_status = 'publish' AND
|
||||
p.post_date < NOW()
|
||||
GROUP BY tr.object_id
|
||||
ORDER BY count DESC, p.post_date DESC
|
||||
LIMIT %d";
|
||||
|
||||
return $wpdb->get_results($wpdb->prepare($q, implode(',', $tags), $post_id, $limit));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
add_shortcode('related_posts', array('ComicPressRelatedPosts', 'display_related_posts'));
|
||||
add_shortcode('related_comics', array('ComicPressRelatedPosts', 'display_related_comics'));
|
||||
|
|
@ -247,36 +247,19 @@ class ComicPressStoryline {
|
|||
return $this->_merge_simple_storyline($simple_storyline);
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
function get_comicpress_dbi() {
|
||||
return ComicPressDBInterface::get_instance();
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
/**
|
||||
* Get a simple structure.
|
||||
*/
|
||||
function get_category_simple_structure($parent = null) {
|
||||
$cache_key = $this->generate_cache_key('storyline-structure', $parent);
|
||||
$result = wp_cache_get($cache_key, 'comicpress');
|
||||
if (is_array($result)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$structure = array();
|
||||
$dbi = $this->get_comicpress_dbi();
|
||||
|
||||
$result = $dbi->get_parent_child_category_ids();
|
||||
|
||||
foreach ($result as $cat_id => $cat_parent) {
|
||||
if (!isset($structure[$cat_parent])) {
|
||||
$structure[$cat_parent] = array();
|
||||
foreach (get_all_category_ids() as $category_id) {
|
||||
$category = get_category($category_id);
|
||||
if (!isset($structure[$category->parent])) {
|
||||
$structure[$category->parent] = array();
|
||||
}
|
||||
$structure[$cat_parent][$cat_id] = true;
|
||||
$structure[$category->parent][$category_id] = true;
|
||||
}
|
||||
|
||||
$structure = $this->_merge_simple_storyline($structure);
|
||||
|
||||
if (!empty($parent)) {
|
||||
if (isset($structure[0])) {
|
||||
foreach ($structure[0] as $key => $children) {
|
||||
|
@ -284,19 +267,9 @@ class ComicPressStoryline {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
wp_cache_set($cache_key, $structure, 'comicpress');
|
||||
|
||||
return $structure;
|
||||
}
|
||||
|
||||
function generate_cache_key($key_name, $param) {
|
||||
if (!empty($param)) {
|
||||
$key_name = "${key_name}-${param}";
|
||||
}
|
||||
return $key_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a flattened category node list.
|
||||
*/
|
||||
|
@ -366,9 +339,6 @@ class ComicPressStoryline {
|
|||
|
||||
$valid_ids = get_all_category_ids();
|
||||
|
||||
if (!isset($comicpress->comicpress_options['category_groupings'])) { $comicpress->comicpress_options['category_groupings'] = array(); }
|
||||
if (!is_array($comicpress->comicpress_options['category_groupings'])) { $comicpress->comicpress_options['category_groupings'] = array(); }
|
||||
|
||||
foreach ($comicpress->comicpress_options['category_groupings'] as $group_id => $category_ids) {
|
||||
$comicpress->comicpress_options['category_groupings'][$group_id] = array_intersect($category_ids, $valid_ids);
|
||||
if (empty($comicpress->comicpress_options['category_groupings'][$group_id])) {
|
||||
|
|
|
@ -22,7 +22,7 @@ $archive_comic_width = "380";
|
|||
$rss_comic_width = "600";
|
||||
|
||||
//BLOG POSTCOUNT - the number of blog entries to appear on the home page (default "5").
|
||||
$blog_postcount = "5";
|
||||
$blog_postcount = "3";
|
||||
|
||||
//Mini Comic Width - The width your comics will appear in minithumbs (default "100")
|
||||
$mini_comic_width = "80";
|
||||
|
|
|
@ -1,125 +0,0 @@
|
|||
<?php
|
||||
|
||||
function comicpress_notice_debug() {
|
||||
global $current_user, $comiccat, $blogcat, $comic_folder, $wpdb, $category_tree, $non_comic_categories, $comicpress_options;
|
||||
|
||||
if( substr( $_SERVER[ 'PHP_SELF' ], -19 ) != '/wp-admin/index.php' || !$comicpress_options['enable_comicpress_debug'])
|
||||
return;
|
||||
|
||||
$comicpress_options = comicpress_load_options();
|
||||
|
||||
$error = array();
|
||||
|
||||
if (floatval(phpversion()) < 5.0) {
|
||||
$phpversion = phpversion();
|
||||
$error[] = array('header', __('You are using PHP version: ','comicpress'). $phpversion);
|
||||
$error[] = __('Version 5 or higher is required for this theme to work correctly. Please check with your host about upgrading to a newer version.','comicpress');
|
||||
}
|
||||
|
||||
$post_cat_link = get_bloginfo('wpurl') . '/wp-admin/categories.php';
|
||||
|
||||
// Check Categories
|
||||
if ($comiccat == $blogcat) {
|
||||
$error[] = array('header', __('Primary Comic and Blog categories are not configured properly.','comicpress'));
|
||||
$error[] = __('ComicPress requires 2 categories to be added to the ','comicpress') . '<a href="'.$post_cat_link.'">' . __('post categories.','comicpress') . '</a>' .
|
||||
__(' It is necessary to have 2 more categories in addition to the uncategorized category, a Blog and Comic primary categories. These two additional categories will be the root categories that seperate the difference between the comic and blog posts. When you post a new comic you will be posting it into the comic category or heirarchal children of the comic category. When posting a new blog post you need to set it into the blog category or child of the blog category. Uncategorized will act as a blog post category (do not rename uncategorized). You can configure the categories to set as the primary blog and comic category from within the ComicPress Manager plugin.','comicpress');
|
||||
}
|
||||
|
||||
if (empty($error)) {
|
||||
// Check Comics Folder
|
||||
$document_root = ABSPATH;
|
||||
|
||||
if (function_exists('cpm_wpmu_modify_path')) {
|
||||
$document_root = cpm_wpmu_modify_path($document_root);
|
||||
}
|
||||
if (!is_dir($document_root .'/'. $comic_folder)) {
|
||||
$error[] = array('header', __('Comics Folder is not configured and is unable to be found.','comicpress'));
|
||||
$error[] = __('ComicPress stores the files it uses inside a specific directory and that directory is set from within ComicPress Manager. When this error is present it means that the theme is unable to find the appropriate directory to read the comics from.','comicpress');
|
||||
$error[] = __('ComicPress Manager - Manager Config will allow you to create the directories needed.');
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($error)) {
|
||||
// Make sure the ComicPress theme is installed in themes/comicpress
|
||||
if (ABSPATH . 'wp-content/themes/comicpress' != get_template_directory()) {
|
||||
$error[] = array('header', __('ComicPress theme is not installed into the correct folder.','comicpress'));
|
||||
$error[] = __('As of version 2.9, the ComicPress main core theme is required to be installed into the wp-content/themes/comicpress directory. It is currently not installed into that directory.','comicpress');
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($error) && $comicpress_options['enable_full_post_check']) {
|
||||
// Check to make sure posts are not in blogcat and comiccat both
|
||||
$founderror = false;
|
||||
$non_comic_categories = str_replace(' and ', ',', $non_comic_categories);
|
||||
$blog_query = '&show_posts=-1&posts_per_page=-1&cat='.$non_comic_categories;
|
||||
|
||||
query_posts($blog_query);
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
if (in_comic_category()) {
|
||||
$founderrorpostlist .= '<a href="'.get_bloginfo('wpurl').'/wp-admin/post.php?action=edit&post='.get_the_ID().'">'.get_the_title().'</a> - Error: Category Crossover<br />';
|
||||
$founderror = true;
|
||||
}
|
||||
endwhile;
|
||||
}
|
||||
if ($founderror) {
|
||||
$error[] = array('header', __('Post\'s are in both a comic category and blog category.','comicpress'));
|
||||
$error[] = __('The following posts are set both in a comic category and a blog category, with ComicPress the designations of categories is very important. The rule of thumb is to make sure that all posts are only in a single category. If a post is in both the comic category and blog category there will be issues with both navigation and execution of the ComicPress code.','comicpress');
|
||||
$error[] = $founderrorpostlist;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($error) && $comicpress_options['enable_full_post_check']) {
|
||||
$founderror = false;
|
||||
$blog_query = '&show_posts=-1&posts_per_page=-1';
|
||||
$posts = query_posts($blog_query);
|
||||
foreach ($posts as $testpost) {
|
||||
$post_title_slug = $testpost->post_name;
|
||||
if (is_numeric($post_title_slug)) {
|
||||
$founderror = true;
|
||||
$founderrorpostname .= '<a href="'.get_bloginfo('wpurl').'/wp-admin/post.php?action=edit&post='.$testpost->ID.'">'.get_the_title($testpost->ID).'</a> - Error: Post Slug (Permalink) is Numeric<br />';
|
||||
}
|
||||
}
|
||||
if ($founderror) {
|
||||
$error[] = array('header', __('Post\'s slug is a numeric.','comicpress'));
|
||||
$error[] = __('The following posts have a post slug (permalink) that is numeric. This will cause problems with permalinks. Post slugs must have at least one alphabetic character in them for Wordpress to handle correctly.','comicpress');
|
||||
$error[] = $founderrorpostname;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($error)) {
|
||||
?>
|
||||
<div class="error">
|
||||
<h2>ComicPress Debug</h2>
|
||||
ComicPress doesn't seem to be fully installed at this time, check out these messages.<br />
|
||||
<br />
|
||||
<?php
|
||||
foreach ($error as $info) {
|
||||
unset($text);
|
||||
if (is_array($info)) {
|
||||
list($type, $text) = $info;
|
||||
} else {
|
||||
if (is_string($info)) {
|
||||
$text = $info;
|
||||
$type = 'paragraph';
|
||||
}
|
||||
}
|
||||
if (!empty($text) && !empty($type)) {
|
||||
switch ($type) {
|
||||
case 'header': echo "<h3>${text}</h3>"; break;
|
||||
case 'raw': echo $text; break;
|
||||
default: echo "<p>${text}</p>"; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'admin_notices', 'comicpress_notice_debug' );
|
||||
|
||||
?>
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -1,267 +1,182 @@
|
|||
<?php
|
||||
|
||||
function comicpress_options_setup() {
|
||||
$pagehook = add_submenu_page('themes.php',__('ComicPress Options', 'comicpress'), __('ComicPress Options','comicpress'), 10, 'comicpress-options', 'comicpress_admin');
|
||||
add_action('admin_head-' . $pagehook, 'comicpress_admin_page_head');
|
||||
add_action('admin_print_scripts-' . $pagehook, 'comicpress_admin_print_scripts');
|
||||
add_action('admin_print_styles-' . $pagehook, 'comicpress_admin_print_styles');
|
||||
}
|
||||
|
||||
function comicpress_admin_print_scripts() {
|
||||
wp_enqueue_script('utils');
|
||||
wp_enqueue_script('jquery');
|
||||
}
|
||||
|
||||
function comicpress_admin_print_styles() {
|
||||
wp_admin_css('css/global');
|
||||
wp_admin_css('css/colors');
|
||||
wp_admin_css('css/ie');
|
||||
wp_enqueue_style('comicpress-options', get_template_directory_uri() . '/options/options.css');
|
||||
function options() {
|
||||
$pagehook = add_submenu_page('themes.php','comicpress', __('ComicPress Options','comicpress'), 10, 'comicpress-options', 'comicpress_admin');
|
||||
add_action('admin_head-'.$pagehook, 'comicpress_admin_page_head');
|
||||
}
|
||||
|
||||
function comicpress_admin_page_head() { ?>
|
||||
<!--[if lt ie 8]> <style> div.show { position: static; margin-top: 1px; } #cpadmin div.off { height: 22px; } </style> <![endif]-->
|
||||
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/options/options.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/tabbed_pages.js"></script>
|
||||
<!--[if lt ie 8]> <style> div.show { position: static; margin-top: 1px; } #cpadmin div.off { height: 22px; } </style> <![endif]-->
|
||||
|
||||
<?php }
|
||||
|
||||
function comicpress_admin() {
|
||||
global $upload_path, $blogcat;
|
||||
$comicpress_options = get_option('comicpress_options');
|
||||
?>
|
||||
|
||||
$comicpress_options = get_option('comicpress_options'); ?>
|
||||
|
||||
<div class="wrap">
|
||||
|
||||
<div id="cpadmin-headericon" style="background: url('<?php echo get_template_directory_uri(); ?>/images/options/comicpress_icon.png') no-repeat;"></div>
|
||||
<h2 class="alignleft"><?php _e('ComicPress Options','comicpress'); ?></h2>
|
||||
<div class="clear"></div>
|
||||
<?php
|
||||
<?php
|
||||
$tab = '';
|
||||
if ( wp_verify_nonce($_POST['_wpnonce'], 'update-options') ) {
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_layout') {
|
||||
$comicpress_options['cp_theme_layout'] = wp_filter_nohtml_kses($_REQUEST['cp_theme_layout']);
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_layout') {
|
||||
$comicpress_options['cp_theme_layout'] = $_REQUEST['cp_theme_layout'];
|
||||
$tab = 'themestyle';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_general') {
|
||||
|
||||
foreach (array(
|
||||
'disable_page_restraints',
|
||||
'rascal_says',
|
||||
'disable_comment_note',
|
||||
'enable_numbered_pagination',
|
||||
'enable_comment_count_in_rss',
|
||||
'enable_post_thumbnail_rss',
|
||||
'comic_clicks_next',
|
||||
'disable_default_comic_nav',
|
||||
'enable_widgetarea_use_sidebar_css',
|
||||
'disable_lrsidebars',
|
||||
'disable_footer_text',
|
||||
'disable_blogheader',
|
||||
'enable_comicpress_debug',
|
||||
'enable_full_post_check',
|
||||
'enable_scroll_to_top',
|
||||
'enable_page_load_info'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
|
||||
foreach (array(
|
||||
'graphicnav_directory'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
}
|
||||
$comicpress_options['disable_page_restraints'] = (bool)( $_REQUEST['disable_page_restraints'] == 1 ? true : false );
|
||||
$comicpress_options['rascal_says'] = (bool)($_REQUEST['rascal_says'] == 1 ? true : false );
|
||||
$comicpress_options['disable_comment_note'] = (bool)($_REQUEST['disable_comment_note'] == 1 ? true : false );
|
||||
$comicpress_options['enable_numbered_pagination'] = (bool)($_REQUEST['enable_numbered_pagination'] == 1 ? true : false );
|
||||
$comicpress_options['comic_clicks_next'] = (bool)($_REQUEST['comic_clicks_next'] == 1 ? true : false );
|
||||
$comicpress_options['disable_default_comic_nav'] = (bool)($_REQUEST['disable_default_comic_nav'] == 1 ? true : false );
|
||||
$comicpress_options['graphicnav_directory'] = wp_filter_nohtml_kses($_REQUEST['graphicnav_directory']);
|
||||
$comicpress_options['enable_widgetarea_use_sidebar_css'] = (bool)($_REQUEST['enable_widgetarea_use_sidebar_css'] == 1 ? true : false );
|
||||
$comicpress_options['disable_lrsidebars_frontpage'] = (bool)($_REQUEST['disable_lrsidebars_frontpage'] == 1 ? true : false );
|
||||
$comicpress_options['disable_footer_text'] = (bool)($_REQUEST['disable_footer_text'] == 1 ? true : false );
|
||||
$comicpress_options['disable_blogheader'] = (bool)($_REQUEST['disable_blogheader'] == 1 ? true : false );
|
||||
$tab = 'general';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_index') {
|
||||
foreach (array(
|
||||
'disable_comic_frontpage',
|
||||
'disable_comic_blog_frontpage',
|
||||
'disable_comic_blog_single',
|
||||
'disable_blog_frontpage',
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
$comicpress_options['blog_postcount'] = wp_filter_nohtml_kses($_REQUEST['blog_postcount']);
|
||||
$comicpress_options['disable_comic_frontpage'] = (bool)($_REQUEST['disable_comic_frontpage'] == 1 ? true : false );
|
||||
$comicpress_options['disable_comic_blog_frontpage'] = (bool)($_REQUEST['disable_comic_blog_frontpage'] == 1 ? true : false );
|
||||
$comicpress_options['disable_comic_blog_single'] = (bool)($_REQUEST['disable_comic_blog_single'] == 1 ? true : false );
|
||||
$comicpress_options['disable_blog_frontpage'] = (bool)($_REQUEST['disable_blog_frontpage'] == 1 ? true : false );
|
||||
$tab = 'index';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_post') {
|
||||
foreach (array(
|
||||
'transcript_in_posts',
|
||||
'enable_related_comics',
|
||||
'enable_related_posts',
|
||||
'remove_wptexturize',
|
||||
'enable_comic_post_author_gravatar',
|
||||
'enable_post_author_gravatar',
|
||||
'split_column_in_two',
|
||||
'enable_comic_post_calendar',
|
||||
'enable_post_calendar',
|
||||
'disable_tags_in_posts',
|
||||
'disable_categories_in_posts',
|
||||
'blogposts_with_comic',
|
||||
'static_blog',
|
||||
'disable_page_titles'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
foreach (array(
|
||||
'author_column_one',
|
||||
'author_column_two',
|
||||
'avatar_directory',
|
||||
'moods_directory',
|
||||
'calendar_directory'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
}
|
||||
$comicpress_options['transcript_in_posts'] = (bool)($_REQUEST['transcript_in_posts'] == 1 ? true : false );
|
||||
$comicpress_options['enable_related_comics'] = (bool)($_REQUEST['enable_related_comics'] == 1 ? true : false );
|
||||
$comicpress_options['enable_related_posts'] = (bool)($_REQUEST['enable_related_posts'] == 1 ? true : false );
|
||||
$comicpress_options['remove_wptexturize'] = (bool)($_REQUEST['remove_wptexturize'] == 1 ? true : false );
|
||||
|
||||
$comicpress_options['split_column_in_two'] = (bool)($_REQUEST['split_column_in_two'] == 1 ? true : false );
|
||||
$comicpress_options['author_column_one'] = wp_filter_nohtml_kses($_REQUEST['author_column_one']);
|
||||
$comicpress_options['author_column_two'] = wp_filter_nohtml_kses($_REQUEST['author_column_two']);
|
||||
|
||||
$comicpress_options['enable_comic_post_author_gravatar'] = (bool)($_REQUEST['enable_comic_post_author_gravatar'] == 1 ? true : false );
|
||||
$comicpress_options['enable_post_author_gravatar'] = (bool)($_REQUEST['enable_post_author_gravatar'] == 1 ? true : false );
|
||||
$comicpress_options['avatar_directory'] = wp_filter_nohtml_kses($_REQUEST['avatar_directory']);
|
||||
$comicpress_options['moods_directory'] = wp_filter_nohtml_kses($_REQUEST['moods_directory']);
|
||||
|
||||
$comicpress_options['calendar_directory'] = wp_filter_nohtml_kses($_REQUEST['calendar_directory']);
|
||||
$comicpress_options['enable_comic_post_calendar'] = (bool)($_REQUEST['enable_comic_post_calendar'] == 1 ? true : false );
|
||||
$comicpress_options['enable_post_calendar'] = (bool)($_REQUEST['enable_post_calendar'] == 1 ? true : false );
|
||||
|
||||
$comicpress_options['disable_tags_in_posts'] = (bool)($_REQUEST['disable_tags_in_posts'] == 1 ? true : false );
|
||||
$comicpress_options['disable_categories_in_posts'] = (bool)($_REQUEST['disable_categories_in_posts'] == 1 ? true : false );
|
||||
|
||||
$comicpress_options['blogposts_with_comic'] = (bool)($_REQUEST['blogposts_with_comic'] == 1 ? true : false );
|
||||
$comicpress_options['static_blog'] = (bool)($_REQUEST['static_blog'] == 1 ? true : false );
|
||||
$comicpress_options['disable_page_titles'] = (bool)($_REQUEST['disable_page_titles'] == 1 ? true : false );
|
||||
|
||||
$tab = 'post';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_archivesearch') {
|
||||
foreach (array(
|
||||
'archive_display_order',
|
||||
'excerpt_or_content_archive',
|
||||
'excerpt_or_content_search',
|
||||
'category_thumbnail_postcount'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_archivesearch') {
|
||||
$comicpress_options['archive_display_order'] = $_REQUEST['archive_display_order'];
|
||||
$comicpress_options['excerpt_or_content_archive'] = $_REQUEST['excerpt_or_content_archive'];
|
||||
$comicpress_options['excerpt_or_content_search'] = $_REQUEST['excerpt_or_content_search'];
|
||||
$comicpress_options['category_thumbnail_postcount'] = $_REQUEST['category_thumbnail_postcount'];
|
||||
$tab = 'archivesearch';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_menubar') {
|
||||
foreach (array(
|
||||
'enable_search_in_menubar',
|
||||
'enable_rss_in_menubar',
|
||||
'enable_navigation_in_menubar',
|
||||
'contact_in_menubar',
|
||||
'disable_dynamic_menubar_links',
|
||||
'disable_default_menubar',
|
||||
'enable_blogroll_off_links'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
$comicpress_options['enable_search_in_menubar'] = (bool)($_REQUEST['enable_search_in_menubar'] == 1 ? true : false );
|
||||
$comicpress_options['enable_rss_in_menubar'] = (bool)($_REQUEST['enable_rss_in_menubar'] == 1 ? true : false );
|
||||
$comicpress_options['enable_navigation_in_menubar'] = (bool)($_REQUEST['enable_navigation_in_menubar'] == 1 ? true : false );
|
||||
$comicpress_options['contact_in_menubar'] = (bool)($_REQUEST['contact_in_menubar'] == 1 ? true : false );
|
||||
$comicpress_options['disable_dynamic_menubar_links'] = (bool)($_REQUEST['disable_dynamic_menubar_links'] == 1 ? true : false );
|
||||
$comicpress_options['disable_default_menubar'] = (bool)($_REQUEST['disable_default_menubar'] == 1 ? true : false );
|
||||
$tab = 'menubar';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_addons') {
|
||||
foreach (array(
|
||||
'enable_custom_image_header',
|
||||
'enable_members_only_post_comments',
|
||||
'buy_print_add_shipping'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
foreach (array(
|
||||
'custom_image_header_width',
|
||||
'custom_image_header_height',
|
||||
'enable_members_only',
|
||||
'members_post_category',
|
||||
'buy_print_email',
|
||||
'buy_print_url',
|
||||
'buy_print_us_amount',
|
||||
'buy_print_int_amount',
|
||||
'buy_print_us_ship',
|
||||
'buy_print_int_ship'
|
||||
) as $key) {
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
}
|
||||
$tab = 'addons';
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_customheader') {
|
||||
$comicpress_options['enable_custom_image_header'] = (bool)($_REQUEST['enable_custom_image_header'] == 1 ? true : false );
|
||||
$comicpress_options['custom_image_header_width'] = wp_filter_nohtml_kses($_REQUEST['custom_image_header_width']);
|
||||
$comicpress_options['custom_image_header_height'] = wp_filter_nohtml_kses($_REQUEST['custom_image_header_height']);
|
||||
$tab = 'customheader';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_config') {
|
||||
|
||||
foreach (array(
|
||||
'comiccat',
|
||||
'blogcat',
|
||||
'comic_folder',
|
||||
'rss_comic_folder',
|
||||
'archive_comic_folder',
|
||||
'mini_comic_folder',
|
||||
'archive_comic_width',
|
||||
'rss_comic_width',
|
||||
'mini_comic_width'
|
||||
) as $key) {
|
||||
$comicpress_options['comicpress_config'][$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
}
|
||||
$tab = 'config';
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_buyprint') {
|
||||
$comicpress_options['buy_print_email'] = wp_filter_nohtml_kses($_REQUEST['buy_print_email']);
|
||||
$comicpress_options['buy_print_url'] = wp_filter_nohtml_kses($_REQUEST['buy_print_url']);
|
||||
$comicpress_options['buy_print_us_amount'] = wp_filter_nohtml_kses($_REQUEST['buy_print_us_amount']);
|
||||
$comicpress_options['buy_print_int_amount'] = wp_filter_nohtml_kses($_REQUEST['buy_print_int_amount']);
|
||||
$comicpress_options['buy_print_add_shipping'] = (bool)($_REQUEST['buy_print_add_shipping'] == 1 ? true : false );
|
||||
$comicpress_options['buy_print_us_ship'] = wp_filter_nohtml_kses($_REQUEST['buy_print_us_ship']);
|
||||
$comicpress_options['buy_print_int_ship'] = wp_filter_nohtml_kses($_REQUEST['buy_print_int_ship']);
|
||||
$tab = 'buyprint';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_members') {
|
||||
$comicpress_options['members_post_category'] = wp_filter_nohtml_kses($_REQUEST['members_post_category']);
|
||||
$tab = 'members';
|
||||
update_option('comicpress_options',$comicpress_options);
|
||||
}
|
||||
|
||||
if ($tab) {
|
||||
?>
|
||||
<div id="message" class="updated"><p><strong><?php _e('ComicPress Settings SAVED!','comicpress'); ?></strong></p></div>
|
||||
<div id="message" class="updated fade"><p><strong><?php _e('ComicPress Settings SAVED!','comicpress'); ?></strong></p></div>
|
||||
<script>function hidemessage() { document.getElementById('message').style.display = 'none'; }</script>
|
||||
<?php }
|
||||
<?php }
|
||||
}
|
||||
if ($_REQUEST['action'] == 'comicpress_reset') {
|
||||
delete_option('comicpress_options');
|
||||
$comicpress_options = comicpress_load_options();
|
||||
?>
|
||||
<div id="message" class="updated"><p><strong><?php _e('ComicPress Settings RESET!','comicpress'); ?></strong></p></div>
|
||||
<div id="message" class="updated fade"><p><strong><?php _e('ComicPress Settings RESET!','comicpress'); ?></strong></p></div>
|
||||
<script>function hidemessage() { document.getElementById('message').style.display = 'none'; }</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div id="poststuff" class="metabox-holder">
|
||||
<div id="cpadmin">
|
||||
<?php
|
||||
$tab_info = array(
|
||||
'themestyle' => __('Layout', 'comicpress'),
|
||||
'general' => __('General', 'comicpress'),
|
||||
'index' => __('Home Page', 'comicpress'),
|
||||
'post' => __('Posts & Pages', 'comicpress'),
|
||||
'archivesearch' => __('Archive & Search', 'comicpress'),
|
||||
'menubar' => __('Menubar', 'comicpress'),
|
||||
'addons' => __('Add Ons', 'comicpress'),
|
||||
'config' => __('Configuration', 'comicpress'),
|
||||
);
|
||||
|
||||
if (empty($tab)) { $tab = array_shift(array_keys($tab_info)); }
|
||||
|
||||
foreach($tab_info as $tab_id => $label) { ?>
|
||||
<div id="comicpress-tab-<?php echo $tab_id ?>" class="comicpress-tab <?php echo ($tab == $tab_id) ? 'on' : 'off'; ?>"><span><?php echo $label; ?></span></div>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-pages">
|
||||
<?php foreach (glob(get_template_directory() . '/options/*.php') as $file) { include($file); } ?>
|
||||
<div id="cpadmin" onclick="hidemessage();">
|
||||
<div class="<?php if ($tab == 'themestyle' || empty($tab)) { ?>on<?php } else { ?>off<?php } ?>" title="themestyle"><span><?php _e('Layout','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'general') { ?>on<?php } else { ?>off<?php } ?>" title="generaloptions"><span><?php _e('General','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'index') { ?>on<?php } else { ?>off<?php } ?>" title="indexoptions"><span><?php _e('Home Page','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'post') { ?>on<?php } else { ?>off<?php } ?>" title="postoptions"><span><?php _e('Posts & Pages','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'archivesearch') { ?>on<?php } else { ?>off<?php } ?>" title="archivesearch"><span><?php _e('Archive & Search','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'menubar') { ?>on<?php } else { ?>off<?php } ?>" title="menubaroptions"><span><?php _e('Menubar','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'customheader') { ?>on<?php } else { ?>off<?php } ?>" title="customheader"><span><?php _e('Custom Header','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'buyprint') { ?>on<?php } else { ?>off<?php } ?>" title="buyprintoptions"><span><?php _e('Buy Print','comicpress'); ?></span></div>
|
||||
<div class="<?php if ($tab == 'members') { ?>on<?php } else { ?>off<?php } ?>" title="membersoptions"><span><?php _e('Members','comicpress'); ?></span></div>
|
||||
</div>
|
||||
<?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'); ?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var showPage = function(which) {
|
||||
$('#comicpress-options-pages > div').each(function(i) {
|
||||
$(this)[(this.id == 'comicpress-' + which) ? 'show' : 'hide']();
|
||||
});
|
||||
};
|
||||
|
||||
$('.comicpress-tab').click(function() {
|
||||
$('#message').animate({height:"0", opacity:0, margin: 0}, 100, 'swing', function() { $(this).remove() });
|
||||
|
||||
showPage(this.id.replace('comicpress-tab-', ''));
|
||||
var myThis = this;
|
||||
$('.comicpress-tab').each(function() {
|
||||
var isSame = (this == myThis);
|
||||
$(this).toggleClass('on', isSame).toggleClass('off', !isSame);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
showPage('<?php echo esc_js($tab) ?>');
|
||||
}(jQuery));
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
add_action('admin_menu', 'comicpress_options_setup');
|
||||
add_action('admin_menu', 'options');
|
||||
|
||||
?>
|
16
footer.php
|
@ -1,8 +1,12 @@
|
|||
<?php global $wpmu_version, $comicpress_options; ?>
|
||||
<div id="footer">
|
||||
<?php if (function_exists('the_project_wonderful_ad')) {
|
||||
the_project_wonderful_ad('footer');
|
||||
} ?>
|
||||
<?php if (function_exists('the_project_wonderful_ad')) { ?>
|
||||
<div class="footerpwad">
|
||||
<center>
|
||||
<?php the_project_wonderful_ad('footer'); ?>
|
||||
</center>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php get_sidebar('footer'); ?>
|
||||
<?php if (!$comicpress_options['disable_footer_text']) { ?>
|
||||
<p>
|
||||
|
@ -27,17 +31,13 @@
|
|||
<span class="footer-pipe">|</span>
|
||||
Subscribe: <a href="<?php bloginfo('rss2_url') ?>">RSS</a>
|
||||
</span>
|
||||
<?php if ($comicpress_options['enable_scroll_to_top']) { ?>
|
||||
<span class="footer-uptotop">
|
||||
<span class="footer-pipe">|</span>
|
||||
<a href="#outside" onclick="scrollup(); return false;"><?php _e('Back to Top ↑','comicpress'); ?></a>
|
||||
</span>
|
||||
<?php } ?>
|
||||
<!-- <?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds. -->
|
||||
</p>
|
||||
<?php } ?>
|
||||
<?php if ($comicpress_options['enable_page_load_info']) { ?>
|
||||
<p><?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds.</p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if (!$comicpress_options['disable_page_restraints']) { ?>
|
||||
|
|
283
functions.php
|
@ -1,55 +1,29 @@
|
|||
<?php
|
||||
|
||||
global $comicpress_options;
|
||||
|
||||
// the_post_thumbnail('thumbnail/medium/full');
|
||||
// the_post_image('thumbnail/medium/full');
|
||||
if (function_exists('add_theme_support')) {
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
}
|
||||
|
||||
function __comicpress_widgets_init() {
|
||||
$available_widgets = array();
|
||||
|
||||
if (($dh = opendir(dirname(__FILE__) . '/widgets')) !== false) {
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
if (strpos($file, '.inc') !== false) {
|
||||
$class_name = "ComicPress" . preg_replace('#\..*$#', '', $file);
|
||||
$class_name = preg_replace('#\..*$#', '', $file);
|
||||
require_once(dirname(__FILE__) . '/widgets/' . $file);
|
||||
register_widget($class_name);
|
||||
$widget = new $class_name(true);
|
||||
if (method_exists($widget, 'init')) {
|
||||
$widget->init();
|
||||
}
|
||||
|
||||
$available_widgets[strtolower($class_name)] = $widget;
|
||||
$widget = new $class_name();
|
||||
if (method_exists($widget, 'init')) { $widget->init(); }
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
foreach (wp_get_sidebars_widgets() as $type => $widgets) {
|
||||
if ($type != 'wp_inactive_widgets') {
|
||||
foreach ($widgets as $widget_id) {
|
||||
foreach ($available_widgets as $key => $widget) {
|
||||
if (method_exists($widget, 'is_active')) {
|
||||
if (strpos(strtolower($widget_id), $key) === 0) {
|
||||
$widget->is_active();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function __comicpress_init() {
|
||||
global $comicpress_options, $__comicpress_handlable_classes;
|
||||
|
||||
$comicpress_options = array();
|
||||
|
||||
// Check if the $comicpress_options exist, if not set defaults
|
||||
$comicpress_options = comicpress_load_options();
|
||||
|
||||
// xili-language plugin check
|
||||
if (class_exists('xili_language')) {
|
||||
define('THEME_TEXTDOMAIN','comicpress');
|
||||
|
@ -59,51 +33,32 @@ function __comicpress_init() {
|
|||
}
|
||||
|
||||
// Queue up the scripts.
|
||||
if (!is_admin() && $comicpress_options['enable_scroll_to_top']) {
|
||||
wp_enqueue_script('comicpress_scroll', get_template_directory_uri() . '/js/scroll.js');
|
||||
}
|
||||
wp_enqueue_script('comicpress_scroll', get_template_directory_uri() . '/js/scroll.js');
|
||||
|
||||
// remove intense debates control over the comment numbers
|
||||
if (function_exists('id_get_comment_number')) {
|
||||
remove_filter('comments_number','id_get_comment_number');
|
||||
}
|
||||
|
||||
$storyline = get_option('comicpress-storyline-category-order');
|
||||
|
||||
$do_rebuild = false;
|
||||
|
||||
if (empty($storyline)) {
|
||||
$do_rebuild = true;
|
||||
} else {
|
||||
$first = array_pop(explode('/', array_shift(explode(',', $storyline))));
|
||||
|
||||
if ($first != $comicpress_options['comicpress_config']['comiccat']) {
|
||||
$do_rebuild = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($do_rebuild) {
|
||||
$storyline = new ComicPressStoryline();
|
||||
|
||||
update_option('comicpress-storyline-category-order', $storyline->get_category_flattened($comicpress_options['comicpress_config']['comiccat']));
|
||||
}
|
||||
|
||||
do_action('comicpress_init');
|
||||
|
||||
if ($verified_nonce = __comicpress_verify_nonce()) {
|
||||
do_action("comicpress_init-${verified_nonce}");
|
||||
}
|
||||
}
|
||||
|
||||
function __comicpress_verify_nonce() {
|
||||
if (isset($_REQUEST['cp'])) {
|
||||
if (is_array($_REQUEST['cp'])) {
|
||||
if (($_REQUEST['cp']['post_id'] <= 0) && ($_POST['post_ID'] > 0)) {
|
||||
$_REQUEST['cp']['post_id'] = $_POST['post_ID'];
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['cp']['_nonce'])) {
|
||||
if (wp_verify_nonce($_REQUEST['cp']['_nonce'], 'comicpress')) {
|
||||
if (isset($_REQUEST['cp']['action'])) {
|
||||
if (isset($_REQUEST['cp']['_action_nonce'])) {
|
||||
if (wp_verify_nonce($_REQUEST['cp']['_action_nonce'], 'comicpress-' . $_REQUEST['cp']['action'])) {
|
||||
return $_REQUEST['cp']['action'];
|
||||
$method_name = 'handle_' . str_replace('-', '_', $_REQUEST['cp']['action']);
|
||||
foreach ($__comicpress_handlable_classes as $class_name) {
|
||||
if (method_exists($class_name, $method_name)) {
|
||||
call_user_func(array($class_name, $method_name), $_REQUEST['cp']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -111,35 +66,54 @@ function __comicpress_verify_nonce() {
|
|||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
add_action('widgets_init', '__comicpress_widgets_init');
|
||||
add_action('init', '__comicpress_init');
|
||||
|
||||
function comicpress_load_options() {
|
||||
global $comicpress_options, $comiccat, $blogcat, $comic_folder, $rss_comic_folder,
|
||||
$archive_comic_folder, $mini_comic_folder, $archive_comic_width, $mini_comic_width,
|
||||
$rss_comic_width;
|
||||
global $wpmu_version;
|
||||
if (!empty($wpmu_version)) {
|
||||
|
||||
if (get_option('upload_path') !== false) {
|
||||
$variables_to_extract = array();
|
||||
|
||||
foreach (array(
|
||||
'comiccat' => 'comiccat',
|
||||
'blogcat' => 'blogcat',
|
||||
'comics_path' => 'comic_folder',
|
||||
'comicsrss_path' => 'rss_comic_folder',
|
||||
'comicsarchive_path' => 'archive_comic_folder',
|
||||
'comicsmini_path' => 'mini_comic_folder',
|
||||
'archive_comic_width' => 'archive_comic_width',
|
||||
'rss_comic_width' => 'rss_comic_width',
|
||||
'mini_comic_width' => 'mini_comic_width',
|
||||
'blog_postcount' => 'blog_postcount') as $options => $variable_name) {
|
||||
$variables_to_extract[$variable_name] = get_option("comicpress-${options}");
|
||||
}
|
||||
|
||||
extract($variables_to_extract);
|
||||
}
|
||||
|
||||
} else {
|
||||
require(get_template_directory() . '/comicpress-config.php');
|
||||
}
|
||||
|
||||
function comicpress_load_options() {
|
||||
global $comicpress_options;
|
||||
$comicpress_options = get_option('comicpress_options');
|
||||
if (empty($comicpress_options)) {
|
||||
$comicpress_options['comicpress_version'] = '2.9.0.11';
|
||||
$comicpress_options['comicpress_version'] = '2.9.0.4';
|
||||
foreach (array(
|
||||
'cp_theme_layout' => 'standard',
|
||||
|
||||
'disable_comic_frontpage' => false,
|
||||
'blog_postcount' => '10',
|
||||
'disable_comic_blog_frontpage' => false,
|
||||
'disable_comic_blog_single' => false,
|
||||
'disable_blog_frontpage' => false,
|
||||
'disable_lrsidebars' => false,
|
||||
'disable_lrsidebars_frontpage' => false,
|
||||
'disable_footer_text' => false,
|
||||
'disable_blogheader' => false,
|
||||
'disable_page_titles' => false,
|
||||
'static_blog' => false,
|
||||
'disable_default_comic_nav' => false,
|
||||
'enable_post_thumbnail_rss' => true,
|
||||
|
||||
'cp_theme_layout' => 'standard',
|
||||
'transcript_in_posts' => false,
|
||||
|
@ -149,7 +123,7 @@ function comicpress_load_options() {
|
|||
'custom_image_header_width' => '980',
|
||||
'custom_image_header_height' => '120',
|
||||
|
||||
'enable_numbered_pagination' => true,
|
||||
'enable_numbered_pagination' => false,
|
||||
'disable_page_restraints' => false,
|
||||
|
||||
'enable_related_comics' => false,
|
||||
|
@ -197,17 +171,7 @@ function comicpress_load_options() {
|
|||
'buy_print_int_amount' => '29.95',
|
||||
'buy_print_add_shipping' => false,
|
||||
'buy_print_us_ship' => '4.95',
|
||||
'buy_print_int_ship' => '9.95',
|
||||
|
||||
'enable_comicpress_debug' => true,
|
||||
'enable_full_post_check' => false,
|
||||
|
||||
'enable_blogroll_off_links' => false,
|
||||
|
||||
'enable_comment_count_in_rss' => false,
|
||||
'enable_scroll_to_top' => false,
|
||||
'enable_page_load_info' => false
|
||||
|
||||
'buy_print_int_ship' => '9.95'
|
||||
) as $field => $value) {
|
||||
$comicpress_options[$field] = $value;
|
||||
}
|
||||
|
@ -215,70 +179,34 @@ function comicpress_load_options() {
|
|||
add_option('comicpress_options', $comicpress_options, '', 'yes');
|
||||
// update_option('comicpress_options', $comicpress_options);
|
||||
}
|
||||
|
||||
if (!isset($comicpress_options['comicpress_config'])) {
|
||||
foreach (array(
|
||||
'comiccat' => '3',
|
||||
'blogcat' => '1',
|
||||
'comic_folder' => 'comics',
|
||||
'rss_comic_folder' => 'comics-rss',
|
||||
'archive_comic_folder' => 'comics-archive',
|
||||
'mini_comic_folder' => 'comics-mini',
|
||||
'rss_comic_width' => '320',
|
||||
'archive_comic_width' => '480',
|
||||
'mini_comic_width' => '80'
|
||||
) as $field => $value) {
|
||||
$comicpress_options['comicpress_config'][$field] = $value;
|
||||
}
|
||||
}
|
||||
$comicpress_options['comicpress_version'] = '2.9.0.4';
|
||||
update_option('comicpress_options', $comicpress_options);
|
||||
extract($comicpress_options['comicpress_config']);
|
||||
return $comicpress_options;
|
||||
}
|
||||
|
||||
function is_cp_theme_layout($choices) {
|
||||
$comicpress_options = comicpress_load_options();
|
||||
global $comicpress_options;
|
||||
$choices = explode(",", $choices);
|
||||
foreach ($choices as $choice) {
|
||||
if ($comicpress_options['cp_theme_layout'] == $choice) {
|
||||
|
||||
if ($choice == $comicpress_options['cp_theme_layout']) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_cp_layout_avail($layout, $avail_layouts) {
|
||||
if (empty($layout)) return false;
|
||||
if (empty($avail_layouts)) $avail_layouts = 'standard,v,3c,3c2r,v3c,v3cr,gn,rgn';
|
||||
$avail_layouts = explode(",",$avail_layouts);
|
||||
foreach ($avail_layouts as $able_layout) {
|
||||
if ($layout == $able_layout) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove of wordpress auto-texturizer.
|
||||
* Dependant on the need remove the commented out areas of this code.
|
||||
* Ex. Russian Language users will need to uncomment all of these to handle the character set dependant on
|
||||
* if they utilize the language translation pack.
|
||||
**/
|
||||
if ($comicpress_options['remove_wptexturize']) {
|
||||
// Remove the wptexturizer from changing the quotes and squotes.
|
||||
remove_filter('the_content', 'wptexturize');
|
||||
// remove_filter('the_content', 'wpautop');
|
||||
// remove_filter('the_title', 'wptexturize');
|
||||
// remove_filter('the_excerpt', 'wptexturize');
|
||||
// remove_filter('comment_text', 'wptexturize');
|
||||
}
|
||||
|
||||
// WIDGETS WP 2.8 compatible ONLY, no backwards compatibility here.
|
||||
$dirs_to_search = array_unique(array(get_template_directory(), get_stylesheet_directory()));
|
||||
$__comicpress_handlable_classes = array();
|
||||
foreach ($dirs_to_search as $__dir) {
|
||||
foreach (array('classes' => 'inc', 'widgets' => 'php', 'functions' => 'php') as $folder => $extension) {
|
||||
foreach (glob($__dir . "/${folder}/*.${extension}") as $__file) {
|
||||
foreach ($dirs_to_search as $dir) {
|
||||
foreach (array('widgets' => 'php', 'functions' => 'php', 'classes' => 'inc') as $folder => $extension) {
|
||||
foreach (glob($dir . "/${folder}/*.${extension}") as $__file) {
|
||||
require_once($__file);
|
||||
$__class_name = preg_replace('#\..*$#', '', basename($__file));
|
||||
if (class_exists($__class_name)) {
|
||||
|
@ -296,7 +224,6 @@ foreach ($dirs_to_search as $__dir) {
|
|||
|
||||
// Dashboard Menu Comicpress Options and ComicPress CSS
|
||||
require_once(get_template_directory() . '/comicpress-options.php');
|
||||
require_once(get_template_directory() . '/comicpress-debug.php');
|
||||
|
||||
// If you want to run multiple comics on a single day, define your additional filters here.
|
||||
// Example: you want to run an additional comic with the filename 2008-01-01-a-my-new-years-comic.jpg.
|
||||
|
@ -433,7 +360,7 @@ function get_adjacent_comic($category, $previous = false) {
|
|||
* Find the terminal post in a specific category.
|
||||
*/
|
||||
function get_terminal_post_in_category($categoryID, $first = true) {
|
||||
global $post, $wp_query;
|
||||
global $post;
|
||||
|
||||
$temp = $wp_query; $wp_query = null;
|
||||
$sortOrder = $first ? "asc" : "desc";
|
||||
|
@ -727,11 +654,9 @@ function comicpress_list_storyline_categories($args = "") {
|
|||
* Display text when image (comic) is hovered
|
||||
* Text is taken from a custom field named "hovertext"
|
||||
*/
|
||||
function the_hovertext($post_to_use = null) {
|
||||
global $post;
|
||||
$post_to_use = !is_null($override_post) ? $override_post : $post;
|
||||
$hovertext = get_post_meta( $post_to_use->ID, "hovertext", true );
|
||||
return (empty($hovertext)) ? get_the_title($post_to_use->ID) : $hovertext;
|
||||
function the_hovertext() {
|
||||
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
|
||||
echo (empty($hovertext)) ? get_the_title() : $hovertext;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -772,6 +697,26 @@ function the_transcript($displaymode = 'raw') {
|
|||
}
|
||||
}
|
||||
|
||||
//Insert the comic image into the RSS feed
|
||||
function comic_feed() {
|
||||
foreach (array("rss", "archive", "mini", "comic") as $type) {
|
||||
if (($requested_thumbnail_image = get_comic_url($type, $first_comic_in_category)) !== false) {
|
||||
$thumbnail_image = $requested_thumbnail_image; break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<p><a href="<?php the_permalink() ?>"><img src="<?php echo $thumbnail_image; ?>" border="0" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a></p><?php
|
||||
}
|
||||
|
||||
function insert_comic_feed($content) {
|
||||
if (is_feed() && in_comic_category()) {
|
||||
return comic_feed() . $content;
|
||||
} else {
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
add_filter('the_content','insert_comic_feed');
|
||||
|
||||
// Register Sidebar and Define Widgets
|
||||
|
||||
if ( function_exists('register_sidebar') ) {
|
||||
|
@ -792,10 +737,10 @@ if ( function_exists('register_sidebar') ) {
|
|||
) as $label) {
|
||||
register_sidebar(array(
|
||||
'name'=> $label,
|
||||
'before_widget' => "<div class=\"widget-head\"></div>\r\n<div id=\"".'%1$s'."\" class=\"widget ".'%2$s'."\">\r\n",
|
||||
'after_widget' => "</div>\r\n<div class=\"widget-foot\"></div>\r\n",
|
||||
'before_title' => "<h2 class=\"widgettitle\">\r\n",
|
||||
'after_title' => "</h2>\r\n"
|
||||
'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h2 class="widgettitle">',
|
||||
'after_title' => '</h2>'
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -863,6 +808,19 @@ function comicpress_check_child_file($filename = '') {
|
|||
return false;
|
||||
}
|
||||
|
||||
function rss_count_comments(){
|
||||
global $wpdb,$post;
|
||||
$args = func_get_args();
|
||||
$comments = get_comments_number();
|
||||
echo $args[0];
|
||||
if ($comments == 0) $comment_text = " (No Comments)";
|
||||
if ($comments == 1) $comment_text = " (1 Comment)";
|
||||
if ($comments > 1) $comment_text = " (". $comments . " Comments)";
|
||||
if ($comments>0) echo $comment_text;
|
||||
}
|
||||
|
||||
add_action('the_title_rss','rss_count_comments');
|
||||
|
||||
function comicpress_gnav_display_css() {
|
||||
global $comicpress_options;
|
||||
if (file_exists(get_stylesheet_directory() . '/images/nav/' . $comicpress_options['graphicnav_directory'] . '/navstyle.css')) { ?>
|
||||
|
@ -874,38 +832,25 @@ function comicpress_gnav_display_css() {
|
|||
|
||||
if (comicpress_check_child_file('childfunctions') == false) {}
|
||||
|
||||
if ( isset( $_GET['latestcomic'] ) )
|
||||
add_action( 'template_redirect', 'latest_comic_jump' );
|
||||
/**
|
||||
* Render the ComicPress calendar widget.
|
||||
*/
|
||||
function comicpress_calendar_embed() {
|
||||
$calendar = new CalendarWidget();
|
||||
|
||||
//to use simply create a URL link to "/?latestcomic"
|
||||
function latest_comic_jump() {
|
||||
wp_redirect( get_permalink( get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), false) ) );
|
||||
exit;
|
||||
$instance = array();
|
||||
foreach (array('before_widget', 'after_widget', 'thumbnail', 'link', 'small', 'medium', 'large') as $field) {
|
||||
$instance[$field] = '';
|
||||
}
|
||||
|
||||
$calendar->widget($instance, array());
|
||||
}
|
||||
|
||||
//Generate a random comic page - to use simply create a URL link to "/?randomcomic"
|
||||
function random_comic() {
|
||||
$randomComicQuery = new WP_Query(); $randomComicQuery->query('showposts=1&orderby=rand&cat='.get_all_comic_categories_as_cat_string());
|
||||
while ($randomComicQuery->have_posts()) : $randomComicQuery->the_post();
|
||||
$random_comic_id = get_the_ID();
|
||||
endwhile;
|
||||
wp_redirect( get_permalink( $random_comic_id ) );
|
||||
exit;
|
||||
/**
|
||||
* Render the ComicPress bookmark widget.
|
||||
*/
|
||||
function comicpress_comic_bookmark_embed() {
|
||||
$bookmark = new BookmarkWidget();
|
||||
$bookmark->init();
|
||||
$bookmark->widget(array(), array());
|
||||
}
|
||||
|
||||
if ( isset( $_GET['randomcomic'] ) )
|
||||
add_action( 'template_redirect', 'random_comic' );
|
||||
|
||||
//Generate a random post page - to use simply create a URL link to "/?randompost"
|
||||
function random_post() {
|
||||
$randomComicQuery = new WP_Query(); $randomComicQuery->query('showposts=1&orderby=rand&cat=-'.exclude_comic_categories());
|
||||
while ($randomComicQuery->have_posts()) : $randomComicQuery->the_post();
|
||||
$random_comic_id = get_the_ID();
|
||||
endwhile;
|
||||
wp_redirect( get_permalink( $random_comic_id ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( isset( $_GET['randompost'] ) )
|
||||
add_action( 'template_redirect', 'random_post' );
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -1,9 +1,17 @@
|
|||
<?php
|
||||
/**
|
||||
* Body Classes
|
||||
* function function comicpress_body_class
|
||||
*
|
||||
* Author: Philip M. Hofer (Frumph)
|
||||
* Author URI: http://frumph.net/
|
||||
* Version: 1.0.7
|
||||
* Author URI: http://frumph.net/ http://frumph.net/
|
||||
* Version: 1.0.6
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -27,12 +35,10 @@ function comicpress_body_class($classes = '') {
|
|||
}
|
||||
}
|
||||
|
||||
if (!is_page()) {
|
||||
if (in_comic_category()) {
|
||||
$classes[] = 'comic';
|
||||
} else {
|
||||
$classes[] = 'noncomic';
|
||||
}
|
||||
if (in_comic_category()) {
|
||||
$classes[] = 'comic';
|
||||
} else {
|
||||
$classes[] = 'noncomic';
|
||||
}
|
||||
|
||||
if($is_lynx) $classes[] = 'lynx';
|
||||
|
@ -85,43 +91,37 @@ function comicpress_body_class($classes = '') {
|
|||
return $classes;
|
||||
}
|
||||
|
||||
add_filter('post_class','comicpress_post_class');
|
||||
|
||||
function comicpress_post_class($classes = '') {
|
||||
function comicpress_post_class($class = '') {
|
||||
global $post;
|
||||
static $post_alt;
|
||||
|
||||
$is_comic = in_comic_category();
|
||||
|
||||
$args = array(
|
||||
'entry_tax' => array( 'category', 'post_tag' )
|
||||
);
|
||||
|
||||
/* Microformats. */
|
||||
$classes[] = 'uentry';
|
||||
|
||||
/* if a comic category */
|
||||
if ($is_comic) $classes[] = 'post-comic';
|
||||
if (is_page()) $classes[] = 'post-page';
|
||||
if (!$is_comic && !is_page()) $classes[] = 'post-blog';
|
||||
|
||||
|
||||
/* Post alt class. */
|
||||
$classes[] = 'postonpage-' . ++$post_alt;
|
||||
|
||||
|
||||
if ( $post_alt % 2 )
|
||||
$classes[] = 'odd';
|
||||
else
|
||||
$classes[] = 'even';
|
||||
|
||||
|
||||
/* Sticky class (only on home/blog page). */
|
||||
if( is_sticky() && is_home() )
|
||||
$classes[] = 'sticky';
|
||||
|
||||
|
||||
/* Author class. */
|
||||
if ( !is_attachment() )
|
||||
$classes[] = 'post-author-' . sanitize_html_class( get_the_author_meta( 'user_nicename' ), get_the_author_meta( 'ID' ) );
|
||||
|
||||
|
||||
/* Password-protected posts. */
|
||||
if ( post_password_required() )
|
||||
$classes[] = 'protected';
|
||||
|
||||
/* User-created classes. */
|
||||
if ( !empty( $class ) ) :
|
||||
if ( !is_array( $class ) )
|
||||
|
@ -129,11 +129,10 @@ function comicpress_post_class($classes = '') {
|
|||
$classes = array_merge( $classes, $class );
|
||||
endif;
|
||||
|
||||
/* Password-protected posts. */
|
||||
if ( post_password_required() )
|
||||
$classes[] = 'protected';
|
||||
/* Join all the classes into one string and echo them. */
|
||||
$class = join( ' ', $classes );
|
||||
|
||||
return $classes;
|
||||
echo apply_filters( 'comicpress_post_class', $class );
|
||||
}
|
||||
|
||||
add_filter('comment_class','comicpress_comment_class');
|
||||
|
|
|
@ -36,34 +36,34 @@ if ($comicpress_options['enable_custom_image_header']) {
|
|||
|
||||
function theme_header_style() {
|
||||
?>
|
||||
|
||||
<style type="text/css">
|
||||
#header {
|
||||
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
|
||||
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
|
||||
background: url(<?php header_image(); ?>) center center no-repeat;
|
||||
}
|
||||
|
||||
<?php
|
||||
<style type="text/css">
|
||||
#header
|
||||
{
|
||||
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
|
||||
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
|
||||
background: url(<?php header_image(); ?>) no-repeat center;
|
||||
}
|
||||
|
||||
<?php
|
||||
// Has the text been hidden?
|
||||
// If so, set display to equal none
|
||||
if ( 'blank' == get_header_textcolor() ) { ?>
|
||||
#header h1, #header .description {
|
||||
display: none;
|
||||
}
|
||||
|
||||
<?php } else {
|
||||
// Otherwise, set the color to be the user selected one
|
||||
?>
|
||||
|
||||
#header * {
|
||||
color: #<?php header_textcolor();?>;
|
||||
}
|
||||
<?php } ?>
|
||||
</style>
|
||||
|
||||
<?php }
|
||||
|
||||
#header h1, #header .description {
|
||||
display: none;
|
||||
}
|
||||
<?php } else {
|
||||
// Otherwise, set the color to be the user selected one
|
||||
?>
|
||||
#header *
|
||||
{
|
||||
color: #<?php header_textcolor();?>;
|
||||
}
|
||||
}
|
||||
<?php } ?>
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ( function_exists('add_custom_image_header') ) {
|
||||
add_custom_image_header('theme_header_style', 'theme_admin_header_style');
|
||||
}
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
/**
|
||||
* Display post
|
||||
* Displays the post info
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
function display_blog_post() {
|
||||
global $post, $wp_query, $authordata, $comicpress_options; ?>
|
||||
<?php if (is_single()) { ?>
|
||||
<div class="blognav">
|
||||
<div class="nav-single">
|
||||
<?php previous_post_link('%link',__(' ‹ Previous ','comicpress'), TRUE); ?>
|
||||
<?php next_post_link('%link',__('| Next › ','comicpress'), TRUE); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="clear"></div>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-head"></div>
|
||||
<div class="post" id="post-<?php the_ID() ?>">
|
||||
<div class="post-info">
|
||||
<?php if ($comicpress_options['enable_post_author_gravatar']) { ?>
|
||||
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_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 ($comicpress_options['enable_post_calendar']) { ?>
|
||||
<div class="post-date">
|
||||
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="post-text">
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-image">
|
||||
<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_post_image('full'); ?></a>
|
||||
</div>
|
||||
<?php } else {?>
|
||||
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php } ?>
|
||||
<div class="post-author"> <?php the_time('F jS, Y'); ?> <span class="pipe">|</span> by <?php the_author_posts_link(); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></div>
|
||||
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
|
||||
<div class="post-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div>
|
||||
<?php } ?>
|
||||
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="entry">
|
||||
<?php if (!is_single()) { global $more; $more = 0; } ?>
|
||||
<?php the_content(__('↓ Read the rest of this entry...','comicpress')); ?>
|
||||
<?php if (is_single()) wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-extras">
|
||||
<?php if (!$comicpress_options['disable_tags_in_posts']) { ?>
|
||||
<div class="post-tags">
|
||||
<?php the_tags(__('└ Tags: ','comicpress'), ', ', '<br />'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ('open' == $post->comment_status) {
|
||||
if (comicpress_check_child_file('partials/commentlink') == false && !(is_single())) { ?>
|
||||
<div class="comment-link"><?php comments_popup_link('<span class="comment-balloon comment-balloon-empty"> </span> '.__('Comments ','comicpress'), '<span class="comment-balloon">1</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">%</span> '.__('Comments ','comicpress')); ?></div>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
<?php if ($comicpress_options['enable_related_posts']) echo related_posts_shortcode(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
|
@ -1,128 +1,47 @@
|
|||
<?php
|
||||
/**
|
||||
* Display Comic
|
||||
* Displays the comic.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
function comicpress_display_comic_area() {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (comicpress_check_child_file('partials/displaycomic') == false) { ?>
|
||||
<div id="comic-wrap">
|
||||
<div id="comic-head"><?php get_sidebar('over'); ?></div>
|
||||
<div class="clear"></div>
|
||||
<?php get_sidebar('comicleft'); ?>
|
||||
<div id="comic"><?php comicpress_display_comic(); ?></div>
|
||||
<?php get_sidebar('comicright'); ?>
|
||||
<div class="clear"></div>
|
||||
<div id="comic-foot"><?php get_sidebar('under'); ?></div>
|
||||
</div>
|
||||
<?php }
|
||||
}
|
||||
|
||||
function comicpress_display_comic_image($searchorder = "comic", $use_post_image = false, $override_post = null, $title = null) {
|
||||
global $post;
|
||||
$post_to_use = !is_null($override_post) ? $override_post : $post;
|
||||
$title_to_use = !is_null($title) ? $title : the_hovertext($post_to_use);
|
||||
$comic = explode(".", the_comic_filename());
|
||||
if ($use_post_image || strtolower($comic[1]) == 'swf') {
|
||||
if (function_exists('has_post_thumbnail')) {
|
||||
if ( has_post_thumbnail($post_to_use->ID) ) {
|
||||
$comic_image = get_the_post_thumbnail($post_to_use->ID,'full');
|
||||
$comic_image = preg_replace('#title="([^*]*)"#', 'title="'.$title_to_use.'"', $comic_image);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isset($comic_image)) {
|
||||
$comic = explode(".", the_comic_filename());
|
||||
if (strtolower($comic[1]) == 'swf') {
|
||||
if (file_exists(get_stylesheet_directory().'/images/mediafile.png')) {
|
||||
$directory_to_use = get_stylesheet_directory_uri();
|
||||
} else {
|
||||
$directory_to_use = get_template_directory_uri();
|
||||
}
|
||||
$comic_image = "<img src=\"{$directory_to_use}/images/mediafile.png\" alt=\"{$title_to_use}\" />";
|
||||
}
|
||||
}
|
||||
if (!isset($comic_image)) {
|
||||
$searchorder = explode(',',$searchorder);
|
||||
$requested_archive_image = '';
|
||||
foreach ($searchorder as $type) {
|
||||
if (($requested_archive_image = get_comic_url($type, $post_to_use)) !== false) {
|
||||
$comic_image = "<img src=\"{$requested_archive_image}\" alt=\"".get_the_title($post_to_use)."\" title=\"{$title_to_use}\" class=\"instant itiltleft icolorFFFCE9 ishadow40 historical\" />";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$comic_image = preg_replace('/\<(.*?)(width="(.*?)")(.*?)(height="(.*?)")(.*?)\>/i', '<$1$4$7>', $comic_image);
|
||||
return apply_filters('comicpress_display_comic_image',$comic_image);
|
||||
}
|
||||
|
||||
function comicpress_display_comic_swf() {
|
||||
global $post;
|
||||
$height = get_post_meta( get_the_ID(), "fheight", true );
|
||||
$width = get_post_meta( get_the_ID(), "fwidth", true );
|
||||
if (empty($height)) $height = '300';
|
||||
if (empty($width)) $width = '100%';
|
||||
$output = "<object id=\"myId\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"{$width}\" height=\"{$height}\">\r\n";
|
||||
$output .= " <param name=\"movie\" value=\"".get_comic_url()."\" />\r\n";
|
||||
$output .= "<!--[if !IE]>--><object type=\"application/x-shockwave-flash\" data=\"".get_comic_url()."\" width=\"{$width}\" height=\"{$height}\"><!--<![endif]-->\r\n";
|
||||
$output .= " <div>\r\n";
|
||||
$output .= " <h1>Get Flash!</h1>\r\n";
|
||||
$output .= " <p><a href=\"http://www.adobe.com/go/getflashplayer\"><img src=\"http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif\" alt=\"Get Adobe Flash player\" /></a></p>\r\n";
|
||||
$output .= " </div>\r\n";
|
||||
$output .= "<!--[if !IE]>--></object><!--<![endif]--></object>\r\n";
|
||||
return apply_filters('comicpress_display_comic_swf',$output);
|
||||
}
|
||||
|
||||
function comicpress_display_comic() {
|
||||
global $post;
|
||||
$comic = explode(".", the_comic_filename());
|
||||
switch (strtolower($comic[1])) {
|
||||
case 'swf':
|
||||
$output = comicpress_display_comic_swf();
|
||||
break;
|
||||
case 'png':
|
||||
case 'gif':
|
||||
case 'jpg':
|
||||
default:
|
||||
$output = comicpress_display_comic_image('comic', false, $post, the_hovertext());
|
||||
}
|
||||
echo apply_filters('comicpress_display_comic', $output);
|
||||
}
|
||||
|
||||
function comicpress_comic_clicks_next($output) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (is_search() || is_archive()) return $output;
|
||||
function display_comic() {
|
||||
global $post, $wp_query, $rascal_says, $comicpress_options, $comic_filename_filters;
|
||||
$next_comic = get_next_comic_permalink();
|
||||
$output = "<a href=\"{$next_comic}\">{$output}</a>\r\n";
|
||||
return $output;
|
||||
$comic = explode(".", the_comic_filename());
|
||||
if ($comic[1] == 'swf') { ?>
|
||||
<?php
|
||||
$height = get_post_meta( get_the_ID(), "fheight", true );
|
||||
$width = get_post_meta( get_the_ID(), "fwidth", true );
|
||||
if (empty($height)) $height = '300';
|
||||
if (empty($width)) $width = '100%';
|
||||
?>
|
||||
<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?php echo $width; ?>" height="<?php echo $height; ?>">
|
||||
<param name="movie" value="<?php echo get_comic_url(); ?>" />
|
||||
<!--[if !IE]>--><object type="application/x-shockwave-flash" data="<?php echo get_comic_url(); ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>"><!--<![endif]-->
|
||||
<div>
|
||||
<h1>Get Flash!</h1>
|
||||
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
|
||||
</div>
|
||||
<!--[if !IE]>--></object><!--<![endif]--></object>
|
||||
<?php } else {
|
||||
if ($comicpress_options['comic_clicks_next']) {
|
||||
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
|
||||
if ($comicpress_options['rascal_says'] && !empty($hovertext)) { ?>
|
||||
<a href="<?php echo $next_comic; ?>" class="tt"><span class="tooltip"><span class="top"></span><span class="middle"><?php the_hovertext() ?></span><span class="bottom"></span></span><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_title(); ?>" /></a>
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo $next_comic; ?>"><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /></a>
|
||||
<?php } ?>
|
||||
<?php } else {
|
||||
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
|
||||
if ($comicpress_options['rascal_says'] && !empty($hovertext)) { ?>
|
||||
<a href="#" class="tt"><span class="tooltip"><span class="top"></span><span class="middle"><?php the_hovertext() ?></span><span class="bottom"></span></span><img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_title(); ?>" /></a>
|
||||
<?php } else { ?>
|
||||
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" class="instant itiltleft icolorFFFCE9 ishadow40 historical" />
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_rascal_says($output) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (is_search() || is_archive()) return $output;
|
||||
$hovertext = get_post_meta( get_the_ID(), "hovertext", true );
|
||||
if (!empty($hovertext)) {
|
||||
$output = preg_replace('#title="([^*]*)"#', '', $output);
|
||||
$href_to_use = "#";
|
||||
|
||||
$output = "<span class=\"tooltip\"><span class=\"top\"> </span><span class=\"middle\">{$hovertext}</span><span class=\"bottom\"> </span></span>{$output}\r\n";
|
||||
}
|
||||
if ($comicpress_options['comic_clicks_next']) {
|
||||
$href_to_use = get_next_comic_permalink();
|
||||
$output = "<a href=\"{$href_to_use}\" class=\"tt\">{$output}</a>";
|
||||
} else {
|
||||
$output = "<a href=\"{$href_to_use}\">{$output}</a>";
|
||||
}
|
||||
return apply_filters('comicpress_rascal_says',$output);
|
||||
}
|
||||
|
||||
// global $comicpress_options, $post;
|
||||
|
||||
if ($comicpress_options['rascal_says']) {
|
||||
add_filter('comicpress_display_comic_image', 'comicpress_rascal_says');
|
||||
}
|
||||
|
||||
if ($comicpress_options['comic_clicks_next'] && !$comicpress_options['rascal_says']) {
|
||||
add_filter('comicpress_display_comic_image', 'comicpress_comic_clicks_next');
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -0,0 +1,83 @@
|
|||
<?php
|
||||
/**
|
||||
* Display comic post
|
||||
* Displays the post info for the comic
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
function display_comic_post() {
|
||||
global $post, $wp_query, $authordata, $comicpress_options;
|
||||
$first_comic = get_first_comic_permalink(); $last_comic = get_last_comic_permalink();
|
||||
if (!$comicpress_options['disable_default_comic_nav']) { ?>
|
||||
<div class="nav">
|
||||
<?php if ( get_permalink() != $first_comic ) { ?><div class="nav-first"><a href="<?php echo $first_comic ?>"><?php _e('‹‹ First','comicpress'); ?></a></div><?php } ?>
|
||||
<div class="nav-previous"><?php $temp_query = $wp_query->is_single; $wp_query->is_single = true; previous_comic_link('%link', __('‹ Previous','comicpress')); $wp_query->is_single = $temp_query;$temp_query = null; ?></div>
|
||||
<div class="nav-next"><?php next_comic_link('%link', __('Next ›','comicpress')) ?></div>
|
||||
<?php if ( get_permalink() != $last_comic ) { ?><div class="nav-last"><a href="<?php echo $last_comic ?>"><?php _e('Last ››','comicpress'); ?></a></div><?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-comic-head"></div>
|
||||
<div class="post-comic" id="post-comic-<?php the_ID() ?>">
|
||||
<div class="post-comic-info">
|
||||
<?php if ($comicpress_options['enable_comic_post_author_gravatar']) { ?>
|
||||
<div class="post-comic-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_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 ($comicpress_options['enable_comic_post_calendar']) { ?>
|
||||
<div class="post-comic-date">
|
||||
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="post-comic-text">
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-comic-image">
|
||||
<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_post_image('full'); ?></a>
|
||||
</div>
|
||||
<?php } else {?>
|
||||
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php } ?>
|
||||
<div class="post-comic-author"> <?php the_time('F jS, Y'); ?> <span class="pipe">|</span> by <?php the_author_posts_link(); ?> <?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></div>
|
||||
<?php if (get_option('comicpress-enable-storyline-support') == 1) { ?>
|
||||
<ul class="storyline-cats"><li class="storyline-root"><?php the_category(' » </li><li>', multiple) ?></li></ul>
|
||||
<?php } else { ?>
|
||||
<?php if (!$comicpress_options['disable_categories_in_posts']) { ?>
|
||||
<div class="post-comic-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="entry">
|
||||
<?php if (!is_single()) { global $more; $more = 0; } ?>
|
||||
<?php the_content(__('↓ Read the rest of this entry...','comicpress')); ?>
|
||||
<?php if (is_single()) wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-comic-extras">
|
||||
<?php if (!$comicpress_options['disable_tags_in_posts']) { ?>
|
||||
<div class="post-comic-tags">
|
||||
<?php the_tags(__('└ Tags: ','comicpress'), ', ', '<br />'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ('open' == $post->comment_status && !$comicpress_options['static_blog'] && !(is_single())) {
|
||||
if (comicpress_check_child_file('partials/commentlink') == false) { ?>
|
||||
<div class="comment-link"><?php comments_popup_link('<span class="comment-balloon comment-balloon-empty"> </span> '.__('Comments ','comicpress'), '<span class="comment-balloon">1</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">%</span> '.__('Comments ','comicpress')); ?></div>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
<?php if ($comicpress_options['enable_related_comics']) echo related_comics_shortcode(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-comic-foot"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
|
@ -1,195 +0,0 @@
|
|||
<?php
|
||||
|
||||
function comicpress_display_post_title($is_comic = false) {
|
||||
global $post, $wp_query;
|
||||
if (is_page()) {
|
||||
$post_title = "<h2 class=\"page-title\">";
|
||||
} else {
|
||||
$post_title = "<h2 class=\"post-title\">";
|
||||
}
|
||||
if (is_home() || is_search() || is_archive() || $is_comic && !is_page()) $post_title .= "<a href=\"".get_permalink()."\">";
|
||||
$post_title .= get_the_title();
|
||||
if (is_home() || is_search() || is_archive() || $is_comic && !is_page()) $post_title .= "</a>";
|
||||
$post_title .= "</h2>\r\n";
|
||||
echo apply_filters('comicpress_display_post_title',$post_title);
|
||||
}
|
||||
|
||||
function comicpress_display_post_thumbnail($is_comic = false) {
|
||||
global $post;
|
||||
if (function_exists('has_post_thumbnail') && !$is_comic) {
|
||||
if ( has_post_thumbnail() ) {
|
||||
$post_thumbnail = "<div class=\"post-image\"><a href=\"".get_permalink()."\" rel=\"bookmark\" title=\"Permanent Link to ".get_the_title()."\">".get_the_post_thumbnail($post->ID,'full')."</a></div>\r\n";
|
||||
echo apply_filters('comicpress_display_post_thumbnail',$post_thumbnail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_author_gravatar($is_comic = false) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (is_page()) return;
|
||||
if (((!$is_comic && $comicpress_options['enable_post_author_gravatar']) || ($is_comic && $comicpress_options['enable_comic_post_author_gravatar']))) {
|
||||
$author_get_gravatar = str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64));
|
||||
$author_gravatar = "<div class=\"post-author-gravatar\">".$author_get_gravatar."</div>\r\n";
|
||||
echo apply_filters('comicpress_display_author_gravatar', $author_gravatar);
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_post_calendar($is_comic = false) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (is_page()) return;
|
||||
if ((!$is_comic && $comicpress_options['enable_post_calendar']) || ($is_comic && $comicpress_options['enable_comic_post_calendar'])) {
|
||||
$post_calendar = "<div class=\"post-calendar-date\"><div class=\"calendar-date\"><span>".get_the_time('M')."</span>".get_the_time('d')."</div></div>\r\n";
|
||||
echo apply_filters('comicpress_display_post_calendar',$post_calendar);
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_post_author() {
|
||||
global $post,$authordata;
|
||||
|
||||
$post_author = "<span class=\"post-date\">".get_the_time('F jS, Y')."</span> <span class=\"pipe\">|</span> <span class=\"post-author\"> ".__(' by ','comicpress')."<a href=\"".get_author_posts_url( $authordata->ID, $authordata->user_nicename )."\">".get_the_author()."</a></span>\r\n";
|
||||
echo apply_filters('comicpress_display_post_author',$post_author);
|
||||
}
|
||||
|
||||
function comicpress_display_post_category($is_comic = false) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (!$comicpress_options['disable_categories_in_posts']) {
|
||||
if (get_option('comicpress-enable-storyline-support') == 1 && $is_comic) {
|
||||
$post_category = "<ul class=\"storyline-cats\"><li class=\"storyline-root\">". get_the_category_list(' » </li><li>', 'multiple')."</li></ul>\r\n";
|
||||
} else {
|
||||
$post_category = "<div class=\"post-cat\">". __('Posted In: ','comicpress') .get_the_category_list(',')."</div>\r\n";
|
||||
}
|
||||
echo apply_filters('comicpress_display_post_category',$post_category);
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_post_tags() {
|
||||
global $post, $comicpress_options;
|
||||
if (!$comicpress_options['disable_tags_in_posts']) {
|
||||
$post_tags = "<div class=\"post-tags\">".get_the_tag_list(__('└ Tags: ','comicpress'), ', ', '<br />')."</div>\r\n";
|
||||
echo apply_filters('comicpress_display_post_tags',$post_tags);
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_comment_link() {
|
||||
global $post, $wp_query;
|
||||
if ('open' == $post->comment_status && !is_singular()) {
|
||||
if (comicpress_check_child_file('partials/commentlink') == false) { ?>
|
||||
<div class="comment-link">
|
||||
<?php comments_popup_link('<span class="comment-balloon comment-balloon-empty"> </span> '.__('Comment ','comicpress'), '<span class="comment-balloon">1</span> '.__('Comment ','comicpress'), '<span class="comment-balloon">%</span> '.__('Comments ','comicpress')); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_related_posts($is_comic = false) {
|
||||
global $post, $comicpress_options;
|
||||
if ($is_comic && $comicpress_options['enable_related_comics']) {
|
||||
echo ComicPressRelatedPosts::display_related_comics();
|
||||
}
|
||||
if (!$is_comic && $comicpress_options['enable_related_posts']) {
|
||||
echo ComicPressRelatedPosts::display_related_posts();
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_display_blog_navigation($is_comic = false) {
|
||||
global $post, $wp_query;
|
||||
if (is_single() && !$is_comic && !is_page() && !is_archive() && !is_search()) { ?>
|
||||
<div class="blognav">
|
||||
<div class="nav-single">
|
||||
<?php previous_post_link('%link',__(' ‹ Previous ','comicpress'), TRUE); ?>
|
||||
<?php next_post_link('%link',__('| Next › ','comicpress'), TRUE); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<?php }
|
||||
}
|
||||
|
||||
function comicpress_display_comic_navigation($is_comic = false) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (!$comicpress_options['disable_default_comic_nav'] && $is_comic) {
|
||||
$first_comic = get_first_comic_permalink();
|
||||
$last_comic = get_last_comic_permalink();
|
||||
$wp_query->is_single = true;
|
||||
if (!is_search() && !is_archive() && !is_page()) { ?>
|
||||
<div class="nav">
|
||||
<?php if ( get_permalink() != $first_comic ) { ?><div class="nav-first"><a href="<?php echo $first_comic ?>"><?php _e('‹‹ First','comicpress'); ?></a></div><?php } ?>
|
||||
<div class="nav-previous"><?php $temp_query = $wp_query->is_single; $wp_query->is_single = true; previous_comic_link('%link', __('‹ Previous','comicpress')); $wp_query->is_single = $temp_query;$temp_query = null; ?></div>
|
||||
<div class="nav-next"><?php next_comic_link('%link', __('Next ›','comicpress')) ?></div>
|
||||
<?php if ( get_permalink() != $last_comic ) { ?><div class="nav-last"><a href="<?php echo $last_comic ?>"><?php _e('Last ››','comicpress'); ?></a></div><?php } ?>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function comicpress_display_the_content($is_comic = false) {
|
||||
global $post, $wp_query, $comicpress_options;
|
||||
if (is_archive() || is_search()) {
|
||||
if ($is_comic) { ?>
|
||||
<div class="comicarchiveframe">
|
||||
<a href="<?php the_permalink() ?>"><?php echo comicpress_display_comic_image("archive,rss,comic", true); ?></a>
|
||||
</div>
|
||||
<?php }
|
||||
if ($comicpress_options['excerpt_or_content_archive'] != 'excerpt') {
|
||||
the_content(__('↓ Read the rest of this entry...','comicpress'));
|
||||
} else {
|
||||
the_excerpt();
|
||||
}
|
||||
} else {
|
||||
if (!is_single()) { global $more; $more = 0; }
|
||||
the_content(__('↓ Read the rest of this entry...','comicpress'));
|
||||
if (is_single()) wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function comicpress_display_post() {
|
||||
global $post, $wp_query;
|
||||
$is_comic = 0;
|
||||
if (in_comic_category()) $is_comic = 1; ?>
|
||||
<?php comicpress_display_blog_navigation($is_comic); ?>
|
||||
<?php comicpress_display_comic_navigation($is_comic); ?>
|
||||
<div <?php post_class(); ?>>
|
||||
<?php comicpress_display_post_thumbnail($is_comic); ?>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="post-info">
|
||||
<?php comicpress_display_author_gravatar($is_comic); ?>
|
||||
<?php comicpress_display_post_calendar($is_comic); ?>
|
||||
<?php if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post(); ?>
|
||||
<div class="post-text">
|
||||
<?php
|
||||
comicpress_display_post_title($is_comic);
|
||||
if (!is_page()) {
|
||||
comicpress_display_post_author($is_comic);
|
||||
comicpress_display_post_category($is_comic);
|
||||
if (function_exists('the_ratings')) { the_ratings(); }
|
||||
if (!is_archive() && !is_search()) { ?>
|
||||
<small><?php edit_post_link(__('Edit Post','comicpress'), ' [ ', ' ] '); ?></small>
|
||||
<?php }
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="entry">
|
||||
<?php comicpress_display_the_content($is_comic); ?>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<?php wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">'.__('Pages:','comicpress').'</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
|
||||
<div class="post-extras">
|
||||
<?php comicpress_display_post_tags(); ?>
|
||||
<?php comicpress_display_comment_link(); ?>
|
||||
<div class="clear"></div>
|
||||
<?php comicpress_display_related_posts($is_comic); ?>
|
||||
<?php if (is_page()) { edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>'); } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -1,26 +1,26 @@
|
|||
<?php
|
||||
|
||||
function comicpress_dual_columns() {
|
||||
global $comicpress_options; ?>
|
||||
global $comicpress_options, $blog_postcount; ?>
|
||||
<div id="dualcolumns">
|
||||
<div class="column_one">
|
||||
<div class="column_one_header"></div>
|
||||
<?php $blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat="-'.exclude_comic_categories().'"&author='.$comicpress_options['author_column_one'].'&paged='.$paged;
|
||||
<?php $blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&author='.$comicpress_options['author_column_one'].'&paged='.$paged;
|
||||
$posts = query_posts($blog_query);
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
display_blog_post();
|
||||
endwhile;
|
||||
} ?>
|
||||
<span class="viewpostsbyone">View all posts by: <?php the_author_posts_link(); ?><span><br />
|
||||
</div>
|
||||
<div class="column_two">
|
||||
<div class="column_two_header"></div>
|
||||
<?php $blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat="-'.exclude_comic_categories().'"&author='.$comicpress_options['author_column_two'];
|
||||
<?php $blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&author='.$comicpress_options['author_column_two'];
|
||||
$posts = query_posts($blog_query);
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
display_blog_post();
|
||||
endwhile;
|
||||
} ?>
|
||||
<span class="viewpostsbytwo">View all posts by: <?php the_author_posts_link(); ?></span><br />
|
||||
|
|
|
@ -9,131 +9,115 @@
|
|||
* example: [members]Only members can read this.[/members]
|
||||
*
|
||||
*
|
||||
* Still need to do, make it a way to flag someone a site_member TRUE
|
||||
*
|
||||
*/
|
||||
global $comicpress_options;
|
||||
|
||||
if ($comicpress_options['enable_members_only']) {
|
||||
|
||||
add_shortcode( 'members', 'shortcode_for_comicpress_members_only' );
|
||||
add_shortcode( 'member', 'shortcode_for_comicpress_members_only' );
|
||||
add_action('show_user_profile', 'comicpress_profile_members_only');
|
||||
add_action('edit_user_profile', 'comicpress_profile_members_only');
|
||||
add_action('profile_update', 'comicpress_profile_members_only_save');
|
||||
|
||||
|
||||
if ($comicpress_options['members_post_category'])
|
||||
add_filter('pre_get_posts','comicpress_members_filter');
|
||||
|
||||
function comicpress_members_filter($query) {
|
||||
global $comicpress_options, $current_user;
|
||||
$members_post_category = $comicpress_options['members_post_category'];
|
||||
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 {
|
||||
$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);
|
||||
}
|
||||
|
||||
add_shortcode( 'members', 'shortcode_for_comicpress_members_only' );
|
||||
add_shortcode( 'member', 'shortcode_for_comicpress_members_only' );
|
||||
add_action('show_user_profile', 'comicpress_profile_members_only');
|
||||
add_action('edit_user_profile', 'comicpress_profile_members_only');
|
||||
add_action('profile_update', 'comicpress_profile_members_only_save');
|
||||
|
||||
|
||||
add_filter('pre_get_posts','comicpress_members_filter');
|
||||
|
||||
function comicpress_members_filter($query) {
|
||||
global $comicpress_options, $current_user;
|
||||
$members_post_category = $comicpress_options['members_post_category'];
|
||||
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 {
|
||||
$excludeset = '-'.$members_post_category;
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
function shortcode_for_comicpress_members_only( $atts, $content = null ) {
|
||||
global $post, $userdata, $profileuser, $current_user, $errormsg;
|
||||
$returninfo = '<div class="non-member"><p>'.__('There is Members Only content here.<br />To view this content you need to be a member of this site.','comicpress').'</p></div>';
|
||||
|
||||
if ( !empty($current_user->ID) ) {
|
||||
$is_member = get_usermeta($current_user->ID,'comicpress-is-member');
|
||||
if ($is_member == 'yes' || current_user_can('publish_posts')) {
|
||||
$content = str_replace('<p>', '', $content);
|
||||
$content = str_replace('</p>', '', $content);
|
||||
$returninfo = "<div class=\"members-only\">\r\n<p>$content</p>\r\n</div>\r\n";
|
||||
}
|
||||
}
|
||||
return $returninfo;
|
||||
if ($is_member != 'yes' || empty($is_member)) {
|
||||
$query->set('cat',$excludeset);
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_profile_members_only() {
|
||||
global $profileuser, $current_user, $errormsg;
|
||||
$comicpress_is_member = get_usermeta($profileuser->ID,'comicpress-is-member');
|
||||
if (empty($comicpress_is_member)) $comicpress_is_member = 'no';
|
||||
?>
|
||||
<h3><?php _e('Member of','comicpress'); ?> <?php bloginfo('name'); ?></h3>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th><label for="Memberflag"><?php _e('Member?','comicpress'); ?></label></th>
|
||||
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.<br />To view this content you need to be a member of this site.','comicpress').'</div>';
|
||||
if ( !empty($current_user->ID) ) {
|
||||
$is_member = get_usermeta($current_user->ID,'comicpress-is-member');
|
||||
if ($is_member == 'yes' || current_user_can('publish_posts')) {
|
||||
$returninfo = '<div class="members-only">'.$content.'</div>';
|
||||
}
|
||||
}
|
||||
return $returninfo;
|
||||
}
|
||||
|
||||
function comicpress_profile_members_only() {
|
||||
global $profileuser, $current_user, $errormsg;
|
||||
$comicpress_is_member = get_usermeta($profileuser->ID,'comicpress-is-member');
|
||||
if (empty($comicpress_is_member)) $comicpress_is_member = 'no';
|
||||
?>
|
||||
<h3><?php _e('Member of','comicpress'); ?> <?php bloginfo('name'); ?></h3>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th><label for="Memberflag"><?php _e('Member?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<?php
|
||||
if (current_user_can('manage_options')) { ?>
|
||||
<label><input name="comicpress-is-member" id="comicpress-is-member-yes" type="radio" value="yes"<?php if ( get_usermeta($profileuser->ID,'comicpress-is-member') == "yes") { echo " checked"; } ?> /><?php _e('Yes','comicpress'); ?></label>
|
||||
|
||||
<label><input name="comicpress-is-member" id="comicpress-is-member-no" type="radio" value="no"<?php if ( get_usermeta($profileuser->ID,'comicpress-is-member') != "yes" ) { echo " checked"; } ?> /><?php _e('No','comicpress'); ?></label>
|
||||
|
||||
<?php } else {
|
||||
if ($comicpress_is_member == 'yes') {
|
||||
echo 'Yes';
|
||||
} else {
|
||||
echo 'No';
|
||||
if (current_user_can('manage_options')) { ?>
|
||||
<label><input name="comicpress-is-member" id="comicpress-is-member-yes" type="radio" value="yes"<?php if ( get_usermeta($profileuser->ID,'comicpress-is-member') == "yes") { echo " checked"; } ?> /><?php _e('Yes','comicpress'); ?></label>
|
||||
|
||||
<label><input name="comicpress-is-member" id="comicpress-is-member-no" type="radio" value="no"<?php if ( get_usermeta($profileuser->ID,'comicpress-is-member') != "yes" ) { echo " checked"; } ?> /><?php _e('No','comicpress'); ?></label>
|
||||
|
||||
<?php } else {
|
||||
if ($comicpress_is_member == 'yes') {
|
||||
echo 'Yes';
|
||||
} else {
|
||||
echo 'No';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php }
|
||||
</tr>
|
||||
</table>
|
||||
<?php }
|
||||
|
||||
|
||||
function comicpress_profile_members_only_save() {
|
||||
$id = $_POST['user_id'];
|
||||
$comicpress_is_member = $_POST['comicpress-is-member'];
|
||||
|
||||
|
||||
function comicpress_profile_members_only_save() {
|
||||
$id = $_POST['user_id'];
|
||||
$comicpress_is_member = $_POST['comicpress-is-member'];
|
||||
|
||||
if (!empty($comicpress_is_member)) {
|
||||
update_usermeta($id, 'comicpress-is-member', $comicpress_is_member);
|
||||
if (!empty($comicpress_is_member)) {
|
||||
update_usermeta($id, 'comicpress-is-member', $comicpress_is_member);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the current post is in the members category.
|
||||
*/
|
||||
function in_members_category() {
|
||||
global $post, $category_tree, $comicpress_options;
|
||||
$members_post_category = $comicpress_options['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 $user_ID;
|
||||
if (!empty($user_ID)) {
|
||||
$is_member = get_usermeta($user_ID,'comicpress-is-member');
|
||||
if ($is_member == 'yes' || current_user_can('publish_posts')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the current post is in the members category.
|
||||
*/
|
||||
function in_members_category() {
|
||||
global $post, $category_tree, $comicpress_options;
|
||||
$members_post_category = $comicpress_options['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 $user_ID;
|
||||
if (!empty($user_ID)) {
|
||||
$is_member = get_usermeta($user_ID,'comicpress-is-member');
|
||||
if ($is_member == 'yes' || current_user_can('publish_posts')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function comicpress_members_comment_filter($content) {
|
||||
global $comicpress_options;
|
||||
if (comicpress_is_member() || !$comicpress_options['enable_members_only_post_comments']) {
|
||||
return $content;
|
||||
}
|
||||
return '<div class="non-member"><p>'.__('There is Members Only content here.<br />To view this content you need to be a member of this site.','comicpress').'</p></div>';
|
||||
|
||||
}
|
||||
|
||||
add_filter('comment_text', 'comicpress_members_comment_filter', $content);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
?>
|
|
@ -21,7 +21,7 @@ function comicpress_show_mood_in_post() {
|
|||
if (!empty($moods_directory) && $moods_directory != 'none') {
|
||||
$mood_file = get_post_meta( get_the_ID(), "mood", true );
|
||||
if (!empty($mood_file) && $mood_file != '') {
|
||||
$mood = explode(".", $mood_file);
|
||||
$mood = explode(".", $mood);
|
||||
$mood = reset($mood);
|
||||
if ( !empty($mood_file) && file_exists(get_stylesheet_directory() . '/images/moods/'.$moods_directory.'/'.$mood_file) ) { ?>
|
||||
<div class="post-mood post-<?php echo $mood; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo $mood_file; ?>" alt="<?php echo $mood; ?>" title="<?php echo $mood; ?>" /></div>
|
||||
|
@ -75,7 +75,7 @@ function comicpress_showmood_edit_post() {
|
|||
$newmood = $newmood[0]; ?>
|
||||
<div style="float:left; margin-top: 10px; text-align: center; width: 68px; overflow: hidden;">
|
||||
<label for="postmood-<?php echo $newmood; ?>" style="cursor:pointer;">
|
||||
<img src="<?php echo $moods_uri; ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo basename($file); ?>" /><br />
|
||||
<img src="<?php echo $moods_uri; ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo basename($file); ?>"><br />
|
||||
<?php echo $newmood; ?>
|
||||
</label>
|
||||
<br />
|
||||
|
|
|
@ -12,7 +12,7 @@ function display_comics_multi() {
|
|||
if (($result = get_comic_path('comic', '', '', 1)) !== false) {
|
||||
foreach ($result as $pathto_comic) { ?>
|
||||
<div class="comicdisp">
|
||||
<img src="<?php echo get_option('home'). '/' .$pathto_comic; ?>" alt="<?php the_title(); ?>" title="<?php echo the_hovertext(); ?>" />
|
||||
<img src="<?php echo get_option('home'). '/' .$pathto_comic; ?>" alt="<?php the_title(); ?>" title="<?php the_hovertext(); ?>" />
|
||||
</div>
|
||||
<?php }
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<?php
|
|
@ -1,41 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Protect global $post and $wp_query.
|
||||
* @param object $use_this_post If provided, after saving the current post, set up this post for template tag use.
|
||||
*/
|
||||
function Protect($use_this_post = null) {
|
||||
global $post, $wp_query, $__post, $__wp_query;
|
||||
|
||||
$__post = $post;
|
||||
$__wp_query = $wp_query;
|
||||
|
||||
if (!is_null($use_this_post)) {
|
||||
$post = $use_this_post;
|
||||
setup_postdata($post);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporarily restore the global $post variable and set it up for use.
|
||||
*/
|
||||
function Restore() {
|
||||
global $post, $__post;
|
||||
|
||||
$post = $__post;
|
||||
setup_postdata($post);
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore global $post and $wp_query.
|
||||
*/
|
||||
function Unprotect() {
|
||||
global $post, $wp_query, $__post, $__wp_query;
|
||||
|
||||
$post = $__post;
|
||||
$wp_query = $__wp_query;
|
||||
|
||||
$__post = $__wp_query = null;
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
/**
|
||||
* Related comics
|
||||
* Displays a list of comic links that are related to this current one using shortcode.
|
||||
*
|
||||
* Usage: [related_comics]
|
||||
*
|
||||
*/
|
||||
|
||||
function related_comics_shortcode( $atts = '' ) {
|
||||
extract(shortcode_atts(array(
|
||||
'limit' => '5',
|
||||
), $atts));
|
||||
|
||||
global $wpdb, $post, $table_prefix, $category_tree;
|
||||
|
||||
if ($post->ID) {
|
||||
// Get tags
|
||||
$tags = wp_get_post_tags($post->ID);
|
||||
$tagsarray = array();
|
||||
foreach ($tags as $tag) {
|
||||
$tagsarray[] = $tag->term_id;
|
||||
}
|
||||
$tagslist = implode(',', $tagsarray);
|
||||
if (empty($tagslist)) return;
|
||||
if (empty($limit)) $limit = 5;
|
||||
// Do the query
|
||||
$q = "SELECT p.*, count(tr.object_id) as count
|
||||
FROM $wpdb->term_taxonomy AS tt, $wpdb->term_relationships AS tr, $wpdb->posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post->ID
|
||||
AND p.post_status = 'publish'
|
||||
AND p.post_date_gmt < NOW()
|
||||
GROUP BY tr.object_id
|
||||
ORDER BY count DESC, p.post_date_gmt DESC
|
||||
LIMIT $limit;";
|
||||
|
||||
$related = $wpdb->get_results($q);
|
||||
if ( $related ) {
|
||||
$retval = '
|
||||
<div class="related_posts">
|
||||
'.__('Related Comics ¬','comicpress');
|
||||
$retval .= '
|
||||
<ul><li>';
|
||||
$comic_categories = array();
|
||||
foreach ($category_tree as $node) {
|
||||
$comic_categories[] = end(explode("/", $node));
|
||||
}
|
||||
$in_comic_cat = 0;
|
||||
$retval .= '
|
||||
<table class="month-table">';
|
||||
foreach($related as $r) :
|
||||
if (count(array_intersect($comic_categories, wp_get_post_categories($r->ID))) > 0)
|
||||
$retval .= '
|
||||
<tr><td class="archive-date" align="right">'.date('M j, Y',strtotime($r->post_date)).'</td><td class="archive-title"><a title="'.wptexturize($r->post_title).'" href="'.get_permalink($r->ID).'">'.wptexturize($r->post_title).'</a></td></tr>';
|
||||
endforeach;
|
||||
$retval .= '
|
||||
</table>';
|
||||
} else {
|
||||
$retval .= '
|
||||
<li>'.__('No related comics found','comicpress').'</li>';
|
||||
}
|
||||
$retval .= '
|
||||
</li></ul>';
|
||||
$retval .= '
|
||||
</div>';
|
||||
return $retval;
|
||||
}
|
||||
return;
|
||||
}
|
||||
add_shortcode('related_comics', 'related_comics_shortcode');
|
||||
|
||||
|
||||
?>
|
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
/**
|
||||
* Related posts
|
||||
* Displays a list of blog links that are related to this current one using shortcode.
|
||||
*
|
||||
* Usage: [related_posts]
|
||||
*
|
||||
*/
|
||||
|
||||
function related_posts_shortcode( $atts = '' ) {
|
||||
extract(shortcode_atts(array(
|
||||
'limit' => '5',
|
||||
), $atts));
|
||||
|
||||
global $wpdb, $post, $table_prefix, $category_tree;
|
||||
|
||||
if ($post->ID) {
|
||||
// Get tags
|
||||
$tags = wp_get_post_tags($post->ID);
|
||||
$tagsarray = array();
|
||||
foreach ($tags as $tag) {
|
||||
$tagsarray[] = $tag->term_id;
|
||||
}
|
||||
$tagslist = implode(',', $tagsarray);
|
||||
if (empty($tagslist)) return;
|
||||
if (empty($limit)) $limit = 5;
|
||||
// Do the query
|
||||
$q = "SELECT p.*, count(tr.object_id) as count
|
||||
FROM $wpdb->term_taxonomy AS tt, $wpdb->term_relationships AS tr, $wpdb->posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post->ID
|
||||
AND p.post_status = 'publish'
|
||||
AND p.post_date_gmt < NOW()
|
||||
GROUP BY tr.object_id
|
||||
ORDER BY count DESC, p.post_date_gmt DESC
|
||||
LIMIT $limit;";
|
||||
|
||||
$related = $wpdb->get_results($q);
|
||||
|
||||
if ( $related ) {
|
||||
$retval = '
|
||||
<div class="related_posts">
|
||||
'.__('Related Posts ¬','comicpress');
|
||||
$retval .= '
|
||||
<ul><li>';
|
||||
$comic_categories = array();
|
||||
foreach ($category_tree as $node) {
|
||||
$comic_categories[] = end(explode("/", $node));
|
||||
}
|
||||
$in_comic_cat = 0;
|
||||
$counter = 0;
|
||||
$retval .= '
|
||||
<table class="month-table">';
|
||||
foreach($related as $r) :
|
||||
if (count(array_intersect($comic_categories, wp_get_post_categories($r->ID))) == 0)
|
||||
$retval .= '
|
||||
<tr><td class="archive-date" align="right">'.date('M j, Y',strtotime($r->post_date)).'</td><td class="archive-title"><a title="'.wptexturize($r->post_title).'" href="'.get_permalink($r->ID).'">'.wptexturize($r->post_title).'</a></td></tr>';
|
||||
endforeach;
|
||||
$retval .= '
|
||||
</table>';
|
||||
} else {
|
||||
$retval .= '
|
||||
<li>'.__('No related posts found','comicpress').'</li>';
|
||||
}
|
||||
$retval .= '
|
||||
</li></ul>';
|
||||
$retval .= '
|
||||
</div>';
|
||||
return $retval;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
add_shortcode('related_posts', 'related_posts_shortcode');
|
||||
|
||||
?>
|
|
@ -16,8 +16,8 @@ Author URI: http://szub.net
|
|||
*/
|
||||
|
||||
function szub_search_custom_join($join) {
|
||||
global $wpdb, $wp_query;
|
||||
if( /* is_search() && */ szub_is_search_key() ) {
|
||||
global $wpdb;
|
||||
if( is_search() && szub_is_search_key() ) {
|
||||
$join = " LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id ";
|
||||
}
|
||||
return $join;
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<?php
|
||||
|
||||
add_shortcode( 'version', 'comicpress_ver_shortcode' );
|
||||
|
||||
function comicpress_ver_shortcode( $atts, $content = null ) {
|
||||
global $comicpress_options;
|
||||
return '<div class="comicpress_ver">'.$comicpress_options['comicpress_version'].'</div>';
|
||||
}
|
||||
|
||||
?>
|
|
@ -10,8 +10,8 @@ function cp_add_to_feed_count_rss() {
|
|||
$feedcount = get_option('comicpress_feed_count_rss');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_rss', $feedcount);
|
||||
} else {
|
||||
update_option('comicpress_feed_count_rss', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_rss', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
@ -23,8 +23,8 @@ function cp_add_to_feed_count_rdf() {
|
|||
$feedcount = get_option('comicpress_feed_count_rdf');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_rdf', $feedcount);
|
||||
} else {
|
||||
update_option('comicpress_feed_count_rdf', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_rdf', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
@ -36,8 +36,8 @@ function cp_add_to_feed_count_atom() {
|
|||
$feedcount = get_option('comicpress_feed_count_atom');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_atom', $feedcount);
|
||||
} else {
|
||||
update_option('comicpress_feed_count_atom', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_atom', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
@ -48,67 +48,12 @@ function cp_add_to_feed_count_rss2() {
|
|||
$feedcount = get_option('comicpress_feed_count_rss2');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_rss2', $feedcount);
|
||||
} else {
|
||||
update_option('comicpress_feed_count_rss2', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_rss2', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
||||
add_action('do_feed_rss2', 'cp_add_to_feed_count_rss2',5);
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add the number of post comments to the title of the RSS feed items.
|
||||
* TODO Make this togglable via options.
|
||||
* @param string $title The title of the post.
|
||||
* @return string The filtered title of the post.
|
||||
*/
|
||||
function comicpress_the_title_rss($title = '') {
|
||||
switch ($count = get_comments_number()) {
|
||||
case 0:
|
||||
$title_pattern = __('%s (No Comments)', 'comicpress');
|
||||
break;
|
||||
case 1:
|
||||
$title_pattern = __('%s (1 Comment)', 'comicpress');
|
||||
break;
|
||||
default:
|
||||
$title_pattern = sprintf(__('%%s (%d Comments)', 'comicpress'), $count);
|
||||
break;
|
||||
}
|
||||
|
||||
return sprintf($title_pattern, $title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle making changes to ComicPress before the export process starts.
|
||||
*/
|
||||
function comicpress_export_wp() {
|
||||
remove_filter('the_title_rss', 'comicpress_the_title_rss');
|
||||
}
|
||||
|
||||
global $comicpress_options;
|
||||
if ($comicpress_options['enable_comment_count_in_rss']) {
|
||||
add_filter('the_title_rss', 'comicpress_the_title_rss');
|
||||
add_action('export_wp', 'comicpress_export_wp');
|
||||
}
|
||||
|
||||
//Insert the comic image into the RSS feed
|
||||
function comicpress_comic_feed() {
|
||||
global $post, $comicpress_options; ?>
|
||||
<p><a href="<?php the_permalink() ?>"><?php echo comicpress_display_comic_image('rss,comic',$comicpress_options['enable_post_thumbnail_rss']); ?></a></p><?php
|
||||
}
|
||||
|
||||
// removed the in_comic_category so that if it has a post-image it will add it to the rss feed (else rss comic thumb)
|
||||
function comicpress_insert_comic_feed($content) {
|
||||
global $post, $wp_query;
|
||||
if (is_feed()) {
|
||||
return comicpress_comic_feed() . $content;
|
||||
} else {
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
||||
add_filter('the_content','comicpress_insert_comic_feed');
|
||||
add_filter('the_excerpt','comicpress_insert_comic_feed');
|
||||
|
||||
?>
|
||||
?>
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -1,48 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Render the ComicPress calendar widget.
|
||||
*/
|
||||
function comicpress_calendar_embed() {
|
||||
$calendar = new CalendarWidget();
|
||||
|
||||
$instance = array();
|
||||
foreach (array('before_widget', 'after_widget', 'thumbnail', 'link', 'small', 'medium', 'large') as $field) {
|
||||
$instance[$field] = '';
|
||||
}
|
||||
|
||||
$calendar->widget($instance, array());
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the ComicPress bookmark widget.
|
||||
*/
|
||||
function comicpress_comic_bookmark_embed() {
|
||||
$bookmark = new BookmarkWidget();
|
||||
$bookmark->init();
|
||||
$bookmark->widget(array(), array());
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the monthly archive dropdown widget
|
||||
*/
|
||||
function comicpress_archive_dropdown() {
|
||||
$archive = new ComicPressArchiveDropdownWidget();
|
||||
$archive->widget(array(), array('mode' => 'monthly_archive'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the comic archive dropdown widget
|
||||
*/
|
||||
function comicpress_archive_dropdown_comics() {
|
||||
$archive = new ComicPressArchiveDropdownWidget();
|
||||
$archive->widget(array(), array('mode' => 'comic_archive'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the storyline order dropdown widget
|
||||
*/
|
||||
function comicpress_archive_dropdown_storyline() {
|
||||
$archive = new ComicPressArchiveDropdownWidget();
|
||||
$archive->widget(array(), array('mode' => 'storyline_order'));
|
||||
}
|
|
@ -92,15 +92,9 @@ if ($comicpress_options['enable_numbered_pagination']) {
|
|||
echo '<li class="paginav-extend">'.$pagenavi_options['dotleft_text'].'</li>';
|
||||
}
|
||||
}
|
||||
$prev_post_link = get_previous_posts_link( $pagenavi_options['prev_text'] );
|
||||
|
||||
if (!empty($prev_post_link)) {
|
||||
echo "<li class=\"paginav-previous\">\r\n";
|
||||
echo $prev_post_link . "\r\n";
|
||||
echo "</li>\r\n";
|
||||
}
|
||||
|
||||
|
||||
echo '<li class="paginav-previous">';
|
||||
previous_posts_link($pagenavi_options['prev_text']);
|
||||
echo '</li>';
|
||||
for($i = $start_page; $i <= $end_page; $i++) {
|
||||
if($i == $paged) {
|
||||
$current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
|
||||
|
@ -110,12 +104,9 @@ if ($comicpress_options['enable_numbered_pagination']) {
|
|||
echo '<li><a href="'.clean_url(get_pagenum_link($i)).'" title="'.$page_text.'">'.$page_text.'</a></li>';
|
||||
}
|
||||
}
|
||||
$next_post_link = get_next_posts_link($pagenavi_options['next_text'], $max_page);
|
||||
if (!empty($next_post_link)) {
|
||||
echo "<li class=\"paginav-next\">\r\n";
|
||||
echo $next_post_link ."\r\n";
|
||||
echo "</li>\r\n";
|
||||
}
|
||||
echo '<li class="paginav-next">';
|
||||
next_posts_link($pagenavi_options['next_text'], $max_page);
|
||||
echo '</li>';
|
||||
if ($end_page < $max_page) {
|
||||
if(!empty($pagenavi_options['dotright_text'])) {
|
||||
echo '<li class="paginav-extend">'.$pagenavi_options['dotright_text'].'</li>';
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/* ComicPress Custom CSS over-rides for [ gecko ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
a:focus { outline: 0; }
|
||||
|
||||
.comicarchiveframe {
|
||||
-moz-opacity: 0.99; /* mozilla, netscape */
|
||||
opacity:0.99; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
-moz-opacity: 0.7; /* mozilla, netscape */
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
-moz-opacity: 0.5; /* mozilla, netscape, gecko */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
-moz-opacity: 0; /* mozilla, netscape */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
background: #a1c0d9; /* Firefox */
|
||||
}
|
37
header.php
|
@ -23,37 +23,40 @@
|
|||
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name') ?> Atom Feed" href="<?php bloginfo('atom_url') ?>" />
|
||||
<link rel="pingback" href="<?php bloginfo('pingback_url') ?>" />
|
||||
<meta name="ComicPress" content="<?php echo $comicpress_options['comicpress_version']; ?>" />
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/ie6submenus.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<?php wp_head(); ?>
|
||||
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
|
||||
<body <?php if (function_exists('body_class')) { body_class(); } ?>>
|
||||
|
||||
<?php do_action('comicpress-header'); ?>
|
||||
<?php get_sidebar('above'); ?>
|
||||
|
||||
<div id="page-head"></div>
|
||||
<?php if (!$comicpress_options['disable_page_restraints']) {
|
||||
|
||||
<?php if (!$comicpress_options['disable_page_restraints']) {
|
||||
if (is_cp_theme_layout('standard,v')) { ?>
|
||||
<div id="page-wrap"><!-- Wraps outside the site width -->
|
||||
<div id="page"><!-- Defines entire site width - Ends in Footer -->
|
||||
<div id="page-wrap"><!-- Wraps outside the site width -->
|
||||
<div id="page"><!-- Defines entire site width - Ends in Footer -->
|
||||
<?php } else { ?>
|
||||
<div id="page-wide-wrap"><!-- Wraps outside the site width -->
|
||||
<div id="page-wide"><!-- Defines entire site width - Ends in Footer -->
|
||||
<div id="page-wide-wrap">
|
||||
<div id="page-wide">
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
<?php if (comicpress_check_child_file('partials/headerarea') == false) { ?>
|
||||
<div id="header">
|
||||
<?php if (function_exists('the_project_wonderful_ad')) {
|
||||
the_project_wonderful_ad('header');
|
||||
} ?>
|
||||
<h1><a href="<?php bloginfo('wpurl'); ?>"><?php bloginfo('name') ?></a></h1>
|
||||
<div id="header">
|
||||
<?php if (function_exists('the_project_wonderful_ad')) { ?>
|
||||
<div class="headerpwad">
|
||||
<?php the_project_wonderful_ad('header'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<h1><a href="<?php bloginfo('wpurl'); ?>"><?php bloginfo('name') ?></a></h1>
|
||||
<div class="description"><?php bloginfo('description') ?></div>
|
||||
<?php get_sidebar('header'); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php get_sidebar('header'); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php get_sidebar('menubar'); ?>
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/* These overrides are for the IE browser, fixes and what not to make it work. */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
#menubar {
|
||||
zoom: 1; /* IE fix, allows for variable height menu */
|
||||
}
|
||||
|
||||
tt a:hover
|
||||
{
|
||||
z-index:1000; color: #aaaaff;
|
||||
background-color: Transparent;
|
||||
}
|
28
image.php
|
@ -2,10 +2,16 @@
|
|||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
|
||||
<div <?php post_class(); ?>>
|
||||
<?php comicpress_display_post_thumbnail(); ?>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content" id="post-<?php the_ID() ?>">
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page" id="post-<?php the_ID() ?>">
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
|
@ -46,19 +52,21 @@
|
|||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php the_content() ?>
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
<?php if ('open' == $post->comment_status) {
|
||||
comments_template('', true);
|
||||
} ?>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
<?php endwhile; else: ?>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<p><?php _e('Sorry, no image matched your criteria.','comicpress'); ?></p>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
After Width: | Height: | Size: 329 B |
After Width: | Height: | Size: 321 B |
After Width: | Height: | Size: 345 B |
After Width: | Height: | Size: 288 B |
After Width: | Height: | Size: 300 B |
After Width: | Height: | Size: 270 B |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 8.3 KiB |
|
@ -1,140 +0,0 @@
|
|||
/* COMIC NAVIGATION
|
||||
Author: Tyler Martin
|
||||
Style: Silver
|
||||
*/
|
||||
#comic_navi_wrapper {
|
||||
display: table;
|
||||
border-collapse: collapse;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.comic_navi_left {
|
||||
}
|
||||
|
||||
.comic_navi_center {
|
||||
}
|
||||
|
||||
.comic_navi_right {
|
||||
}
|
||||
|
||||
.comic_navi {
|
||||
|
||||
}
|
||||
|
||||
.navi-comictitle {
|
||||
text-align: center;
|
||||
padding-top: 26px;
|
||||
max-width: 100px;
|
||||
}
|
||||
|
||||
.navi {
|
||||
width: 66px;
|
||||
padding: 66px 0 0 0;
|
||||
/* margin: 0 5px; */
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.navi:hover {
|
||||
background-position: -66px 0;
|
||||
}
|
||||
|
||||
.navi-first {
|
||||
background: url('first.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-prevchap, .navi-story_prev {
|
||||
background: url('prevchap.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-story_prev_in {
|
||||
background: url('prevchap.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-prev, .navi-previous {
|
||||
margin-right: 10px;
|
||||
background: url('prev.png') no-repeat;
|
||||
}
|
||||
|
||||
|
||||
.navi-comments, .navi-archive, .navi-random, .navi-buyprint {
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.navi-buyprint {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
background: url('buyprint.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-buyprint:hover, button .navi-buyprint:hover {
|
||||
background: url('buyprint.png') no-repeat;
|
||||
background-position: -66px 0;
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.navi-buyprint-form {
|
||||
width: 76px;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navi-archive, .navi-archives {
|
||||
background: url('archive.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-random {
|
||||
background: url('random.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-comments {
|
||||
padding: 0;
|
||||
background: url('comments.png') no-repeat;
|
||||
}
|
||||
|
||||
a.navi-comments span {
|
||||
display: inline-block;
|
||||
width: 66px;
|
||||
height: 66px;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
line-height: 66px;
|
||||
color: #c5c5c5;
|
||||
}
|
||||
|
||||
a.navi-comments span:hover {
|
||||
color: #860b04;
|
||||
}
|
||||
|
||||
.navi-next {
|
||||
margin-left: 10px;
|
||||
background: url('next.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-nextchap, .navi-story_next {
|
||||
background: url('nextchap.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-story_next_in {
|
||||
background: url('nextchap.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-last {
|
||||
background: url('last.png') no-repeat;
|
||||
}
|
||||
|
||||
.navi-void, .navi-void:hover {
|
||||
color: #999;
|
||||
background-position: -132px 0;
|
||||
}
|
||||
|
||||
.comic-left .navi-prev, .comic-right .navi-prev, .comic-left .navi-next, .comic-right .navi-next {
|
||||
/* margin: 0 5px; */
|
||||
}
|
||||
|
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB |
|
@ -2,21 +2,20 @@
|
|||
Author: Tyler Martin
|
||||
Style: Default
|
||||
*/
|
||||
|
||||
#comic_navi_wrapper {
|
||||
width: 100%;
|
||||
display: table;
|
||||
border-collapse: collapse;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.comic_navi_left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.comic_navi_center {
|
||||
}
|
||||
|
||||
.comic_navi_right {
|
||||
float: right;
|
||||
}
|
||||
|
@ -25,21 +24,44 @@ Style: Default
|
|||
padding: 2px;
|
||||
}
|
||||
|
||||
.comic_navi a {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.comic_navi a:hover {
|
||||
color: #b00;
|
||||
}
|
||||
|
||||
|
||||
.navi-comictitle {
|
||||
padding: 0px 6px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
.navi-comictitle a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navi-comictitle a:hover {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.navi {
|
||||
padding: 0 6px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navi a {
|
||||
display: block;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.navi a:hover {
|
||||
color: #000;
|
||||
background: #f00;
|
||||
}
|
||||
|
||||
.navi-first {
|
||||
float: left;
|
||||
}
|
||||
|
@ -56,6 +78,7 @@ Style: Default
|
|||
float: left;
|
||||
}
|
||||
|
||||
|
||||
.navi-comments, .navi-archive, .navi-random, .navi-buyprint {
|
||||
display: inline-block;
|
||||
}
|
||||
|
@ -64,22 +87,35 @@ Style: Default
|
|||
height: 25px;
|
||||
width: 80px;
|
||||
line-height: 15px;
|
||||
color: #000;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navi-buyprint:hover, button .navi-buyprint:hover {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.navi-buyprint-form {
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.navi-comments-count {
|
||||
padding-right: 4px;
|
||||
.navi-archive, .navi-archives {
|
||||
}
|
||||
|
||||
.navi-random {
|
||||
}
|
||||
|
||||
.navi-comments {
|
||||
}
|
||||
|
||||
a.navi-comments span {
|
||||
}
|
||||
|
||||
a.navi-comments span:hover {
|
||||
}
|
||||
|
||||
.navi-comments-count {
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.navi-next {
|
||||
float: left;
|
||||
|
@ -98,5 +134,10 @@ Style: Default
|
|||
}
|
||||
|
||||
.navi-void, .navi-void:hover {
|
||||
font-weight: normal;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.comic-left .navi-prev, .comic-right .navi-prev, .comic-left .navi-next, .comic-right .navi-next {
|
||||
/* margin: 0 5px; */
|
||||
}
|
||||
|
||||
|
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.6 KiB |
93
index.php
|
@ -1,26 +1,68 @@
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
<div id="content-wrapper-head"></div>
|
||||
<div id="content-wrapper">
|
||||
|
||||
<?php if (is_cp_theme_layout('gn,v3c')) get_sidebar('left'); ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('gn,rgn')) { ?>
|
||||
<div id="pagewrap-right">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!(is_paged())) { ?>
|
||||
|
||||
<?php if (!$comicpress_options['disable_comic_frontpage']) { ?>
|
||||
<?php $wp_query ->in_the_loop = true; $comicFrontpage = new WP_Query(); $comicFrontpage->query('showposts=1&cat='.get_all_comic_categories_as_cat_string());
|
||||
while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post() ?>
|
||||
<?php if (comicpress_check_child_file('partials/displaycomic') == false) { ?>
|
||||
<div id="comic-wrap">
|
||||
<div id="comic-head"><?php get_sidebar('over'); ?></div>
|
||||
<div class="clear"></div>
|
||||
<?php get_sidebar('comicleft'); ?>
|
||||
<div id="comic"><?php display_comic(); ?></div>
|
||||
<?php get_sidebar('comicright'); ?>
|
||||
<div class="clear"></div>
|
||||
<div id="comic-foot"><?php get_sidebar('under'); ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!$comicpress_options['disable_comic_frontpage'] && !$comicpress_options['disable_comic_blog_frontpage'] && !is_paged() ) {
|
||||
if (is_archive()) echo "Thinks its an archive";
|
||||
Protect();
|
||||
$comic_query = 'showposts=1&cat="'.get_all_comic_categories_as_cat_string().'"';
|
||||
query_posts($comic_query);
|
||||
$wp_query->is_archive = false;
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
Restore();
|
||||
UnProtect();
|
||||
wp_reset_query();
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (function_exists('the_project_wonderful_ad')) {
|
||||
the_project_wonderful_ad('blog');
|
||||
} ?>
|
||||
<?php if (is_cp_theme_layout('3c,standard,3c2r')) { ?>
|
||||
<div id="subcontent-wrapper-head"></div>
|
||||
<div id="subcontent-wrapper">
|
||||
<?php } ?>
|
||||
|
||||
<?php get_sidebar('overblog'); ?>
|
||||
<?php if (is_cp_theme_layout('3c,rgn')) get_sidebar('left'); ?>
|
||||
|
||||
<?php if (!is_cp_theme_layout('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!$comicpress_options['disable_comic_frontpage'] && !$comicpress_options['disable_comic_blog_frontpage'] && !is_paged() ) { ?>
|
||||
<?php while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post();
|
||||
display_comic_post();
|
||||
$comicFrontPage->is_single = true;
|
||||
comments_template();
|
||||
endwhile; ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (function_exists('the_project_wonderful_ad')) { ?>
|
||||
<div class="blogpwad">
|
||||
<center>
|
||||
<?php the_project_wonderful_ad('blog'); ?>
|
||||
</center>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php get_sidebar('blog'); ?>
|
||||
|
||||
|
@ -28,10 +70,10 @@
|
|||
<div id="blogheader"><!-- This area can be used for a heading above your main page blog posts --></div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!$comicpress_options['disable_blog_frontpage']) {
|
||||
Protect();
|
||||
<?php if (!$comicpress_options[disable_blog_frontpage]) {
|
||||
global $blog_postcount;
|
||||
if (!$comicpress_options['split_column_in_two']) {
|
||||
$blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
|
||||
$blog_query = 'showposts='.$blog_postcount.'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
|
||||
|
||||
$posts = query_posts($blog_query);
|
||||
if (have_posts()) { ?>
|
||||
|
@ -39,7 +81,7 @@
|
|||
<div class="blogindex">
|
||||
<?php while (have_posts()) : the_post();
|
||||
|
||||
comicpress_display_post();
|
||||
display_blog_post();
|
||||
|
||||
endwhile; ?>
|
||||
</div>
|
||||
|
@ -48,10 +90,7 @@
|
|||
comicpress_pagination();
|
||||
} else {
|
||||
comicpress_dual_columns();
|
||||
}
|
||||
Restore();
|
||||
UnProtect();
|
||||
wp_reset_query();
|
||||
}
|
||||
} ?>
|
||||
|
||||
<?php get_sidebar('underblog'); ?>
|
||||
|
|
141
js/bookmark.js
|
@ -1,99 +1,72 @@
|
|||
var button_images = {
|
||||
'clear-tag': {
|
||||
'off': '3a.gif', 'on': '3.gif'
|
||||
},
|
||||
'goto-tag': {
|
||||
'off': '2a.gif', 'on': '2.gif'
|
||||
}
|
||||
};
|
||||
|
||||
var BookmarkInfo = Class.create({
|
||||
'def': {
|
||||
'permalink': false
|
||||
},
|
||||
'initialize': function() {
|
||||
this.jar = new CookieJar({
|
||||
'expires': 60 * 60 * 24 * 31,
|
||||
'path': '/'
|
||||
});
|
||||
},
|
||||
'read': function() {
|
||||
var bookmark_info = this.jar.get('bookmark-info');
|
||||
'permalink': false
|
||||
},
|
||||
'initialize': function() {
|
||||
this.jar = new CookieJar({
|
||||
'expires': 60 * 60 * 24 * 31,
|
||||
'path': '/'
|
||||
});
|
||||
},
|
||||
'read': function() {
|
||||
var bookmark_info = this.jar.get('bookmark-info');
|
||||
|
||||
if ((typeof(bookmark_info) != 'object') || (bookmark_info == null)) {
|
||||
bookmark_info = this.def;
|
||||
}
|
||||
if ((typeof(bookmark_info) != 'object') || (bookmark_info == null)) {
|
||||
bookmark_info = this.def;
|
||||
}
|
||||
|
||||
return bookmark_info;
|
||||
},
|
||||
'write': function(bookmark_info) {
|
||||
this.jar.put('bookmark-info', bookmark_info);
|
||||
if (this.onWrite) { this.onWrite(bookmark_info); }
|
||||
}
|
||||
return bookmark_info;
|
||||
},
|
||||
'write': function(bookmark_info) {
|
||||
this.jar.put('bookmark-info', bookmark_info);
|
||||
if (this.onWrite) { this.onWrite(bookmark_info); }
|
||||
}
|
||||
});
|
||||
|
||||
var ComicBookmark = {};
|
||||
ComicBookmark.setup = function(id, mode, url, elements) {
|
||||
var bookmark_info = new BookmarkInfo();
|
||||
var info = bookmark_info.read();
|
||||
Event.observe(window, 'load', function() {
|
||||
var bookmark_info = new BookmarkInfo();
|
||||
var info = bookmark_info.read();
|
||||
|
||||
if ($(id)) {
|
||||
var hrefs = {};
|
||||
$$('#' + id + ' a').each(function(a) {
|
||||
if ($('comic-bookmark-holder')) {
|
||||
var hrefs = {};
|
||||
$$('#comic-bookmark-holder a').each(function(a) {
|
||||
var name = $w(a.className).shift();
|
||||
hrefs[name] = a;
|
||||
});
|
||||
|
||||
switch (mode) {
|
||||
case 'three-button':
|
||||
var set_goto_tag = function(i) {
|
||||
hrefs['goto-tag'].href = (i.permalink ? i.permalink : "#");
|
||||
['goto-tag','clear-tag'].each(function(which) {
|
||||
hrefs[which].innerHTML = elements[which + '-' + (i.permalink ? "on" : "off")];
|
||||
});
|
||||
var set_goto_tag = function(i) {
|
||||
hrefs['goto-tag'].href = (i.permalink ? i.permalink : "#");
|
||||
[ 'goto-tag','clear-tag' ].each(function(which) {
|
||||
hrefs[which].select('img')[0].src = image_root + button_images[which][i.permalink ? "on" : "off"];
|
||||
});
|
||||
};
|
||||
|
||||
$H(hrefs).each(function(info) {
|
||||
info.value[i.permalink ? 'addClassName' : 'removeClassName']('active');
|
||||
});
|
||||
};
|
||||
bookmark_info.onWrite = function(i) { set_goto_tag(i); }
|
||||
set_goto_tag(info);
|
||||
|
||||
hrefs['tag-page'].innerHTML = elements['tag-page'];
|
||||
Event.observe(hrefs['tag-page'], 'click', function(e) {
|
||||
Event.stop(e);
|
||||
info.permalink = permalink;
|
||||
bookmark_info.write(info);
|
||||
});
|
||||
|
||||
bookmark_info.onWrite = function(i) { set_goto_tag(i); }
|
||||
set_goto_tag(info);
|
||||
Event.observe(hrefs['clear-tag'], 'click', function(e) {
|
||||
Event.stop(e);
|
||||
info.permalink = false;
|
||||
bookmark_info.write(info);
|
||||
});
|
||||
|
||||
hrefs['tag-page'].observe('click', function(e) {
|
||||
Event.stop(e);
|
||||
info.permalink = url;
|
||||
bookmark_info.write(info);
|
||||
});
|
||||
|
||||
hrefs['goto-tag'].observe('click', function(e) {
|
||||
if (hrefs['goto-tag'].href == "#") { Event.stop(e); }
|
||||
});
|
||||
|
||||
hrefs['clear-tag'].observe('click', function(e) {
|
||||
Event.stop(e);
|
||||
info.permalink = false;
|
||||
bookmark_info.write(info);
|
||||
});
|
||||
|
||||
break;
|
||||
case 'one-button':
|
||||
var set_goto_tag = function(i) {
|
||||
hrefs['bookmark-clicker'].href = (i.permalink ? i.permalink : "#");
|
||||
hrefs['bookmark-clicker'].innerHTML = elements['bookmark-clicker-' + (i.permalink ? "on" : "off")];
|
||||
hrefs['bookmark-clicker'][i.permalink ? 'addClassName' : 'removeClassName']('active');
|
||||
};
|
||||
bookmark_info.onWrite = function(i) { set_goto_tag(i); }
|
||||
set_goto_tag(info);
|
||||
|
||||
hrefs['bookmark-clicker'].observe('click', function(e) {
|
||||
var current_link = info.permalink;
|
||||
info.permalink = (hrefs['bookmark-clicker'].href.match(/#$/)) ? url : false;
|
||||
bookmark_info.write(info);
|
||||
|
||||
if (hrefs['bookmark-clicker'].href.match(/#$/) == null) {
|
||||
hrefs['bookmark-clicker'].href = url;
|
||||
Event.stop(e);
|
||||
} else {
|
||||
document.location.href = current_link;
|
||||
Event.stop(e);
|
||||
}
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
Event.observe(hrefs['goto-tag'], 'click', function(e) {
|
||||
if (hrefs['goto-tag'].href == "#") { Event.stop(e); }
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
/* ================================================================
|
||||
This copyright notice must be untouched at all times.
|
||||
|
||||
The original version of this script and the associated (x)html
|
||||
is available at http://www.stunicholls.com/various/tabbed_pages.html
|
||||
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
|
||||
This script and the associated (x)html may be modified in any
|
||||
way to fit your requirements.
|
||||
=================================================================== */
|
||||
|
||||
|
||||
onload = function() {
|
||||
var e, i = 0;
|
||||
while (e = document.getElementById('cpadmin').getElementsByTagName ('DIV') [i++]) {
|
||||
if (e.className == 'on' || e.className == 'off') {
|
||||
e.onclick = function () {
|
||||
var getEls = document.getElementsByTagName('DIV');
|
||||
for (var z=0; z<getEls.length; z++) {
|
||||
getEls[z].className=getEls[z].className.replace('show', 'hide');
|
||||
getEls[z].className=getEls[z].className.replace('on', 'off');
|
||||
}
|
||||
this.className = 'on';
|
||||
var max = this.getAttribute('title');
|
||||
document.getElementById(max).className = "show";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,18 +1,12 @@
|
|||
<?php if (comicpress_check_child_file('layout-foot') == false) { ?>
|
||||
</div>
|
||||
<?php if (is_cp_theme_layout('v3cr')) { ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div id="subcontent-wrapper-foot"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('3c2r,v3cr')) {
|
||||
</div>
|
||||
<?php if (is_cp_theme_layout('3c2r')) {
|
||||
get_sidebar('left');
|
||||
} ?>
|
||||
|
||||
<?php
|
||||
if (is_cp_theme_layout('3c,v3c,gn,standard,v,3c2r,v3cr')) {
|
||||
if (is_cp_theme_layout('3c,v3c,gn,standard,v,3c2r')) {
|
||||
get_sidebar('right'); ?>
|
||||
<?php } ?>
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<?php global $comicpress_options; ?>
|
||||
<?php if (comicpress_check_child_file('layout-head') == false) { ?>
|
||||
|
||||
<div id="content-wrapper-head"></div>
|
||||
|
@ -9,57 +8,23 @@
|
|||
<?php if (is_cp_theme_layout('gn,rgn')) { ?>
|
||||
<div id="pagewrap-right">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v3cr')) { ?>
|
||||
<div id="pagewrap-left">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v,v3c')) { ?>
|
||||
<?php if (is_cp_theme_layout('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<?php get_sidebar('overblog'); ?>
|
||||
<div class="column">
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if (is_home()) {
|
||||
if (!$comicpress_options['disable_comic_frontpage']) {
|
||||
Protect();
|
||||
$comic_query = 'showposts=1&cat='.get_all_comic_categories_as_cat_string();
|
||||
query_posts($comic_query);
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
$temp_single = $wp_query->is_single;
|
||||
$wp_query->is_single = true;
|
||||
comicpress_display_comic_area();
|
||||
$wp_query->is_single = $temp_single;
|
||||
$temp_single = null;
|
||||
endwhile;
|
||||
}
|
||||
Restore();
|
||||
UnProtect();
|
||||
wp_reset_query();
|
||||
}
|
||||
} else {
|
||||
if (is_single() && in_comic_category()) {
|
||||
comicpress_display_comic_area();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (is_cp_theme_layout('3c,standard,3c2r')) { ?>
|
||||
<div id="subcontent-wrapper-head"></div>
|
||||
<div id="subcontent-wrapper">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('3c,rgn')) get_sidebar('left'); ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v3cr')) { ?>
|
||||
<div id="subcontent-wrapper-head"></div>
|
||||
<div id="subcontent-wrapper">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('3c,standard,3c2r')) { ?>
|
||||
<div id="subcontent-wrapper-head"></div>
|
||||
<div id="subcontent-wrapper">
|
||||
<?php } ?>
|
||||
|
||||
<?php get_sidebar('overblog'); ?>
|
||||
<?php if (is_cp_theme_layout('3c,rgn')) get_sidebar('left'); ?>
|
||||
|
||||
<?php if (!is_cp_theme_layout('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<?php get_sidebar('overblog'); ?>
|
||||
<div class="column">
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
|
|
61
links.php
|
@ -6,34 +6,43 @@ Template Name: Links
|
|||
<?php get_header(); ?>
|
||||
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
||||
|
||||
<?php
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
comicpress_display_post();
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$linkcatid = get_term_by('name','menubar','link_category');
|
||||
$linkcatid = $linkcatid->term_id;
|
||||
$bookmarks = wp_list_bookmarks('echo=0&categorize=1&exclude_category='.$linkcatid);
|
||||
$bookmarks = preg_replace('#<li ([^>]*)>#', '<li>', $bookmarks);
|
||||
$bookmarks = preg_replace('#<ul ([^>]*)>#', '<ul>', $bookmarks);
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<div id="linkspage">
|
||||
<ul>
|
||||
<?php echo $bookmarks; ?>
|
||||
</ul>
|
||||
<?php
|
||||
$linkcatid = get_term_by('name','menubar','link_category');
|
||||
$linkcatid = $linkcatid->term_id;
|
||||
$bookmarks = wp_list_bookmarks('echo=0&categorize=1&exclude_category='.$linkcatid);
|
||||
$bookmarks = preg_replace('#<li ([^>]*)>#', '<li>', $bookmarks);
|
||||
$bookmarks = preg_replace('#<ul ([^>]*)>#', '<ul>', $bookmarks);
|
||||
?>
|
||||
|
||||
<?php while (have_posts()) : the_post() ?>
|
||||
<div class="<?php comicpress_post_class(); ?>">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<?php if (function_exists('the_post_image')) {
|
||||
if ( has_post_image() ) { ?>
|
||||
<div class="post-page-image">
|
||||
<?php the_post_image('full'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!$comicpress_options['disable_page_titles']) { ?>
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<?php } ?>
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<br class="clear-margins" />
|
||||
<?php edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>') ?>
|
||||
<div id="linkspage">
|
||||
<ul>
|
||||
<?php echo $bookmarks; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
/* ComicPress Custom CSS over-rides for [ lynx ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
|
@ -2,35 +2,27 @@
|
|||
/*
|
||||
Template Name: Members Only Blog
|
||||
*/
|
||||
get_header();
|
||||
global $comicpress_options;
|
||||
remove_filter('pre_get_posts','comicpress_members_filter');
|
||||
include(get_template_directory() . '/layout-head.php');
|
||||
?>
|
||||
<?php get_header(); global $members_post_category; ?>
|
||||
<?php remove_filter('pre_get_posts','comicpress_members_filter'); ?>
|
||||
|
||||
if ($comicpress_options['enable_members_only']) {
|
||||
if ($comicpress_options['members_post_category'] && comicpress_is_member()) {
|
||||
$blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat='.$comicpress_options['members_post_category'].'&paged='.$paged;
|
||||
<?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);
|
||||
if (have_posts()) {
|
||||
while (have_posts()) : the_post();
|
||||
|
||||
while (have_posts()) : the_post();
|
||||
|
||||
comicpress_display_post();
|
||||
|
||||
endwhile;
|
||||
|
||||
}
|
||||
comicpress_pagination();
|
||||
} else {
|
||||
_e("This page is restricted to members only.",'comicpress');
|
||||
}
|
||||
} else {
|
||||
_e('Member\'s Only content is not enabled on this installation.');
|
||||
}
|
||||
display_blog_post();
|
||||
|
||||
endwhile;
|
||||
|
||||
comicpress_pagination();
|
||||
|
||||
get_sidebar('underblog');
|
||||
endif; ?>
|
||||
<?php get_sidebar('underblog'); ?>
|
||||
|
||||
include(get_template_directory() . '/layout-foot.php');
|
||||
|
||||
get_footer() ?>
|
||||
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
||||
<?php get_footer() ?>
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
/* ComicPress Custom CSS over-rides for [ gecko ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
.comicarchiveframe
|
||||
{
|
||||
-moz-opacity: 0.99; /* mozilla, netscape */
|
||||
opacity:0.99; /* firefox, opera, safari, chrome */
|
||||
-khtml-opacity: 0.99; /* khtml, old safari */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
-moz-opacity: 0.7; /* mozilla, netscape */
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
-khtml-opacity: 0.7; /* khtml, old safari */
|
||||
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
-moz-opacity: 0.5; /* mozilla, netscape, gecko */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
-khtml-opacity: 0.5; /* khtml, old safari */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
-moz-opacity: 0; /* mozilla, netscape */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
-khtml-opacity: 0.5; /* khtml, old safari */
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
background: #a1c0d9; /* Firefox */
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
/* selection colors */
|
||||
::selection {
|
||||
background: #ffb7b7; /* Safari */
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
/* ComicPress Custom CSS over-rides for [ ns4 ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
.comicarchiveframe {
|
||||
-moz-opacity: 0.99; /* mozilla, netscape */
|
||||
opacity:0.99; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
-moz-opacity: 0.7; /* mozilla, netscape */
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
-moz-opacity: 0.5; /* mozilla, netscape, gecko */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
-moz-opacity: 0; /* mozilla, netscape */
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/* ComicPress Custom CSS over-rides for [ opera ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
.comicarchiveframe {
|
||||
opacity:0.99; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
|
@ -1,179 +0,0 @@
|
|||
<div id="comicpress-addons">
|
||||
|
||||
<form method="post" id="myForm-addons" enctype="multipart/form-data" action="">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Custom Header','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_custom_image_header"><?php _e('Use Custom Header','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_custom_image_header" name="enable_custom_image_header" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_custom_image_header']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Adds Custom Header option under Dashboard -> Appearance. Allows you to add your own header image and customize or hide the default text.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="custom_image_header_width"><?php _e('Width','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="5" name="custom_image_header_width" id="custom_image_header_width" value="<?php echo $comicpress_options['custom_image_header_width']; ?>" /><br />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Sets the width of the image you want to use for Custom Header. Defaults widths are 780px or 980px depending on the layout. Refer to the width of the layout you chose and any custom changes you have made to site width in the CSS.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="custom_image_header_height"><?php _e('Height','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="5" name="custom_image_header_height" id="custom_image_header_height" value="<?php echo $comicpress_options['custom_image_header_height']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Sets the height of the image you want to use for Custom Header. Recommended maximum height is 120px, but if your logo/image demands it you can set it higher.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Members Only Content','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_members_only"><?php _e('Enable Members Only options?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_members_only" name="enable_members_only" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_members_only']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('When enabled this will allow all of the members only code to be active and working.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_members_only_post_comments"><?php _e('Enable Members only comment content?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_members_only_post_comments" name="enable_members_only_post_comments" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_members_only_post_comments']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('When enabled this will make all the content of each of the comments available to be seen only by users registered and set as members.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row" colspan="2">
|
||||
<label for="members_post_category"><?php _e('Members category','comicpress'); ?></label>
|
||||
<?php
|
||||
$select = wp_dropdown_categories('show_option_none=Select category&show_count=0&orderby=name&echo=0&selected='.$comicpress_options['members_post_category']);
|
||||
$select = preg_replace('#<select([^>]*)>#', '<select name="members_post_category" id="members_post_category">', $select);
|
||||
echo $select;
|
||||
?>
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('The category that is designated to show members only content.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<p><?php _e('USAGE: Edit the user with <em>Dashboard -> Users -> Authors & Users</em> and flag the user you want to be a member with the option at the bottom.','comicpress'); ?></p>
|
||||
<p><?php _e('Inside posts, add [members] content you only want members to see [/members]','comicpress'); ?></p>
|
||||
<p><?php _e('When setting a \'members\' category, you *cannot* use an existing comic category, uncategorized, or blog category!','comicpress'); ?></p>
|
||||
<p><?php _e('You MUST create a whole new category and called it "members", then you select that category here and create a page called "Members" or something equivelant and associate the Member\'s Only template to it.','comicpress'); ?></p>
|
||||
<p><?php _e('This will make it so that that category is only seen as blogposts inside that area and not anywhere else on the site unless the user has the members flag.','comicpress'); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Buy Print','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<th scope="row" colspan="2">
|
||||
<label for="buy_print_email"><?php _e('Paypal email address','comicpress'); ?></label>
|
||||
<input type="text" size="25" name="buy_print_email" id="buy_print_email" value="<?php echo $comicpress_options['buy_print_email']; ?>" />
|
||||
</th>
|
||||
<td>
|
||||
<span style="color: #d54e21;"><?php _e('* This must be correct, you do not want other people getting your money.','comicpress'); ?></span><br />
|
||||
<?php _e('The Email address you registered with Paypal and that your store is associated with.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"colspan="2">
|
||||
<label for="buy_print_url"><?php _e('URL of the template page','comicpress'); ?></label>
|
||||
<input type="text" size="25" name="buy_print_url" id="buy_print_url" value="<?php echo $comicpress_options['buy_print_url']; ?>" />
|
||||
</th>
|
||||
<td>
|
||||
<span style="color: #d54e21;"><?php _e('* This must be correct, the form needs some place to go.','comicpress'); ?></span><br />
|
||||
<?php _e('The URL address to which you associated the buy print template.','comicpress'); ?><br />
|
||||
<em>
|
||||
<?php _e('Examples:','comicpress'); ?>
|
||||
"http://yourdomain.com/?p=233",
|
||||
"http://yourdomain.com/shop/",
|
||||
"/?p=233",
|
||||
"/shop/".
|
||||
</em>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_add_shipping"><?php _e('Add shipping to each item','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="buy_print_add_shipping" name="buy_print_add_shipping" type="checkbox" value="1" <?php checked(true, $comicpress_options['buy_print_add_shipping']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Enabling this option will make it so that shipping costs will be added to each item purchased.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="buy_print_us_amount"><?php _e('Print Cost (US/Canada)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_us_amount" id="buy_print_us_amount" value="<?php echo $comicpress_options['buy_print_us_amount']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How much does a print cost for people in the United States and Canada?','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_us_ship"><?php _e('Shipping Cost (US/Canada)','comicpress'); ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" size="7" name="buy_print_us_ship" id="buy_print_us_ship" value="<?php echo $comicpress_options['buy_print_us_ship']; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="buy_print_int_amount"><?php _e('Print Cost (International)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_int_amount" id="buy_print_int_amount" value="<?php echo $comicpress_options['buy_print_int_amount']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How much does a print cost for people *NOT* in the United States and Canada (International)','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_int_ship"><?php _e('Shipping Cost (International)','comicpress'); ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" size="7" name="buy_print_int_ship" id="buy_print_int_ship" value="<?php echo $comicpress_options['buy_print_int_ship']; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
<input name="comicpress_save_customheader" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_addons" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,14 +1,14 @@
|
|||
<div id="comicpress-archivesearch">
|
||||
<div id="archivesearch" class="<?php if ($tab == 'archivesearch') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
|
||||
<form method="post" id="myForm-archivesearch" enctype="multipart/form-data" action="">
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
<div id="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Archive & Search Results','comicpress'); ?></th>
|
||||
<th colspan="3"><?php _e('Archive & Search Results','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
|
@ -55,23 +55,23 @@
|
|||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How many images in the comic category would you like to see in the archive page (-1 will display all available).','comicpress'); ?>
|
||||
<?php _e('How many images in the comic category would you like to see in the archive page?','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<input name="comicpress_save_archivesearch" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_archivesearch" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
<div id="buyprintoptions" class="<?php if ($tab == 'buyprint') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div id="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Buy Print','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<th scope="row" colspan="2">
|
||||
<label for="buy_print_email"><?php _e('Paypal email address','comicpress'); ?></label>
|
||||
<input type="text" size="25" name="buy_print_email" id="buy_print_email" value="<?php echo $comicpress_options['buy_print_email']; ?>" />
|
||||
</th>
|
||||
<td>
|
||||
<span style="color: #d54e21;"><?php _e('* This must be correct, you do not want other people getting your money.','comicpress'); ?></span><br />
|
||||
<?php _e('The Email address you registered with Paypal and that your store is associated with.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"colspan="2">
|
||||
<label for="buy_print_url"><?php _e('URL of the template page','comicpress'); ?></label>
|
||||
<input type="text" size="25" name="buy_print_url" id="buy_print_url" value="<?php echo $comicpress_options['buy_print_url']; ?>" />
|
||||
</th>
|
||||
<td>
|
||||
<span style="color: #d54e21;"><?php _e('* This must be correct, the form needs some place to go.','comicpress'); ?></span><br />
|
||||
<?php _e('The URL address to which you associated the buy print template.','comicpress'); ?><br />
|
||||
<em>
|
||||
<?php _e('Examples:','comicpress'); ?>
|
||||
"http://yourdomain.com/?p=233",
|
||||
"http://yourdomain.com/shop/",
|
||||
"/?p=233",
|
||||
"/shop/".
|
||||
</em>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_add_shipping"><?php _e('Add shipping to each item','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="buy_print_add_shipping" name="buy_print_add_shipping" type="checkbox" value="1" <?php checked(true, $comicpress_options['buy_print_add_shipping']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Enabling this option will make it so that shipping costs will be added to each item purchased.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="buy_print_us_amount"><?php _e('Print Cost (US/Canada)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_us_amount" id="buy_print_us_amount" value="<?php echo $comicpress_options['buy_print_us_amount']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How much does a print cost for people in the United States and Canada?','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_us_ship"><?php _e('Shipping Cost (US/Canada)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_us_ship" id="buy_print_us_ship" value="<?php echo $comicpress_options['buy_print_us_ship']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="buy_print_int_amount"><?php _e('Print Cost (International)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_int_amount" id="buy_print_int_amount" value="<?php echo $comicpress_options['buy_print_int_amount']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How much does a print cost for people *NOT* in the United States and Canada (International)','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="buy_print_int_ship"><?php _e('Shipping Cost (International)','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="buy_print_int_ship" id="buy_print_int_ship" value="<?php echo $comicpress_options['buy_print_int_ship']; ?>" />
|
||||
</td>
|
||||
<td/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<input name="comicpress_save_buyprint" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_buyprint" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,179 +0,0 @@
|
|||
<div id="comicpress-config">
|
||||
|
||||
<form method="post" id="myForm-config" enctype="multipart/form-data" action="">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="5"><?php _e('Configuration','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr class="alternate">
|
||||
<th scope="row">
|
||||
<label for="comiccat"><?php _e('Comic Category','comicpress'); ?></label>
|
||||
<?php
|
||||
$comiccat = $comicpress_options['comicpress_config']['comiccat'];
|
||||
$select = wp_dropdown_categories('show_option_all=Select category&hide_empty=0&show_count=0&orderby=name&echo=0&selected='.$comiccat);
|
||||
$select = preg_replace('#<select([^>]*)>#', '<select name="comiccat" id="comicccat">', $select);
|
||||
echo $select;
|
||||
?>
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('The category that is designated for the primary comic category.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="comiccat"><?php _e('Blog Category','comicpress'); ?></label>
|
||||
<?php
|
||||
$blogcat = $comicpress_options['comicpress_config']['blogcat'];
|
||||
$select = wp_dropdown_categories('show_option_all=Select category&hide_empty=0&show_count=0&orderby=name&echo=0&selected='.$blogcat);
|
||||
$select = preg_replace('#<select([^>]*)>#', '<select name="blogcat" id="blogcat">', $select);
|
||||
echo $select;
|
||||
?>
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('The primary blog category.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$dirs_to_search = array_unique(array(ABSPATH));
|
||||
$directories = array();
|
||||
foreach ($dirs_to_search as $dir) { $directories = array_merge($directories,glob("${dir}/*")); }
|
||||
|
||||
$current_directory = $comicpress_options['comicpress_config']['comic_folder'];
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="comic_folder"><?php _e('Comic Folder','comicpress'); ?></label>
|
||||
|
||||
<select name="comic_folder" id="comic_folder">
|
||||
<?php
|
||||
foreach ($directories as $dirs) {
|
||||
if (is_dir($dirs)) {
|
||||
$dir_name = basename($dirs); ?>
|
||||
<option class="level-0" value="<?php echo $dir_name; ?>" <?php if ($current_directory == $dir_name) { ?>selected="selected"<?php } ?>><?php echo $dir_name; ?></option>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('Choose a directory to get the original sized comics from.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$current_directory = $comicpress_options['comicpress_config']['rss_comic_folder'];
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><label for="rss_comic_folder"><?php _e('RSS Thumbnail Folder','comicpress'); ?></label>
|
||||
|
||||
<select name="rss_comic_folder" id="rss_comic_folder">
|
||||
<?php
|
||||
foreach ($directories as $dirs) {
|
||||
if (is_dir($dirs)) {
|
||||
$dir_name = basename($dirs); ?>
|
||||
<option class="level-0" value="<?php echo $dir_name; ?>" <?php if ($current_directory == $dir_name) { ?>selected="selected"<?php } ?>><?php echo $dir_name; ?></option>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('Choose a directory to get the RSS thumbnails from.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$current_directory = $comicpress_options['comicpress_config']['archive_comic_folder'];
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="archive_comic_folder"><?php _e('Archive Thumbnail Folder','comicpress'); ?></label>
|
||||
|
||||
<select name="archive_comic_folder" id="archive_comic_folder">
|
||||
<?php
|
||||
foreach ($directories as $dirs) {
|
||||
if (is_dir($dirs)) {
|
||||
$dir_name = basename($dirs); ?>
|
||||
<option class="level-0" value="<?php echo $dir_name; ?>" <?php if ($current_directory == $dir_name) { ?>selected="selected"<?php } ?>><?php echo $dir_name; ?></option>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('Choose a directory to get the ARCHIVE/SEARCH thumbnails from.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$current_directory = $comicpress_options['comicpress_config']['mini_comic_folder'];
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><label for="mini_comic_folder"><?php _e('Mini Thumbnail Folder','comicpress'); ?></label>
|
||||
|
||||
<select name="mini_comic_folder" id="mini_comic_folder">
|
||||
<?php
|
||||
foreach ($directories as $dirs) {
|
||||
if (is_dir($dirs)) {
|
||||
$dir_name = basename($dirs); ?>
|
||||
<option class="level-0" value="<?php echo $dir_name; ?>" <?php if ($current_directory == $dir_name) { ?>selected="selected"<?php } ?>><?php echo $dir_name; ?></option>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('Choose a directory to get the MINI thumbnails from. (for archive-comic-list, etc.)','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="rss_comic_width"><?php _e('RSS Thumbnail Width','comicpress'); ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" size="7" name="rss_comic_width" id="rss_comic_width" value="<?php echo $comicpress_options['comicpress_config']['rss_comic_width']; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="archive_comic_width"><?php _e('ARCHIVE Thumbnail Width','comicpress'); ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" size="7" name="archive_comic_width" id="archive_comic_width" value="<?php echo $comicpress_options['comicpress_config']['archive_comic_width']; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="mini_comic_width"><?php _e('MINI Thumbnail Width','comicpress'); ?></label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" size="7" name="mini_comic_width" id="mini_comic_width" value="<?php echo $comicpress_options['comicpress_config']['mini_comic_width']; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
<input name="comicpress_save_config" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_config" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,57 @@
|
|||
<div id="customheader" class="<?php if ($tab == 'customheader') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div id="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Custom Header','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_custom_image_header"><?php _e('Use Custom Header','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_custom_image_header" name="enable_custom_image_header" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_custom_image_header']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Adds Custom Header option under Dashboard -> Appearance. Allows you to add your own header image and customize or hide the default text.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="custom_image_header_width"><?php _e('Width','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="5" name="custom_image_header_width" id="custom_image_header_width" value="<?php echo $comicpress_options['custom_image_header_width']; ?>" /><br />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Sets the width of the image you want to use for Custom Header. Defaults widths are 780px or 980px depending on the layout. Refer to the width of the layout you chose and any custom changes you have made to site width in the CSS.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="custom_image_header_height"><?php _e('Height','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="5" name="custom_image_header_height" id="custom_image_header_height" value="<?php echo $comicpress_options['custom_image_header_height']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Sets the height of the image you want to use for Custom Header. Recommended maximum height is 120px, but if your logo/image demands it you can set it higher.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<input name="comicpress_save_customheader" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_customheader" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,9 +1,9 @@
|
|||
<div id="comicpress-general">
|
||||
<div id="generaloptions" class="<?php if ($tab == 'general') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
|
||||
<form method="post" id="myForm-general" enctype="multipart/form-data" action="">
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
<div id="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<input id="disable_page_restraints" name="disable_page_restraints" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_page_restraints']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Allows the width of your site to either be Dynamic (fills browser window) or Fixed (width is specified, e.g., 980px, 780px, etc.) If Dynamic is enabled #page and #page-wide will not load. This allow you to use the entire browser for your canvas instead of the 780px/980px that the two elements limit you to by default.','comicpress'); ?>
|
||||
<?php _e('Allows the width of your site to either be Dynamic (fills browser window) or Fixed (width is specified, e.g., 980px, 780px, etc.) If Dynamic is enabled #page and #page-wide will not load. This allow you to use the entire browser for your canvas instead of the 780px/980px that the two elements limit you to by default.','comicpress'); ?></th>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -41,40 +41,14 @@
|
|||
<tr>
|
||||
<th scope="row"><label for="disable_blogheader"><?php _e('Disable blog header','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_blogheader" name="disable_blogheader" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_blogheader']); ?> />
|
||||
<input id="disable_blogheader" name="disable_blogheader" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_blogheader']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Checkmark this and your site will not display the contents of #blogheader.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('RSS','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_comment_count_in_rss"><?php _e('Enable the comment count to show in feed title.','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_comment_count_in_rss" name="enable_comment_count_in_rss" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_comment_count_in_rss']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Will show how many comments there are in the title of the post in the feed.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_post_thumbnail_rss"><?php _e('Enable the post thumbnails in the RSS feed?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_post_thumbnail_rss" name="enable_post_thumbnail_rss" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_post_thumbnail_rss']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('If enabled will show the post thumbnail of the post in the RSS feed.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -105,37 +79,37 @@
|
|||
<input id="disable_default_comic_nav" name="disable_default_comic_nav" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_default_comic_nav']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('The default comic post navigation is above each comic blog post.','comicpress'); ?>
|
||||
<?php _e('Previous Entries and Next Entries buttons are replaced by a bar of numbered pages. The default comic post navigation is above each comic blog post.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
$current_gnav_directory = $comicpress_options['graphicnav_directory'];
|
||||
if (empty($current_gnav_directory)) $current_gnav_directory = 'default';
|
||||
$dirs_to_search = array_unique(array(get_template_directory(),get_stylesheet_directory()));
|
||||
$gnav_directories = array();
|
||||
foreach ($dirs_to_search as $dir) { $gnav_directories = array_merge($gnav_directories,glob("${dir}/images/nav/*")); }
|
||||
?>
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row" colspan="2"><label for="graphicnav_directory"><?php _e('Graphic Navigation Directory','comicpress'); ?></label>
|
||||
|
||||
<th scope="row" colspan="2"><label for="graphicnav_directory"><?php _e('Graphic Navigation Directory','comicpress'); ?></label>
|
||||
|
||||
<select name="graphicnav_directory" id="graphicnav_directory">
|
||||
<?php
|
||||
foreach ($gnav_directories as $gnav_dirs) {
|
||||
if (is_dir($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>
|
||||
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('Choose a directory to get the graphic navigation styling from. To create your own custom graphic navigation menu buttons just create a directory under <i>images/nav/</i> and place your image files inside of it and create a navstyle.css file to determine the style of your navigation display.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -143,7 +117,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_widgetarea_use_sidebar_css"><?php _e('Enable main Sidebar CSS for all sidebars','comicpress'); ?></label></th>
|
||||
<th scope="row"><label for="enable_widgetarea_use_sidebar_css"><?php _e('Enable main Sidebar CSS for all sidebars?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_widgetarea_use_sidebar_css" name="enable_widgetarea_use_sidebar_css" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_widgetarea_use_sidebar_css']); ?> />
|
||||
</td>
|
||||
|
@ -152,16 +126,16 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="disable_lrsidebars"><?php _e('Disable left and right sidebars','comicpress'); ?></label></th>
|
||||
<th scope="row"><label for="disable_lrsidebars_frontpage"><?php _e('Disable home page sidebars','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_lrsidebars" name="disable_lrsidebars" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_lrsidebars']); ?> />
|
||||
<input id="disable_lrsidebars_frontpage" name="disable_lrsidebars_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_lrsidebars_frontpage']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Your site will not display the default left/right sidebars. Minimalists dream. WARNING: Not recommended for use with Graphic Novel layouts.','comicpress'); ?>
|
||||
<?php _e('Your home page will not display the default left/right sidebars. Minimalists dream. WARNING: Not recommended for use with Graphic Novel layouts.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -177,64 +151,21 @@
|
|||
<?php _e('Default text in the footer will not display. Enable this if you do not want any text in the footer. If you wish to add you own custom content, you may do so via Appearance -> Widgets-> Footer.', 'comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_scroll_to_top"><?php _e('Enable the scroll to top link in the footer?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_scroll_to_top" name="enable_scroll_to_top" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_scroll_to_top']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('When this link is clicked on long pages it will scroll back to the top.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Debug','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_comicpress_debug"><?php _e('Enable the dashboard ComicPress debug?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_comicpress_debug" name="enable_comicpress_debug" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_comicpress_debug']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Default enabled, this will do some sanity checks on your ComicPress installation and report the findings on your dashboard.', 'comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_full_post_check"><?php _e('Enable checking EVERY post for category problems?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_full_post_check" name="enable_full_post_check" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_full_post_check']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Enable this if you would like to check ALL of your posts to see if there are any category problems and inconsistancies.', 'comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_page_load_info"><?php _e('Enable the page load info in the footer?','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_page_load_info" name="enable_page_load_info" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_page_load_info']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Will display information on how many queries and how fast it took to load the page in the footer.', 'comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<input name="comicpress_save_general" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_general" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<div id="comicpress-index">
|
||||
<div id="indexoptions" class="<?php if ($tab == 'index') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
|
||||
<form method="post" id="myForm-index" enctype="multipart/form-data" action="">
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
<div id="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -14,21 +14,12 @@
|
|||
<tr class="alternate">
|
||||
<th scope="row"><label for="disable_blog_frontpage"><?php _e('Disable the blog on the Home page','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_blog_frontpage" name="disable_blog_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_blog_frontpage']); ?> />
|
||||
<input id="disable_blog_frontpage" name="disable_blog_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_blog_frontpage']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Checkmark this and the blog will not display on the Home page of your site. The features allows to either not have a blog at all, or, if you place a menu link to your blog page, you can maintain your blog within the same site without readers having to see it when they are just trying to read your comic.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="blog_postcount"><?php _e('Blog Post Count','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" size="7" name="blog_postcount" id="blog_postcount" value="<?php echo $comicpress_options['blog_postcount']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How many blog posts you would like displayed on the index page at one time.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
|
@ -40,7 +31,7 @@
|
|||
<tr class="alternate">
|
||||
<th scope="row"><label for="disable_comic_frontpage"><?php _e('Disable comic on Home page','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_comic_frontpage" name="disable_comic_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_frontpage']); ?> />
|
||||
<input id="disable_comic_frontpage" name="disable_comic_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_frontpage']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Checkmark this and the comic will not display on the home page of your site. You can use the Latest Thumbnail widget to display your comic in a sidebar. Make sure you set the archive-thumbnail size to under 200px. Note: Turning this off and using the Graphic Novel style turns ComicPress into a blog only.','comicpress'); ?>
|
||||
|
@ -49,35 +40,35 @@
|
|||
<tr>
|
||||
<th scope="row"><label for="disable_comic_blog_frontpage"><?php _e('Disable the comic blog on Home page','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_comic_blog_frontpage" name="disable_comic_blog_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_blog_frontpage']); ?> />
|
||||
<input id="disable_comic_blog_frontpage" name="disable_comic_blog_frontpage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_blog_frontpage']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Checkmark this and the comic blog will not display on the Home Page. Enabling this allows you to either not have a comic blog at all, or you can place it where you want using the comic blog post widget. If there is no content in the post it will not display regardless.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="disable_comic_blog_single"><?php _e('Disable the comic blog on the single pages','comicpress'); ?></label></th>
|
||||
<th scope="row"><label for="disable_comic_blog_single"><?php _e('Disable the comic blog on the single pages','comicpress'); ?></lable></th>
|
||||
<td>
|
||||
<input id="disable_comic_blog_single" name="disable_comic_blog_single" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_blog_single']); ?> />
|
||||
<input id="disable_comic_blog_single" name="disable_comic_blog_single" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comic_blog_single']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Checkmark this and the blog portion of the comic will not display on the single/archive pages of your site.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<input name="comicpress_save_index" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_index" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<div id="membersoptions" class="<?php if ($tab == 'members') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div id="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e('Members Only Content','comicpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row">
|
||||
<label for="members_post_category"><?php _e('Members category','comicpress'); ?></label>
|
||||
<?php
|
||||
$select = wp_dropdown_categories('show_option_none=Select category&show_count=0&orderby=name&echo=0&selected='.$comicpress_options['members_post_category']);
|
||||
$select = preg_replace('#<select([^>]*)>#', '<select name="members_post_category" id="members_post_category">', $select);
|
||||
echo $select;
|
||||
?>
|
||||
</th>
|
||||
<td>
|
||||
<?php _e('The category that is designated to show members only content.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<p><?php _e('USAGE: Edit the user with <em>Dashboard -> Users -> Authors & Users</em> and flag the user you want to be a member with the option at the bottom.','comicpress'); ?></p>
|
||||
<p><?php _e('Inside posts, add [members] content you only want members to see [/members]','comicpress'); ?></p>
|
||||
<p><?php _e('When setting a \'members\' category, you *cannot* use an existing comic category, uncategorized, or blog category!','comicpress'); ?></p>
|
||||
<p><?php _e('You MUST create a whole new category and called it "members", then you select that category here and create a page called "Members" or something equivelant and associate the Member\'s Only template to it.','comicpress'); ?></p>
|
||||
<p><?php _e('This will make it so that that category is only seen as blogposts inside that area and not anywhere else on the site unless the user has the members flag.','comicpress'); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<input name="comicpress_save_members" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_members" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,9 +1,9 @@
|
|||
<div id="comicpress-menubar">
|
||||
<div id="menubaroptions" class="<?php if ($tab == 'menubar') { ?>show<?php } else { ?>hide<?php } ?>">
|
||||
|
||||
<form method="post" id="myForm-menubar" enctype="multipart/form-data" action="">
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
<div id="comicpress-options">
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<td>
|
||||
<?php _e('Allows you to customize the location of the Menubar via Widgets.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_search_in_menubar"><?php _e('Enable Search Form','comicpress'); ?></label></th>
|
||||
<td>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<td>
|
||||
<?php _e('Searchforms can be fun when you have something to search for.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="enable_rss_in_menubar"><?php _e('Enable RSS Link','comicpress'); ?></label></th>
|
||||
<td>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<td>
|
||||
<?php _e('Adds an RSS link icon to your menubar on the right side.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_navigation_in_menubar"><?php _e('Enable mini navigation','comicpress'); ?></label></th>
|
||||
<td>
|
||||
|
@ -46,7 +46,7 @@
|
|||
<td>
|
||||
<?php _e('Mini Navigation adds small previous and next arrows arrow to the right side of your Menubar.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="contact_in_menubar"><?php _e('Enable Contact/custom links','comicpress'); ?></label></th>
|
||||
<td>
|
||||
|
@ -55,39 +55,30 @@
|
|||
<td>
|
||||
<?php _e('Adds a Contact button to the Menubar associated with your admin email. You can also create a links category called <i>Menubar</i> and whatever links you add to that will appear in the Menubar.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="disable_dynamic_menubar_links"><?php _e('Disable auto-generated WordPress links','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_dynamic_menubar_links" name="disable_dynamic_menubar_links" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_dynamic_menubar_links']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Disable creation of the pages from the wordpress core.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="enable_blogroll_off_links"><?php _e('Enable the blogroll to appear as a dropdown off the Links page','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="enable_blogroll_off_links" name="enable_blogroll_off_links" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_blogroll_off_links']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Allows you to show a dropdown of your blogroll off the page created Links. When creating the links page, the name must be a capital-L lowercase inks for it to work.','comicpress'); ?>
|
||||
<?php _e('Allows you to use the links category <i>menubar</i> (you will need to create this category if it does not already exist) to create custom links on the Menubar (mostly used for making graphic images as links). Otherwise, ALL published pages will appear automatically.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comicpress-options-save">
|
||||
<div class="comicpress-major-publishing-actions">
|
||||
<div class="comicpress-publishing-action">
|
||||
<div id="comicpress-options-save">
|
||||
<div id="major-publishing-actions">
|
||||
<div id="publishing-action">
|
||||
<input name="comicpress_save_menubar" type="submit" class="button-primary" value="Save Settings" />
|
||||
<input type="hidden" name="action" value="comicpress_save_menubar" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|