I just wanted to check if you were interested in doing an update for this plugin.
]]>The plugin does not appear on under the widgets list.
I went through the codes, and found that the widget initialization codes need to be updated.
Thanks.
]]>Plugin not working! WordPress latest version
]]>Hi,
You plugin works great but it has some coding errors. It was almost ready to handle multiple images.
I only modified widget-image-field/widget-image-field.php
.
On line 53, modified :
Before :
$this->widget_field = $this->get_widget_field( $widget, $this->image_id );
After :
$this->widget_field = $this->get_widget_field( $this->image_id );
On line 126, added :
if (isset($this->widget->image_field))
{
$field_name = $this->widget->image_field;
}
And on line 132, modified :
Before :
$field .= "<input type='hidden' style='display:none;' id='" . $this->widget->get_field_id( $this->widget->image_field ) . "' name='" . $this->widget->get_field_name( $this->widget->image_field ) . "' value='" . $this->image_id . "' />";
After :
$field .= "<input type='hidden' style='display:none;' id='" . $this->widget->get_field_id( $field_name ) . "' name='" . $this->widget->get_field_name( $field_name ) . "' value='" . $this->image_id . "' />";
Can you review my changes and update the plugin ?
Thanks !
]]>I’m trying to figure out how to upload multiple images with this pluggin. what am i missing? See the sight
if( class_exists( 'WidgetImageField' ) )
add_action( 'widgets_init', create_function( '', "register_widget( 'image_rotator' );" ) );
class ITI_Widget_Image_OTM extends WP_Widget
{
var $image_field = 'image'; // the image field ID
function __construct()
{
$widget_ops = array(
'classname' => 'image_rotator',
'description' => __( "Image Rotator")
);
parent::__construct( 'image_rotator', __('Image Rotator'), $widget_ops );
}
function form( $instance )
{
$image_id = esc_attr( isset( $instance[$this->image_field] ) ? $instance[$this->image_field] : 0 );
$image_id2 = esc_attr( isset( $instance[$this->image_field] ) ? $instance[$this->image_field] : 0 );
$image = new WidgetImageField( $this, $image_id );
$image2 = new WidgetImageField( $this, $image_id2 );
?>
<h3>Image One:</h3>
<div>
<label><?php _e( 'Image:' ); ?></label>
<?php echo $image->get_widget_field(); ?>
</div>
<h3>Image Two:</h3>
<div>
<label><?php _e( 'Image:' ); ?></label>
<?php echo $image2->get_widget_field(); ?>
</div>
<?php
}
function widget( $args, $instance )
{
extract($args);
$image_id = $instance[$this->image_field];
$image_id2 = $instance[$this->image_field];
$image = new WidgetImageField( $this, $image_id );
$image2 = new WidgetImageField( $this, $image_id2 );
echo $before_widget;
?>
<?php if( !empty( $image ) ) : ?>
<img src="<?php echo $image->get_image_src( 'thumbnail' ); ?>" width="<?php echo $image->get_image_width( 'thumbnail' ); ?>" height="<?php echo $image->get_image_height( 'thumbnail' ); ?>" />
<?php endif; ?>
<?php if( !empty( $image2 ) ) : ?>
<img src="<?php echo $image2->get_image_src( 'thumbnail' ); ?>" width="<?php echo $image2->get_image_width( 'thumbnail' ); ?>" height="<?php echo $image2->get_image_height( 'thumbnail' ); ?>" />
<?php endif; ?>
<?php
echo $after_widget;
}
function update( $new_instance, $old_instance )
{
$instance = $old_instance;
$instance[$this->image_field] = intval( strip_tags( $new_instance[$this->image_field] ) );
$instance[$this->image_field] = intval( strip_tags( $new_instance[$this->image_field] ) );
return $instance;
}
}
add_action('widgets_init', create_function('', 'return register_widget("ITI_Widget_Image_OTM");'));
?>
]]>
Just wanted to say thanks for a great little plugin.
So many WP plugins are overbuilt and try to do too much. Rarely does someone just put out a bit of plumbing that devs can integrate as they see fit, like you did.
Thanks, and great work.
https://www.ads-software.com/extend/plugins/widget-image-field/
]]>Just wanted to post this in case others have this problem. In Firefox I get this error:
ReferenceError: event is not defined
tb_show(jQuery(this).attr('title'), event.target.href, false);
Seems like it should be e instead of event since that’s the parameter that was passed in. After changing to the line below it works.
tb_show(jQuery(this).attr('title'), e.target.href, false);
Thanks for the great plugin. It’s very useful!
https://www.ads-software.com/extend/plugins/widget-image-field/
]]>Not working with a child theme…can’t see any other reason for it not to work. Can you confirm where to place the ITI_Widget_Image_OTM file in relation to the plugin?
https://www.ads-software.com/extend/plugins/widget-image-field/
]]>