From 57afce8c1c22f84e4be55d46247a15dacbeca693 Mon Sep 17 00:00:00 2001 From: "Philip M. Hofer (Frumph)" Date: Sat, 19 Sep 2009 03:11:37 -0700 Subject: [PATCH] 2.8.1.10 Signed-off-by: Philip M. Hofer (Frumph) --- 404.php | 10 +- archive-comic-calendar.php | 4 +- archive-comic-storyline-thumbs.php | 4 +- archive-comic-storyline.php | 2 +- archive-comic-year.php | 27 +- archive-comic.php | 2 +- archive.php | 131 ++-- archives.php | 2 +- author.php | 2 +- buystrip.php | 4 +- comicpress-options-config.php | 11 + comicpress-options.php | 927 ++------------------------- functions.php | 69 +- functions/classes.php | 22 +- functions/comment-functions.php | 233 +++++++ functions/displayblogpost.php | 2 +- functions/displaycomicpost.php | 2 +- functions/membersonly.php | 63 +- functions/rawformatting.php | 3 - image.php | 4 +- links.php | 2 +- members-blog.php | 30 + options/archivesearchoptions.php | 67 ++ options/buyprintoptions.php | 91 +++ options/customheaderoptions.php | 59 ++ options/generaloptions.php | 212 ++++++ options/indexoptions.php | 75 +++ options/membersoptions.php | 32 + options/menubaroptions.php | 87 +++ options/postoptions.php | 182 ++++++ options/themestyle.php | 100 +++ page.php | 2 +- search-transcript.php | 9 +- search.php | 9 +- single.php | 2 +- style.css | 19 +- themepack/drippy/style.css | 2 +- themepack/silver/background.png | Bin 0 -> 310 bytes themepack/silver/browse-search.png | Bin 0 -> 9651 bytes themepack/silver/comment-balloon.png | Bin 0 -> 2185 bytes themepack/silver/commentlink.php | 1 + themepack/silver/menu-nav.png | Bin 0 -> 8756 bytes themepack/silver/menu.png | Bin 0 -> 343 bytes themepack/silver/notes.php | 7 + themepack/silver/screenshot.png | Bin 0 -> 42455 bytes themepack/silver/style.css | 497 ++++++++++++++ wpmu-functions.php | 52 -- 47 files changed, 1953 insertions(+), 1108 deletions(-) create mode 100644 functions/comment-functions.php create mode 100644 members-blog.php create mode 100644 options/archivesearchoptions.php create mode 100644 options/buyprintoptions.php create mode 100644 options/customheaderoptions.php create mode 100644 options/generaloptions.php create mode 100644 options/indexoptions.php create mode 100644 options/membersoptions.php create mode 100644 options/menubaroptions.php create mode 100644 options/postoptions.php create mode 100644 options/themestyle.php create mode 100644 themepack/silver/background.png create mode 100644 themepack/silver/browse-search.png create mode 100644 themepack/silver/comment-balloon.png create mode 100644 themepack/silver/commentlink.php create mode 100644 themepack/silver/menu-nav.png create mode 100644 themepack/silver/menu.png create mode 100644 themepack/silver/notes.php create mode 100644 themepack/silver/screenshot.png create mode 100644 themepack/silver/style.css delete mode 100644 wpmu-functions.php diff --git a/404.php b/404.php index 8c52180..a1f1ea2 100644 --- a/404.php +++ b/404.php @@ -1,15 +1,7 @@ - - - - -
-
- - -
+

Page Not Found

