'image_path image alt', 'width' =>'image width', 'height' =>'image height', 'path_prefix' =>'prefix image paths with this path'); var $default_context = LP_CONTEXT_ALL; var $description = 'Rotate images in the header'; var $active = true; var $hooks = array('pre_render'); var $images = ''; var $width = 0; var $height = 0; var $path_prefix = ''; var $textareas = array('images'); function HeaderImages(&$frontend, $args, $dummy_run=false) { $this->LightPressPlugin($frontend, $args, $dummy_run); } function run($hook, &$plugin_data) { $tpl =& $this->_frontend->tpl; $images = explode("\n", $this->images); $image = trim($images[rand(0, count($images) - 1)]); $image = explode(' ', $image, 2); $tpl->setVar( 'PLUGIN_HEADERIMAGES', sprintf('%s', $this->path_prefix, $image[0], $image[1], $image[1], $this->width, $this->height) ); } } ?>