<?php
	
	include_once( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );

	/**
	 * implements the main view of the feed reader plugin
	 */
	class PluginFlickrConfigView extends AdminPluginTemplatedView
	{

		function PluginFlickrConfigView( $blogInfo )
		{
			$this->AdminPluginTemplatedView( $blogInfo, "flickr", "flickr" );
		}
		
		function render()
		{
			// load some configuration settings
			$blogSettings = $this->_blogInfo->getSettings();
			$pluginEnabled = $blogSettings->getValue( "plugin_flickr_enabled" );
			$email = $blogSettings->getValue( "plugin_flickr_email" );
            $password = $blogSettings->getValue( "plugin_flickr_password" );
            $aliasName = $blogSettings->getValue( "plugin_flickr_aliasname" );
            $albumThumbnailSize = $blogSettings->getValue( "plugin_flickr_albumthumbnailsize" );
            if ( $albumThumbnailSize == "" ) $albumThumbnailSize = "s";
            $photoThumbnailSize = $blogSettings->getValue( "plugin_flickr_photothumbnailsize" );
            if ( $photoThumbnailSize == "" ) $photoThumbnailSize = "s";
            $showPrivate = $blogSettings->getValue( "plugin_flickr_showprivate" );
            if ( $showPrivate == "") $showPrivate = 1;
            $showNote = $blogSettings->getValue( "plugin_flickr_shownote" );
            if ( $showNote == "") $showNote = 1;
            $expiredTime = $blogSettings->getValue( "plugin_flickr_expiredtime" );
            if ( $expiredTime == "") $expiredTime = 3600;
			
			// create a view and export the settings to the template
			$this->setValue( "pluginEnabled", $pluginEnabled );
			$this->setValue( "email", $email );
			$this->setValue( "password", $password );
			$this->setValue( "aliasName", $aliasName );
			$this->setValue( "albumThumbnailSize", $albumThumbnailSize );
			$this->setValue( "photoThumbnailSize", $photoThumbnailSize );
			$this->setValue( "showPrivate", $showPrivate );
			$this->setValue( "showNote", $showNote );
			$this->setValue( "expiredTime", $expiredTime );		
			
			parent::render();
		}
	}
?>