From 58062ff7206d5e9cac16b84e7193adb2bfc31bba Mon Sep 17 00:00:00 2001 From: "Philip M. Hofer (Frumph)" Date: Thu, 5 Nov 2009 21:27:52 -0800 Subject: [PATCH] 2.8.2.2 - Fixed Avatars, Moods, Calendar's to work with child themes. Removed all traces of themepacks completely. Signed-off-by: Philip M. Hofer (Frumph) --- archive-comic-calendar.php | 23 +++++++++++------------ comicpress-options-config.php | 5 ----- functions.php | 3 +-- functions/avatars.php | 12 ++++++++---- functions/displayblogpost.php | 2 +- functions/displaycomicpost.php | 2 +- images/nav/scifi/navstyle.css | 18 +++++++++++++++++- sidebar-left.php | 2 +- sidebar-right.php | 2 +- style.css | 18 ++++++++++++++---- widgets/calendar.php | 2 +- widgets/menubar.php | 2 +- 12 files changed, 57 insertions(+), 34 deletions(-) diff --git a/archive-comic-calendar.php b/archive-comic-calendar.php index e8986a7..c5754a9 100644 --- a/archive-comic-calendar.php +++ b/archive-comic-calendar.php @@ -87,26 +87,25 @@ foreach ( $years as $year ) {
- + - - 0) { + + 0) { if (is_array($monthfile)) $monthfile = reset($monthfile); ?> - <?php echo $month[$i]['month'] ?> + <?php echo $month[$i]['month'] ?> <?php echo $month[$i]['month'] ?> - 0) { + 0) { if (is_array($monthfile)) $monthfile = reset($monthfile); ?> - <?php echo $month[$i]['month'] ?> + <?php echo $month[$i]['month'] ?> <?php echo $month[$i]['month'] ?> - + @@ -114,16 +113,16 @@ foreach ( $years as $year ) { 0) { if (is_array($monthfile)) $monthfile = reset($monthfile); ?> - <?php echo $month[$i]['month'] ?> + <?php echo $month[$i]['month'] ?> - <?php echo $month[$i]['month'] ?> + <?php echo $month[$i]['month'] ?> 0) { if (is_array($monthfile)) $monthfile = reset($monthfile); ?> - <?php echo $month[$i]['month'] ?> + <?php echo $month[$i]['month'] ?> - <?php echo $month[$i]['month'] ?> + <?php echo $month[$i]['month'] ?> diff --git a/comicpress-options-config.php b/comicpress-options-config.php index 9cfc8cb..c4a1415 100644 --- a/comicpress-options-config.php +++ b/comicpress-options-config.php @@ -214,11 +214,6 @@ $options = array ( "default" => "no", "type" => "comicpress-disable_footer_text"), - array( - "id" => "comicpress-themepack_directory", - "default" => "silver", - "type" => "comicpress-themepack_directory"), - array( "id" => "comicpress-avatar_directory", "default" => "default", diff --git a/functions.php b/functions.php index b51c5f1..75b32e5 100644 --- a/functions.php +++ b/functions.php @@ -19,7 +19,7 @@ if (function_exists('id_get_comment_number')) { remove_filter('comments_number','id_get_comment_number'); } -$comicpress_version = '2.8.2.1'; +$comicpress_version = '2.8.2.2'; global $wpmu_version; if (!empty($wpmu_version)) { @@ -113,7 +113,6 @@ if (get_option('upload_path') !== false) { } if (empty($avatar_directory)) $avatar_directory = 'default'; -if (empty($themepack_directory)) $themepack_directory = 'silver'; if (empty($graphicnav_directory)) $graphicnav_directory = 'default'; if (empty($moods_directory)) $moods_directory = 'default'; if (empty($calendar_directory)) $calendar_directory = 'default'; diff --git a/functions/avatars.php b/functions/avatars.php index 39f451f..08b713c 100644 --- a/functions/avatars.php +++ b/functions/avatars.php @@ -90,9 +90,13 @@ function comicpress_random_default_avatar($id_or_email = '') { $current_avatar_directory = get_option('comicpress-avatar_directory'); if (empty($current_avatar_directory)) $current_avatar_directory = 'default'; - - $count = count($results = glob(get_template_directory() . '/images/avatars/'.$current_avatar_directory.'/*')); - + if (file_exists(get_stylesheet_directory() . '/images/avatars/' . $current_avatar_directory)) { + $count = count($results = glob(get_stylesheet_directory() . '/images/avatars/'.$current_avatar_directory.'/*')); + $blogurl = get_stylesheet_directory_uri(); + } else { + $count = count($results = glob(get_template_directory() . '/images/avatars/'.$current_avatar_directory.'/*')); + $blogurl = get_template_directory_uri(); + } if ($count) { $default = ''; @@ -102,7 +106,7 @@ function comicpress_random_default_avatar($id_or_email = '') { } else { return false; } - return get_bloginfo('stylesheet_directory').'/images/avatars/'.$current_avatar_directory.'/'.$default; + return $blogurl.'/images/avatars/'.$current_avatar_directory.'/'.$default; } return false; } diff --git a/functions/displayblogpost.php b/functions/displayblogpost.php index f3f759a..b175af8 100644 --- a/functions/displayblogpost.php +++ b/functions/displayblogpost.php @@ -7,7 +7,7 @@ */ function display_blog_post() { - global $post, $wp_query, $authordata, $enable_related_posts, $enable_post_author_gravatar, $enable_post_calendar, $themepack_directory, $disable_categories_in_posts, $disable_tags_in_posts; ?> + global $post, $wp_query, $authordata, $enable_related_posts, $enable_post_author_gravatar, $enable_post_calendar, $disable_categories_in_posts, $disable_tags_in_posts; ?>