calendar now allows options for thumbnails and wallpaper links some styling fixes
Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
parent
94ad13698a
commit
2b863e844f
|
@ -90,7 +90,7 @@ function comicpress_admin() {
|
|||
switch ( $value['type'] ) {
|
||||
case "comicpress-cp_theme_style": ?>
|
||||
<tr>
|
||||
<th scope="row"><strong>Choose which theme style you want to use.</strong><br /><br />This is the style in which your theme will be presented.<br /><br /></th>
|
||||
<th scope="row"><strong>Choose which theme style you want to use.</strong><br /><br />This is the style in which your theme will be presented.<br /><br />NOTE: Use 3-Column theme if you're using ComicPress as a Blog.</th>
|
||||
<td valign="top">
|
||||
<label>
|
||||
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" class="code" onchange="showimage(this,'cpthemestyle')">
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<?php } ?>
|
||||
<?php get_sidebar('footer'); ?>
|
||||
<p>
|
||||
©<?php echo cp_copyright_year(); ?> <?php echo the_author_meta('firstname',0); echo " "; echo the_author_meta('lastname'); ?>. <?php bloginfo('name') ?> is powered by <a href="http://wordpress.org/">WordPress</a> with <a href="http://comicpress.org/">ComicPress</a>
|
||||
©<?php echo cp_copyright_year(); ?> <?php echo the_author_meta('firstname',0); echo " "; echo the_author_meta('lastname',0); ?>. <?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>
|
||||
|
|
|
@ -64,7 +64,7 @@ function comicpress_showmood_edit_post() {
|
|||
$newmood = explode(".", $newmood_file);
|
||||
$newmood = $newmood[0]; ?>
|
||||
<div style="float:left; margin-top: 10px; text-align: center; width: 68px; overflow: hidden;">
|
||||
<label for="<?php echo $newmood; ?>" style="cursor:pointer;">
|
||||
<label for="postmood-<?php echo $newmood; ?>" style="cursor:pointer;">
|
||||
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo basename($file); ?>"><br />
|
||||
<?php echo $newmood; ?>
|
||||
</label>
|
||||
|
|
|
@ -373,7 +373,6 @@ h3, h3 a {
|
|||
background:#fff;
|
||||
padding:10px 0;
|
||||
border:1px solid #999;
|
||||
margin:10px 0 0 0;
|
||||
text-align: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
@ -908,6 +907,12 @@ ul.children {
|
|||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.wp-calendar-thumb {
|
||||
width: 178px;
|
||||
height: 130px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
|
||||
#wp-calendar th {
|
||||
font-size: 10px;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/*
|
||||
Widget Name: Calendar
|
||||
Widget Name: ComicPress Calendar
|
||||
Widget URI: http://comicpress.org/
|
||||
Description: Display a calendar of this months posts.
|
||||
Author: Philip M. Hofer (Frumph)
|
||||
|
@ -9,10 +9,19 @@ Author URI: http://webcomicplanet.com/
|
|||
|
||||
*/
|
||||
|
||||
function comicpress_calendar() {
|
||||
global $post; ?>
|
||||
function comicpress_calendar($instance) {
|
||||
global $post;
|
||||
$thumbnail = $instance['thumbnail'];
|
||||
$small = $instance['small'];
|
||||
$medium = $instance['medium'];
|
||||
$large = $instance['large'];
|
||||
?>
|
||||
<div id="wp-calendar-top"></div>
|
||||
<div id="wp-calendar-wrap">
|
||||
<?php if (!empty($thumbnail)) { ?>
|
||||
<img src="<?php echo $thumbnail; ?>" alt="" class="wp-calendar-thumb" /><br />
|
||||
<?php if (!empty($small)) { ?>[<a href="<?php echo $small; ?>">S</a>] <?php } ?><?php if (!empty($medium)) { ?>[<a href="<?php echo $medium; ?>">M</a>] <?php } ?><?php if (!empty($large)) { ?>[<a href="<?php echo $large; ?>">L</a>] <?php } ?>
|
||||
<?php } ?>
|
||||
<?php get_calendar(); ?>
|
||||
</div>
|
||||
<div id="wp-calendar-bottom"></div>
|
||||
|
@ -32,21 +41,35 @@ class widget_comicpress_calendar extends WP_Widget {
|
|||
echo $before_widget;
|
||||
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
|
||||
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
|
||||
comicpress_calendar();
|
||||
comicpress_calendar($instance);
|
||||
echo $after_widget;
|
||||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
$instance['title'] = strip_tags($new_instance['title']);
|
||||
$instance['thumbnail'] = strip_tags($new_instance['thumbnail']);
|
||||
$instance['small'] = strip_tags($new_instance['small']);
|
||||
$instance['medium'] = strip_tags($new_instance['medium']);
|
||||
$instance['large'] = strip_tags($new_instance['large']);
|
||||
return $instance;
|
||||
}
|
||||
|
||||
function form($instance) {
|
||||
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
|
||||
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'thumbnail' => '', 'small' => '', 'medium' => '', 'large' => '') );
|
||||
$title = strip_tags($instance['title']);
|
||||
$thumbnail = strip_tags($instance['thumbnail']);
|
||||
$small = strip_tags($instance['small']);
|
||||
$medium = strip_tags($instance['medium']);
|
||||
$large = strip_tags($instance['large']);
|
||||
?>
|
||||
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
|
||||
|
||||
<p><label for="<?php echo $this->get_field_id('thumbnail'); ?>">Thumbnail URL: <input class="widefat" id="<?php echo $this->get_field_id('thumbnail'); ?>" name="<?php echo $this->get_field_name('thumbnail'); ?>" type="text" value="<?php echo attribute_escape($thumbnail); ?>" /></label></p>
|
||||
<p><label for="<?php echo $this->get_field_id('small'); ?>">Wallpaper URL (Small): <input class="widefat" id="<?php echo $this->get_field_id('small'); ?>" name="<?php echo $this->get_field_name('small'); ?>" type="text" value="<?php echo attribute_escape($small); ?>" /></label></p>
|
||||
<p><label for="<?php echo $this->get_field_id('medium'); ?>">Wallpaper URL (Medium): <input class="widefat" id="<?php echo $this->get_field_id('medium'); ?>" name="<?php echo $this->get_field_name('medium'); ?>" type="text" value="<?php echo attribute_escape($medium); ?>" /></label></p>
|
||||
<p><label for="<?php echo $this->get_field_id('large'); ?>">Wallpaper URL (Large): <input class="widefat" id="<?php echo $this->get_field_id('large'); ?>" name="<?php echo $this->get_field_name('large'); ?>" type="text" value="<?php echo attribute_escape($large); ?>" /></label></p>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue