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) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-11-05 21:27:52 -08:00
parent e8b749fdb3
commit 58062ff720
12 changed files with 57 additions and 34 deletions

View File

@ -87,26 +87,25 @@ foreach ( $years as $year ) {
<div class="cpcal-cals">
<?php $i=1; while($i<=12) {
$calendar_directory = get_option('comicpress-calendar_directory');
$themepack_directory = get_option('comicpress-themepack_directory');
if (!empty($calendar_directory) && $calendar_directory != 'none') { ?>
<div class="cpcal-month" style="height: 257px;" id="<?php echo $month[$i]['month'] ?>">
<?php if ($calendar_directory == 'themepack') { ?>
<?php if (file_exists(get_stylesheet_directory() . '/images/cal') && $calendar_directory != 'default') { ?>
<?php if (file_exists(get_template_directory().'/themepack/'.$themepack_directory.'/cal/'.$archive_year)) { ?>
<?php if (count($monthfile = glob(get_template_directory().'/themepack/'.$themepack_directory.'/cal/'.$archive_year.'/'.strtolower($month[$i]['month']).'.*')) > 0) {
<?php if (file_exists(get_stylesheet_directory().'/images/cal/'.$calendar_directory.'/'.$archive_year)) { ?>
<?php if (count($monthfile = glob(get_stylesheet_directory().'/images/cal/'.$calendar_directory.'/'.$archive_year.'/'.strtolower($month[$i]['month']).'.*')) > 0) {
if (is_array($monthfile)) $monthfile = reset($monthfile); ?>
<img class="cpcal-image" src="<?php echo get_stylesheet_directory_uri(); ?>/themepack/<?php echo $themepack_directory; ?>/cal/<?php echo $archive_year; ?>/<?php echo basename($monthfile); ?>" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<img class="cpcal-image" src="<?php echo get_stylesheet_directory_uri(); ?>/images/cal/<?php echo $calendar_directory; ?>/<?php echo $archive_year; ?>/<?php echo basename($monthfile); ?>" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<?php } else { ?>
<img class="cpcal-image" src="<?php echo get_stylesheet_directory_uri(); ?>/images/cal/default.png" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<?php } ?>
<?php } else { ?>
<?php if (count($monthfile = glob(get_template_directory().'/themepack/'.$themepack_directory.'/cal/'.strtolower($month[$i]['month']).'.*')) > 0) {
<?php if (count($monthfile = glob(get_stylesheet_directory().'/images/cal/'.$calendar_directory.'/'.strtolower($month[$i]['month']).'.*')) > 0) {
if (is_array($monthfile)) $monthfile = reset($monthfile); ?>
<img class="cpcal-image" src="<?php echo get_stylesheet_directory_uri(); ?>/themepack/<?php echo $themepack_directory; ?>/cal/<?php echo basename($monthfile); ?>" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<img class="cpcal-image" src="<?php echo get_stylesheet_directory_uri(); ?>/images/cal/<?php echo $calendar_directory; ?>/<?php echo basename($monthfile); ?>" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<?php } else { ?>
<img class="cpcal-image" src="<?php echo get_stylesheet_directory_uri(); ?>/images/cal/default.png" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<?php } ?>
<?php } ?>
<?php } ?>
<?php } else { ?>
@ -114,16 +113,16 @@ foreach ( $years as $year ) {
<?php if (file_exists(get_template_directory().'/images/cal/'.$calendar_directory.'/'.$archive_year)) { ?>
<?php if (count($monthfile = glob(get_template_directory().'/images/cal/'.$calendar_directory.'/'.$archive_year.'/'.strtolower($month[$i]['month']).'.*')) > 0) {
if (is_array($monthfile)) $monthfile = reset($monthfile); ?>
<img class="cpcal-image" src="<?php bloginfo('stylesheet_directory'); ?>/images/cal/<?php echo $calendar_directory; ?>/<?php echo $archive_year; ?>/<?php echo basename($monthfile); ?>" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<img class="cpcal-image" src="<?php echo get_template_directory_uri(); ?>/images/cal/<?php echo $calendar_directory; ?>/<?php echo $archive_year; ?>/<?php echo basename($monthfile); ?>" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<?php } else { ?>
<img class="cpcal-image" src="<?php bloginfo('stylesheet_directory'); ?>/images/cal/default.png" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<img class="cpcal-image" src="<?php echo get_template_directory_uri(); ?>/images/cal/default.png" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<?php } ?>
<?php } else { ?>
<?php if (count($monthfile = glob(get_template_directory().'/images/cal/'.$calendar_directory.'/'.strtolower($month[$i]['month']).'.*')) > 0) {
if (is_array($monthfile)) $monthfile = reset($monthfile); ?>
<img class="cpcal-image" src="<?php bloginfo('stylesheet_directory'); ?>/images/cal/<?php echo $calendar_directory; ?>/<?php echo basename($monthfile); ?>" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<img class="cpcal-image" src="<?php echo get_template_directory_uri(); ?>/images/cal/<?php echo $calendar_directory; ?>/<?php echo basename($monthfile); ?>" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<?php } else { ?>
<img class="cpcal-image" src="<?php bloginfo('stylesheet_directory'); ?>/images/cal/default.png" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<img class="cpcal-image" src="<?php echo get_template_directory_uri(); ?>/images/cal/default.png" alt="<?php echo $month[$i]['month'] ?>" title="<?php echo $month[$i]['month'] ?>" />
<?php } ?>
<?php } ?>

View File

@ -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",

View File

@ -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';

View File

@ -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;
}

View File

@ -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; ?>
<?php if (is_single()) { ?>
<div class="blognav">
<div class="nav-single">

View File

@ -7,7 +7,7 @@
*/
function display_comic_post() {
global $post, $wp_query, $authordata, $enable_related_comics, $enable_comic_post_author_gravatar, $enable_comic_post_calendar, $themepack_directory, $disable_categories_in_posts, $disable_tags_in_posts; ?>
global $post, $wp_query, $authordata, $enable_related_comics, $enable_comic_post_author_gravatar, $enable_comic_post_calendar, $disable_categories_in_posts, $disable_tags_in_posts; ?>
<div class="<?php comicpress_post_class(); ?>">
<div class="post-comic-head"></div>
<div <?php post_class(); ?> id="post-comic-<?php the_ID() ?>">

View File

@ -4,7 +4,23 @@ Style: Sci Fi
*/
#comic_navi_wrapper {
padding: 5px 0 5px 0;
width: 100%;
text-align: center;
}
.comic_navi_left {
display: inline-block;
float: left;
}
.comic_navi_center {
margin: 0 auto;
display: inline-block;
}
.comic_navi_right {
display: inline-block;
float: right;
}
#comic_navi {

View File

@ -5,7 +5,7 @@
<div class="sidebar-head"></div>
<div class="sidebar">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Sidebar') ) : ?>
<?php $default_image = get_bloginfo('stylesheet_directory').'/images/cal/default.png'; ?>
<?php $default_image = get_template_directory_uri() . '/images/cal/default.png'; ?>
<div class="widget">
<?php comicpress_calendar(array('thumbnail' => $default_image)) ?>
</div>

View File

@ -8,7 +8,7 @@
<?php comicpress_comic_bookmark() ?>
<?php if (is_cp_theme_layout('standard,v')) { ?>
<?php $default_image = get_bloginfo('stylesheet_directory').'/images/cal/default.png'; ?>
<?php $default_image = get_template_directory_uri() . '/images/cal/default.png'; ?>
<div class="widget">
<?php comicpress_calendar(array('thumbnail' => $default_image)) ?>
</div>

View File

@ -4,7 +4,7 @@ Theme URI: http://comicpress.org
Description: Publish a comic with WordPress. <a href="http://comicpress.org">Visit the ComicPress Website.</a> This is the ComicPress Core Framework.
Author: Tyler Martin, John Bintz, Philip M. Hofer
Author URI: http://mindfaucet.com/
Version: 2.8.1
Version: 2.8.2
.
The CSS, XHTML and design is released under GPL v3:
http://www.opensource.org/licenses/gpl-3.0.html
@ -616,13 +616,23 @@ a.navi-comments:hover span {
float: left;
}
.comment-author {
display: inline;
}
.comment-author {
padding-left: 5px;
display: inline;
}
.comment-time {
padding-left: 5px;
}
li.comment {
margin-top: 10px;
}
.comment-meta-data {
background: #efefef;
border-bottom: solid 1px #999;
border-right: solid 1px #aaa;
margin: 0;
padding-left: 5px;
}

View File

@ -70,7 +70,7 @@ class widget_comicpress_calendar extends WP_Widget {
}
function form($instance) {
$default_image = get_bloginfo('stylesheet_directory').'/images/cal/default.png';
$default_image = get_template_directory_uri() . '/images/cal/default.png';
$instance = wp_parse_args( (array) $instance, array( 'thumbnail' => $default_image, 'small' => '', 'medium' => '', 'large' => '', 'link' => '') );
$thumbnail = strip_tags($instance['thumbnail']);
$small = strip_tags($instance['small']);

View File

@ -11,7 +11,7 @@ Author URI: http://webcomicplanet.com/
function comicpress_menubar() {
global $contact_in_menubar,$enable_search_in_menubar,$enable_rss_in_menubar,$enable_navigation_in_menubar,$disable_dynamic_menubar_links, $themepack_directory;
global $contact_in_menubar,$enable_search_in_menubar,$enable_rss_in_menubar,$enable_navigation_in_menubar,$disable_dynamic_menubar_links;
if (comicpress_check_child_file('menubar') == false) {
if (file_exists(get_template_directory() . '/custom-menubar.php')) {
include(get_template_directory() . '/custom-menubar.php');