diff --git a/archive-comic-calendar.php b/archive-comic-calendar.php index 4c4081f..d89fa42 100644 --- a/archive-comic-calendar.php +++ b/archive-comic-calendar.php @@ -5,7 +5,7 @@ Template Name: Comic Calendar Archive ?> - + 'November', 'days' => '30'); $month['12'] = array('month' => 'December', 'days' => '31'); ?> -
+
diff --git a/archive-comic-storyline-thumbs.php b/archive-comic-storyline-thumbs.php index 8e510f0..c69511f 100644 --- a/archive-comic-storyline-thumbs.php +++ b/archive-comic-storyline-thumbs.php @@ -6,7 +6,7 @@ Template Name: Comic Storyline with Thumbs -
+
@@ -27,7 +27,7 @@ Template Name: Comic Storyline with Thumbs $category_id = end($parts); $category = $categories_by_id[$category_id]; $description = $category->description; - $first_comic_in_category = get_terminal_post_in_category($category_id); + $first_comic_in_category = get_terminal_post_in_category($category_id,true); $first_comic_permalink = get_permalink($first_comic_in_category->ID); $archive_image = null; foreach (array("archive", "rss", "comic") as $type) { diff --git a/archive-comic-storyline.php b/archive-comic-storyline.php index 86e57bb..851ee15 100644 --- a/archive-comic-storyline.php +++ b/archive-comic-storyline.php @@ -6,7 +6,7 @@ Template Name: Comic Storyline Archive -
+
diff --git a/archive-comic-year.php b/archive-comic-year.php index 0fb87f5..4715969 100644 --- a/archive-comic-year.php +++ b/archive-comic-year.php @@ -3,19 +3,23 @@ Template Name: Comic Year Archive */ ?> - + + + + + -
+
@@ -24,7 +28,6 @@ Template Name: Comic Year Archive
-
| get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date ASC"); foreach ( $years as $year ) { @@ -34,7 +37,7 @@ Template Name: Comic Year Archive
- query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$archive_year); + query('&showposts=-1&cat='.get_all_comic_categories_as_cat_string().'&year='.$archive_year); while ($comicArchive->have_posts()) : $comicArchive->the_post() ?> diff --git a/archive-comic.php b/archive-comic.php index 9ffece5..f045839 100644 --- a/archive-comic.php +++ b/archive-comic.php @@ -6,7 +6,7 @@ Template Name: Comic Archive -
+
diff --git a/archive.php b/archive.php index 6496a46..ee63c93 100644 --- a/archive.php +++ b/archive.php @@ -1,18 +1,24 @@ - + + - + post_count; ?>
Found result.
- -
+ +
@@ -39,17 +45,54 @@ + + - -
-
-
+
+
+ <?php the_title() ?>
+
+
+ + + +
+
+
+ +
+ <?php the_title() ?>
+
+
+
+
+
+ +
+
+
-
- <?php the_title() ?>
-
-
-
-
-
- -
-
-
- -
-
- - + + -
+

No entries found.

