deleting of more deprecated files, commenting out the sidebar-left and sidebar-right widgets that are not currently working. fixes to some of the include widgets

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-12-21 15:18:40 -08:00
parent e8f665c721
commit b8fef1fa9e
34 changed files with 32 additions and 935 deletions

View File

@ -1,3 +0,0 @@
<?php
// Depreciated
?>

View File

@ -852,3 +852,12 @@ function comicpress_gnav_display_css() {
}
if (comicpress_check_child_file('childfunctions') == false) {}
if ( isset( $_GET['latestcomic'] ) )
add_action( 'template_redirect', 'latest_comic_jump' );
//to use simply create a URL link to "/?latestcomic"
function latest_comic_jump() {
wp_redirect( get_permalink( get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), false) ) );
exit;
}

View File

@ -6,10 +6,10 @@ if (!$comicpress_options['disable_lrsidebars_frontpage']) { ?>
<?php
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Sidebar') ) :
if (!is_cp_theme_layout('standard,v')) {
the_widget('CalendarWidget');
the_widget('ArchiveDropdownWidget','mode=monthly_archive');
the_widget('ComicPressCalendarWidget');
// the_widget('ComicPressArchiveDropdownWidget','mode=monthly_archive');
}
the_widget('LatestComicsWidget');
the_widget('ComicPressLatestComicsWidget');
endif;
?>
</div>

View File

@ -1,6 +1,6 @@
<?php global $comicpress_options;
if (!$comicpress_options['disable_default_menubar']) {
the_widget('MenubarWidget',array(),array());
the_widget('ComicPressMenubarWidget',array(),array());
}
?>
<?php if (comicpress_is_active_sidebar('Menubar')) { ?>

View File

@ -5,10 +5,10 @@ if (!$comicpress_options['disable_lrsidebars_frontpage']) { ?>
<div class="sidebar">
<?php
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Right Sidebar') ) :
the_widget('BookmarkWidget','mode=three-button');
// the_widget('ComicpressBookmarkWidget','mode=three-button');
if (is_cp_theme_layout('standard,v')) {
the_widget('CalendarWidget');
the_widget('ArchiveDropdownWidget','mode=monthly_archive');
the_widget('ComicpressCalendarWidget');
// the_widget('ComicpressArchiveDropdownWidget','mode=monthly_archive');
}
the_widget('WP_Widget_Pages');
the_widget('WP_Widget_Categories','hierarchical=1&count=1');

View File

@ -1,6 +1,6 @@
<?php
/*
Widget Name: comicpress archive dropdown
Widget Name: ArchiveDropDown
Widget URI: http://comicpress.org/
Description:
Author: Philip M. Hofer (Frumph) & John Bintz
@ -9,10 +9,10 @@ Author URI: http://frumph.net/
*/
class ArchiveDropdownWidget extends WP_Widget {
class ComicPressArchiveDropdownWidget extends WP_Widget {
var $modes;
function ArchiveDropdownWidget($skip_widget_init = false) {
function ComicPressArchiveDropdownWidget($skip_widget_init = false) {
if (!$skip_widget_init) {
$widget_ops = array('classname' => __CLASS__, 'description' => __('Display a dropdown list of your archives, styled.','comicpress') );
$this->WP_Widget(__CLASS__, __('ComicPress Archive Dropdown','comicpress'), $widget_ops);

View File

@ -1,9 +1,9 @@
<?php
class BookmarkWidget extends WP_Widget {
class ComicPressBookmarkWidget extends WP_Widget {
var $text_fields;
function BookmarkWidget($skip_widget_init = false) {
function ComicPressBookmarkWidget($skip_widget_init = false) {
if (!$skip_widget_init) {
$widget_ops = array('classname' => __CLASS__, 'description' => __('Allow the user to bookmark a page and then jump to it upon return.','comicpress') );
$this->WP_Widget(__CLASS__, __('ComicPress Bookmark','comicpress'), $widget_ops);

View File

@ -1,62 +0,0 @@
<?php
/*
Widget Name: Buy Comic Print
Widget URI: http://comicpress.org/
Description: Places a button that works with the Buy This template.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
class BuyThisPrintWidget extends WP_Widget {
function BuyThisPrintWidget($skip_widget_init = false) {
if (!$skip_widget_init) {
$widget_ops = array('classname' => __CLASS__, 'description' => __('Adds a button that goes to the buy print template page.','comicpress') );
$this->WP_Widget(__CLASS__, __('ComicPress Buy This Print','comicpress'), $widget_ops);
}
}
function init() {
add_filter('comicpress_buy_print_structure', array(&$this, 'buy_print_structure'));
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
if ( get_post_meta( get_the_ID(), "buythiscomic", true ) !== 'sold' ) {
echo apply_filters('comicpress_buy_print_structure', '');
}
echo $after_widget;
}
function buy_print_structure($content = '') {
$comicpress_options = comicpress_load_options(); ?>
<div class="buythis"><form method="post" action="<?php echo $comicpress_options['buy_print_url']; ?>">
<input type="hidden" name="comic" value="<?php echo get_the_ID(); ?>" />
<button class="buythisbutton" type="submit" value="submit" name="submit"></button></form></div>
<div class="clear"></div>
<?php
}
function update($new_instance, $old_instance = array()) {
$instance = array();
foreach (array('title') as $field) {
if (isset($new_instance[$field])) { $instance[$field] = strip_tags($new_instance[$field]); }
}
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']);
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','comicpress'); ?> <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>
<?php
}
}

View File

@ -4,13 +4,14 @@ Widget Name: ComicPress Calendar
Widget URI: http://comicpress.org/
Description: Display a calendar of this months posts.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Version: 1.02
Author URI: http://frumph.net/
*/
class CalendarWidget extends WP_Widget {
function CalendarWidget($skip_widget_init = false) {
class ComicPressCalendarWidget extends WP_Widget {
function ComicPressCalendarWidget($skip_widget_init = false) {
if (!$skip_widget_init) {
$widget_ops = array('classname' => __CLASS__, 'description' => __('Display a calendar showing this months posts. (this calendar does not drop lines if there is no title given.)','comicpress') );
$this->WP_Widget(__CLASS__, __('ComicPress Calendar','comicpress'), $widget_ops);

View File

@ -43,13 +43,5 @@ class ComicPressCommentsWidget extends WP_Widget {
<?php
}
}
register_widget('widget_comicpress_comments');
function widget_comicpress_comments_init() {
new widget_comicpress_comments();
}
add_action('widgets_init', 'widget_comicpress_comments_init');
?>

View File

@ -10,8 +10,9 @@ Author URI: http://frumph.net/
require_once(dirname(__FILE__) . '/../classes/ComicPressNavigation.inc');
class GraphicalNavigationWidget extends WP_Widget {
function GraphicalNavigationWidget($skip_widget_init = false) {
class ComicPressGraphicalNavigationWidget extends WP_Widget {
function ComicPressGraphicalNavigationWidget($skip_widget_init = false) {
if (!$skip_widget_init) {
$widget_ops = array('classname' => __CLASS__, 'description' => __('Displays Graphical Navigation Buttons. (used in comic sidebars)','comicpress') );
$this->WP_Widget(__CLASS__, __('ComicPress Comic Navigation','comicpress'), $widget_ops);

View File

@ -8,9 +8,9 @@ Version: 1.02
*/
class LatestComicsWidget extends WP_Widget {
class ComicPressLatestComicsWidget extends WP_Widget {
function LatestComicsWidget($skip_widget_init = false) {
function ComicPressLatestComicsWidget($skip_widget_init = false) {
if (!$skip_widget_init) {
$widget_ops = array('classname' => __CLASS__, 'description' => __('Display a list of the latest comics available.','comicpress') );
$this->WP_Widget(__CLASS__, __('ComicPress Latest Comics','comicpress'), $widget_ops);

View File

@ -9,9 +9,9 @@ Author URI: http://frumph.net/
*/
class MenubarWidget extends WP_Widget {
class ComicPressMenubarWidget extends WP_Widget {
function MenubarWidget($skip_widget_init = false) {
function ComicPressMenubarWidget($skip_widget_init = false) {
if (!$skip_widget_init) {
$widget_ops = array('classname' => __CLASS__, 'description' => __('Displays a menubar.','comicpress') );
$this->WP_Widget(__CLASS__, __('Comicpress Menubar','comicpress'), $widget_ops);

View File

@ -1,3 +0,0 @@
<?php
// depreciated
?>

View File

@ -1,3 +0,0 @@
<?php
// No Longer Used
?>

View File

@ -1,3 +0,0 @@
<?php
// Depreciated
?>

View File

@ -1,3 +0,0 @@
<?php
// Depreciated
?>

View File

@ -1,58 +0,0 @@
<?php
/*
Widget Name: Comic Blog Post
Widget URI: http://comicpress.org/
Description: Display's the comic's blog post.
Author: Philip M. Hofer (Frumph)
Version: 1.04
Author URI: http://frumph.net/
*/
class widget_comicpress_comic_blog_post extends WP_Widget {
function widget_comicpress_comic_blog_post() {
$widget_ops = array('classname' => 'widget_comicpress_comic_blog_post', 'description' => 'Displays the comic blog post, ..used to be around the comic areas.' );
$this->WP_Widget('comicpress_comic_blog_post', 'ComicPress Comic Blog Post', $widget_ops);
}
function widget($args, $instance) {
global $post, $wp_query;
if (is_home() || is_single()) {
extract($args, EXTR_SKIP);
if (!empty($post->post_content)) {
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo '<div class="heading">'.$title.'</div>'; }
display_comic_post();
echo $after_widget;
}
}
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']);
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Heading:<br /><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>
<?php
}
}
register_widget('widget_comicpress_comic_blog_post');
function widget_comicpress_comic_blog_post_init() {
new widget_comicpress_comic_blog_post();
}
add_action('widgets_init', 'widget_comicpress_comic_blog_post_init');
?>

View File

@ -1,53 +0,0 @@
<?php
/*
Widget Name: Comic Comments
Widget URI: http://comicpress.org/
Description: Display a comments link to put inside the comic area.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
class widget_comicpress_comments extends WP_Widget {
function widget_comicpress_comments() {
$widget_ops = array('classname' => 'widget_comicpress_comments', 'description' => __('Displays a comments link. (used in comic sidebars)','comicpress') );
$this->WP_Widget('comicpress_comic_comments', __('ComicPress Comic Comments','comicpress'), $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? __('Permalink','comicpress') : apply_filters('widget_title', $instance['title']); ?>
<?php if ('open' == $post->comment_status) { ?><div class="comment-link"><?php comments_popup_link('<span class="comment-balloon comment-balloon-empty">&rdquo;</span>Comment ', '<span class="comment-balloon">1</span>Comment ', '<span class="comment-balloon">%</span>Comment '); ?></div><?php } ?>
<?php
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '') );
$title = strip_tags($instance['title']);
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('New Link name:','comicpress'); ?> <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>
<?php
}
}
register_widget('widget_comicpress_comments');
function widget_comicpress_comments_init() {
new widget_comicpress_comments();
}
add_action('widgets_init', 'widget_comicpress_comments_init');
?>

View File

@ -1,59 +0,0 @@
<?php
/*
Widget Name: Comic Date
Widget URI: http://comicpress.org/
Description: Display's the date of post of the comic.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
class widget_comicpress_comic_date extends WP_Widget {
function widget_comicpress_comic_date() {
$widget_ops = array('classname' => 'widget_comicpress_comic_date', 'description' => __('Displays the date of the post of the comic.','comicpress') );
$this->WP_Widget('comicpress_comic_date', __('ComicPress Comic Date','comicpress'), $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $title; } ?> <?php the_time($instance['format']); ?>
<?php echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['format'] = strip_tags($new_instance['format']);
if (empty($instance['format'])) $instance['format'] = 'F jS, Y';
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'format' => '' ) );
$title = strip_tags($instance['title']);
$format = strip_tags($instance['format']);
if (empty($format)) $format = 'F jS, Y';
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Words to use before date:','comicpress'); ?><br /><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('format'); ?>"><?php _e('Format of the Time/Date:','comicpress'); ?><br /><input class="widefat" id="<?php echo $this->get_field_id('format'); ?>" name="<?php echo $this->get_field_name('format'); ?>" type="text" value="<?php echo attribute_escape($format); ?>" /></label></p>
<p><a href="http://us.php.net/manual/en/function.date.php" target="_blank"><?php _e('Date String Examples','comicpress'); ?></a></p>
<?php
}
}
register_widget('widget_comicpress_comic_date');
function widget_comicpress_comic_date_init() {
new widget_comicpress_comic_date();
}
add_action('widgets_init', 'widget_comicpress_comic_date_init');
?>

View File

@ -1,45 +0,0 @@
<?php
/*
Widget Name: comictitle
Widget URI: http://comicpress.org/
Description: Display a Title of the Comic that can be used in any area around the comic.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
class widget_comicpress_comictitle extends WP_Widget {
function widget_comicpress_comictitle() {
$widget_ops = array('classname' => 'widget_comicpress_comictitle', 'description' => __('Displays the title of the comic. (used in comic sidebars)','comicpress') );
$this->WP_Widget('comicpress_comictitle', __('ComicPress Comic Title','comicpress'), $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
return $instance;
}
function form($instance) {
}
}
register_widget('widget_comicpress_comictitle');
function widget_comicpress_comictitle_init() {
new widget_comicpress_comictitle();
}
add_action('widgets_init', 'widget_comicpress_comictitle_init');
?>

View File

@ -1,87 +0,0 @@
<?php
/*
Widget Name: Control Panel
Widget URI: http://comicpress.org/
Description: Display an area for login and logout, forgot password and register.
Author: Philip M. Hofer (Frumph)
Version: 1.02
Author URI: http://frumph.net/
*/
function comicpress_show_control_panel() {
global $wpmu_version; ?>
<?php if (!is_user_logged_in()) { ?>
<form action="<?php bloginfo('wpurl') ?>/wp-login.php" method="post">
<?php _e('UserName:','comicpress'); ?><br />
<input type="text" name="log" id="sname" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="22" /><br /><br />
<?php _e('Password:','comicpress'); ?><br />
<input type="password" name="pwd" id="spassword" size="22" /><br />
<label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label><br />
<br />
<button type="submit" class="button"><?php _e('Login','comicpress'); ?></button>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
</form>
<br />
<ul>
<?php if (!empty($wpmu_version)) { ?>
<li><a href="<?php bloginfo('wpurl') ?>/wp-signup.php"><?php _e('Register','comicpress'); ?></a></li>
<?php } else { ?>
<li><a href="<?php bloginfo('wpurl') ?>/wp-register.php"><?php _e('Register','comicpress'); ?></a></li>
<?php } ?>
<li><a href="<?php bloginfo('wpurl') ?>/wp-login.php?action=lostpassword"><?php _e('Recover password','comicpress'); ?></a></li>
</ul>
<?php } else { ?>
<ul>
<?php $redirect = '&amp;redirect_to='.urlencode(wp_make_link_relative(get_bloginfo('wpurl')));
$uri = wp_nonce_url( site_url("wp-login.php?action=logout$redirect", 'login'), 'log-out' ); ?>
<li><a href="<?php echo $uri; ?>"><?php _e('Logout','comicpress'); ?></a></li>
<?php wp_register(); ?>
<li><a href="<?php bloginfo('wpurl'); ?>/wp-admin/profile.php"><?php _e('Profile','comicpress'); ?></a></li>
</ul>
<?php } ?>
<?php
}
class widget_comicpress_show_control_panel extends WP_Widget {
function widget_comicpress_show_control_panel() {
$widget_ops = array('classname' => 'widget_comicpress_show_control_panel', 'description' => __('Login/Logoff menu with register/lost password links if not logged on. (use only if registrations are enabled.','comicpress') );
$this->WP_Widget('comicpress_control_panel', __('ComicPress Control Panel','comicpress'), $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? __('Control Panel','comicpress') : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
comicpress_show_control_panel();
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']);
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','comicpress'); ?> <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>
<?php
}
}
register_widget('widget_comicpress_show_control_panel');
function widget_comicpress_show_control_panel_init() {
new widget_comicpress_show_control_panel();
}
add_action('widgets_init', 'widget_comicpress_show_control_panel_init');
?>

View File

@ -1,3 +0,0 @@
<?php
// Depreciated
?>

View File

@ -1,63 +0,0 @@
<?php
/*
Widget Name: Latest Comic Jump
Widget URI: http://comicpress.org/
Description: Creates a link to the latest Comic
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
if ( isset( $_GET['latestcomic'] ) )
add_action( 'template_redirect', 'latest_comic_jump' );
//to use simply create a URL link to "/?latestcomic"
function latest_comic_jump() {
wp_redirect( get_permalink( get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), false) ) );
exit;
}
class widget_comicpress_latest_comic_jump extends WP_Widget {
function widget_comicpress_latest_comic_jump() {
$widget_ops = array('classname' => 'widget_comicpress_latest_comic_jump', 'description' => __('Displays a link to click to go to the latest comic.','comicpress') );
$this->WP_Widget('comicpress_latest_comic_jump', __('ComicPress Latest Comic Link','comicpress'), $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?>
<h2><a href="?latestcomic"><span class="latest-comic-icon">?</span> Latest Comic</a></h2>
<?php
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']);
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','comicpress'); ?> <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>
<?php
}
}
register_widget('widget_comicpress_latest_comic_jump');
function widget_comicpress_latest_comic_jump_init() {
new widget_comicpress_latest_comic_jump();
}
add_action('widgets_init', 'widget_comicpress_latest_comic_jump_init');
?>

View File

@ -1,68 +0,0 @@
<?php
/*
Widget Name: Latest Thumbnail
Widget URI: http://comicpress.org/
Description: Display a thumbnail of the latest comic.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
class widget_comicpress_latest_thumbnail extends WP_Widget {
function widget_comicpress_latest_thumbnail() {
$widget_ops = array('classname' => 'widget_comicpress_latest_thumbnail', 'description' => __('Display a thumbnail of the latest comic, clickable to go to the comic post.','comicpress') );
$this->WP_Widget('ComicPress latest_thumbnail', __('ComicPress Latest Thumbnail','comicpress'), $widget_ops);
}
function widget($args, $instance) {
global $post;
if (is_home()) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? __('Latest Comic','comicpress') : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
$latestcomics = get_posts('numberposts=1&category='.get_all_comic_categories_as_cat_string());
$archive_image = null;
foreach($latestcomics as $post) :
foreach (array("archive", "rss", "mini", "comic") as $type) {
if (($requested_archive_image = get_comic_url($type, $post)) !== false) {
$archive_image = $requested_archive_image; break;
}
} ?>
<center>
<a href="<?php the_permalink(); ?>"><img src="<?php echo $archive_image ?>" alt="<?php the_title() ?> - <?php the_date(); ?>" title="<?php the_hovertext() ?>" /></a><br />
<span class="latest_thumbnail_date"><?php the_date(); ?></span>
</center>
<?php endforeach;
echo $after_widget;
}
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']);
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','comicpress'); ?> <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>
<?php
}
}
register_widget('widget_comicpress_latest_thumbnail');
function widget_comicpress_latest_thumbnail_init() {
new widget_comicpress_latest_thumbnail();
}
add_action('widgets_init', 'widget_comicpress_latest_thumbnail_init');
?>

View File

@ -1,3 +0,0 @@
<?php
// depreciated
?>

View File

@ -1,57 +0,0 @@
<?php
/*
Widget Name: Non-Member text widget
Widget URI: http://comicpress.org/
Description: Displays whatever inside to non-members.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
class widget_comicpress_non_member_text extends WP_Widget {
function widget_comicpress_non_member_text() {
$widget_ops = array('classname' => 'widget_comicpress_non_member_text', 'description' => __('Displays Whatever is in the text box to non-members only.','comicpress') );
$control_ops = array('width' => 400, 'height' => 350);
$this->WP_Widget('widget_comicpress_non_member_text', __('ComicPress Non-Member Text','comicpress'), $widget_ops, $control_ops);
}
function widget($args, $instance) {
global $post, $wp_query;
if (!comicpress_is_member()) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '': apply_filters('widget_title', $instance['title']);
echo stripslashes($instance['textinfo']);
echo $after_widget;
}
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['textinfo'] = addslashes($new_instance['textinfo']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' , 'textinfo' => '') );
$title = strip_tags($instance['title']);
$textinfo = stripslashes($instance['textinfo']);
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','comicpress'); ?><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><textarea style="width: 400px; height: 280px;" name="<?php echo $this->get_field_name('textinfo'); ?>" name="<?php echo $this->get_field_name('textinfo'); ?>"><?php echo $textinfo; ?></textarea></label></p>
<?php
}
}
register_widget('widget_comicpress_non_member_text');
function widget_comicpress_non_member_text_init() {
new widget_comicpress_non_member_text();
}
add_action('widgets_init', 'widget_comicpress_non_member_text_init');
?>

View File

@ -1,57 +0,0 @@
<?php
/*
Widget Name: Permalink
Widget URI: http://comicpress.org/
Description: Display a permalink link that can be used in any area around the comic.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
class widget_comicpress_permalink extends WP_Widget {
function widget_comicpress_permalink() {
$widget_ops = array('classname' => 'widget_comicpress_permalink', 'description' => __('Displays a permalink. (used in comic sidebars)','comicpress') );
$this->WP_Widget('comicpress_permalink', __('ComicPress Permalink','comicpress'), $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); ?>
<a href="<?php the_permalink(); ?><?php if ($instance['comment'] == 'yes') { ?>#comment<?php } ?>" class="widget_permalink_href"><?php echo $title; ?></a>
<?php
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['comment'] = strip_tags($new_instance['comment']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' , 'comment' => '') );
$title = strip_tags($instance['title']);
$comment = strip_tags($instance['comment']);
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('New Link name:','comicpress'); ?><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><input name="<?php echo $this->get_field_name('comment'); ?>" id="<?php echo $this->get_field_id('comment'); ?>-comment" type="radio" value="yes"<?php if ( $comment == "yes") { echo " checked"; } ?> />Yes <input name="<?php echo $this->get_field_name('comment'); ?>" id="<?php echo $this->get_field_id('comment'); ?>-comment" type="radio" value="no"<?php if ( $comment == "no") { echo " checked"; } ?> />No<br />Add #comment to href?</label></p>
<?php
}
}
register_widget('widget_comicpress_permalink');
function widget_comicpress_permalink_init() {
new widget_comicpress_permalink();
}
add_action('widgets_init', 'widget_comicpress_permalink_init');
?>

View File

@ -1,63 +0,0 @@
<?php
/*
Widget Name: Scheduled Posts
Widget URI: http://comicpress.org/
Description: Display a list of posts that are due to be scheduled.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
class widget_comicpress_show_scheduled_posts extends WP_Widget {
function widget_comicpress_show_scheduled_posts() {
$widget_ops = array('classname' => 'widget_comicpress_show_scheduled_posts', 'description' => __('Display a list of posts that are scheduled to be published.','comicpress') );
$this->WP_Widget('comicpress_show_scheduled_posts', __('ComicPress Scheduled Posts','comicpress'), $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo '<div class="scheduled-post-wrap">';
echo $before_widget;
$title = empty($instance['title']) ? __('Scheduled Posts','comicpress') : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
$scheduled_posts = get_posts('post_status=future&numberposts=-1');
if (empty($scheduled_posts)) {
echo '<ul><li>None.</li></ul>';
} else { ?>
<ul>
<?php foreach($scheduled_posts as $post) : ?>
<li><span class="scheduled-post-date"><?php echo date('m/d/Y',strtotime($post->post_date)); ?></span> <span class="scheduled-post-title"><?php echo $post->post_title; ?></span></li>
<?php endforeach; ?>
</ul>
<?php }
echo $after_widget;
echo '</div>';
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']);
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','comicpress'); ?> <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>
<?php
}
}
register_widget('widget_comicpress_show_scheduled_posts');
function widget_comicpress_show_scheduled_posts_init() {
new widget_comicpress_show_scheduled_posts();
}
add_action('widgets_init', 'widget_comicpress_show_scheduled_posts_init');
?>

View File

@ -1,53 +0,0 @@
<?php
/*
Widget Name: Search Transcript
Widget URI: http://comicpress.org/
Description: Link to the form template for searching transcripts.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
class widget_comicpress_search_transcripts extends WP_Widget {
function widget_comicpress_search_transcripts() {
$widget_ops = array('classname' => 'widget_comicpress_search_transcripts', 'description' => __('Displays a form input box for searching transcripts.','comicpress') );
$this->WP_Widget('comicpress_search_transcripts', __('ComicPress Search Transcripts','comicpress'), $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
include(get_template_directory() . '/searchform-transcript.php');
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = strip_tags($instance['title']);
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','comicpress'); ?> <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>
<?php
}
}
register_widget('widget_comicpress_search_transcripts');
function widget_comicpress_search_transcripts_init() {
new widget_comicpress_search_transcripts();
}
add_action('widgets_init', 'widget_comicpress_search_transcripts_init');
?>

View File

@ -1,95 +0,0 @@
<?php
/*
Widget Name: ComicPress Social
Widget URI: http://comicpress.org/
Description: Translates a user's URL line into a social widget, associating it to images.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
class widget_comicpress_social extends WP_Widget {
function widget_comicpress_social() {
$widget_ops = array('classname' => 'widget_comicpress_social', 'description' => __('Display a user defined social button, with translated URL','comicpress') );
$this->WP_Widget('comicpress_social', __('ComicPress Social','comicpress'), $widget_ops);
}
function widget($args, $instance) {
global $post;
extract($args, EXTR_SKIP);
/* Get the info necessary */
$permalink = get_permalink($post->ID);
$posttitle = $post->post_title;
$posttitle = str_replace(' ', '%20', $posttitle);
$title = $instance['title'];
if (empty($title)) $title = $posttitle;
$rss = get_bloginfo('rss2_url');
$blogname = urlencode(get_bloginfo('name')." ".get_bloginfo('description'));
// Grab the excerpt, if there is no excerpt, create one
$excerpt = urlencode(strip_tags(strip_shortcodes($post->post_excerpt)));
if ($excerpt == "") {
$excerpt = urlencode(substr(strip_tags(strip_shortcodes($post->post_content)),0,250));
}
// Clean the excerpt for use with links
$excerpt = str_replace('+','%20',$excerpt);
echo $before_widget;
$url = $instance['urlstr'];
$url = str_replace('[URL]', $permalink, $url);
$url = str_replace('[TITLE]', $posttitle, $url);
$url = str_replace('[RSS]', $rss, $url);
$url = str_replace('[BLOGNAME]', $blogname, $url);
$url = str_replace('[EXCERPT]', $excerpt, $url); ?>
<div class="social-<?php echo sanitize_title($title); ?>">
<?php if (!empty($instance['image'])) { ?>
<a href="<?php echo $url; ?>" target="_blank" class="social-<?php echo sanitize_title($title); ?>"><img src="<?php echo $instance['image']; ?>" alt="<?php echo $title; ?>" /></a>
<?php } else { ?>
<a href="<?php echo $url; ?>" target="_blank" class="social-<?php echo sanitize_title($title); ?>"><?php echo $title; ?></a>
<?php } ?>
</div>
<?php echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['urlstr'] = strip_tags($new_instance['urlstr']);
$instance['image'] = strip_tags($new_instance['image']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => 'Share This!', 'urlstr' => '', 'image' => '') );
$title = strip_tags($instance['title']);
if (empty($title)) $title = 'Share This!';
$urlstr = strip_tags($instance['urlstr']);
$image = strip_tags($instance['image']);
?>
<small>
<strong>Translated Strings:</strong> [URL] [TITLE] [RSS] [BLOGNAME] [EXCERPT]<br />
<strong>Examples:</strong><br />
http://twitter.com/home?status=[TITLE]%20-%20[URL]<br />
http://www.stumbleupon.com/submit?url=[URL]&amp;title=[TITLE]<br />
</small>
<br />
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title (used as CSS marker too):','comicpress'); ?> <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('urlstr'); ?>"><?php _e('URL','comicpress'); ?> <input class="widefat" id="<?php echo $this->get_field_id('urlstr'); ?>" name="<?php echo $this->get_field_name('urlstr'); ?>" type="text" value="<?php echo attribute_escape($urlstr); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('image'); ?>"><?php _e('Image','comicpress'); ?> <input class="widefat" id="<?php echo $this->get_field_id('image'); ?>" name="<?php echo $this->get_field_name('image'); ?>" type="text" value="<?php echo attribute_escape($image); ?>" /></label></p>
<?php
}
}
register_widget('widget_comicpress_social');
function widget_comicpress_social_init() {
new widget_comicpress_social();
}
add_action('widgets_init', 'widget_comicpress_social_init');
?>

View File

@ -1,62 +0,0 @@
<?php
/*
Widget Name: Show Transcription
Widget URI: http://comicpress.org/
Description: Show the stylized transcription in a widget area.
Author: Philip M. Hofer (Frumph)
Version: 1.01
Author URI: http://frumph.net/
*/
class widget_comicpress_show_transcription extends WP_Widget {
function widget_comicpress_show_transcription() {
$widget_ops = array('classname' => 'widget_comicpress_show_transcription', 'description' => __('Display the transcription of the current post if there is one. (used in comic sidebars)','comicpress') );
$this->WP_Widget('comicpress_transcript', __('ComicPress Transcript','comicpress'), $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
$transtype = empty($instance['transtype']) ? 'empty' : apply_filters('widget_transtype', $instance['transtype']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
the_transcript($transtype);
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['transtype'] = strip_tags($new_instance['transtype']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'transtype' => '' ) );
$title = strip_tags($instance['title']);
$transtype = strip_tags($instance['transtype']);
if (empty($transtype)) $transtype = 'styled';
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','comicpress'); ?> <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><input name="<?php echo $this->get_field_name('transtype'); ?>" id="<?php echo $this->get_field_id('transtype'); ?>-styled" type="radio" value="styled"<?php if ( $transtype == "styled") { echo " checked"; } ?> /><?php _e('Styled','comicpress'); ?></label><br />
<label><input name="<?php echo $this->get_field_name('transtype'); ?>" id="<?php echo $this->get_field_id('transtype'); ?>-br" type="radio" value="br"<?php if ( $transtype == "br") { echo " checked"; } ?> /><?php _e('Add BR','comicpress'); ?></label><br />
<label><input name="<?php echo $this->get_field_name('transtype'); ?>" id="<?php echo $this->get_field_id('transtype'); ?>-raw" type="radio" value="raw"<?php if ( $transtype == "raw") { echo " checked"; } ?> /><?php _e('Raw Output','comicpress'); ?></label>
</p>
<?php
}
}
register_widget('widget_comicpress_show_transcription');
function widget_comicpress_show_transcription_init() {
new widget_comicpress_show_transcription();
}
add_action('widgets_init', 'widget_comicpress_show_transcription_init');
?>

View File

@ -1,3 +0,0 @@
<?php
// Depreciated
?>