diff --git a/.gitignore b/.gitignore index a938aaa..fd85171 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ .settings/ .DS_Store coverage/ +comicpress-config.php diff --git a/chrome_style.css b/chrome_style.css deleted file mode 100644 index 0b0c65a..0000000 --- a/chrome_style.css +++ /dev/null @@ -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 */ - } \ No newline at end of file diff --git a/classes/ComicPressMediaHandling.inc b/classes/ComicPressMediaHandling.inc new file mode 100644 index 0000000..e5fbb41 --- /dev/null +++ b/classes/ComicPressMediaHandling.inc @@ -0,0 +1,229 @@ +_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; + } +} + diff --git a/classes/ComicPressPostMediaHandlingMetabox.inc b/classes/ComicPressPostMediaHandlingMetabox.inc new file mode 100644 index 0000000..7a6cabb --- /dev/null +++ b/classes/ComicPressPostMediaHandlingMetabox.inc @@ -0,0 +1,49 @@ +_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')); \ No newline at end of file diff --git a/classes/partials/post-media-handling/metabox.inc b/classes/partials/post-media-handling/metabox.inc new file mode 100644 index 0000000..43f5a45 --- /dev/null +++ b/classes/partials/post-media-handling/metabox.inc @@ -0,0 +1,26 @@ + + + + +

+ Enter in relative or absolute URLs to the images you want to use for this post. This will override file system searches. +

+ + __('Comic', 'comicpress'), + 'rss' => __('RSS', 'comicpress'), + 'archive' => __('Archive', 'comicpress'), + 'mini' => __('Mini', 'comicpress') + ) as $field => $label) { + $value = isset($media_info[$field]) ? $media_info[$field] : ''; + ?> + + + + + +
URL + +
diff --git a/comicpress-config.php b/comicpress-config.php.dist similarity index 99% rename from comicpress-config.php rename to comicpress-config.php.dist index 43e4c38..972c717 100644 --- a/comicpress-config.php +++ b/comicpress-config.php.dist @@ -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"; - -?> diff --git a/comicpress-debug.php b/comicpress-debug.php new file mode 100644 index 0000000..575cd11 --- /dev/null +++ b/comicpress-debug.php @@ -0,0 +1,68 @@ +' . __('post categories.','comicpress') . '' . + __(' 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)) { + ?> +
+

ComicPress Debug

+ ComicPress doesn't seem to be fully installed at this time, check out these messages.
+
+ ${text}"; break; + case 'raw': echo $text; break; + default: echo "

${text}

"; break; + } + } + } + ?> +
+
+
+ \ No newline at end of file diff --git a/comicpress-options-config.php b/comicpress-options-config.php new file mode 100644 index 0000000..7ac7fd1 --- /dev/null +++ b/comicpress-options-config.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/comments.php b/comments.php index 97b0daf..dbbd88c 100644 --- a/comments.php +++ b/comments.php @@ -16,24 +16,45 @@ if ( post_password_required() ) { ?> - +

- +
    - 'comment', - 'reply_text' => __('Reply to %s¬','comicpress'), - 'callback' => 'comicpress_comments_callback', - 'end-callback' => 'comicpress_comments_end_callback', - 'avatar_size'=>64 - ) - ); - } else { - wp_list_comments(array('type' => 'comment', 'avatar_size'=>64)); + 'comment', + 'reply_text' => __('Reply to %s¬','comicpress'), + 'callback' => 'comicpress_comments_callback', + 'end-callback' => 'comicpress_comments_end_callback', + 'avatar_size'=>64 + ) + ); + } else { + wp_list_comments(array('type' => 'comment', 'avatar_size'=>64)); }?>
+ + +
+

+
    + +
