* @access public
*/
class BIFE_AlbumPhoto extends BIFE_Widget {
- /**
- * Photo filename.
- *
- * @var string $file
- * @access protected
- */
- var $file;
-
- /**
- * Photo Description.
- *
- * @var string $desc
- * @access protected
- */
- var $desc;
-
// ~X2C
// +X2C Operation 106
*/
function __construct($attrs) // ~X2C
{
- $this->file = @$attrs['FILE'] ? $attrs['FILE'] : @$_REQUEST['BIFE_AlbumPhoto_FILE'];
- $this->desc = @$attrs['DESC'] ? $attrs['DESC'] : basename($this->file);
+ $new_attrs['FILE'] = @$attrs['FILE'] ? $attrs['FILE'] : @$_REQUEST['BIFE_ALBUM_FILE'];
+ $new_attrs['DESC'] = @$attrs['DESC'] ? $attrs['DESC'] : basename($new_attrs['FILE']);
+ parent::__construct($new_attrs);
}
// -X2C
*/
function render(&$template) // ~X2C
{
- $template->loadTemplateFile('bife_albumphoto.html');
- $template->setVariable(
- array(
- 'FILE' => $this->file,
- 'DESC' => $this->desc,
- )
- );
- return $template->get();
+ $template->group = 'album';
+ return $template->parse('photo', $this->attrs);
}
// -X2C