diff --git a/archives.php b/archives.php index f34b872..f0f3873 100644 --- a/archives.php +++ b/archives.php @@ -6,7 +6,7 @@ Template Name: Archives -
+
diff --git a/author.php b/author.php index b841d4f..a47a962 100644 --- a/author.php +++ b/author.php @@ -11,7 +11,7 @@ if (empty($curauth)) { ?>

No such author.

-
+
diff --git a/buystrip.php b/buystrip.php index 590aeae..6ca937d 100644 --- a/buystrip.php +++ b/buystrip.php @@ -13,7 +13,7 @@ Templete Author Email: philip@frumph.net -
+
@@ -88,7 +88,7 @@ Templete Author Email: philip@frumph.net
-
+

diff --git a/comicpress-options-config.php b/comicpress-options-config.php index 24abd04..a9258a7 100644 --- a/comicpress-options-config.php +++ b/comicpress-options-config.php @@ -238,6 +238,17 @@ $options = array ( "id" => "comicpress-excerpt_or_content_search", "default" => "excerpt", "type" => "comicpress-excerpt_or_content_search"), + + array( + "id" => "comicpress-category_thumbnail_postcount", + "default" => "30", + "type" => "comicpress-category_thumbnail_postcount"), + + array( + "id" => "comicpress-members_post_category", + "default" => "", + "type" => "comicpress-members_post_category"), + array("type" => "close") ); diff --git a/comicpress-options.php b/comicpress-options.php index 46d2cf8..95822c0 100644 --- a/comicpress-options.php +++ b/comicpress-options.php @@ -8,13 +8,12 @@ function comicpress_options() { } function comicpress_admin_page_head() { -global $is_IE; -if ($is_IE) { -?> + global $is_IE; + if ($is_IE) { ?> - + - + -

Options/Settings SAVED!

+

Options/Settings SAVED!

-

Options/Settings RESET!

+

Options/Settings RESET!

- -
-
Theme Style
-
General
-
Index Page
-
Post
-
Menubar
-
Custom Header
-
Buy Print
-
- -
-
-
- -
- - - - - - - - - - - - - - - - - - -
Choose which theme layout you want to use.

This is the layout in which your theme will be presented.

- - - ComicPress Theme Style -
Themepack

Choose a Themepack to use.
- -
- -
-
- - <?php echo $themepack_dir_name; ?> - -
- -
- -
- -
-
- -
- - - -
+
+
Theme Style
+
General
+
Index Page
+
Post
+
Archive & Search
+
Menubar
+
Custom Header
+
Buy Print
+
Members
-
-
-
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - case "comicpress-comic_clicks_next": ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Enable Sidebar CSS?

Enabling this will use the standard CSS styling of the sidebars for all the widget areas.

- -    - - - If not enabled it will use the .customwidgetarea user made styling only and only the Sidebar-left and Sidebar-right will use sidebar styling.
-
Enable numbered pagination?

Setting to "Yes" will make the Previous Entries and Next Entries turn into numbered pages to click on.
- -    - - - Numbered pagination appears on the home(index) page, the authors page the blog template and comments/single when there are more then the set # of comments per page. It's default is off, it is styled like the menubar. -
Disable the #page / #page-wide restraints?
-
- Turning this option to Yes will make it so that the divs for #page and #page-wide will not load.
-
-
- -    - - - What you can do with this is use the entire browser for your canvas instead of the 780px/980px that the two elements keep you in. -
Make the comic an Href that goes to next comic?

In doing this if someone clicks the comic it will go to the next comic (if possible)
- -    - - - When a user or yourself puts their mouse cursor over the comic that is displayed on either the index or single page the action that happens next is the first step in the larger, bigger, more astonishing consequence of actually having any the other things you place your mouse cursor over and click. You click, it goes to the next comic. -
Enable Rascal the ComicPress Mascot?

Enabling this option will make a comic bubble appear over the comic and write out what you put in the hovertext.
- -    - - - You can add hovertext when uploading your comic with ComicPress Manager. To change the graphics for this you should probably know CSS quite well. If you don't good luck with it. -
Graphic Navigation Directory

Choose a directory to get the graphic navigation styling from.
- - -
- - Graphic Navigation directories are found in your theme directory/images/nav/* to create your own custom graphic navigation menu buttons just create a directory - under images/nav/ and place your image files inside of it and create a navstyle.css file to determine the style of your navigation display. -
Calendar Directory

Choose a directory to get the Archive Calendar styling from.
- - - To not have calendar graphics, set this as "none".
-
- - Calendar directories are found in your theme directory/images/cal/* to create your own custom archive calendar images just create a directory - under images/cal/ and place your image files inside of it. -
Disable Extra Comment Code?

Set to "Yes" and the extended comment code will be disabled.

- -    -
-
- Extra Comment code is advanced code for how your comments are used. Turning this off might increase the speed of your site but doubt it. If turned off it will revert to the ComicPress 2.7 styling. -
Disable the default text in the footer?

Set to "Yes" and the text in the footer will not show.

- -    -
-
- Footer text that shows up in the #footer area can be simply removed this way. -
Avatar (no Gravatar) Directory

Choose a directory to get the avatars for default gravatars if someone doesnt have one.
- -
Display Archive in Ascending or Descending order?

Long time ago or most recent displays first?
- -
Disable the comment notes?

Disabling this will remove the note text that displays with more options for adding to comments (html).

- -    - - -
Would you like to have users see the entire content or just an excerpt when viewing the archives?

- -    - - -
Would you like to have users see the entire content or just an excerpt when searching?

- -    - - -
- - -
-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Disable Comic On Frontpage?

Set to "Yes" and the comic will not display on the index page/front page of your site.
- -    -
-
- Note: You can use the Latest Thumbnail widget to display your comic in a sidebar. Make sure you set the archive-thumbnail size to under 200px. - Turning this off and using the GN style turns ComicPress into a Blog. -
Disable the comic blog on the index and single pages?

Set to "Yes" and the blog portion of the comic will not display on the index page/front page of your site.
- -    -
-
- *Some* people,.. not naming names ..do not like to have a comic post let alone showing on the index page. You can use the comic blog post widget and place it anywhere around the comic. IF there is no content in the post it will not display. -
Disable the blog on the index page?

Set to "Yes" and the blog area will not display on the index page/front page of your site.
- -    -
-
- This feature is quite handy actually. If you disable this you can add a page to your menubar and associate it to the "blog" template, still keeping your blog, .. just not on the index page. -
Disable the left and right sidebars on the index page?

Set to "Yes" and the index page/front page of your site will not display the left and right sidebars.
- -    -
-
- Minimalists dream. Best not to use with theme styles that have one of the styles that are to the side of the comic. -
- - -
-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Show transcript in post area?

When enabled, if the comic has a transcript, the transcript will be displayed inside the post for the comic.
- -    - - - The transcript is text that that you can have of your comic's speech. When you add a transcript of the comic to the post-edit or when you upload your comic you can enable this and a transcript box will appear *in* that comic's post area, alternatively you can set the transcript widget and have it placed anywhere *in* the same area of the comic. -
Moods Directory

Choose a directory to get the post moods from.

Set this to 'none' to turn off use.
- - - Found: moods in the "" directory.
-
- Mood directories are found in your theme directory/images/moods/* to create your own custom moods just create a directory - under images/moods/ and place ONLY image files inside of it. The name of the image file represents what the mood is. -
Put Related Comics in comic posts?

Related comics on the list will be related by 'tags' that you create for each comic post.
- -    - - - When creating tags for your comics, include *only* the subject material and possibly cast. Do not use tags that can relate to the entire archive or storyline the post is on. -
Put Related Posts in blog posts?

- -    - - - Like the related posts for comics, the related posts for blog post checked with other blog posts comparing the tags. Do no use tags that relate to a massive amount of other things, make sure you stick to only using 1-5 tags total, the less the better. -
Add graphic calendar to blog posts?

Enabling this option will display a calendar image on your posts.
- -    - - - The graphic calendar is an image that has the date of the post overlayed on top of it. This option is for the blog posts. -
Display a gravatar of the post author on blog posts?

Enabling this option will show a gravatar of the post author based on the authors email.
- -    - - - Gravatar's are associated by your email address and you can create them at http://gravatar.com. They are pictures of you, your cat of whatever you want to represent yourself. -
Add graphic calendar to comic posts?

Enabling this option will display a calendar image on your posts.
- -    - - - The graphic calendar is an image that has the date of the post overlayed on top of it. This option is for the comic posts, and yes this was cut and pasted from the other one just the word "blog" was changed to "comic". -
Display a gravatar of the post author on comic posts?

Enabling this option will show a gravatar of the post author based on the authors email.
- -    - - - Gravatar's are associated by your email address and you can create them at http://gravatar.com. They are pictures of you, your cat of whatever you want to represent yourself. I didn't cut and paste this one, I just wasn't clever enough to change the text. -
Disable showing categories in posts?

The categories that are shown by default are the ones the post in set to.
- -    - - - Categores != Tags -
Disable showing tags in posts?

Tags are 'descriptive keywords' describing the content of the post.
- -    - - - Tags != Categories -
- - -
-
-
- - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
Enable Custom Image Header panel?

Setting to "Yes" will set a new option in your Dashboard -> Appearance menu.
- -    - - - Setting to "Yes" will set a new option in your Dashboard -> Appearance menu. Setting to "Yes" will set a new option in your Dashboard -> Appearance menu. Setting to "No" will not set a new option in your Dashboard -> Appearance menu. Setting to "Yes" will set a new option in your Dashboard -> Appearance menu. -
Header Image Height

Set the height of the image you want to use in the Custom Image Header panel.
- - - This area intentionally left blank. -
Header Image Width

Set the width of the image you want to use in the Custom Image Header panel.
- - - The Standard and V styles use 760 px width, while the 3C, GN and V3C use 980 px width. This is configurable in case you set the #page, #page-width widths in the CSS to something different than the default while using the Custom Header panel. -
- - -
-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Paypal Email Address*

The Email address you registered with Paypal and that your store is associated with.
- -
Url Page of the Template*

The URL address to which you associated the buy print template.
- -
Print Cost (US/Canada)

How much does a print cost for people in the United State and Canada?
- -
Shipping Cost (US/Canada)

- -
Print Cost (International)

How much does a print cost for people *NOT* in the United States and Canda (International)
- -
Shipping Cost (International)

- -
- - -
-
-
- ComicPress 2.8 (), created by Tyler Martin, with John Bintz and Philip M. Hofer (Frumph)
- If you like the ComicPress theme, please donate. It will help in creating new versions.
-
- - - - -
+ ComicPress 2.8 (), created by Tyler Martin, with John Bintz and Philip M. Hofer (Frumph)
+ If you like the ComicPress theme, please donate. It will help in creating new versions.
+
+ + + + +
diff --git a/functions.php b/functions.php index 1570814..86c5757 100644 --- a/functions.php +++ b/functions.php @@ -5,17 +5,17 @@ if (function_exists('id_get_comment_number')) { remove_filter('comments_number','id_get_comment_number'); } -$comicpress_version = '2.8.1.9'; +$comicpress_version = '2.8.1.10'; // Remove the wptexturizer from changing the quotes and squotes. +// remove_filter('the_content', 'wpautop'); // remove_filter('the_title', 'wptexturize'); -// remove_filter('the_content', 'wptexturize'); +remove_filter('the_content', 'wptexturize'); // remove_filter('the_excerpt', 'wptexturize'); // remove_filter('comment_text', 'wptexturize'); global $wpmu_version; if (!empty($wpmu_version)) { - require_once(get_template_directory() . '/wpmu-functions.php'); if (get_option('upload_path') !== false) { $variables_to_extract = array(); @@ -46,14 +46,12 @@ if (get_option('upload_path') !== false) { 'disable_comic_frontpage' => 'disable_comic_frontpage', 'disable_comic_blog_frontpage' => 'disable_comic_blog_frontpage', 'disable_blog_frontpage' => 'disable_blog_frontpage', - 'disable_extended_comments' => 'disable_extended_comments', 'buy_print_email' => 'buy_print_email', 'buy_print_url' => 'buy_print_url', 'buy_print_us_amount' => 'buy_print_us_amount', 'buy_print_int_amount' => 'buy_print_int_amount', 'buy_print_us_ship' => 'buy_print_us_ship', 'buy_print_int_ship' => 'buy_print_int_ship', - 'custom_css' => 'custom_css', 'cp_theme_layout' => 'cp_theme_layout', 'transcript_in_posts' => 'transcript_in_posts', 'enable_widgetarea_use_sidebar_css' => 'enable_widgetarea_use_sidebar_css', @@ -62,7 +60,6 @@ if (get_option('upload_path') !== false) { 'custom_image_header_height' => 'custom_image_header_height', 'enable_numbered_pagination' => 'enable_numbered_pagination', 'disable_page_restraints' => 'disable_page_restraints', - 'enable_dropdown_sidebar' => 'enable_dropdown_sidebar', 'enable_related_comics' => 'enable_related_comics', 'enable_related_posts' => 'enable_related_posts', 'comic_clicks_next' => 'comic_clicks_next', @@ -89,7 +86,9 @@ if (get_option('upload_path') !== false) { 'archive_display_order' => 'archive_display_order', 'disable_comment_note' => 'disable_comment_note', 'excerpt_or_content_archive' => 'excerpt_or_content_archive', - 'excerpt_or_content_search' => 'excerpt_or_content_search' ) as $options => $variable_name) { + 'excerpt_or_content_search' => 'excerpt_or_content_search', + 'category_thumbnail_postcount' => 'category_thumbnail_postcount', + 'members_post_category' => 'members_post_category' ) as $options => $variable_name) { $variables_to_extract[$variable_name] = get_option("comicpress-${options}"); } @@ -129,10 +128,6 @@ if ($enable_numbered_pagination == 'yes') { require_once(get_template_directory() . '/options/wp-pagenavi.php'); } -if ($disable_extended_comments != 'yes') { - require_once(get_template_directory() . '/options/comment-functions.php'); -} - if ($enable_custom_image_header == 'yes') { require_once(get_template_directory() . '/options/custom-image-header.php'); } @@ -172,7 +167,7 @@ $comic_filename_filters['default'] = "{date}*.*"; add_action('init', 'get_all_comic_categories'); function get_first_comic() { - return get_terminal_post_in_category(get_all_comic_categories_as_cat_string()); + return get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), true); } function get_last_comic() { @@ -227,7 +222,7 @@ function next_comic_link($format, $link) { /** * Get the previous comic from the current one. */ -function get_previous_comic($category = null) { return get_adjacent_comic($category,true); } +function get_previous_comic($category = null) { return get_adjacent_comic($category, true); } /** * Get the next comic from the current one. @@ -272,10 +267,10 @@ function get_previous_comic_permalink() { /** * Get the adjacent comic from the current one. * @param int $category The category to use. - * @param boolean $next True if the next chronological comic should be retrieved. + * @param boolean $previous True if the previous chronological comic should be retrieved. * @return array The WordPress post object for the comic post. */ -function get_adjacent_comic($category, $next = false) { +function get_adjacent_comic($category, $previous = false) { global $non_comic_categories; // get_all_comic_categories(); @@ -285,7 +280,7 @@ function get_adjacent_comic($category, $next = false) { $categories_to_exclude = get_string_to_exclude_all_but_provided_categories($category); } - return get_adjacent_post(false, $categories_to_exclude, $next); + return get_adjacent_post(false, $categories_to_exclude, $previous); } /** @@ -379,9 +374,9 @@ function get_adjacent_storyline_category_id($next = false) { * @param string $filter The $comic_filename_filters to use. * @return string The relative path to the comic file, or false if not found. */ -if (!function_exists('get_comic_path')) { - function get_comic_path($folder = 'comic', $override_post = null, $filter = 'default', $multi = null) { - global $post, $comic_filename_filters, $comic_folder, $archive_comic_folder, $rss_comic_folder, $comic_pathfinding_errors; + +function get_comic_path($folder = 'comic', $override_post = null, $filter = 'default', $multi = null) { + global $post, $comic_filename_filters, $comic_folder, $archive_comic_folder, $rss_comic_folder, $comic_pathfinding_errors, $wpmu_version; if (isset($comic_filename_filters[$filter])) { $filter_to_use = $comic_filename_filters[$filter]; @@ -395,6 +390,12 @@ if (!function_exists('get_comic_path')) { case "comic": default: $folder_to_use = $comic_folder; break; } + if (!empty($wpmu_version)) { + if (($wpmu_path = get_option('upload_path')) !== false) { + $folder_to_use = $wpmu_path . '/' . $folder_to_use; + } + } + $post_to_use = (is_object($override_post)) ? $override_post : $post; $post_date = mysql2date(CP_DATE_FORMAT, $post_to_use->post_date); @@ -403,6 +404,13 @@ if (!function_exists('get_comic_path')) { $results = array(); if (count($results = glob("${folder_to_use}/${filter_with_date}")) > 0) { + + if (!empty($wpmu_version)) { + $comic = reset($results); + if ($wpmu_path !== false) { $comic = str_replace($wpmu_path, "files", $comic); } + return $comic; + } + if (!empty($multi)) { return $results; } else { @@ -412,9 +420,9 @@ if (!function_exists('get_comic_path')) { $comic_pathfinding_errors[] = sprintf(__("Unable to find the file in the %s folder that matched the pattern %s. Check your WordPress and ComicPress settings.", 'comicpress'), $folder, $filter_with_date); return false; - } } + /** * Find a comic file in the filesystem and return an absolute URL to that file. * @param string $folder The folder name to search. @@ -728,25 +736,6 @@ function comicpress_is_active_sidebar( $name ) { return false; } -function copyrightDate() { - global $wpdb; - $copyright_dates = $wpdb->get_results(" - SELECT - YEAR(min(post_date_gmt)) AS firstdate, - YEAR(max(post_date_gmt)) AS lastdate - FROM - $wpdb->posts - "); - if($copyright_dates) { - $copyright = "© " . $copyright_dates[0]->firstdate; - if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) { - $copyright .= '-' . $copyright_dates[0]->lastdate; - } - echo $copyright . " " . get_bloginfo('name'); - } - return false; -} - function cp_copyright_year() { global $wpdb; $copyright_dates = $wpdb->get_results(" @@ -755,6 +744,8 @@ function cp_copyright_year() { YEAR(max(post_date_gmt)) AS lastdate FROM $wpdb->posts + WHERE + post_status = 'publish' "); $output = ''; if($copyright_dates) { diff --git a/functions/classes.php b/functions/classes.php index ef20fd2..f0055ef 100644 --- a/functions/classes.php +++ b/functions/classes.php @@ -3,16 +3,15 @@ * Body Classes * function function comicpress_body_class * - * This has two functions, the first being it adds the browser type as a class + * Author: Philip M. Hofer (Frumph) + * Author URI: http://webcomicplanet.com/ http://frumph.net/ + * Version: 1.0.1 + * + * This function adds the browser type as a class * in the tag where you can then do .ie #page and do things specific * for each browser type as well as a few other classes that the normal body_class * does not yet support. * - * The second is you can write code specific for a particular browser. - * - * example: if (reset(browser_body_class()) == 'ie') { - * - * the reset() portion resets the array to a string. * */ @@ -21,7 +20,6 @@ add_filter('body_class','comicpress_body_class'); function comicpress_body_class($classes = '') { global $current_user, $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $post, $wp_query, $cp_theme_layout; - $current_user = get_currentuserinfo(); if (!empty($current_user)) { $user_login = addslashes($current_user->user_login); $classes[] = 'user-'.$user_login; @@ -29,6 +27,12 @@ function comicpress_body_class($classes = '') { $classes[] = 'user-guest'; } + if (comicpress_is_member()) { + $classes[] = 'member'; + } else { + $classes[] = 'non-member'; + } + if($is_lynx) $classes[] = 'lynx'; elseif($is_gecko) $classes[] = 'gecko'; elseif($is_opera) $classes[] = 'opera'; @@ -81,7 +85,7 @@ function comicpress_body_class($classes = '') { return $classes; } -function comicpress_blogpost_class($class = '') { +function comicpress_post_class($class = '') { global $post; static $post_alt; @@ -122,7 +126,7 @@ function comicpress_blogpost_class($class = '') { /* Join all the classes into one string and echo them. */ $class = join( ' ', $classes ); - echo apply_filters( 'comicpress_blogpost_class', $class ); + echo apply_filters( 'comicpress_post_class', $class ); } ?> \ No newline at end of file diff --git a/functions/comment-functions.php b/functions/comment-functions.php new file mode 100644 index 0000000..bea4eb7 --- /dev/null +++ b/functions/comment-functions.php @@ -0,0 +1,233 @@ +'; + $id_or_email = get_comment_author_email(); + if (empty($id_or_email)) $id_or_email = get_comment_author(); + if(function_exists('get_avatar') && $comment_type != 'pingback' && $comment_type != 'trackback' ) { + echo str_replace("alt='", "alt='".wp_specialchars(get_comment_author(), 1)."' title='".wp_specialchars(get_comment_author(), 1), comicpress_get_avatar($id_or_email, 64)); + } else { + if ($comment_type == 'pingback' || $comment_type == 'trackback') { + echo ''; + } else { + echo ''; + } + } + + if($url == true && $url != 'http://') + echo ''; +} + +/** +* Properly displays comment author name/link +* bbPress and other external systems sometimes don't set a display name for registrations +* WP has problems if no display name is set +* WP gives registered users URL of 'http://' if none is set +* +* @since 0.2.2 +*/ +function comicpress_comment_author() { + global $comment; + + $author = get_comment_author(); + $url = get_comment_author_url(); + + /* + * Registered members w/o URL defaults to 'http://' + */ + if($url == 'http://') + $url = false; + + /* + * Registered through bbPress sometimes leaves no display name + * Bug with bbPress 0.9 series and WP 2.5 (no later testing) + * 'Anonymous' should be localized according to WP, not the theme + */ + if($comment->user_id > 0) : + $user = get_userdata($comment->user_id); + if($user->display_name) + $author = $user->display_name; + elseif($user->user_nickname) + $author = $user->nickname; + elseif($user->user_nicename) + $author = $user->user_nicename; + else + $author = $user->user_login; + endif; + + /* + * Display link and cite if URL is set + * Also properly cites trackbacks/pingbacks + */ + if($url) : + $output = ''; + $output .= '' . $author . ''; + $output .= ''; + else : + $output = ''; + $output .= $author; + $output .= ''; + endif; + + echo $output; +} + +/** +* Displays individual comments +* Uses the callback parameter for wp_list_comments +* Overwrites the default display of comments +* +* @since 0.2.3 +* +* @param $comment The comment variable +* @param $args Array of arguments passed from wp_list_comments +* @param $depth What level the particular comment is +*/ +function comicpress_comments_callback($comment, $args, $depth) { + $GLOBALS['comment'] = $comment; + $GLOBALS['comment_depth'] = $depth; + ?> + +
  • + + + + + + +
    + +
    + +
    + '; +} + +/** +* Sets a class for each comment +* Sets alt, odd/even, and author/user classes +* Adds author, user, and reader classes +* +* @since 0.2 +*/ +function comicpress_comment_class() { + global $comment; + static $comment_alt; + $classes = array(); + + if(function_exists('get_comment_class')) + $classes = get_comment_class(); + + $classes[] = get_comment_type();; + + /* + * User classes + */ + if($comment->user_id > 0 && $user = get_userdata($comment->user_id)) : + + $classes[] = 'user user-' . $user->user_nicename; + + if($post = get_post($post_id)) : + if($comment->user_id === $post->post_author) + $classes[] = 'author author-' . $user->user_nicename; + endif; + else : + $classes[] = 'reader'; + endif; + + /* + * http://microid.org + */ + $email = get_comment_author_email(); + $url = get_comment_author_url(); + if(!empty($email) && !empty($url)) { + $microid = 'microid-mailto+http:sha1:' . sha1(sha1('mailto:'.$email).sha1($url)); + $classes[] = $microid; + } + $classes = join(' ', $classes); + echo $classes; +} + +function list_pings($comment, $args, $depth) { + $GLOBALS['comment'] = $comment; ?> +
  • +
  • + \ No newline at end of file diff --git a/functions/displayblogpost.php b/functions/displayblogpost.php index 8aac140..aac4ebe 100644 --- a/functions/displayblogpost.php +++ b/functions/displayblogpost.php @@ -8,7 +8,7 @@ function display_blog_post() { global $post, $wp_query, $authordata, $enable_related_posts, $enable_post_author_gravatar, $enable_post_calendar, $themepack_directory; ?> -
    +
    -
    +