alpinebot = new PhotoTileForSmugMugBot();
$bot = $this->alpinebot;
$widget_ops = array('classname' => $bot->name, 'description' => __($bot->desc));
$control_ops = array('width' => 550, 'height' => 350);
$this->__construct($bot->domain, __($bot->name), $widget_ops, $control_ops);
}
/**
* Widget
*
* @ Updated 1.2.3.2
*/
function widget( $args, $options ) {
$bot = $this->alpinebot;
extract($args);
// Set Important Widget Options
$bot->options = $options;
$bot->updateGlobalOptions();
$bot->wid = $args["widget_id"];
$bot->photo_retrieval();
$bot->enqueue_style_and_script();
echo $before_widget . $before_title . $options['widget_title'] . $after_title;
echo $bot->results['hidden'];
if( $bot->results['continue'] ){
if( "vertical" == $options['style_option'] ){
$bot->display_vertical();
}elseif( "cascade" == $options['style_option'] ){
$bot->display_cascade();
}else{
$bot->display_hidden();
}
echo $bot->out;
}
// If user does not have necessary extensions
// or error occured before content complete, report such...
else{
echo 'Sorry:
'.$bot->results['message'];
}
echo $after_widget;
}
/**
* Update
*
* @ Updated 1.2.0
*/
function update( $newoptions, $oldoptions ) {
$bot = $this->alpinebot;
$optiondetails = $bot->option_defaults();
foreach( $newoptions as $id=>$input ){
$options[$id] = $bot->MenuOptionsValidate( $input,$oldoptions[$id],$optiondetails[$id] );
}
return $options;
}
/**
* Form
*
* @ Updated 1.2.3
*/
function form( $options ) {
$bot = $this->alpinebot;
$widget_container = $this->get_field_id( 'AlpinePhotoTiles-container' ); ?>
| >MenuDisplayCallback($options,$option,$fieldname,$fieldid); ?> |