Calendar and bug fixes.
Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
|
@ -107,8 +107,31 @@ foreach ( $years as $year ) {
|
|||
<?php } } ?>
|
||||
</div>
|
||||
|
||||
<?php $i=1; while($i<=12) { ?>
|
||||
<div class="cpcal-month" id="<?php echo $month[$i]['month'] ?>">
|
||||
<?php $i=1; while($i<=12) {
|
||||
$calendar_directory = get_option('comicpress-calendar_directory');
|
||||
|
||||
|
||||
?>
|
||||
<?php if ($calendar_directory != 'none') { ?>
|
||||
<div class="cpcal-month" style="height: 257px;" id="<?php echo $month[$i]['month'] ?>">
|
||||
<?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'] ?>" />
|
||||
<?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'] ?>" />
|
||||
<?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'] ?>" />
|
||||
<?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'] ?>" />
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<div class="cpcal-month" style="height: 137px;" id="<?php echo $month[$i]['month'] ?>">
|
||||
<?php } ?>
|
||||
<div class="cpcal-monthtitle"><?php echo $month[$i]['month']." ".$archive_year ?></div>
|
||||
<?php foreach(array("S", "M", "T", "W", "T", "F", "S") as $dow) { ?>
|
||||
<div class="cpcal-dayletter"><?php echo $dow ?></div>
|
||||
|
|
|
@ -194,6 +194,11 @@ $options = array (
|
|||
"default" => "no",
|
||||
"type" => "comicpress-disable_lrsidebars_frontpage"),
|
||||
|
||||
array(
|
||||
"id" => "comicpress-calendar_directory",
|
||||
"default" => "none",
|
||||
"type" => "comicpress-calendar_directory"),
|
||||
|
||||
|
||||
array("type" => "close")
|
||||
);
|
||||
|
|
|
@ -20,7 +20,7 @@ if ($is_IE) {
|
|||
|
||||
|
||||
function comicpress_admin() {
|
||||
global $options, $upload_path, $blogcat, $moods_directory;
|
||||
global $options, $upload_path, $blogcat, $moods_directory, $calendar_directory, $graphicnav_directory;
|
||||
|
||||
|
||||
?>
|
||||
|
@ -305,6 +305,41 @@ function comicpress_admin() {
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<?php break;
|
||||
case "comicpress-calendar_directory":
|
||||
$current_cal_directory = get_option($value['id']);
|
||||
if (empty($current_cal_directory)) $current_cal_directory = 'default';
|
||||
|
||||
$count = count($results = glob(get_template_directory() . '/images/cal/'.$current_cal_directory.'/*'));
|
||||
$cal_directories = glob(get_template_directory() . '/images/cal/*');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><strong>Calendar Directory</strong><br /><br />Choose a directory to get the Archive Calendar styling from.<br /></th>
|
||||
<td valign="top">
|
||||
<label>
|
||||
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
|
||||
<option class="level-0" value="none" <?php if ($current_cal_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
|
||||
<?php
|
||||
foreach ($cal_directories as $cal_dirs) {
|
||||
if (is_dir($cal_dirs)) {
|
||||
$cal_dir_name = basename($cal_dirs); ?>
|
||||
<option class="level-0" value="<?php echo $cal_dir_name; ?>" <?php if ($current_cal_directory == $cal_dir_name) { ?>selected="selected"<?php } ?>><?php echo $cal_dir_name; ?></option>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</label>
|
||||
</td>
|
||||
<td valign="top">
|
||||
To not have calendar graphics, set this as "none".<br />
|
||||
<br />
|
||||
<?php echo get_template_directory() . '/images/cal/'; ?>
|
||||
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.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php break;
|
||||
case "comicpress-disable_extended_comments": ?>
|
||||
<tr>
|
||||
|
@ -355,14 +390,14 @@ function comicpress_admin() {
|
|||
<?php break;
|
||||
case "comicpress-disable_comic_blog_frontpage": ?>
|
||||
<tr>
|
||||
<th scope="row"><strong>Disable the comic blog on the index page?</strong><br /><br />Set to "Yes" and the blog portion of the comic will not display on the index page/front page of your site.<br /></th>
|
||||
<th scope="row"><strong>Disable the comic blog on the index and single pages?</strong><br /><br />Set to "Yes" and the blog portion of the comic will not display on the index page/front page of your site.<br /></th>
|
||||
<td valign="top">
|
||||
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-yes" type="radio" value="yes"<?php if ( get_option( $value['id'] ) == "yes") { echo " checked"; } ?> />Yes</label>
|
||||
|
||||
<label><input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>-no" type="radio" value="no"<?php if ( get_option( $value['id'] ) == "no") { echo " checked"; } ?> />No</label><br />
|
||||
</td>
|
||||
<td valign="top">
|
||||
*Some* people,.. not naming names ..do not like to have a comic post let alone showing on the index page.
|
||||
*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.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<?php } ?>
|
||||
<?php get_sidebar('footer'); ?>
|
||||
<p>
|
||||
<?php global $wpmu_version; if (empty($wpmu_version)) { ?>©<?php echo cp_copyright_year(); ?> <?php echo the_author_meta('firstname',1); echo " "; echo the_author_meta('lastname',1); ?>.<?php } ?><?php bloginfo('name') ?> is powered by <a href="http://wordpress.org/">WordPress</a> with <a href="http://comicpress.org/">ComicPress</a>
|
||||
<?php global $wpmu_version; if (empty($wpmu_version)) { ?>©<?php echo cp_copyright_year(); ?> <?php echo the_author_meta('firstname',1); echo " "; echo the_author_meta('lastname',1); ?> | <?php } ?><?php bloginfo('name') ?> is powered by <a href="http://wordpress.org/">WordPress</a> with <a href="http://comicpress.org/">ComicPress</a>
|
||||
| Subscribe: <a href="<?php bloginfo('rss2_url') ?>">RSS Feed</a> | <a href="#outside" onclick="scrollup(); return false;">Back to Top ↑</a><br />
|
||||
<!-- <?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds. -->
|
||||
</p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
$comicpress_version = '2.8.0.R';
|
||||
$comicpress_version = '2.8.0.R2';
|
||||
|
||||
// Remove the wptexturizer from changing the quotes and squotes.
|
||||
// remove_filter('the_title', 'wptexturize');
|
||||
|
@ -76,6 +76,7 @@ if (get_option('upload_path') !== false) {
|
|||
'enable_rss_in_menubar' => 'enable_rss_in_menubar',
|
||||
'enable_navigation_in_menubar' => 'enable_navigation_in_menubar',
|
||||
'disable_lrsidebars_frontpage' => 'disable_lrsidebars_frontpage',
|
||||
'comicpress-calendar_directory' => 'comicpress-calendar_directory',
|
||||
'contact_in_menubar' => 'contact_in_menubar' ) as $options => $variable_name) {
|
||||
$variables_to_extract[$variable_name] = get_option("comicpress-${options}");
|
||||
}
|
||||
|
@ -85,6 +86,7 @@ if (get_option('upload_path') !== false) {
|
|||
|
||||
if (empty($graphicnav_directory)) $graphicnav_directory = 'default';
|
||||
if (empty($moods_directory)) $moods_directory = 'default';
|
||||
if (empty($calendar_directory)) $calendar_directory = 'none';
|
||||
|
||||
function is_cp_theme_style($choices) {
|
||||
global $cp_theme_style;
|
||||
|
|
|
@ -22,7 +22,7 @@ function comicpress_show_mood_in_post() {
|
|||
$mood = explode(".", $mood);
|
||||
$mood = reset($mood);
|
||||
if ( !empty($mood_file) && file_exists(get_template_directory() . '/images/moods/'.$moods_directory.'/'.$mood_file) ) { ?>
|
||||
<div class="post-mood post-<?php echo $mood; ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/moods/default/<?php echo $mood_file; ?>" alt="<?php echo $mood; ?>" title="<?php echo $mood; ?>" /></div>
|
||||
<div class="post-mood post-<?php echo $mood; ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo $mood_file; ?>" alt="<?php echo $mood; ?>" title="<?php echo $mood; ?>" /></div>
|
||||
<?php }
|
||||
}
|
||||
|
||||
|
|
Before Width: | Height: | Size: 276 B After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 15 KiB |
|
@ -45,7 +45,10 @@
|
|||
<?php get_sidebar('blog'); ?>
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post();
|
||||
if (in_comic_category()) {
|
||||
global $disable_comic_blog_frontpage;
|
||||
if ($disable_comic_blog_frontpage != 'yes') {
|
||||
display_comic_post();
|
||||
}
|
||||
} else {
|
||||
display_blog_post();
|
||||
}
|
||||
|
|
|
@ -211,6 +211,7 @@ h3, h3 a {
|
|||
border-width: 1px 1px 1px 0;
|
||||
border-style: solid;
|
||||
border-color: #999;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#menunav {
|
||||
|
@ -1331,9 +1332,13 @@ li.storyline-root {
|
|||
|
||||
/* Archive Calendar Template */
|
||||
|
||||
.cpcal-image {
|
||||
height: 120px;
|
||||
width: 152px;
|
||||
}
|
||||
|
||||
.cpcal-month {
|
||||
width: 157px;
|
||||
height: 138px;
|
||||
padding: 5px 0 5px 5px;
|
||||
margin: 0 8px 8px 0;
|
||||
float: left;
|
||||
|
|
|
@ -121,14 +121,12 @@ class widget_comicpress_bookmark extends WP_Widget {
|
|||
function widget($args, $instance) {
|
||||
global $post, $wp_query;
|
||||
extract($args, EXTR_SKIP);
|
||||
if (!is_home() && !is_page() && !is_single()) {
|
||||
echo $before_widget;
|
||||
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
|
||||
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
|
||||
comicpress_comic_bookmark();
|
||||
echo $after_widget;
|
||||
}
|
||||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
|
|
|
@ -17,15 +17,20 @@ class widget_comicpress_comic_blog_post extends WP_Widget {
|
|||
}
|
||||
|
||||
function widget($args, $instance) {
|
||||
global $post;
|
||||
global $post, $wp_query;
|
||||
extract($args, EXTR_SKIP);
|
||||
|
||||
if (have_posts()) : while (have_posts()) : the_post();
|
||||
if (!empty($post->post_content)) {
|
||||
echo $before_widget;
|
||||
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
|
||||
if ( !empty( $title ) ) { echo $title; }
|
||||
|
||||
display_comic_post();
|
||||
echo $after_widget;
|
||||
}
|
||||
endwhile;
|
||||
endif;
|
||||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
|
|