resolve merge conflict
|
@ -4,3 +4,4 @@
|
|||
.settings/
|
||||
.DS_Store
|
||||
coverage/
|
||||
comicpress-config.php
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/* 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 */
|
||||
}
|
|
@ -0,0 +1,229 @@
|
|||
<?php
|
||||
|
||||
class ComicPressMediaHandling {
|
||||
var $root_filter = '%wordpress%/%type-folder%/';
|
||||
var $default_filter = '%wordpress%/%type-folder%/{date}*.*';
|
||||
var $default_filename_filter = '%date-Y-m-d%';
|
||||
|
||||
function _bundle_global_variables() {
|
||||
global $comic_folder, $archive_comic_folder, $rss_comic_folder, $mini_comic_folder;
|
||||
|
||||
$bundle = array();
|
||||
foreach (array('comic', 'archive', 'rss', 'mini') as $which) {
|
||||
switch ($which) {
|
||||
case 'comic':
|
||||
$bundle['comic'] = $comic_folder;
|
||||
break;
|
||||
default:
|
||||
$bundle[$which] = ${"${which}_comic_folder"};
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $bundle;
|
||||
}
|
||||
|
||||
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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$filter = $this->default_filter;
|
||||
if ($result = get_option('comicpress-manager-cpm-date-format')) {
|
||||
$filter = str_replace('{date}', "%date-${result}%", $filter);
|
||||
} else {
|
||||
$filter = str_replace('{date}', $this->default_filename_filter, $filter);
|
||||
}
|
||||
|
||||
return $filter;
|
||||
}
|
||||
|
||||
function _convert_to_percent_filter($old) {
|
||||
if (strpos(strtolower($old), '%wordpress%') !== 0) {
|
||||
$old = str_replace('{date}', '%date-Y-m-d%', $old);
|
||||
return $this->root_filter . $old;
|
||||
}
|
||||
return $old;
|
||||
}
|
||||
|
||||
function _expand_filter($filter, $type_folder, $override_post = null) {
|
||||
global $post;
|
||||
$this->post_to_use = !is_null($override_post) ? $override_post : $post;
|
||||
$this->type_folder = $type_folder;
|
||||
|
||||
$result = preg_replace_callback('#%([a-z0-9-]+)%#i', array(&$this, '_expand_filter_callback'), $filter);
|
||||
$result = str_replace('.', '\.', $result);
|
||||
$result = str_replace('*', '.*', $result);
|
||||
|
||||
unset($this->post_to_use);
|
||||
unset($this->type_folder);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function _get_regex_dirname($input) {
|
||||
return dirname($this->_resolve_regex_path($input));
|
||||
}
|
||||
|
||||
function _get_regex_filename($input) {
|
||||
$input = preg_replace('#\\\(?![.])#', '/', $input);
|
||||
return preg_replace('#^.*\/([^\/]+)$#', '$1', $input);
|
||||
}
|
||||
|
||||
function _resolve_regex_path($input) {
|
||||
$input = str_replace('\.', '.', $input);
|
||||
$input = str_replace('\\', '/', $input);
|
||||
return $input;
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
function _abspath() {
|
||||
return trailingslashit($this->_resolve_regex_path(realpath(ABSPATH)));
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
function _expand_filter_callback($matches) {
|
||||
$value = '';
|
||||
switch (strtolower($matches[1])) {
|
||||
case 'wordpress':
|
||||
$value = untrailingslashit($this->_abspath());
|
||||
break;
|
||||
case 'type-folder':
|
||||
$value = $this->type_folder;
|
||||
break;
|
||||
default:
|
||||
if (preg_match('#^date-(.*)$#', $matches[1], $date_matches) > 0) {
|
||||
if (isset($this->post_to_use)) {
|
||||
$value = date($date_matches[1], strtotime($this->post_to_use->post_date));
|
||||
break;
|
||||
}
|
||||
}
|
||||
$value = $matches[0];
|
||||
break;
|
||||
}
|
||||
return apply_filters('comicpress_expand_filter_callback', $value, $matches);
|
||||
}
|
||||
|
||||
function _read_directory($pattern) {
|
||||
$dirname = $this->_get_regex_dirname($pattern);
|
||||
$results = false;
|
||||
if (is_dir($dirname)) {
|
||||
$results = array();
|
||||
if (($dh = opendir($dirname)) !== false) {
|
||||
$filename_pattern = str_replace('#', '\#', $this->_get_regex_filename($pattern));
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
$target = $dirname . '/' . $file;
|
||||
if (is_file($target)) {
|
||||
if (preg_match("#^${filename_pattern}$#", $file) > 0) {
|
||||
$results[] = $target;
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
|
||||
function _check_post_meta_data($post_to_use, $type) {
|
||||
if ($result = get_post_meta($post_to_use->ID, "backend_url_${type}", true)) {
|
||||
if (is_string($result)) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
if ($result = get_post_meta($post_to_use->ID, "backend_url_images", true)) {
|
||||
$types = false;
|
||||
if (is_string($result)) {
|
||||
parse_str($result, $types);
|
||||
}
|
||||
if (is_array($result)) {
|
||||
$types = $result;
|
||||
}
|
||||
if (is_array($types)) {
|
||||
if (isset($types[$type])) {
|
||||
return $types[$type];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($result = get_post_meta($post_to_use->ID, "backend_url", true)) {
|
||||
if (is_string($result)) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function _ensure_valid_uri($uri, $type) {
|
||||
if (!empty($uri)) {
|
||||
if (substr($uri, 0, 1) == '/') {
|
||||
return $uri;
|
||||
} else {
|
||||
if (preg_match('#^[a-z]+://#', $uri) > 0) {
|
||||
return $uri;
|
||||
} else {
|
||||
$bundle = $this->_bundle_global_variables();
|
||||
if (isset($bundle[$type])) {
|
||||
$this->type_folder = $bundle[$type];
|
||||
} else {
|
||||
$this->type_folder = '';
|
||||
}
|
||||
|
||||
$uri = preg_replace_callback('#%([a-z0-9-]+)%#i', array(&$this, '_expand_filter_callback'), $uri);
|
||||
|
||||
return $uri;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the comic path.
|
||||
* @param string $type The type to retrieve.
|
||||
* @param object $override_post The post to use in place of the Loop post.
|
||||
* @param string $filter The filter to use.
|
||||
* @param boolean $multi If true, return all matching files.
|
||||
* @return string|array|boolean A single comic URI relative to the WordPress base, multiple comic URIs, or false if an error occurred.
|
||||
*/
|
||||
function get_comic_path($type = 'comic', $override_post = null, $filter = 'default', $multi = false) {
|
||||
global $post;
|
||||
$post_to_use = !is_null($override_post) ? $override_post : $post;
|
||||
|
||||
if ($uri = $this->_check_post_meta_data($post_to_use, $type)) {
|
||||
if ($result = $this->_ensure_valid_uri($uri, $type)) {
|
||||
return preg_replace('#^/#', '', $result);
|
||||
}
|
||||
}
|
||||
|
||||
$filter = $this->_get_filter($filter);
|
||||
$globals = $this->_bundle_global_variables();
|
||||
|
||||
if (isset($globals[$type])) {
|
||||
$filter = $this->_expand_filter($filter, $globals[$type], $post_to_use);
|
||||
if (is_array($results = $this->_read_directory($filter))) {
|
||||
if (($pre_handle = apply_filters('comicpress_pre_handle_comic_path_results', false, $results, $type, $post_to_use)) !== false) {
|
||||
return $pre_handle;
|
||||
}
|
||||
$new_results = array();
|
||||
foreach ($results as $result) {
|
||||
$new_results[] = str_replace($this->_abspath(), '', $result);
|
||||
}
|
||||
if ($multi) {
|
||||
return $new_results;
|
||||
} else {
|
||||
return reset($new_results);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
class ComicPressPostMediaHandlingMetabox {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
update_post_meta($post_id, 'backend_url_images', $result);
|
||||
}
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
function admin_menu() {
|
||||
add_meta_box('comicpress-post-media-handling', __('ComicPress Post Media', 'comicpress'), array('ComicPressPostMediaHandlingMetabox', 'metabox'), 'post', 'normal', 'low');
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
function metabox() {
|
||||
global $post;
|
||||
$media_info = get_post_meta($post->ID, 'backend_url_images', true);
|
||||
if (!is_array($media_info)) {
|
||||
$media_info = array();
|
||||
}
|
||||
|
||||
$nonce = wp_create_nonce('comicpress');
|
||||
$action_nonce = wp_create_nonce('comicpress-post-media-update');
|
||||
|
||||
include('partials/post-media-handling/metabox.inc');
|
||||
}
|
||||
}
|
||||
|
||||
add_action('admin_menu', array('ComicPressPostMediaHandlingMetabox', 'admin_menu'));
|
||||
add_action('save_post', array('ComicPressPostMediaHandlingMetabox', 'save_post'));
|
|
@ -0,0 +1,26 @@
|
|||
<input type="hidden" name="cp[_nonce]" value="<?php echo esc_attr($nonce) ?>" />
|
||||
<input type="hidden" name="cp[action]" value="post-media-update" />
|
||||
<input type="hidden" name="cp[post_id]" value="<?php echo $post->ID ?>" />
|
||||
<input type="hidden" name="cp[_action_nonce]" value="<?php echo esc_attr($action_nonce) ?>" />
|
||||
<p>
|
||||
<em>Enter in relative or absolute URLs to the images you want to use for this post. This will override file system searches.</em>
|
||||
</p>
|
||||
<table class="widefat">
|
||||
<?php
|
||||
foreach (array(
|
||||
'comic' => __('Comic', 'comicpress'),
|
||||
'rss' => __('RSS', 'comicpress'),
|
||||
'archive' => __('Archive', 'comicpress'),
|
||||
'mini' => __('Mini', 'comicpress')
|
||||
) as $field => $label) {
|
||||
$value = isset($media_info[$field]) ? $media_info[$field] : '';
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><?php echo esc_html($label) ?> URL</th>
|
||||
<td>
|
||||
<input type="text" style="width:100%" name="cp[urls][<?php echo esc_attr($field) ?>]" value="<?php echo esc_attr($value) ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
?>
|
||||
</table>
|
|
@ -29,5 +29,3 @@ $mini_comic_width = "80";
|
|||
|
||||
//Minithumb Comic Folder - The folder for your your mini thumbs (default "comics-mini")
|
||||
$mini_comic_folder = "comics-mini";
|
||||
|
||||
?>
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
function comicpress_notice_debug() {
|
||||
global $current_user, $comiccat, $blogcat, $comic_folder;
|
||||
|
||||
if( substr( $_SERVER[ 'PHP_SELF' ], -19 ) != '/wp-admin/index.php' )
|
||||
return;
|
||||
|
||||
$comicpress_options = comicpress_load_options();
|
||||
|
||||
$error = array();
|
||||
$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-config.php file or use ComicPress Manager - ComicPress Config','comicpress');
|
||||
}
|
||||
|
||||
// Check Comics Folder
|
||||
if (!is_dir(ABSPATH . '/' . $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 within the comicpress-config.php or you can configure it 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');
|
||||
}
|
||||
|
||||
// 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)) {
|
||||
?>
|
||||
<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
|
||||
?>
|
48
comments.php
|
@ -16,12 +16,11 @@ if ( post_password_required() ) { ?>
|
|||
|
||||
|
||||
<?php if ( ! empty($comments_by_type['comment']) ) : ?>
|
||||
<div class="commentsrsslink">[ <?php comments_rss_link('Comments RSS'); ?> ]</div>
|
||||
<h3 id="comments"><?php comments_number(__('Discussion ¬','comicpress'), __('Discussion ¬','comicpress'), __('Discussion (%) ¬','comicpress') );?></h3>
|
||||
|
||||
<h3 id="comments"><?php comments_number(__('Discussion ¬','comicpress'), __('Discussion ¬','comicpress'), __('Discussion (%) ¬','comicpress') );?></h3>
|
||||
<div class="commentsrsslink">[ <?php comments_rss_link('Comments RSS'); ?> ]</div>
|
||||
<ol class="commentlist">
|
||||
<?php
|
||||
if (function_exists('comicpress_comments_callback')) {
|
||||
<?php if (function_exists('comicpress_comments_callback')) {
|
||||
wp_list_comments(array(
|
||||
'type' => 'comment',
|
||||
'reply_text' => __('Reply to %s¬','comicpress'),
|
||||
|
@ -34,6 +33,28 @@ if ( post_password_required() ) { ?>
|
|||
wp_list_comments(array('type' => 'comment', 'avatar_size'=>64));
|
||||
}?>
|
||||
</ol>
|
||||
|
||||
<?php if ( ! empty($comments_by_type['pings']) ) : ?>
|
||||
<div id="pingtrackback-wrap">
|
||||
<h3 id="pingtrackback"><?php _e('Pings & Trackbacks ¬','comicpress'); ?></h3>
|
||||
<ol class="commentlist">
|
||||
<ul>
|
||||
<?php if (function_exists('comicpress_comments_callback')) {
|
||||
wp_list_comments(array(
|
||||
'type' => 'pings',
|
||||
'callback' => 'comicpress_comments_callback',
|
||||
'end-callback' => 'comicpress_comments_end_callback',
|
||||
'avatar_size'=>32
|
||||
)
|
||||
);
|
||||
} else {
|
||||
wp_list_comments(array('type' => 'pings', 'avatar_size'=>64));
|
||||
}?>
|
||||
</ul>
|
||||
</ol>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($comicpress_options['enable_numbered_pagination']) { ?>
|
||||
|
@ -110,26 +131,7 @@ if ( post_password_required() ) { ?>
|
|||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ! empty($comments_by_type['pings']) ) : ?>
|
||||
|
||||
<h3 id="comments"><?php _e('Pings & Trackbacks ¬','comicpress'); ?></h3>
|
||||
<ol class="commentlist">
|
||||
<ul>
|
||||
<?php
|
||||
if (function_exists('comicpress_comments_callback')) {
|
||||
wp_list_comments(array(
|
||||
'type' => 'pings',
|
||||
'callback' => 'comicpress_comments_callback',
|
||||
'end-callback' => 'comicpress_comments_end_callback',
|
||||
'avatar_size'=>32
|
||||
)
|
||||
);
|
||||
} else {
|
||||
wp_list_comments(array('type' => 'pings', 'avatar_size'=>64));
|
||||
}?>
|
||||
</ul>
|
||||
</ol>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<div id="comment-wrapper-foot"></div>
|
179
functions.php
|
@ -21,7 +21,7 @@ function __comicpress_widgets_init() {
|
|||
}
|
||||
|
||||
function __comicpress_init() {
|
||||
global $comicpress_options;
|
||||
global $comicpress_options, $__comicpress_handlable_classes;
|
||||
// Check if the $comicpress_options exist, if not set defaults
|
||||
$comicpress_options = comicpress_load_options();
|
||||
// xili-language plugin check
|
||||
|
@ -39,6 +39,31 @@ function __comicpress_init() {
|
|||
if (function_exists('id_get_comment_number')) {
|
||||
remove_filter('comments_number','id_get_comment_number');
|
||||
}
|
||||
|
||||
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 (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'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
add_action('widgets_init', '__comicpress_widgets_init');
|
||||
|
@ -75,8 +100,7 @@ function comicpress_load_options() {
|
|||
global $comicpress_options;
|
||||
$comicpress_options = get_option('comicpress_options');
|
||||
if (empty($comicpress_options)) {
|
||||
$comicpress_options['comicpress_version'] = '2.9.0.3';
|
||||
|
||||
$comicpress_options['comicpress_version'] = '2.9.0.5';
|
||||
foreach (array(
|
||||
'disable_comic_frontpage' => false,
|
||||
'disable_comic_blog_frontpage' => false,
|
||||
|
@ -153,7 +177,7 @@ function comicpress_load_options() {
|
|||
add_option('comicpress_options', $comicpress_options, '', 'yes');
|
||||
// update_option('comicpress_options', $comicpress_options);
|
||||
}
|
||||
$comicpress_options['comicpress_version'] = '2.9.0.3';
|
||||
$comicpress_options['comicpress_version'] = '2.9.0.5';
|
||||
update_option('comicpress_options', $comicpress_options);
|
||||
return $comicpress_options;
|
||||
}
|
||||
|
@ -170,39 +194,44 @@ function is_cp_theme_layout($choices) {
|
|||
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_content', '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) {
|
||||
// Widgets
|
||||
foreach (glob($dir . '/widgets/*.php') as $__file) { require_once($__file); }
|
||||
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)) {
|
||||
if (method_exists($__class_name, '__comicpress_init')) {
|
||||
add_action('comicpress_init', array($__class_name, '__comicpress_init'));
|
||||
}
|
||||
|
||||
// FUNCTIONS & Extra's
|
||||
foreach (glob($dir . '/functions/*.php') as $__file) { require_once($__file); }
|
||||
if (method_exists($__class_name, 'handle_update')) {
|
||||
$__comicpress_handlable_classes[] = $__class_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dashboard Menu Comicpress Options and ComicPress CSS
|
||||
require_once(get_template_directory() . '/comicpress-options.php');
|
||||
|
||||
// If any errors occur while searching for a comic file, the error messages will be pushed into here.
|
||||
$comic_pathfinding_errors = array();
|
||||
|
||||
// If ComicPress Manager is installed, use the date format defined there. If not, default to
|
||||
// Y-m-d.. It's best to use CPM's date definition for improved operability between theme and plugin.
|
||||
|
||||
if (defined("CPM_DATE_FORMAT")) {
|
||||
define("CP_DATE_FORMAT", CPM_DATE_FORMAT);
|
||||
} else {
|
||||
define("CP_DATE_FORMAT", "Y-m-d");
|
||||
}
|
||||
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.
|
||||
|
@ -218,7 +247,6 @@ if (defined("CPM_DATE_FORMAT")) {
|
|||
// Note that it's quite possible to slurp up the wrong file if your expressions are too broad.
|
||||
|
||||
$comic_filename_filters = array();
|
||||
$comic_filename_filters['default'] = "{date}*.*";
|
||||
|
||||
// load all of the comic & non-comic category information
|
||||
add_action('init', 'get_all_comic_categories');
|
||||
|
@ -428,61 +456,8 @@ function get_adjacent_storyline_category_id($next = false) {
|
|||
*/
|
||||
|
||||
function get_comic_path($folder = 'comic', $override_post = null, $filter = 'default', $multi = null) {
|
||||
global $post, $comic_filename_filters, $comic_folder, $archive_comic_folder, $rss_comic_folder, $mini_comic_folder, $comic_pathfinding_errors, $wpmu_version;
|
||||
|
||||
if (isset($comic_filename_filters[$filter])) {
|
||||
$filter_to_use = $comic_filename_filters[$filter];
|
||||
} else {
|
||||
$filter_to_use = '{date}*.*';
|
||||
}
|
||||
|
||||
switch ($folder) {
|
||||
case "rss": $folder_to_use = $rss_comic_folder; break;
|
||||
case "archive": $folder_to_use = $archive_comic_folder; break;
|
||||
case "mini": $folder_to_use = $mini_comic_folder; break;
|
||||
case "comic": default: $folder_to_use = $comic_folder; break;
|
||||
}
|
||||
|
||||
if (!empty($wpmu_version)) {
|
||||
if (($wpmu_path = get_option('upload_path')) !== false) {
|
||||
$folder_to_use = $wpmu_path . '/' . $folder_to_use;
|
||||
}
|
||||
}
|
||||
|
||||
$post_to_use = (is_object($override_post)) ? $override_post : $post;
|
||||
$post_date = mysql2date(CP_DATE_FORMAT, $post_to_use->post_date);
|
||||
|
||||
$filter_with_date = str_replace('{date}', $post_date, $filter_to_use);
|
||||
|
||||
$cwd = get_stylesheet_directory();
|
||||
if ($cwd !== false) {
|
||||
// Strip the wp-admin part and just get to the root.
|
||||
$root_path = preg_replace('#[\\/]wp-(admin|content).*#', '', $cwd);
|
||||
}
|
||||
|
||||
$results = array();
|
||||
/* have to use root_path to get subdirectory installation directories */
|
||||
if (count($results = glob("${root_path}/${folder_to_use}/${filter_with_date}")) > 0) {
|
||||
|
||||
if (!empty($wpmu_version)) {
|
||||
$comic = reset($results);
|
||||
$comic = $folder_to_use . '/'. basename($comic);
|
||||
if ($wpmu_path !== false) { $comic = str_replace($wpmu_path, "files", $comic); }
|
||||
return $comic;
|
||||
}
|
||||
|
||||
if (!empty($multi)) {
|
||||
return $results;
|
||||
} else {
|
||||
/* clear the root path */
|
||||
$comic = reset($results);
|
||||
$comic = $folder_to_use .'/'. basename($comic);
|
||||
return $comic;
|
||||
}
|
||||
}
|
||||
|
||||
$comic_pathfinding_errors[] = sprintf(__("Unable to find the file in the <strong>%s</strong> folder that matched the pattern <strong>%s</strong>. Check your WordPress and ComicPress settings.", 'comicpress'), $folder_to_use, $filter_with_date);
|
||||
return false;
|
||||
$mh = new ComicPressMediaHandling();
|
||||
return $mh->get_comic_path($folder, $override_post, $filter, $multi);
|
||||
}
|
||||
|
||||
|
||||
|
@ -493,16 +468,13 @@ function get_comic_path($folder = 'comic', $override_post = null, $filter = 'def
|
|||
* @param string $filter The $comic_filename_filters to use.
|
||||
* @return string The absolute URL to the comic file, or false if not found.
|
||||
*/
|
||||
function get_comic_url($folder = 'comic', $override_post = null, $filter = 'default') {
|
||||
if (($result = get_comic_path($folder, $override_post, $filter)) !== false) {
|
||||
return get_bloginfo('wpurl') . '/' . $result;
|
||||
} else {
|
||||
if (($result = get_comic_path('comic', $override_post, $filter)) !== false) {
|
||||
$basecomic = basename($result);
|
||||
return get_bloginfo('wpurl') . '/' . $result;
|
||||
function get_comic_url($type = 'comic', $override_post = null, $filter = 'default') {
|
||||
foreach (array_unique(array($type, 'comic')) as $which_type) {
|
||||
if (($result = get_comic_path($which_type, $override_post, $filter)) !== false) {
|
||||
return trailingslashit(get_bloginfo('url')) . $result;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -638,22 +610,10 @@ function in_comic_category() {
|
|||
// ComicPress Template Functions
|
||||
|
||||
function the_comic_filename($filter = 'default') { return get_comic_filename('comic',null, $filter); }
|
||||
|
||||
function the_comic($filter = 'default') { echo get_comic_url('comic', null, $filter); }
|
||||
//The following is deprecated...
|
||||
function comic_display($filter = 'default') { echo get_comic_url('comic', null, $filter); }
|
||||
|
||||
function the_comic_archive($filter = 'default') { echo get_comic_url('archive', null, $filter); }
|
||||
//The following is deprecated...
|
||||
function comic_archive($filter = 'default') { echo get_comic_url('archive', null, $filter); }
|
||||
|
||||
function the_comic_rss($filter = 'default') { echo get_comic_url('rss', null, $filter); }
|
||||
//The following is deprecated...
|
||||
function comic_rss($filter = 'default') { echo get_comic_url('rss', null, $filter); }
|
||||
|
||||
function the_comic_mini($filter = 'default') { echo get_comic_url('mini', null, $filter); }
|
||||
//The following is deprecated...
|
||||
function comic_mini($filter = 'default') { echo get_comic_url('mini', null, $filter); }
|
||||
|
||||
/**
|
||||
* Display the list of Storyline categories.
|
||||
|
@ -879,26 +839,3 @@ function comicpress_gnav_display_css() {
|
|||
}
|
||||
|
||||
if (comicpress_check_child_file('childfunctions') == false) {}
|
||||
|
||||
/**
|
||||
* Render the ComicPress calendar widget.
|
||||
*/
|
||||
function comicpress_calendar() {
|
||||
$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() {
|
||||
$bookmark = new BookmarkWidget();
|
||||
$bookmark->init();
|
||||
$bookmark->widget(array(), array());
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -21,34 +21,28 @@ function comicpress_avatar() {
|
|||
|
||||
$comment_type = get_comment_type();
|
||||
|
||||
if($comment_type == 'trackback') :
|
||||
$avatar = '/images/trackback.png';
|
||||
|
||||
elseif($comment_type == 'pingback') :
|
||||
$avatar = '/images/pingback.png';
|
||||
|
||||
elseif(get_settings('avatar_default')):
|
||||
if(get_settings('avatar_default')):
|
||||
$avatar = get_settings('avatar_default');
|
||||
|
||||
endif;
|
||||
|
||||
// $avatar = apply_filters('comicpress_avatar', $avatar);
|
||||
if ($comment_type != 'pingback' && $comment_type != 'trackback') {
|
||||
echo '<div class="comment-avatar">';
|
||||
if($url == true && $url != 'http://')
|
||||
echo '<a href="' . $url . '" rel="external nofollow" title="' . wp_specialchars(get_comment_author(), 1) . '">';
|
||||
$id_or_email = get_comment_author_email();
|
||||
if (empty($id_or_email)) $id_or_email = get_comment_author();
|
||||
if(function_exists('comicpress_get_avatar') && $comment_type != 'pingback' && $comment_type != 'trackback' ) {
|
||||
echo str_replace("alt='", "alt='".wp_specialchars(get_comment_author(), 1)."' title='".wp_specialchars(get_comment_author(), 1), comicpress_get_avatar($id_or_email, 72));
|
||||
} else {
|
||||
if ($comment_type == 'pingback' || $comment_type == 'trackback') {
|
||||
echo '<img src="'.get_template_directory_uri().'/'.$avatar.'" class="photo trackping" />';
|
||||
echo str_replace("alt='", "alt='".wp_specialchars(get_comment_author(), 1)."' title='".wp_specialchars(get_comment_author(), 1), comicpress_get_avatar($id_or_email, 64));
|
||||
} else {
|
||||
echo '<img src="'.get_template_directory_uri().'/'.$avatar.'" class="avatar photo" />';
|
||||
}
|
||||
}
|
||||
|
||||
if($url == true && $url != 'http://')
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -123,40 +117,40 @@ function comicpress_comments_callback($comment, $args, $depth) {
|
|||
|
||||
<li id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>
|
||||
|
||||
<div class="comment-avatar">
|
||||
<?php comicpress_avatar(); // Avatar filter ?>
|
||||
</div>
|
||||
|
||||
<div class="comment-content">
|
||||
|
||||
<div class="comment-meta-data">
|
||||
|
||||
<div class="comment-author vcard">
|
||||
<?php comicpress_comment_author(); ?><br />
|
||||
<?php comicpress_comment_author(); ?>
|
||||
</div>
|
||||
|
||||
<div class="comment-meta-data">
|
||||
|
||||
<span class="comment-time" title="<?php comment_date(__('l, F jS, Y, g:i a','comicpress')); ?>">
|
||||
<?php printf(__('%1$s at %2$s','comicpress'), get_comment_date(), get_comment_time()); ?>
|
||||
</span>
|
||||
|
||||
<span class="separator">|</span> <a class="permalink" href="#comment-<?php echo str_replace('&', '&', get_comment_ID()); ?>" title="<?php _e('Permalink to comment','comicpress'); ?>"><?php _e('Permalink','comicpress'); ?></a>
|
||||
<?php
|
||||
if((get_option('thread_comments')) && ($args['type'] == 'all' || get_comment_type() == 'comment')) :
|
||||
<span class="comment-permalink">
|
||||
<span class="separator">|</span> <a href="#comment-<?php echo str_replace('&', '&', get_comment_ID()); ?>" title="<?php _e('Permalink to comment','comicpress'); ?>"><?php _e('#','comicpress'); ?></a>
|
||||
</span>
|
||||
|
||||
<?php if((get_option('thread_comments')) && ($args['type'] == 'all' || get_comment_type() == 'comment')) :
|
||||
$max_depth = get_option('thread_comments_depth');
|
||||
echo comment_reply_link(array(
|
||||
'reply_text' => __('Reply','comicpress'),
|
||||
'login_text' => __('Log in to reply.','comicpress'),
|
||||
'login_text' => __('Login to Reply','comicpress'),
|
||||
'depth' => $depth,
|
||||
'max_depth' => $max_depth,
|
||||
'before' => '<span class="separator">|</span> <span class="comment-reply-link">',
|
||||
'before' => '<span class="comment-reply-link"><span class="separator">|</span> ',
|
||||
'after' => '</span>'
|
||||
));
|
||||
endif;
|
||||
?>
|
||||
endif; ?>
|
||||
|
||||
<?php edit_comment_link('<span class="edit">'.__('Edit','comicpress').'</span>',' <span class="separator">|</span> ',''); ?>
|
||||
|
||||
<?php if($comment->comment_approved == '0') : ?>
|
||||
<div class="comment-moderated"><em><?php _e('Your comment is awaiting moderation.','comicpress'); ?></em></div>
|
||||
<div class="comment-moderated"><?php _e('Your comment is awaiting moderation.','comicpress'); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
@ -166,8 +160,11 @@ function comicpress_comments_callback($comment, $args, $depth) {
|
|||
<?php comment_text(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php }
|
||||
|
||||
/**
|
||||
|
|
|
@ -64,7 +64,7 @@ function display_blog_post() {
|
|||
<?php } ?>
|
||||
<?php
|
||||
if ('open' == $post->comment_status) {
|
||||
if (comicpress_check_child_file('partials/commentlink') == false) { ?>
|
||||
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 }
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ function display_comic_post() {
|
|||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ('open' == $post->comment_status) {
|
||||
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 }
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
/**
|
||||
* Syndication - Feed Count Capturing & adding comic to feed.
|
||||
* Author: Philip M. Hofer (Frumph)
|
||||
* In Testing
|
||||
*/
|
||||
/*
|
||||
|
||||
function cp_add_to_feed_count_rss() {
|
||||
$feedcount = get_option('comicpress_feed_count_rss');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_rss', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_rss', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
||||
add_action('do_feed_rss', 'cp_add_to_feed_count_rss',5);
|
||||
|
||||
|
||||
function cp_add_to_feed_count_rdf() {
|
||||
$feedcount = get_option('comicpress_feed_count_rdf');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_rdf', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_rdf', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
||||
add_action('do_feed_rdf', 'cp_add_to_feed_count_rdf',5);
|
||||
|
||||
|
||||
function cp_add_to_feed_count_atom() {
|
||||
$feedcount = get_option('comicpress_feed_count_atom');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_atom', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_atom', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
||||
add_action('do_feed_atom', 'cp_add_to_feed_count_atom',5);
|
||||
|
||||
function cp_add_to_feed_count_rss2() {
|
||||
$feedcount = get_option('comicpress_feed_count_rss2');
|
||||
if (!empty($feedcount)) {
|
||||
$feedcount = $feedcount + 1;
|
||||
update_option('comicpress_feed_count_rss2', $feedcount);
|
||||
} else {
|
||||
add_option('comicpress_feed_count_rss2', 1, ' ', 'yes');
|
||||
}
|
||||
}
|
||||
|
||||
add_action('do_feed_rss2', 'cp_add_to_feed_count_rss2',5);
|
||||
*/
|
||||
?>
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -0,0 +1,48 @@
|
|||
<?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 ArchiveDropdownWidget();
|
||||
$archive->widget(array(), array('mode' => 'monthly_archive'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the comic archive dropdown widget
|
||||
*/
|
||||
function comicpress_archive_dropdown_comics() {
|
||||
$archive = new ArchiveDropdownWidget();
|
||||
$archive->widget(array(), array('mode' => 'comic_archive'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the storyline order dropdown widget
|
||||
*/
|
||||
function comicpress_archive_dropdown_storyline() {
|
||||
$archive = new ArchiveDropdownWidget();
|
||||
$archive->widget(array(), array('mode' => 'storyline_order'));
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
function _comicpress_pre_handle_comic_path_results($return, $results, $type, $post_to_use) {
|
||||
global $wpmu_version;
|
||||
|
||||
if (!empty($wpmu_version)) {
|
||||
$globals = ComicPressMediaHandling::_bundle_global_variables();
|
||||
|
||||
$comic = $globals[$type] . '/'. basename(reset($results));
|
||||
|
||||
if (($wpmu_path = get_option('upload_path')) !== false) {
|
||||
$comic = str_replace($wpmu_path, "files", $comic);
|
||||
}
|
||||
return $comic;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function _comicpress_expand_filter_callback($value, $matches) {
|
||||
global $wpmu_version;
|
||||
|
||||
if (!empty($wpmu_version)) {
|
||||
if (strtolower($matches[1]) == 'wordpress') {
|
||||
if ($path = get_option('upload_path')) {
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
add_filter('comicpress_pre_handle_comic_path_results', '_comicpress_pre_handle_comic_path_results', 10, 4);
|
||||
add_filter('comicpress_expand_filter_callback', '_comicpress_expand_filter_callback', 10, 2);
|
|
@ -1,29 +0,0 @@
|
|||
/* 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 */
|
||||
}
|
|
@ -35,7 +35,6 @@
|
|||
<?php get_sidebar('above'); ?>
|
||||
|
||||
<div id="page-head"></div>
|
||||
|
||||
<?php if (!$comicpress_options['disable_page_restraints']) {
|
||||
if (is_cp_theme_layout('standard,v')) { ?>
|
||||
<div id="page-wrap"><!-- Wraps outside the site width -->
|
||||
|
|
13
ie_style.css
|
@ -1,13 +0,0 @@
|
|||
/* 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;
|
||||
}
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
|
@ -8,6 +8,10 @@
|
|||
<div id="pagewrap-right">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v3cr')) { ?>
|
||||
<div id="pagewrap-left">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
|
@ -43,6 +47,11 @@
|
|||
<?php get_sidebar('overblog'); ?>
|
||||
<?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('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
<?php if (comicpress_check_child_file('layout-foot') == false) { ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (is_cp_theme_layout('3c2r')) {
|
||||
<?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')) {
|
||||
get_sidebar('left');
|
||||
} ?>
|
||||
|
||||
<?php
|
||||
if (is_cp_theme_layout('3c,v3c,gn,standard,v,3c2r')) {
|
||||
if (is_cp_theme_layout('3c,v3c,gn,standard,v,3c2r,v3cr')) {
|
||||
get_sidebar('right'); ?>
|
||||
<?php } ?>
|
||||
|
||||
|
|
|
@ -9,9 +9,8 @@
|
|||
<div id="pagewrap-right">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
<?php if (is_cp_theme_layout('v3cr')) { ?>
|
||||
<div id="pagewrap-left">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('3c,standard,3c2r')) { ?>
|
||||
|
@ -22,6 +21,11 @@
|
|||
<?php get_sidebar('overblog'); ?>
|
||||
<?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('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
/* ComicPress Custom CSS over-rides for [ lynx ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
|
@ -1,42 +0,0 @@
|
|||
/* 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 */
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
/* 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 */
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/* ComicPress Custom CSS over-rides for [ opera ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
.comicarchiveframe {
|
||||
opacity:0.99; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('How many images in the comic category would you like to see in the archive page?','comicpress'); ?>
|
||||
<?php _e('How many images in the comic category would you like to see in the archive page (-1 will display all available).','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<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('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'); ?>
|
||||
<?php _e('The default comic post navigation is above each comic blog post.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
|
|
@ -250,7 +250,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<th scope="row"><label for="blogposts_with_comic"><?php _e('Show all blog posts up until the next comic post on single pages?','comicpress'); ?></label></th>
|
||||
<th scope="row"><label for="blogposts_with_comic"><?php _e('Show all blog posts up until the next comic post on single pages','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="blogposts_with_comic" name="blogposts_with_comic" type="checkbox" value="1" <?php checked(true, $comicpress_options['blogposts_with_comic']); ?> />
|
||||
</td>
|
||||
|
@ -264,7 +264,7 @@
|
|||
<input id="static_blog" name="static_blog" type="checkbox" value="1" <?php checked(true, $comicpress_options['static_blog']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Blog will stay with the single pages, good to use with comments disabled in the settings.','comicpress'); ?>
|
||||
<?php _e('Blog will stay with the single pages, this will automatically disable any commenting ability for comic blog posts. ','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
<option class="level-0" value="3c" <?php if ($comicpress_options['cp_theme_layout'] =='3c') { ?>selected="selected" <?php } ?>><?php _e('3 Column - Standard ','comicpress'); ?></option>
|
||||
<option class="level-0" value="3c2r" <?php if ($comicpress_options['cp_theme_layout'] =='3c2r') { ?>selected="selected" <?php } ?>><?php _e('3 Column - Double Right Sidebar','comicpress'); ?></option>
|
||||
<option class="level-0" value="v3c" <?php if ($comicpress_options['cp_theme_layout'] =='v3c') { ?>selected="selected" <?php } ?>><?php _e('3 Column - Vertical','comicpress'); ?></option>
|
||||
<option class="level-0" value="v3cr" <?php if ($comicpress_options['cp_theme_layout'] =='v3c') { ?>selected="selected" <?php } ?>><?php _e('3 Column - Vertical Double Right Sidebar','comicpress'); ?></option>
|
||||
<option class="level-0" value="gn" <?php if ($comicpress_options['cp_theme_layout'] =='gn') { ?>selected="selected" <?php } ?>><?php _e('Graphic Novel - Left Sidebar','comicpress'); ?></option>
|
||||
<option class="level-0" value="rgn" <?php if ($comicpress_options['cp_theme_layout'] =='rgn') { ?>selected="selected" <?php } ?>><?php _e('Graphic Novel - Right Sidebar','comicpress'); ?></option>
|
||||
</select>
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
/* ComicPress Custom CSS over-rides for [ safari ]: ComicPress - 2.8 */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
.comicarchiveframe {
|
||||
-khtml-opacity: 0.99; /* khtml, old safari */
|
||||
}
|
||||
|
||||
.comicarchiveframe:hover {
|
||||
opacity:0.70; /* firefox, opera, safari, chrome */
|
||||
-khtml-opacity: 0.7; /* khtml, old safari */
|
||||
|
||||
}
|
||||
|
||||
.imagenav-link img {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
-khtml-opacity: 0.5; /* khtml, old safari */
|
||||
}
|
||||
|
||||
.imagenav-link img:hover {
|
||||
opacity:0.5; /* firefox, opera, safari, chrome */
|
||||
-khtml-opacity: 0.5; /* khtml, old safari */
|
||||
}
|
||||
|
||||
/* Supports: car, both, horizontal, none, vertical */
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
/* selection colors */
|
||||
::selection {
|
||||
background: #ffb7b7; /* Safari */
|
||||
}
|
BIN
screenshot.png
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 26 KiB |
|
@ -6,7 +6,7 @@
|
|||
<div class="sidebar">
|
||||
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Sidebar') ) : ?>
|
||||
<div class="widget">
|
||||
<?php comicpress_calendar() ?>
|
||||
<?php comicpress_calendar_embed() ?>
|
||||
</div>
|
||||
<div class="widget">
|
||||
<?php comicpress_archive_dropdown(); ?>
|
||||
|
|
|
@ -4,13 +4,12 @@ if (!$comicpress_options['disable_lrsidebars_frontpage']) { ?>
|
|||
<div class="sidebar-head"></div>
|
||||
<div class="sidebar">
|
||||
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Right Sidebar') ) : ?>
|
||||
<?php
|
||||
comicpress_comic_bookmark()
|
||||
?>
|
||||
|
||||
<div class="widget">
|
||||
<?php comicpress_comic_bookmark_embed(); ?>
|
||||
</div>
|
||||
<?php if (is_cp_theme_layout('standard,v')) { ?>
|
||||
<div class="widget">
|
||||
<?php comicpress_calendar(); ?>
|
||||
<?php comicpress_calendar_embed(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="widget">
|
||||
|
|
15
single.php
|
@ -1,5 +1,4 @@
|
|||
<?php get_header(); global $comicpress_options; ?>
|
||||
|
||||
<div id="content-wrapper-head"></div>
|
||||
<div id="content-wrapper">
|
||||
|
||||
|
@ -9,6 +8,10 @@
|
|||
<div id="pagewrap-right">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v3cr')) { ?>
|
||||
<div id="pagewrap-left">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (is_cp_theme_layout('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
|
@ -37,12 +40,16 @@
|
|||
<?php get_sidebar('overblog'); ?>
|
||||
<?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('v3c,v')) { ?>
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="column">
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post();
|
||||
if (in_comic_category()) {
|
||||
if (!$comicpress_options['disable_comic_blog_single']) {
|
||||
|
@ -116,9 +123,9 @@
|
|||
$post = $temppost; $wp_query = $temp_query; $temppost = null; $temp_query = null;
|
||||
}
|
||||
}
|
||||
if ('open' == $post->comment_status) {
|
||||
|
||||
comments_template('', true);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php else: ?>
|
||||
|
|
213
style.css
|
@ -13,6 +13,8 @@ http://www.opensource.org/licenses/gpl-3.0.html
|
|||
|
||||
/* STANDARD TAGS */
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Arial', sans-serif;
|
||||
|
@ -48,7 +50,7 @@ img {
|
|||
}
|
||||
|
||||
small {
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
hr {
|
||||
|
@ -68,12 +70,11 @@ blockquote {
|
|||
border-color: #000;
|
||||
}
|
||||
|
||||
cite {
|
||||
blockquote cite {
|
||||
margin: 5px 0 0;
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-family: 'Arial', sans-serif;
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
@ -168,6 +169,10 @@ h3, h3 a {
|
|||
list-style: none;
|
||||
}
|
||||
|
||||
.ie #menubar {
|
||||
zoom: 1; /* IE fix, allows for variable height menu */
|
||||
}
|
||||
|
||||
#menunav {
|
||||
float: right;
|
||||
text-align: center;
|
||||
|
@ -414,6 +419,13 @@ h3, h3 a {
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
#pagewrap-left {
|
||||
width: 560px;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
#subcontent-wrapper {
|
||||
clear: both;
|
||||
}
|
||||
|
@ -472,7 +484,7 @@ h3, h3 a {
|
|||
|
||||
.post-info, .post-comic-info {
|
||||
padding-bottom: 5px;
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.post-text, .post-comic-text {
|
||||
|
@ -594,35 +606,76 @@ h3, h3 a {
|
|||
|
||||
/* COMMENTS */
|
||||
|
||||
#comment-wrapper {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.comment {
|
||||
padding: 2px;
|
||||
clear: both;
|
||||
display: block;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.comment .comment {
|
||||
margin-left: 30px;
|
||||
margin: 10px 0 0 70px;
|
||||
}
|
||||
|
||||
.comment .avatar {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
.comment .comment .comment {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.comment-avatar {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.comment .comment .comment-avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.comment .comment .avatar {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.comment .trackping {
|
||||
float: left;
|
||||
.comment-content {
|
||||
margin-left: 70px;
|
||||
}
|
||||
|
||||
#comment-wrapper #respond {
|
||||
.comment .comment .comment-content {
|
||||
margin-left: 45px;
|
||||
}
|
||||
|
||||
|
||||
.comment-author cite {
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.comment .comment .comment-author cite {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.comment-meta-data {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.comment .comment .comment-permalink {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.comment-moderated {
|
||||
font-style: italic;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.comment-text {
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.comment-text p {
|
||||
padding: 5px 5px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.comment-note {
|
||||
|
@ -631,55 +684,12 @@ h3, h3 a {
|
|||
font-size: 11px;
|
||||
}
|
||||
|
||||
.comment-text {
|
||||
font-size: 13px;
|
||||
padding: 10px 5px 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.comment-author {
|
||||
padding-left: 5px;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.comment-author cite {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.comment .comment .comment-author cite {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.comment-time {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.comment-moderated em {
|
||||
color: #f00;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
li.comment {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.comment-meta-data {
|
||||
}
|
||||
|
||||
.comment-meta {
|
||||
display: inline;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.says {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.commentsrsslink {
|
||||
float: right;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
|
@ -704,7 +714,6 @@ h3, h3 a {
|
|||
ol.commentlist {
|
||||
margin: 0;
|
||||
padding: 10px 0 30px 0;
|
||||
font-size: 11px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
|
@ -718,11 +727,27 @@ ul.children {
|
|||
list-style: none;
|
||||
}
|
||||
|
||||
.reply {
|
||||
padding: 10px 0 0 0;
|
||||
text-align: right;
|
||||
#respond {
|
||||
padding: 20px 0 0 0;
|
||||
}
|
||||
|
||||
/* Pingbacks and Trackbacks */
|
||||
|
||||
#pingtrackback {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.pingback .comment-content, .trackback .comment-content {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.trackback .comment-author cite, .pingback .comment-author cite {
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
|
||||
/* ARCHIVE */
|
||||
/* For the built-in WordPress archive pages (by month or category) as well as search result pages */
|
||||
|
||||
|
@ -731,11 +756,34 @@ ul.children {
|
|||
padding: 2px 2px 6px 2px;
|
||||
}
|
||||
|
||||
.comicarchiveframe img {
|
||||
border: 1px solid #000;
|
||||
.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 */
|
||||
}
|
||||
|
||||
.comicarchiveframe img {
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
.comicarchiveframe h3 {
|
||||
|
@ -863,7 +911,7 @@ ul.children {
|
|||
}
|
||||
|
||||
#wp-calendar th {
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -1092,11 +1140,6 @@ ul.children {
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Pingbacks and Trackbacks */
|
||||
|
||||
li.pingback div p, li.trackback div p {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* STORYLINES */
|
||||
|
||||
|
@ -1201,7 +1244,7 @@ li.pingback div p, li.trackback div p {
|
|||
display: block;
|
||||
float: left;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
line-height: 13px;
|
||||
}
|
||||
|
||||
|
@ -1212,7 +1255,7 @@ li.pingback div p, li.trackback div p {
|
|||
display: block;
|
||||
float: left;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
line-height: 13px;
|
||||
border: 1px solid #999;
|
||||
}
|
||||
|
@ -1419,6 +1462,11 @@ li.pingback div p, li.trackback div p {
|
|||
z-index: 1000;
|
||||
}
|
||||
|
||||
.ie .tt a:hover {
|
||||
z-index:1000; color: #aaaaff;
|
||||
background-color: Transparent;
|
||||
}
|
||||
|
||||
/* User Pages */
|
||||
|
||||
#userpage {
|
||||
|
@ -1458,3 +1506,18 @@ li.pingback div p, li.trackback div p {
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Non-IE browser additions */
|
||||
|
||||
::-moz-selection {
|
||||
background: #a1c0d9; /* Firefox */
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
/* selection colors */
|
||||
::selection {
|
||||
background: #ffb7b7; /* Safari */
|
||||
}
|
|
@ -0,0 +1,278 @@
|
|||
<?php
|
||||
|
||||
require_once('PHPUnit/Framework.php');
|
||||
require_once('MockPress/mockpress.php');
|
||||
require_once('vfsStream/vfsStream.php');
|
||||
require_once(dirname(__FILE__) . '/../classes/ComicPressMediaHandling.inc');
|
||||
require_once(dirname(__FILE__) . '/../functions/wpmu.php');
|
||||
|
||||
class ComicPressMediaHandlingTest extends PHPUnit_Framework_TestCase {
|
||||
function setUp() {
|
||||
_reset_wp();
|
||||
$this->cpmh = new ComicPressMediaHandling();
|
||||
$this->default_filter = $this->cpmh->default_filter;
|
||||
|
||||
vfsStreamWrapper::register();
|
||||
vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
|
||||
}
|
||||
|
||||
function testBundleGlobalVariables() {
|
||||
global $comic_folder, $archive_comic_folder, $rss_comic_folder, $mini_comic_folder;
|
||||
|
||||
$comic_folder = 'comic';
|
||||
$archive_comic_folder = 'archive';
|
||||
$rss_comic_folder = 'rss';
|
||||
$mini_comic_folder = 'mini';
|
||||
|
||||
$this->assertEquals(array(
|
||||
'comic' => 'comic',
|
||||
'archive' => 'archive',
|
||||
'rss' => 'rss',
|
||||
'mini' => 'mini'
|
||||
), $this->cpmh->_bundle_global_variables());
|
||||
}
|
||||
|
||||
function providerTestGetFilter() {
|
||||
$cpmh = new ComicPressMediaHandling();
|
||||
|
||||
$default = str_replace('{date}', $cpmh->default_filename_filter, $cpmh->default_filter);
|
||||
|
||||
return array(
|
||||
array(null, $default),
|
||||
array('fail', $default),
|
||||
array(array(), $default),
|
||||
array('test', 'test')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestGetFilter
|
||||
*/
|
||||
function testGetFilter($filter_to_use, $expected_result) {
|
||||
global $comic_filename_filters;
|
||||
|
||||
$comic_filename_filters['test'] = 'test';
|
||||
|
||||
$default = str_replace('{date}', $this->cpmh->default_filename_filter, $this->cpmh->default_filter);
|
||||
|
||||
$cpmh = $this->getMock('ComicPressMediaHandling', array('_convert_to_percent_filter'));
|
||||
if ($expected_result !== $default) {
|
||||
$cpmh->expects($this->once())->method('_convert_to_percent_filter')->with($expected_result)->will($this->returnValue($expected_result));
|
||||
} else {
|
||||
$cpmh->expects($this->never())->method('_convert_to_percent_filter');
|
||||
}
|
||||
|
||||
$this->assertEquals($expected_result, $cpmh->_get_filter($filter_to_use));
|
||||
}
|
||||
|
||||
function testGetFilterCPMOption() {
|
||||
update_option('comicpress-manager-cpm-date-format', 'test');
|
||||
|
||||
$this->assertEquals(str_replace('{date}', '%date-test%', $this->cpmh->default_filter), $this->cpmh->_get_filter());
|
||||
}
|
||||
|
||||
function providerTestConvertToPercentFilter() {
|
||||
return array(
|
||||
array('', '%wordpress%/%type-folder%/'),
|
||||
array('{date}', '%wordpress%/%type-folder%/%date-Y-m-d%'),
|
||||
array('%wordpress%/%type-folder%/{date}', '%wordpress%/%type-folder%/{date}'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestConvertToPercentFilter
|
||||
*/
|
||||
function testConvertToPercentFilter($old_filter, $new_filter) {
|
||||
$this->assertEquals($new_filter, $this->cpmh->_convert_to_percent_filter($old_filter));
|
||||
}
|
||||
|
||||
function providerTestExpandFilter() {
|
||||
return array(
|
||||
array('', ''),
|
||||
array('%test%', '%test%'),
|
||||
array('%wordpress%', vfsStream::url('root')),
|
||||
array('%wordpress%%wordpress%', vfsStream::url('root') . vfsStream::url('root')),
|
||||
array('%test test%', '%test test%'),
|
||||
array('%wordpress%/%type-folder%', vfsStream::url('root') . '/comic'),
|
||||
array('%date-Y%', '2009'),
|
||||
array('%wordpress%/%type-folder%/%date-Y-m-d%*.*', vfsStream::url('root') . '/comic/2009-01-01.*\..*')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestExpandFilter
|
||||
*/
|
||||
function testExpandFilter($filter, $expected_result) {
|
||||
$cpmh = $this->getMock('ComicPressMediaHandling', array('_abspath'));
|
||||
$cpmh->expects($this->any())->method('_abspath')->will($this->returnValue(vfsStream::url('root')));
|
||||
|
||||
$this->assertEquals($expected_result, $cpmh->_expand_filter($filter, 'comic', (object)array('ID' => 1, 'post_date' => '2009-01-01 15:00:00')));
|
||||
}
|
||||
|
||||
function testExpandFilterNoPostDateRequested() {
|
||||
$this->assertEquals('%date-Y%', $this->cpmh->_expand_filter('%date-Y%', 'comic', null));
|
||||
}
|
||||
|
||||
function providerTestExpandFilterWPMUCallback() {
|
||||
return array(
|
||||
array('', '', 'original'),
|
||||
array('', 'new', 'original'),
|
||||
array('1', 'new', 'new'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestExpandFilterWPMUCallback
|
||||
*/
|
||||
function testExpandFilterWPMUCallback($_wpmu_version, $option_value, $expected_result) {
|
||||
global $wpmu_version;
|
||||
$wpmu_version = $_wpmu_version;
|
||||
|
||||
update_option('upload_path', $option_value);
|
||||
$this->assertEquals($expected_result, _comicpress_expand_filter_callback('original', array('all', 'wordpress')));
|
||||
}
|
||||
|
||||
function providerTestReadDirectory() {
|
||||
return array(
|
||||
array(vfsStream::url('root2/.*'), false),
|
||||
array(vfsStream::url('root/.*'), array('2009-01-01.jpg', '2009-01-02.jpg', '2009-02-02-two.jpg', '2008-01-01.jpg')),
|
||||
array(vfsStream::url('root/2009.*'), array('2009-01-01.jpg', '2009-01-02.jpg', '2009-02-02-two.jpg')),
|
||||
array(vfsStream::url('root/2009-01.*'), array('2009-01-01.jpg', '2009-01-02.jpg')),
|
||||
array(vfsStream::url('root/2009-01-01.*'), array('2009-01-01.jpg')),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestReadDirectory
|
||||
*/
|
||||
function testReadDirectory($pattern, $expected_results) {
|
||||
foreach (array('2009-01-01.jpg', '2009-01-02.jpg', '2009-02-02-two.jpg', '2008-01-01.jpg') as $file) {
|
||||
file_put_contents(vfsStream::url("root/${file}"), 'file');
|
||||
}
|
||||
if (is_array($expected_results)) {
|
||||
foreach ($expected_results as &$result) { $result = vfsStream::url("root/${result}"); }
|
||||
}
|
||||
$this->assertEquals($expected_results, $this->cpmh->_read_directory($pattern));
|
||||
}
|
||||
|
||||
function providerTestResolveRegexPath() {
|
||||
return array(
|
||||
array('test', 'test'),
|
||||
array('te\.st', 'te.st'),
|
||||
array('te\st', 'te/st'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestResolveRegexPath
|
||||
*/
|
||||
function testResolveRegexPath($input, $expected_output) {
|
||||
$this->assertEquals($expected_output, $this->cpmh->_resolve_regex_path($input));
|
||||
}
|
||||
|
||||
function providerTestGetRegexDirname() {
|
||||
return array(
|
||||
array('/test/test2', '/test')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestGetRegexDirname
|
||||
*/
|
||||
function testGetRegexDirname($input, $expected_output) {
|
||||
$this->assertEquals($expected_output, $this->cpmh->_get_regex_dirname($input));
|
||||
}
|
||||
|
||||
function providerTestGetRegexFilename() {
|
||||
return array(
|
||||
array('/test/test2', 'test2'),
|
||||
array('c:\test\test2', 'test2'),
|
||||
array('/test/test2\.cat', 'test2\.cat'),
|
||||
array('c:\test\test2\.cat', 'test2\.cat'),
|
||||
array('C:/inetpub/a\.windows\.directory/comics/2009-11-24.*\..*', '2009-11-24.*\..*')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestGetRegexFilename
|
||||
*/
|
||||
function testGetRegexFilename($input, $expected_output) {
|
||||
$this->assertEquals($expected_output, $this->cpmh->_get_regex_filename($input));
|
||||
}
|
||||
|
||||
function providerTestPreHandleComicPathResults() {
|
||||
return array(
|
||||
array('', '', false),
|
||||
array('1', '', 'comic/one'),
|
||||
array('1', 'comic', 'files/one'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestPreHandleComicPathResults
|
||||
*/
|
||||
function testPreHandleComicPathResults($_wpmu_version, $upload_path, $expected_result) {
|
||||
global $wpmu_version, $comic_folder;
|
||||
$wpmu_version = $_wpmu_version;
|
||||
$comic_folder = 'comic';
|
||||
|
||||
update_option('upload_path', $upload_path);
|
||||
|
||||
$this->assertEquals($expected_result, _comicpress_pre_handle_comic_path_results(false, array('one/one', 'two/two', 'three/three'), 'comic', (object)array('ID' => 1)));
|
||||
}
|
||||
|
||||
function providerTestCheckPostMetaData() {
|
||||
return array(
|
||||
array('comic', array(), false),
|
||||
array('comic', array('backend_url_comic' => '/test'), '/test'),
|
||||
array('comic', array('backend_url_comic' => array('test')), false),
|
||||
array('comic', array('backend_url_images' => 'test=/test'), false),
|
||||
array('comic', array('backend_url_images' => 'comic=/test'), '/test'),
|
||||
array('comic', array('backend_url_images' => array('comic' => '/test')), '/test'),
|
||||
array('comic', array('backend_url' => '/test'), '/test'),
|
||||
array('comic', array('backend_url' => array('test')), false),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestCheckPostMetaData
|
||||
*/
|
||||
function testCheckPostMetaData($type, $metadata, $expected_result) {
|
||||
foreach ($metadata as $key => $value) {
|
||||
update_post_meta(1, $key, $value);
|
||||
}
|
||||
|
||||
$this->assertEquals($expected_result, $this->cpmh->_check_post_meta_data((object)array('ID' => 1), $type));
|
||||
}
|
||||
|
||||
function providerTestEnsureValidURI() {
|
||||
return array(
|
||||
array('', false),
|
||||
array('test', 'test'),
|
||||
array('%type-folder%/test', 'comic-dir/test'),
|
||||
array('/test', '/test'),
|
||||
array('http://file', 'http://file'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestEnsureValidURI
|
||||
*/
|
||||
function testEnsureValidURI($uri, $expected_result) {
|
||||
_set_bloginfo('url', 'wordpress');
|
||||
|
||||
$cpmh = $this->getMock('ComicPressMediaHandling', array('_bundle_global_variables'));
|
||||
$cpmh->expects($this->any())->method('_bundle_global_variables')->will($this->returnValue(array('comic' => 'comic-dir')));
|
||||
|
||||
$this->assertEquals($expected_result, $cpmh->_ensure_valid_uri($uri, 'comic'));
|
||||
}
|
||||
|
||||
function testEnsureValidURIInvalidType() {
|
||||
_set_bloginfo('url', 'wordpress');
|
||||
|
||||
$cpmh = $this->getMock('ComicPressMediaHandling', array('_bundle_global_variables'));
|
||||
$cpmh->expects($this->any())->method('_bundle_global_variables')->will($this->returnValue(array('comic' => 'comic-dir')));
|
||||
|
||||
$this->assertEquals('', $cpmh->_ensure_valid_uri('%type-folder%', 'test'));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
require_once('PHPUnit/Framework.php');
|
||||
require_once('MockPress/mockpress.php');
|
||||
require_once(dirname(__FILE__) . '/../classes/ComicPressPostMediaHandlingMetabox.inc');
|
||||
|
||||
class ComicPressPostMediaHandlingMetaboxTest extends PHPUnit_Framework_TestCase {
|
||||
function setUp() {
|
||||
_reset_wp();
|
||||
$_REQUEST = array();
|
||||
$this->pmh = new ComicPressPostMediaHandlingMetabox();
|
||||
}
|
||||
|
||||
function providerTestSavePost() {
|
||||
return array(
|
||||
array(array(), array()),
|
||||
array(array('urls' => false), array()),
|
||||
array(array('urls' => array()), array()),
|
||||
array(array('urls' => array('test' => 'test')), array()),
|
||||
array(array('urls' => array('comic' => 'test')), array('comic' => 'test')),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestSavePost
|
||||
*/
|
||||
function testSavePost($input, $expected_post_metadata) {
|
||||
$pmh = $this->getMock('ComicPressPostMediaHandlingMetabox', array('_get_valid_types', '_verify_nonce'));
|
||||
$pmh->expects($this->once())->method('_verify_nonce')->will($this->returnValue(true));
|
||||
$pmh->expects($this->any())->method('_get_valid_types')->will($this->returnValue(array('comic')));
|
||||
|
||||
$_REQUEST = array('cp' => $input);
|
||||
|
||||
$pmh->save_post(1);
|
||||
$this->assertEquals($expected_post_metadata, get_post_meta(1, 'backend_url_images', true));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
<?php
|
||||
|
||||
require_once('PHPUnit/Framework.php');
|
||||
require_once('MockPress/mockpress.php');
|
||||
require_once(dirname(__FILE__) . '/../../widgets/ArchiveDropdownWidget.inc');
|
||||
|
||||
class ArchiveDropdownWidgetTest extends PHPUnit_Framework_TestCase {
|
||||
function setUp() {
|
||||
_reset_wp();
|
||||
|
||||
$this->w = new ArchiveDropdownWidget();
|
||||
}
|
||||
|
||||
function providerTestBuildDropdown() {
|
||||
return array(
|
||||
array(null, 'Archives...', null, 'Go'),
|
||||
array('Test', 'Test', 'Test2', 'Test2'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestBuildDropdown
|
||||
*/
|
||||
function testBuildDropdown($default_value, $expected_default, $button_value, $expected_button) {
|
||||
if (!is_null($default_value)) {
|
||||
_set_filter_expectation('comicpress_archive_dropdown_default_entry', $default_value);
|
||||
}
|
||||
|
||||
if (!is_null($button_value)) {
|
||||
_set_filter_expectation('comicpress_archive_dropdown_submit_button', $button_value);
|
||||
}
|
||||
|
||||
foreach (array(
|
||||
array('test' => 'Test', 'test2' => 'Test2'),
|
||||
'<option value="test">Test</option><option value="test2">Test2</option>'
|
||||
) as $entries) {
|
||||
$html = $this->w->build_dropdown($entries);
|
||||
|
||||
foreach (array(
|
||||
array('tag' => 'div', 'attributes' => array('class' => 'archive-dropdown-wrap')),
|
||||
array('tag' => 'form', 'attributes' => array('action' => '', 'method' => 'get')),
|
||||
array('tag' => 'select', 'attributes' => array('name' => 'cp[urls]')),
|
||||
array('tag' => 'input', 'attributes' => array('name' => 'cp[_nonce]')),
|
||||
array('tag' => 'input', 'attributes' => array('name' => 'cp[_action_nonce]')),
|
||||
array('tag' => 'input', 'attributes' => array('name' => 'cp[action]', 'value' => 'follow-archive-dropdown')),
|
||||
array('tag' => 'option', 'attributes' => array('value' => ''), 'content' => $expected_default),
|
||||
array('tag' => 'input', 'attributes' => array('type' => 'submit', 'value' => $expected_button)),
|
||||
array('tag' => 'option', 'attributes' => array('value' => 'test'), 'content' => 'Test'),
|
||||
array('tag' => 'option', 'attributes' => array('value' => 'test2'), 'content' => 'Test2'),
|
||||
) as $matcher) {
|
||||
$this->assertTag($matcher, $html);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function testBuildDropdownNotStringOrArray() {
|
||||
$html = $this->w->build_dropdown(false);
|
||||
|
||||
$this->assertTrue(empty($html));
|
||||
}
|
||||
|
||||
function testBuildComicArchiveDropdown() {
|
||||
$w = $this->getMock('ArchiveDropdownWidget', array('_new_comicpressstoryline', '_new_wp_query', 'build_dropdown'));
|
||||
|
||||
$storyline = $this->getMock('ComicPressStoryline', array('read_from_options', 'build_from_restrictions'));
|
||||
$storyline->expects($this->once())->method('read_from_options');
|
||||
$storyline->expects($this->once())->method('build_from_restrictions')->will($this->returnValue(array(1,2,3)));
|
||||
|
||||
$w->expects($this->once())->method('_new_comicpressstoryline')->will($this->returnValue($storyline));
|
||||
|
||||
$query = $this->getMock('WP_Query', array('query', 'have_posts', 'next_post'));
|
||||
$query->expects($this->once())->method('query')->with(array(
|
||||
'showposts' => -1,
|
||||
'category__in' => array(1,2,3)
|
||||
));
|
||||
|
||||
wp_insert_post((object)array('ID' => 1, 'guid' => 'guid', 'post_title' => 'title'));
|
||||
|
||||
$query->expects($this->at(1))->method('have_posts')->will($this->returnValue(true));
|
||||
$query->expects($this->at(2))->method('next_post')->will($this->returnValue((object)array('ID' => 1, 'guid' => 'guid', 'post_title' => 'title')));
|
||||
$query->expects($this->at(3))->method('have_posts')->will($this->returnValue(false));
|
||||
|
||||
$w->expects($this->once())->method('_new_wp_query')->will($this->returnValue($query));
|
||||
|
||||
$w->expects($this->once())->method('build_dropdown')->with(array('guid' => 'title'));
|
||||
|
||||
$w->build_comic_archive_dropdown();
|
||||
}
|
||||
|
||||
function providerTestUpdate() {
|
||||
$w = new ArchiveDropdownWidget();
|
||||
$valid_mode = array_shift(array_keys($w->modes));
|
||||
|
||||
return array(
|
||||
array(array(), array()),
|
||||
array(
|
||||
array('title' => '<b>test</b>'),
|
||||
array('title' => 'test'),
|
||||
),
|
||||
array(
|
||||
array('mode' => 'bad'),
|
||||
array()
|
||||
),
|
||||
array(
|
||||
array('mode' => $valid_mode),
|
||||
array('mode' => $valid_mode)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestUpdate
|
||||
*/
|
||||
function testUpdate($input, $expected_output) {
|
||||
$this->assertEquals($expected_output, $this->w->update($input, array()));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,203 @@
|
|||
<?php
|
||||
/*
|
||||
Widget Name: comicpress archive dropdown
|
||||
Widget URI: http://comicpress.org/
|
||||
Description:
|
||||
Author: Philip M. Hofer (Frumph) & John Bintz
|
||||
Version: 1.1
|
||||
Author URI: http://frumph.net/
|
||||
|
||||
*/
|
||||
|
||||
class ArchiveDropdownWidget extends WP_Widget {
|
||||
var $modes;
|
||||
|
||||
function ArchiveDropdownWidget() {
|
||||
$widget_ops = array('classname' => 'ArchiveDropdownWidget', 'description' => __('Display a dropdown list of your archives, styled.','comicpress') );
|
||||
$this->WP_Widget('archive_dropdown', __('ComicPress Archive Dropdown','comicpress'), $widget_ops);
|
||||
|
||||
$this->modes = array(
|
||||
'monthly_archive' => __('Monthly archive', 'comicpress'),
|
||||
'comic_archive' => __('Comic archive', 'comicpress'),
|
||||
'storyline_order' => __('Storyline order', 'comicpress'),
|
||||
);
|
||||
}
|
||||
|
||||
function _verify_nonce() { return __comicpress_verify_nonce(); }
|
||||
|
||||
function template_redirect() {
|
||||
if (ArchiveDropdownWidget::_verify_nonce() == 'follow-archive-dropdown') {
|
||||
wp_redirect($_GET['cp']['urls']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a dropdown geared toward quick links to posts.
|
||||
*/
|
||||
function build_dropdown($entries) {
|
||||
if (is_string($entries) || is_array($entries)) {
|
||||
$id = 'archive-dropdown-' . md5(rand());
|
||||
$button_id = 'archive-dropdown-submit-' . md5(rand());
|
||||
|
||||
$nonce = wp_create_nonce('comicpress');
|
||||
$action_nonce = wp_create_nonce('comicpress-follow-archive-dropdown');
|
||||
|
||||
ob_start(); ?>
|
||||
<div class="archive-dropdown-wrap" id="<?php echo esc_attr($id) ?>">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="cp[_nonce]" value="<?php echo esc_attr($nonce) ?>" />
|
||||
<input type="hidden" name="cp[action]" value="follow-archive-dropdown" />
|
||||
<input type="hidden" name="cp[_action_nonce]" value="<?php echo esc_attr($action_nonce) ?>" />
|
||||
|
||||
<select name="cp[urls]">
|
||||
<option value=""><?php echo esc_html(apply_filters('comicpress_archive_dropdown_default_entry', __('Archives...', 'comicpress'))) ?></option>
|
||||
<?php
|
||||
if (is_string($entries)) {
|
||||
echo $entries;
|
||||
} else {
|
||||
foreach ($entries as $url => $value) { ?>
|
||||
<option value="<?php echo esc_attr($url) ?>"><?php echo esc_html($value) ?></option>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input id="<?php echo esc_attr($button_id) ?>" type="submit" value="<?php echo esc_attr(apply_filters('comicpress_archive_dropdown_submit_button', __('Go', 'comicpress'))) ?>" />
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
document.getElementById('<?php echo esc_js($button_id) ?>').style.display = 'none';
|
||||
document.getElementById('<?php echo esc_js($id) ?>').onchange = function(e) {
|
||||
document.location.href = e.target.options[e.target.selectedIndex].value;
|
||||
};
|
||||
</script>
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the monthly archive dropdown.
|
||||
*/
|
||||
function build_monthly_archive_dropdown() {
|
||||
return $this->build_dropdown(wp_get_archives('type=monthly&format=option&show_post_count=-1&echo=0'));
|
||||
}
|
||||
|
||||
function _new_comicpressstoryline() { return new ComicPressStoryline(); }
|
||||
function _new_comicpressdbinterface() { return new ComicPressDBInterface(); }
|
||||
function _new_wp_query() { return new WP_Query(); }
|
||||
|
||||
/**
|
||||
* Build the comic archive dropdown.
|
||||
*/
|
||||
function build_comic_archive_dropdown() {
|
||||
$storyline = $this->_new_comicpressstoryline();
|
||||
$storyline->read_from_options();
|
||||
|
||||
$query = $this->_new_wp_query();
|
||||
$query->query(array(
|
||||
'showposts' => -1,
|
||||
'category__in' => $storyline->build_from_restrictions()
|
||||
));
|
||||
|
||||
$results = array();
|
||||
while($query->have_posts()) {
|
||||
$post = $query->next_post();
|
||||
$results[get_permalink($post)] = get_the_title($post);
|
||||
}
|
||||
|
||||
return $this->build_dropdown($results);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build dropdown based on storyline order.
|
||||
*/
|
||||
function build_storyline_order_dropdown() {
|
||||
$storyline = $this->_new_comicpressstoryline();
|
||||
$storyline->read_from_options();
|
||||
|
||||
$results = array();
|
||||
if (!empty($storyline->_structure)) {
|
||||
foreach ($storyline->_structure as $id => $info) {
|
||||
$category = get_category($id);
|
||||
if (!empty($category)) {
|
||||
$results[get_category_link($id)] = str_repeat(' ', ($info['level'] - 1) * 3) . $category->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->build_dropdown($results);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the widget.
|
||||
*/
|
||||
function widget($args, $instance) {
|
||||
extract($args, EXTR_SKIP);
|
||||
|
||||
echo $before_widget;
|
||||
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
|
||||
if (!empty($title)) { echo $before_title . $title . $after_title; };
|
||||
|
||||
if (method_exists($this, "build_{$instance['mode']}_dropdown")) {
|
||||
echo $this->{"build_{$instance['mode']}_dropdown"}();
|
||||
}
|
||||
|
||||
echo $after_widget;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update widget parameters.
|
||||
*/
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = array();
|
||||
|
||||
foreach (array('title', 'mode') as $field) {
|
||||
if (isset($new_instance[$field])) {
|
||||
switch ($field) {
|
||||
case 'mode':
|
||||
if (isset($this->modes[$new_instance[$field]])) {
|
||||
$instance[$field] = $new_instance[$field];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$instance[$field] = strip_tags($new_instance[$field]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the widget editor.
|
||||
*/
|
||||
function form($instance) {
|
||||
$valid_mode = array_shift(array_keys($this->modes));
|
||||
$instance = wp_parse_args((array)$instance, array('title' => '', 'mode' => $valid_mode));
|
||||
|
||||
foreach (array(
|
||||
'title' => __('Title:', 'comicpress'),
|
||||
'mode' => __('Show in widget:', 'comicpress')
|
||||
) as $field => $label) { ?>
|
||||
<p>
|
||||
<?php switch ($field) {
|
||||
case 'mode': ?>
|
||||
<?php echo $label ?><br />
|
||||
<?php foreach ($this->modes as $mode => $label) { ?>
|
||||
<label><input type="radio" name="<?php echo $this->get_field_name($field); ?>" value="<?php echo $mode ?>" <?php echo ($mode == $instance['mode']) ? 'checked="checked"' : '' ?> /> <?php echo $label ?></label><br />
|
||||
<?php }
|
||||
break;
|
||||
default: ?>
|
||||
<label for="<?php echo $this->get_field_id($field); ?>"><?php echo $label ?>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id($field); ?>" name="<?php echo $this->get_field_name($field); ?>" type="text" value="<?php echo esc_attr($instance[$field]) ?>" />
|
||||
</label>
|
||||
<br />
|
||||
<?php break;
|
||||
} ?>
|
||||
</p>
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
|
||||
add_action('template_redirect', array('ArchiveDropdownWidget', 'template_redirect'));
|
|
@ -36,10 +36,8 @@ class BuyThisPrintWidget extends WP_Widget {
|
|||
}
|
||||
|
||||
function buy_print_structure($content = '') {
|
||||
global $buy_print_url;
|
||||
ob_start();
|
||||
?>
|
||||
<div class="buythis"><form method="post" action="<?php echo $buy_print_url; ?>">
|
||||
$comicpress_options = comicpress_load_options(); ?>
|
||||
<div class="buythis"><form method="post" action="<?php echo $comicpress_options['buy_print_url']; ?>">
|
||||
<input type="hidden" name="comic" value="<?php echo get_the_ID(); ?>" />
|
||||
<button class="buythisbutton" type="submit" value="submit" name="submit"></button></form></div>
|
||||
<div class="clear"></div>
|
||||
|
|
|
@ -49,8 +49,8 @@ class GraphicalNavigationWidget extends WP_Widget {
|
|||
* Handles hitting the global namespace for you.
|
||||
*/
|
||||
function comicpress_get_buy_print_url($url = '') {
|
||||
global $buy_print_url;
|
||||
return $buy_print_url;
|
||||
$comicpress_options = comicpress_load_options();
|
||||
return $comicpress_options['buy_print_url'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -422,17 +422,17 @@ class GraphicalNavigationWidget extends WP_Widget {
|
|||
);
|
||||
|
||||
$title_defaults = array(
|
||||
'first_title' => __('‹‹ First', 'comicpress'),
|
||||
'first_title' => __('First', 'comicpress'),
|
||||
'story_prev_title' => __('Chapter', 'comicpress'),
|
||||
'story_next_title' => __('Chapter', 'comicpress'),
|
||||
'story_prev_in_title' => __('In Chapter', 'comicpress'),
|
||||
'story_next_in_title' => __('In Chapter', 'comicpress'),
|
||||
'previous_title' => __('‹ Previous', 'comicpress'),
|
||||
'previous_title' => __('Previous', 'comicpress'),
|
||||
'random_title' => __('Random', 'comicpress'),
|
||||
'archives_title' => __('Archives', 'comicpress'),
|
||||
'comments_title' => __('Comments', 'comicpress'),
|
||||
'next_title' => __('Next ›', 'comicpress'),
|
||||
'last_title' => __('Last ››', 'comicpress'),
|
||||
'next_title' => __('Next', 'comicpress'),
|
||||
'last_title' => __('Last', 'comicpress'),
|
||||
'buyprint_title' => __('Buy Print', 'comicpress')
|
||||
);
|
||||
|
||||
|
|
|
@ -1,102 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
Widget Name: comicpress archive dropdown
|
||||
Widget URI: http://comicpress.org/
|
||||
Description:
|
||||
Author: Philip M. Hofer (Frumph)
|
||||
Version: 1.04
|
||||
Author URI: http://frumph.net/
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
function comicpress_archive_dropdown_storyline() {
|
||||
$storyline = new ComicPressStoryline();
|
||||
$storyline->create_structure(get_option('comicpress-storyline-category-order'));
|
||||
$categories = array_keys($storyline->_structure);
|
||||
foreach ($categories as $id) {
|
||||
$post = ComicPressDBInterface::get_instance()->get_first_comic($id);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
function comicpress_archive_dropdown() { ?>
|
||||
<div class="archive-dropdown-wrap">
|
||||
<select name="archive-dropdown" class="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'>
|
||||
<option value=""><?php echo attribute_escape(__('Archives...','comicpress')); ?></option>
|
||||
<?php wp_get_archives('type=monthly&format=option&show_post_count=-1'); ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
function comicpress_archive_dropdown_comics() {
|
||||
global $post, $wp_query;
|
||||
$temp_post = $post;
|
||||
$temp_query = $wp_query;
|
||||
?>
|
||||
<div class="archive-dropdown-wrap">
|
||||
<select name="archive-dropdown" class="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'>
|
||||
<option value=""><?php echo attribute_escape(__('Archives...','comicpress')); ?></option>
|
||||
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=-1&cat='.get_all_comic_categories_as_cat_string());
|
||||
while ($comicArchive->have_posts()) : $comicArchive->the_post() ?>
|
||||
<option value="<?php echo get_permalink($post->ID) ?>"><?php the_title() ?></option>
|
||||
<?php endwhile; ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php
|
||||
$post = $temp_post; $temp_post = null;
|
||||
$wp_query = $temp_query; $temp_query = null;
|
||||
}
|
||||
|
||||
class widget_comicpress_archive_dropdown extends WP_Widget {
|
||||
|
||||
function widget_comicpress_archive_dropdown() {
|
||||
$widget_ops = array('classname' => 'widget_comicpress_archive_dropdown', 'description' => __('Display a dropdown list of your archives, styled.','comicpress') );
|
||||
$this->WP_Widget('archive_dropdown', __('ComicPress Archive Dropdown','comicpress'), $widget_ops);
|
||||
}
|
||||
|
||||
function widget($args, $instance) {
|
||||
extract($args, EXTR_SKIP);
|
||||
|
||||
echo $before_widget;
|
||||
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
|
||||
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
|
||||
if ($instance['showcomicposts'] == 'on') {
|
||||
comicpress_archive_dropdown_comics();
|
||||
} else {
|
||||
comicpress_archive_dropdown();
|
||||
}
|
||||
echo $after_widget;
|
||||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
$instance['title'] = strip_tags($new_instance['title']);
|
||||
$instance['showcomicposts'] = $new_instance['showcomicposts'];
|
||||
return $instance;
|
||||
}
|
||||
|
||||
function form($instance) {
|
||||
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'showcomicposts' => 'off' ) );
|
||||
$title = strip_tags($instance['title']);
|
||||
$showcomicposts = $instance['showcomicposts']; if (empty($showcomicposts)) $showcomicposts = 'off';
|
||||
?>
|
||||
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','comicpress'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
|
||||
<p><label for="<?php echo $this->get_field_id('showcomicposts'); ?>"><strong><?php _e('Show individual comic posts?','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('showcomicposts'); ?>" name="<?php echo $this->get_field_name('showcomicposts'); ?>" type="radio" value="on"<?php if ( $showcomicposts == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('showcomicposts'); ?>" name="<?php echo $this->get_field_name('showcomicposts'); ?>" type="radio" value="off"<?php if ( $showcomicposts == "off") { echo " checked"; } ?> />Off</label></p>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
register_widget('widget_comicpress_archive_dropdown');
|
||||
|
||||
|
||||
function widget_comicpress_archive_dropdown_init() {
|
||||
new widget_comicpress_archive_dropdown();
|
||||
}
|
||||
|
||||
add_action('widgets_init', 'widget_comicpress_archive_dropdown_init');
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
// No Longer Used
|
||||
?>
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|
|
@ -1,285 +1,3 @@
|
|||
<?php
|
||||
/*
|
||||
Widget Name: Graphical Navigation
|
||||
Widget URI: http://comicpress.org/
|
||||
Description: You can place graphical navigation buttons on your comic, for ComicPress 2.8
|
||||
Author: Philip M. Hofer (Frumph)
|
||||
Version: 1.01
|
||||
Author URI: http://frumph.net/
|
||||
|
||||
*/
|
||||
|
||||
class widget_comicpress_graphical_navigation extends WP_Widget {
|
||||
|
||||
function widget_comicpress_graphical_navigation() {
|
||||
$widget_ops = array('classname' => 'widget_comicpress_graphical_navigation', 'description' => __('Displays Graphical Navigation Buttons. (used in comic sidebars)','comicpress') );
|
||||
$this->WP_Widget('graphicalnavigation', __('Comic Navigation (orig)','comicpress'), $widget_ops);
|
||||
}
|
||||
|
||||
function widget($args, $instance) {
|
||||
global $wp_query, $post;
|
||||
|
||||
if (is_home() || is_single()) {
|
||||
|
||||
$this_permalink = get_permalink();
|
||||
|
||||
$temp_query = $wp_query->is_single;
|
||||
$wp_query->is_single = true;
|
||||
$prev_comic = get_previous_comic_permalink();
|
||||
$next_comic = get_next_comic_permalink();
|
||||
$wp_query->is_single = $temp_query;
|
||||
$temp_query = null;
|
||||
|
||||
$first_comic = get_first_comic_permalink();
|
||||
$last_comic = get_last_comic_permalink();
|
||||
|
||||
$prev_story = get_previous_storyline_start_permalink();
|
||||
$next_story = get_next_storyline_start_permalink();
|
||||
|
||||
$latest_comic = get_permalink( get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), false) );
|
||||
?>
|
||||
<div id="comic_navi_wrapper">
|
||||
<table id="comic_navi" cellpadding="0" cellspacing="0"><tr><td>
|
||||
<?php if ($instance['first'] == 'on') {
|
||||
if (!empty($first_comic) && ($first_comic != $this_permalink)) { ?>
|
||||
<a href="<?php echo $first_comic; ?>" class="navi navi-first" title="<?php echo $instance['first_title']; ?>"><?php echo $instance['first_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-first navi-void"><?php echo $instance['first_title']; ?></div>
|
||||
<?php }
|
||||
}
|
||||
if ($instance['story_prev'] == 'on') {
|
||||
if (!empty($prev_story)) { ?>
|
||||
<a href="<?php echo $prev_story; ?>" class="navi navi-prevchap" title="<?php echo $instance['story_prev_title']; ?>"><?php echo $instance['story_prev_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-prevchap navi-void"><?php echo $instance['story_prev_title']; ?></div>
|
||||
<?php }
|
||||
}
|
||||
if ($instance['previous'] == 'on') {
|
||||
if (!empty($prev_comic)) { ?>
|
||||
<a href="<?php echo $prev_comic; ?>" class="navi navi-prev" title="<?php echo $instance['previous_title']; ?>"><?php echo $instance['previous_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-prev navi-void"><?php echo $instance['previous_title']; ?></div>
|
||||
<?php }
|
||||
}
|
||||
if ($instance['archives'] == 'on' && !empty($instance['archive_path'])) { ?>
|
||||
<a href="<?php echo $instance['archive_path']; ?>" class="navi navi-archive" title="<?php echo $instance['archives_title']; ?>"><?php echo $instance['archives_title']; ?></a>
|
||||
<?php }
|
||||
if ($instance['random'] == 'on') { ?>
|
||||
<a href="<?php echo bloginfo('url'); ?>/?randomcomic" class="navi navi-random" title="<?php echo $instance['random_title']; ?>"><?php echo $instance['random_title']; ?></a>
|
||||
<?php }
|
||||
if ($instance['comictitle'] == 'on') { ?>
|
||||
<div class="navi-comictitle"><a href="<?php the_permalink(); ?>">"<?php the_title(); ?>"</a></div>
|
||||
<?php }
|
||||
if ($instance['comments'] == 'on') { ?>
|
||||
<a href="<?php the_permalink(); ?>#comment" class="navi navi-comments" title="<?php echo $instance['comments_title']; ?>"><span class="navi-comments-count"><?php comments_number('0', '1', '%'); ?></span><?php echo $instance['comments_title']; ?></a>
|
||||
<?php }
|
||||
if ($instance['buyprint'] == 'on') { ?>
|
||||
<form method="post" title="<?php echo $instance['buyprint_title']; ?>" action="<?php global $buy_print_url; echo $buy_print_url; ?>" class="navi-buyprint-form">
|
||||
<input type="hidden" name="comic" value="<?php echo get_the_ID(); ?>" />
|
||||
<button class="navi navi-buyprint" type="submit" value="buyprint"><?php echo $instance['buyprint_title']; ?></button>
|
||||
</form>
|
||||
<?php }
|
||||
if ($instance['next'] == 'on') {
|
||||
if (!empty($next_comic)) {
|
||||
if (($next_comic == $latest_comic) && $instance['lastgohome'] == 'on') { ?>
|
||||
<a href="/" class="navi navi-next" title="<?php echo $instance['next_title']; ?>"><?php echo $instance['next_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo $next_comic; ?>" class="navi navi-next" title="<?php echo $instance['next_title']; ?>"><?php echo $instance['next_title']; ?></a>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-next navi-void"><?php echo $instance['next_title']; ?></div>
|
||||
<?php }
|
||||
}
|
||||
if ($instance['story_next'] == 'on') {
|
||||
if (!empty($next_story) && !is_home()) { ?>
|
||||
<a href="<?php echo $next_story; ?>" class="navi navi-nextchap" title="<?php echo $instance['story_next_title']; ?>"><?php echo $instance['story_next_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-nextchap navi-void"><?php echo $instance['story_next_title']; ?></div>
|
||||
<?php }
|
||||
}
|
||||
if ($instance['last'] == 'on') {
|
||||
if (!empty($last_comic) && ($last_comic != $this_permalink)) {
|
||||
if ($instance['lastgohome'] == 'on') { ?>
|
||||
<a href="/" class="navi navi-last" title="<?php echo $instance['last_title']; ?>"><?php echo $instance['last_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo $last_comic; ?>" class="navi navi-last" title="<?php echo $instance['last_title']; ?>"><?php echo $instance['last_title']; ?></a>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-last navi-void"><?php echo $instance['last_title']; ?></div>
|
||||
<?php }
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
$instance['first'] = $new_instance['first'];
|
||||
$instance['last'] = $new_instance['last'];
|
||||
$instance['story_prev'] = $new_instance['story_prev'];
|
||||
$instance['story_next'] = $new_instance['story_next'];
|
||||
$instance['previous'] = $new_instance['previous'];
|
||||
$instance['random'] = $new_instance['random'];
|
||||
$instance['archives'] = $new_instance['archives'];
|
||||
$instance['comments'] = $new_instance['comments'];
|
||||
$instance['next'] = $new_instance['next'];
|
||||
$instance['archive_path'] = strip_tags($new_instance['archive_path']);
|
||||
$instance['buyprint'] = $new_instance['buyprint'];
|
||||
$instance['comictitle'] = $new_instance['comictitle'];
|
||||
$instance['lastgohome'] = $new_instance['lastgohome'];
|
||||
|
||||
$instance['first_title'] = strip_tags($new_instance['first_title']);
|
||||
$instance['last_title'] = strip_tags($new_instance['last_title']);
|
||||
$instance['story_prev_title'] = strip_tags($new_instance['story_prev_title']);
|
||||
$instance['story_next_title'] = strip_tags($new_instance['story_next_title']);
|
||||
$instance['previous_title'] = strip_tags($new_instance['previous_title']);
|
||||
$instance['random_title'] = strip_tags($new_instance['random_title']);
|
||||
$instance['archives_title'] = strip_tags($new_instance['archives_title']);
|
||||
$instance['comments_title'] = strip_tags($new_instance['comments_title']);
|
||||
$instance['next_title'] = strip_tags($new_instance['next_title']);
|
||||
$instance['buyprint_title'] = strip_tags($new_instance['buyprint_title']);
|
||||
return $instance;
|
||||
}
|
||||
|
||||
function form($instance) {
|
||||
$instance = wp_parse_args( (array) $instance, array(
|
||||
'first' => 'on',
|
||||
'last' => 'on',
|
||||
'story_prev' => 'off',
|
||||
'story_next' => 'off',
|
||||
'previous' => 'on',
|
||||
'random' => 'off',
|
||||
'archives' => 'off',
|
||||
'comments' => 'off',
|
||||
'next' => 'on',
|
||||
'archive_path' => '',
|
||||
'buyprint' => 'off',
|
||||
'first_title' => 'First',
|
||||
'last_title' => 'Latest',
|
||||
'story_prev_title' => 'Chapter',
|
||||
'story_next_title' => 'Chapter',
|
||||
'previous_title' => 'Previous',
|
||||
'random_title' => 'Random',
|
||||
'archives_title' => 'Archives',
|
||||
'comments_title' => 'Comments',
|
||||
'next_title' => 'Next',
|
||||
'buyprint_title' => 'Buy Print',
|
||||
'comictitle' => 'off',
|
||||
'lastgohome' => 'off',
|
||||
) );
|
||||
$first = $instance['first']; if (empty($first)) $first = 'on';
|
||||
$last = $instance['last']; if (empty($last)) $last = 'on';
|
||||
$story_prev = $instance['story_prev']; if (empty($story_prev)) $story_prev = 'off';
|
||||
$story_next = $instance['story_next']; if (empty($story_next)) $story_next = 'off';
|
||||
$previous = $instance['previous']; if (empty($previous)) $previous = 'on';
|
||||
$random = $instance['random']; if (empty($random)) $random = 'off';
|
||||
$archives = $instance['archives']; if (empty($archives)) $archives = 'off';
|
||||
$comments = $instance['comments']; if (empty($comments)) $comments = 'off';
|
||||
$archive_path = $instance['archive_path'];
|
||||
$next = $instance['next']; if (empty($next)) $next = 'on';
|
||||
$buyprint = $instance['buyprint']; if (empty($buyprint)) $buyprint = 'off';
|
||||
$comictitle = $instance['comictitle']; if (empty($comictitle)) $comictitle = 'off';
|
||||
$lastgohome = $instance['lastgohome']; if (empty($lastgohome)) $lastgohome = 'off';
|
||||
|
||||
|
||||
$first_title = $instance['first_title'];
|
||||
$last_title = $instance['last_title'];
|
||||
$story_prev_title = $instance['story_prev_title'];
|
||||
$story_next_title = $instance['story_next_title'];
|
||||
$previous_title = $instance['previous_title'];
|
||||
$random_title = $instance['random_title'];
|
||||
$archives_title = $instance['archives_title'];
|
||||
$comments_title = $instance['comments_title'];
|
||||
$next_title = $instance['next_title'];
|
||||
$buyprint_title = $instance['buyprint_title'];
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<label for="<?php echo $this->get_field_id('first'); ?>"><strong><?php _e('First','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('first'); ?>" name="<?php echo $this->get_field_name('first'); ?>" type="radio" value="on"<?php if ( $first == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('first'); ?>" name="<?php echo $this->get_field_name('first'); ?>" type="radio" value="off"<?php if ( $first == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('first_title'); ?>" name="<?php echo $this->get_field_name('first_title'); ?>" type="text" value="<?php echo attribute_escape($first_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('last'); ?>"><strong><?php _e('Last','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('last'); ?>" name="<?php echo $this->get_field_name('last'); ?>" type="radio" value="on"<?php if ( $last == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('last'); ?>" name="<?php echo $this->get_field_name('last'); ?>" type="radio" value="off"<?php if ( $last == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('last_title'); ?>" name="<?php echo $this->get_field_name('last_title'); ?>" type="text" value="<?php echo attribute_escape($last_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('previous'); ?>"><strong><?php _e('Previous','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('previous'); ?>" name="<?php echo $this->get_field_name('previous'); ?>" type="radio" value="on"<?php if ( $previous == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('previous'); ?>" name="<?php echo $this->get_field_name('previous'); ?>" type="radio" value="off"<?php if ( $previous == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('previous_title'); ?>" name="<?php echo $this->get_field_name('previous_title'); ?>" type="text" value="<?php echo attribute_escape($previous_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('next'); ?>"><strong><?php _e('Next','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('next'); ?>" name="<?php echo $this->get_field_name('next'); ?>" type="radio" value="on"<?php if ( $next == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('next'); ?>" name="<?php echo $this->get_field_name('next'); ?>" type="radio" value="off"<?php if ( $next == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('next_title'); ?>" name="<?php echo $this->get_field_name('next_title'); ?>" type="text" value="<?php echo attribute_escape($next_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('story_prev'); ?>"><strong><?php _e('Previous Chapter','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('story_prev'); ?>" name="<?php echo $this->get_field_name('story_prev'); ?>" type="radio" value="on"<?php if ( $story_prev == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('story_prev'); ?>" name="<?php echo $this->get_field_name('story_prev'); ?>" type="radio" value="off"<?php if ( $story_prev == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('story_prev_title'); ?>" name="<?php echo $this->get_field_name('story_prev_title'); ?>" type="text" value="<?php echo attribute_escape($story_prev_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('story_next'); ?>"><strong><?php _e('Next Chapter','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('story_next'); ?>" name="<?php echo $this->get_field_name('story_next'); ?>" type="radio" value="on"<?php if ( $story_next == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('story_next'); ?>" name="<?php echo $this->get_field_name('story_next'); ?>" type="radio" value="off"<?php if ( $story_next == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('story_next_title'); ?>" name="<?php echo $this->get_field_name('story_next_title'); ?>" type="text" value="<?php echo attribute_escape($story_next_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('comictitle'); ?>"><strong><?php _e('Comic Title','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('comictitle'); ?>" name="<?php echo $this->get_field_name('comictitle'); ?>" type="radio" value="on"<?php if ( $comictitle == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('comictitle'); ?>" name="<?php echo $this->get_field_name('comictitle'); ?>" type="radio" value="off"<?php if ( $comictitle == "off") { echo " checked"; } ?> />Off<br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('archives'); ?>"><strong><?php _e('Archives','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('archives'); ?>" name="<?php echo $this->get_field_name('archives'); ?>" type="radio" value="on"<?php if ( $archives == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('archives'); ?>" name="<?php echo $this->get_field_name('archives'); ?>" type="radio" value="off"<?php if ( $archives == "off") { echo " checked"; } ?> />Off<br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('archives_title'); ?>" name="<?php echo $this->get_field_name('archives_title'); ?>" type="text" value="<?php echo attribute_escape($archives_title); ?>" /></label><br />
|
||||
Archive URL:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('archive_path'); ?>" name="<?php echo $this->get_field_name('archive_path'); ?>" type="text" value="<?php echo attribute_escape($archive_path); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('comments'); ?>"><strong><?php _e('Comments','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('comments'); ?>" name="<?php echo $this->get_field_name('comments'); ?>" type="radio" value="on"<?php if ( $comments == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('comments'); ?>" name="<?php echo $this->get_field_name('comments'); ?>" type="radio" value="off"<?php if ( $comments == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('comments_title'); ?>" name="<?php echo $this->get_field_name('comments_title'); ?>" type="text" value="<?php echo attribute_escape($comments_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('random'); ?>"><strong><?php _e('Random','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('random'); ?>" name="<?php echo $this->get_field_name('random'); ?>" type="radio" value="on"<?php if ( $random == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('random'); ?>" name="<?php echo $this->get_field_name('random'); ?>" type="radio" value="off"<?php if ( $random == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('random_title'); ?>" name="<?php echo $this->get_field_name('random_title'); ?>" type="text" value="<?php echo attribute_escape($random_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('buyprint'); ?>"><strong><?php _e('Buy Print','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('buyprint'); ?>" name="<?php echo $this->get_field_name('buyprint'); ?>" type="radio" value="on"<?php if ( $buyprint == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('buyprint'); ?>" name="<?php echo $this->get_field_name('buyprint'); ?>" type="radio" value="off"<?php if ( $buyprint == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('buyprint_title'); ?>" name="<?php echo $this->get_field_name('buyprint_title'); ?>" type="text" value="<?php echo attribute_escape($buyprint_title); ?>" /></label><br />
|
||||
<hr>
|
||||
<?php _e('Next to Last, and latest Button goes home?','comicpress'); ?><br />
|
||||
<input id="<?php echo $this->get_field_id('lastgohome'); ?>" name="<?php echo $this->get_field_name('lastgohome'); ?>" type="radio" value="on"<?php if ( $lastgohome == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('lastgohome'); ?>" name="<?php echo $this->get_field_name('lastgohome'); ?>" type="radio" value="off"<?php if ( $lastgohome == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
register_widget('widget_comicpress_graphical_navigation');
|
||||
|
||||
|
||||
function widget_comicpress_graphical_navigation_init() {
|
||||
new widget_comicpress_graphical_navigation();
|
||||
}
|
||||
|
||||
add_action('widgets_init', 'widget_comicpress_graphical_navigation_init');
|
||||
|
||||
// Depreciated
|
||||
?>
|
|
@ -0,0 +1,285 @@
|
|||
<?php
|
||||
/*
|
||||
Widget Name: Graphical Navigation
|
||||
Widget URI: http://comicpress.org/
|
||||
Description: You can place graphical navigation buttons on your comic, for ComicPress 2.8
|
||||
Author: Philip M. Hofer (Frumph)
|
||||
Version: 1.01
|
||||
Author URI: http://frumph.net/
|
||||
|
||||
*/
|
||||
|
||||
class widget_comicpress_graphical_navigation extends WP_Widget {
|
||||
|
||||
function widget_comicpress_graphical_navigation() {
|
||||
$widget_ops = array('classname' => 'widget_comicpress_graphical_navigation', 'description' => __('Displays Graphical Navigation Buttons. (used in comic sidebars)','comicpress') );
|
||||
$this->WP_Widget('graphicalnavigation', __('Comic Navigation (orig)','comicpress'), $widget_ops);
|
||||
}
|
||||
|
||||
function widget($args, $instance) {
|
||||
global $wp_query, $post;
|
||||
|
||||
if (is_home() || is_single()) {
|
||||
|
||||
$this_permalink = get_permalink();
|
||||
|
||||
$temp_query = $wp_query->is_single;
|
||||
$wp_query->is_single = true;
|
||||
$prev_comic = get_previous_comic_permalink();
|
||||
$next_comic = get_next_comic_permalink();
|
||||
$wp_query->is_single = $temp_query;
|
||||
$temp_query = null;
|
||||
|
||||
$first_comic = get_first_comic_permalink();
|
||||
$last_comic = get_last_comic_permalink();
|
||||
|
||||
$prev_story = get_previous_storyline_start_permalink();
|
||||
$next_story = get_next_storyline_start_permalink();
|
||||
|
||||
$latest_comic = get_permalink( get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), false) );
|
||||
?>
|
||||
<div id="comic_navi_wrapper">
|
||||
<table id="comic_navi" cellpadding="0" cellspacing="0"><tr><td>
|
||||
<?php if ($instance['first'] == 'on') {
|
||||
if (!empty($first_comic) && ($first_comic != $this_permalink)) { ?>
|
||||
<a href="<?php echo $first_comic; ?>" class="navi navi-first" title="<?php echo $instance['first_title']; ?>"><?php echo $instance['first_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-first navi-void"><?php echo $instance['first_title']; ?></div>
|
||||
<?php }
|
||||
}
|
||||
if ($instance['story_prev'] == 'on') {
|
||||
if (!empty($prev_story)) { ?>
|
||||
<a href="<?php echo $prev_story; ?>" class="navi navi-prevchap" title="<?php echo $instance['story_prev_title']; ?>"><?php echo $instance['story_prev_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-prevchap navi-void"><?php echo $instance['story_prev_title']; ?></div>
|
||||
<?php }
|
||||
}
|
||||
if ($instance['previous'] == 'on') {
|
||||
if (!empty($prev_comic)) { ?>
|
||||
<a href="<?php echo $prev_comic; ?>" class="navi navi-prev" title="<?php echo $instance['previous_title']; ?>"><?php echo $instance['previous_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-prev navi-void"><?php echo $instance['previous_title']; ?></div>
|
||||
<?php }
|
||||
}
|
||||
if ($instance['archives'] == 'on' && !empty($instance['archive_path'])) { ?>
|
||||
<a href="<?php echo $instance['archive_path']; ?>" class="navi navi-archive" title="<?php echo $instance['archives_title']; ?>"><?php echo $instance['archives_title']; ?></a>
|
||||
<?php }
|
||||
if ($instance['random'] == 'on') { ?>
|
||||
<a href="<?php echo bloginfo('url'); ?>/?randomcomic" class="navi navi-random" title="<?php echo $instance['random_title']; ?>"><?php echo $instance['random_title']; ?></a>
|
||||
<?php }
|
||||
if ($instance['comictitle'] == 'on') { ?>
|
||||
<div class="navi-comictitle"><a href="<?php the_permalink(); ?>">"<?php the_title(); ?>"</a></div>
|
||||
<?php }
|
||||
if ($instance['comments'] == 'on') { ?>
|
||||
<a href="<?php the_permalink(); ?>#comment" class="navi navi-comments" title="<?php echo $instance['comments_title']; ?>"><span class="navi-comments-count"><?php comments_number('0', '1', '%'); ?></span><?php echo $instance['comments_title']; ?></a>
|
||||
<?php }
|
||||
if ($instance['buyprint'] == 'on') { ?>
|
||||
<form method="post" title="<?php echo $instance['buyprint_title']; ?>" action="<?php global $buy_print_url; echo $buy_print_url; ?>" class="navi-buyprint-form">
|
||||
<input type="hidden" name="comic" value="<?php echo get_the_ID(); ?>" />
|
||||
<button class="navi navi-buyprint" type="submit" value="buyprint"><?php echo $instance['buyprint_title']; ?></button>
|
||||
</form>
|
||||
<?php }
|
||||
if ($instance['next'] == 'on') {
|
||||
if (!empty($next_comic)) {
|
||||
if (($next_comic == $latest_comic) && $instance['lastgohome'] == 'on') { ?>
|
||||
<a href="/" class="navi navi-next" title="<?php echo $instance['next_title']; ?>"><?php echo $instance['next_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo $next_comic; ?>" class="navi navi-next" title="<?php echo $instance['next_title']; ?>"><?php echo $instance['next_title']; ?></a>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-next navi-void"><?php echo $instance['next_title']; ?></div>
|
||||
<?php }
|
||||
}
|
||||
if ($instance['story_next'] == 'on') {
|
||||
if (!empty($next_story) && !is_home()) { ?>
|
||||
<a href="<?php echo $next_story; ?>" class="navi navi-nextchap" title="<?php echo $instance['story_next_title']; ?>"><?php echo $instance['story_next_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-nextchap navi-void"><?php echo $instance['story_next_title']; ?></div>
|
||||
<?php }
|
||||
}
|
||||
if ($instance['last'] == 'on') {
|
||||
if (!empty($last_comic) && ($last_comic != $this_permalink)) {
|
||||
if ($instance['lastgohome'] == 'on') { ?>
|
||||
<a href="/" class="navi navi-last" title="<?php echo $instance['last_title']; ?>"><?php echo $instance['last_title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo $last_comic; ?>" class="navi navi-last" title="<?php echo $instance['last_title']; ?>"><?php echo $instance['last_title']; ?></a>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<div class="navi navi-last navi-void"><?php echo $instance['last_title']; ?></div>
|
||||
<?php }
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
$instance['first'] = $new_instance['first'];
|
||||
$instance['last'] = $new_instance['last'];
|
||||
$instance['story_prev'] = $new_instance['story_prev'];
|
||||
$instance['story_next'] = $new_instance['story_next'];
|
||||
$instance['previous'] = $new_instance['previous'];
|
||||
$instance['random'] = $new_instance['random'];
|
||||
$instance['archives'] = $new_instance['archives'];
|
||||
$instance['comments'] = $new_instance['comments'];
|
||||
$instance['next'] = $new_instance['next'];
|
||||
$instance['archive_path'] = strip_tags($new_instance['archive_path']);
|
||||
$instance['buyprint'] = $new_instance['buyprint'];
|
||||
$instance['comictitle'] = $new_instance['comictitle'];
|
||||
$instance['lastgohome'] = $new_instance['lastgohome'];
|
||||
|
||||
$instance['first_title'] = strip_tags($new_instance['first_title']);
|
||||
$instance['last_title'] = strip_tags($new_instance['last_title']);
|
||||
$instance['story_prev_title'] = strip_tags($new_instance['story_prev_title']);
|
||||
$instance['story_next_title'] = strip_tags($new_instance['story_next_title']);
|
||||
$instance['previous_title'] = strip_tags($new_instance['previous_title']);
|
||||
$instance['random_title'] = strip_tags($new_instance['random_title']);
|
||||
$instance['archives_title'] = strip_tags($new_instance['archives_title']);
|
||||
$instance['comments_title'] = strip_tags($new_instance['comments_title']);
|
||||
$instance['next_title'] = strip_tags($new_instance['next_title']);
|
||||
$instance['buyprint_title'] = strip_tags($new_instance['buyprint_title']);
|
||||
return $instance;
|
||||
}
|
||||
|
||||
function form($instance) {
|
||||
$instance = wp_parse_args( (array) $instance, array(
|
||||
'first' => 'on',
|
||||
'last' => 'on',
|
||||
'story_prev' => 'off',
|
||||
'story_next' => 'off',
|
||||
'previous' => 'on',
|
||||
'random' => 'off',
|
||||
'archives' => 'off',
|
||||
'comments' => 'off',
|
||||
'next' => 'on',
|
||||
'archive_path' => '',
|
||||
'buyprint' => 'off',
|
||||
'first_title' => 'First',
|
||||
'last_title' => 'Latest',
|
||||
'story_prev_title' => 'Chapter',
|
||||
'story_next_title' => 'Chapter',
|
||||
'previous_title' => 'Previous',
|
||||
'random_title' => 'Random',
|
||||
'archives_title' => 'Archives',
|
||||
'comments_title' => 'Comments',
|
||||
'next_title' => 'Next',
|
||||
'buyprint_title' => 'Buy Print',
|
||||
'comictitle' => 'off',
|
||||
'lastgohome' => 'off',
|
||||
) );
|
||||
$first = $instance['first']; if (empty($first)) $first = 'on';
|
||||
$last = $instance['last']; if (empty($last)) $last = 'on';
|
||||
$story_prev = $instance['story_prev']; if (empty($story_prev)) $story_prev = 'off';
|
||||
$story_next = $instance['story_next']; if (empty($story_next)) $story_next = 'off';
|
||||
$previous = $instance['previous']; if (empty($previous)) $previous = 'on';
|
||||
$random = $instance['random']; if (empty($random)) $random = 'off';
|
||||
$archives = $instance['archives']; if (empty($archives)) $archives = 'off';
|
||||
$comments = $instance['comments']; if (empty($comments)) $comments = 'off';
|
||||
$archive_path = $instance['archive_path'];
|
||||
$next = $instance['next']; if (empty($next)) $next = 'on';
|
||||
$buyprint = $instance['buyprint']; if (empty($buyprint)) $buyprint = 'off';
|
||||
$comictitle = $instance['comictitle']; if (empty($comictitle)) $comictitle = 'off';
|
||||
$lastgohome = $instance['lastgohome']; if (empty($lastgohome)) $lastgohome = 'off';
|
||||
|
||||
|
||||
$first_title = $instance['first_title'];
|
||||
$last_title = $instance['last_title'];
|
||||
$story_prev_title = $instance['story_prev_title'];
|
||||
$story_next_title = $instance['story_next_title'];
|
||||
$previous_title = $instance['previous_title'];
|
||||
$random_title = $instance['random_title'];
|
||||
$archives_title = $instance['archives_title'];
|
||||
$comments_title = $instance['comments_title'];
|
||||
$next_title = $instance['next_title'];
|
||||
$buyprint_title = $instance['buyprint_title'];
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<label for="<?php echo $this->get_field_id('first'); ?>"><strong><?php _e('First','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('first'); ?>" name="<?php echo $this->get_field_name('first'); ?>" type="radio" value="on"<?php if ( $first == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('first'); ?>" name="<?php echo $this->get_field_name('first'); ?>" type="radio" value="off"<?php if ( $first == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('first_title'); ?>" name="<?php echo $this->get_field_name('first_title'); ?>" type="text" value="<?php echo attribute_escape($first_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('last'); ?>"><strong><?php _e('Last','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('last'); ?>" name="<?php echo $this->get_field_name('last'); ?>" type="radio" value="on"<?php if ( $last == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('last'); ?>" name="<?php echo $this->get_field_name('last'); ?>" type="radio" value="off"<?php if ( $last == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('last_title'); ?>" name="<?php echo $this->get_field_name('last_title'); ?>" type="text" value="<?php echo attribute_escape($last_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('previous'); ?>"><strong><?php _e('Previous','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('previous'); ?>" name="<?php echo $this->get_field_name('previous'); ?>" type="radio" value="on"<?php if ( $previous == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('previous'); ?>" name="<?php echo $this->get_field_name('previous'); ?>" type="radio" value="off"<?php if ( $previous == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('previous_title'); ?>" name="<?php echo $this->get_field_name('previous_title'); ?>" type="text" value="<?php echo attribute_escape($previous_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('next'); ?>"><strong><?php _e('Next','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('next'); ?>" name="<?php echo $this->get_field_name('next'); ?>" type="radio" value="on"<?php if ( $next == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('next'); ?>" name="<?php echo $this->get_field_name('next'); ?>" type="radio" value="off"<?php if ( $next == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('next_title'); ?>" name="<?php echo $this->get_field_name('next_title'); ?>" type="text" value="<?php echo attribute_escape($next_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('story_prev'); ?>"><strong><?php _e('Previous Chapter','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('story_prev'); ?>" name="<?php echo $this->get_field_name('story_prev'); ?>" type="radio" value="on"<?php if ( $story_prev == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('story_prev'); ?>" name="<?php echo $this->get_field_name('story_prev'); ?>" type="radio" value="off"<?php if ( $story_prev == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('story_prev_title'); ?>" name="<?php echo $this->get_field_name('story_prev_title'); ?>" type="text" value="<?php echo attribute_escape($story_prev_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('story_next'); ?>"><strong><?php _e('Next Chapter','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('story_next'); ?>" name="<?php echo $this->get_field_name('story_next'); ?>" type="radio" value="on"<?php if ( $story_next == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('story_next'); ?>" name="<?php echo $this->get_field_name('story_next'); ?>" type="radio" value="off"<?php if ( $story_next == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('story_next_title'); ?>" name="<?php echo $this->get_field_name('story_next_title'); ?>" type="text" value="<?php echo attribute_escape($story_next_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('comictitle'); ?>"><strong><?php _e('Comic Title','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('comictitle'); ?>" name="<?php echo $this->get_field_name('comictitle'); ?>" type="radio" value="on"<?php if ( $comictitle == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('comictitle'); ?>" name="<?php echo $this->get_field_name('comictitle'); ?>" type="radio" value="off"<?php if ( $comictitle == "off") { echo " checked"; } ?> />Off<br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('archives'); ?>"><strong><?php _e('Archives','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('archives'); ?>" name="<?php echo $this->get_field_name('archives'); ?>" type="radio" value="on"<?php if ( $archives == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('archives'); ?>" name="<?php echo $this->get_field_name('archives'); ?>" type="radio" value="off"<?php if ( $archives == "off") { echo " checked"; } ?> />Off<br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('archives_title'); ?>" name="<?php echo $this->get_field_name('archives_title'); ?>" type="text" value="<?php echo attribute_escape($archives_title); ?>" /></label><br />
|
||||
Archive URL:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('archive_path'); ?>" name="<?php echo $this->get_field_name('archive_path'); ?>" type="text" value="<?php echo attribute_escape($archive_path); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('comments'); ?>"><strong><?php _e('Comments','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('comments'); ?>" name="<?php echo $this->get_field_name('comments'); ?>" type="radio" value="on"<?php if ( $comments == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('comments'); ?>" name="<?php echo $this->get_field_name('comments'); ?>" type="radio" value="off"<?php if ( $comments == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('comments_title'); ?>" name="<?php echo $this->get_field_name('comments_title'); ?>" type="text" value="<?php echo attribute_escape($comments_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('random'); ?>"><strong><?php _e('Random','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('random'); ?>" name="<?php echo $this->get_field_name('random'); ?>" type="radio" value="on"<?php if ( $random == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('random'); ?>" name="<?php echo $this->get_field_name('random'); ?>" type="radio" value="off"<?php if ( $random == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('random_title'); ?>" name="<?php echo $this->get_field_name('random_title'); ?>" type="text" value="<?php echo attribute_escape($random_title); ?>" /></label><br />
|
||||
|
||||
<br />
|
||||
<label for="<?php echo $this->get_field_id('buyprint'); ?>"><strong><?php _e('Buy Print','comicpress'); ?></strong><br />
|
||||
<input id="<?php echo $this->get_field_id('buyprint'); ?>" name="<?php echo $this->get_field_name('buyprint'); ?>" type="radio" value="on"<?php if ( $buyprint == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('buyprint'); ?>" name="<?php echo $this->get_field_name('buyprint'); ?>" type="radio" value="off"<?php if ( $buyprint == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
Title:<br />
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('buyprint_title'); ?>" name="<?php echo $this->get_field_name('buyprint_title'); ?>" type="text" value="<?php echo attribute_escape($buyprint_title); ?>" /></label><br />
|
||||
<hr>
|
||||
<?php _e('Next to Last, and latest Button goes home?','comicpress'); ?><br />
|
||||
<input id="<?php echo $this->get_field_id('lastgohome'); ?>" name="<?php echo $this->get_field_name('lastgohome'); ?>" type="radio" value="on"<?php if ( $lastgohome == "on") { echo " checked"; } ?> />On</label> <input id="<?php echo $this->get_field_id('lastgohome'); ?>" name="<?php echo $this->get_field_name('lastgohome'); ?>" type="radio" value="off"<?php if ( $lastgohome == "off") { echo " checked"; } ?> />Off</label><br />
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
register_widget('widget_comicpress_graphical_navigation');
|
||||
|
||||
|
||||
function widget_comicpress_graphical_navigation_init() {
|
||||
new widget_comicpress_graphical_navigation();
|
||||
}
|
||||
|
||||
add_action('widgets_init', 'widget_comicpress_graphical_navigation_init');
|
||||
|
||||
?>
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
// Depreciated
|
||||
?>
|