+
+ + @@ -110,26 +131,7 @@ if ( post_password_required() ) { ?> - - -

-
    - -
- +
\ No newline at end of file diff --git a/functions.php b/functions.php index 7bcfc2d..0a02516 100644 --- a/functions.php +++ b/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())); +$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 %s folder that matched the pattern %s. 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()); -} diff --git a/functions/checkbrowser.php b/functions/checkbrowser.php new file mode 100644 index 0000000..7ac7fd1 --- /dev/null +++ b/functions/checkbrowser.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/functions/comment-functions.php b/functions/comment-functions.php index 472357a..d6f228f 100644 --- a/functions/comment-functions.php +++ b/functions/comment-functions.php @@ -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($url == true && $url != 'http://') - echo ''; - $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 ''; + if ($comment_type != 'pingback' && $comment_type != 'trackback') { + echo '
'; + if($url == true && $url != 'http://') + echo ''; + $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, 64)); } else { echo ''; } + if($url == true && $url != 'http://') + echo ''; + echo '
'; } - if($url == true && $url != 'http://') - echo ''; } /** @@ -123,51 +117,54 @@ function comicpress_comments_callback($comment, $args, $depth) {
  • > -
    - -
    +
    + +
    + +
    - - -
    - + )); + endif; ?> + + '.__('Edit','comicpress').'',' | ',''); ?> + + comment_approved == '0') : ?> +
    + +
    - -
    + + +
    + +
    + +
    + +
    + comment_status) { - if (comicpress_check_child_file('partials/commentlink') == false) { ?> + if (comicpress_check_child_file('partials/commentlink') == false && !(is_single())) { ?> comment_status) { + if ('open' == $post->comment_status && !$comicpress_options['static_blog'] && !(is_single())) { if (comicpress_check_child_file('partials/commentlink') == false) { ?> \ No newline at end of file diff --git a/functions/syndication.php b/functions/syndication.php new file mode 100644 index 0000000..2e3cba3 --- /dev/null +++ b/functions/syndication.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/functions/userpages.php b/functions/userpages.php new file mode 100644 index 0000000..7ac7fd1 --- /dev/null +++ b/functions/userpages.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/functions/widget-template-tags.php b/functions/widget-template-tags.php new file mode 100644 index 0000000..8b617b7 --- /dev/null +++ b/functions/widget-template-tags.php @@ -0,0 +1,48 @@ +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')); +} diff --git a/functions/wpmu.php b/functions/wpmu.php new file mode 100644 index 0000000..f2651dd --- /dev/null +++ b/functions/wpmu.php @@ -0,0 +1,33 @@ + -
    diff --git a/ie_style.css b/ie_style.css deleted file mode 100644 index f5f61de..0000000 --- a/ie_style.css +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/images/options/3c.png b/images/options/3c.png index cbbc95f..b91070d 100644 Binary files a/images/options/3c.png and b/images/options/3c.png differ diff --git a/images/options/3c2r.png b/images/options/3c2r.png index 34d9201..deb0c04 100644 Binary files a/images/options/3c2r.png and b/images/options/3c2r.png differ diff --git a/images/options/blog.png b/images/options/blog.png deleted file mode 100644 index a8252ec..0000000 Binary files a/images/options/blog.png and /dev/null differ diff --git a/images/options/gn.png b/images/options/gn.png index 9b61709..373fac1 100644 Binary files a/images/options/gn.png and b/images/options/gn.png differ diff --git a/images/options/rgn.png b/images/options/rgn.png index 628a249..4ce66c7 100644 Binary files a/images/options/rgn.png and b/images/options/rgn.png differ diff --git a/images/options/standard.png b/images/options/standard.png index 3423f28..2f46f49 100644 Binary files a/images/options/standard.png and b/images/options/standard.png differ diff --git a/images/options/v.png b/images/options/v.png index 3fdce63..4bb1070 100644 Binary files a/images/options/v.png and b/images/options/v.png differ diff --git a/images/options/v3c.png b/images/options/v3c.png index 97a2142..4d2ebaf 100644 Binary files a/images/options/v3c.png and b/images/options/v3c.png differ diff --git a/images/options/v3cr.png b/images/options/v3cr.png new file mode 100644 index 0000000..5624f2c Binary files /dev/null and b/images/options/v3cr.png differ diff --git a/index.php b/index.php index 93a8c12..806849e 100644 --- a/index.php +++ b/index.php @@ -8,6 +8,10 @@
    + +
    + +
    @@ -43,6 +47,11 @@ + +
    +
    + +
    diff --git a/layout-foot.php b/layout-foot.php index e5ebdc5..bd5658e 100644 --- a/layout-foot.php +++ b/layout-foot.php @@ -1,12 +1,19 @@
    - +
    +
    +
    +
    + + + diff --git a/layout-head.php b/layout-head.php index 6ea6af0..ebd097d 100644 --- a/layout-head.php +++ b/layout-head.php @@ -8,23 +8,27 @@
    - - -
    -
    + + +
    - - -
    -
    - - + + +
    +
    + + + +
    +
    + +
    -
    +
    diff --git a/lynx_style.css b/lynx_style.css deleted file mode 100644 index 6e9c0b4..0000000 --- a/lynx_style.css +++ /dev/null @@ -1,3 +0,0 @@ -/* ComicPress Custom CSS over-rides for [ lynx ]: ComicPress - 2.8 */ - -html { overflow-y: scroll; } \ No newline at end of file diff --git a/notie_style.css b/notie_style.css deleted file mode 100644 index 580ecde..0000000 --- a/notie_style.css +++ /dev/null @@ -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 */ -} \ No newline at end of file diff --git a/ns4_style.css b/ns4_style.css deleted file mode 100644 index c954931..0000000 --- a/ns4_style.css +++ /dev/null @@ -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 */ - } diff --git a/opera_style.css b/opera_style.css deleted file mode 100644 index 349cd1e..0000000 --- a/opera_style.css +++ /dev/null @@ -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 */ - } - diff --git a/options/archivesearchoptions.php b/options/archivesearchoptions.php index d10ce80..e92cf0c 100644 --- a/options/archivesearchoptions.php +++ b/options/archivesearchoptions.php @@ -55,7 +55,7 @@ - + diff --git a/options/generaloptions.php b/options/generaloptions.php index 83b1117..56688cf 100644 --- a/options/generaloptions.php +++ b/options/generaloptions.php @@ -79,7 +79,7 @@ /> - + - + /> @@ -264,7 +264,7 @@ /> - + diff --git a/options/themestyle.php b/options/themestyle.php index ac8c5f2..4e2709a 100644 --- a/options/themestyle.php +++ b/options/themestyle.php @@ -28,6 +28,7 @@ + diff --git a/safari_style.css b/safari_style.css deleted file mode 100644 index f4bfc07..0000000 --- a/safari_style.css +++ /dev/null @@ -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 */ -} \ No newline at end of file diff --git a/screenshot.png b/screenshot.png index bcad0f6..9063027 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/sidebar-left.php b/sidebar-left.php index e210e2e..8779f97 100644 --- a/sidebar-left.php +++ b/sidebar-left.php @@ -6,7 +6,7 @@