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

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

		function PluginSmileysConfigView( $blogInfo )
		{
			$this->AdminPluginTemplatedView( $blogInfo, "smileys", "smileys" );
		}
		
		function render()
		{
			lt_include( PLOG_CLASS_PATH."plugins/smileys/class/smileys/smileys.class.php" );
			
			$blogSettings = $this->_blogInfo->getSettings();
			$pluginEnabled = $blogSettings->getValue( "plugin_smileys_enabled" );
			$smileySet = $blogSettings->getValue( "plugin_smileys_iconset" );
			if ($smileySet == "") $smileySet = DEFAULT_SMILEY_SET;
			
			$smileySets = Smileys::scanSmileysFolder();
			
			// create a view and export the settings to the template
			$this->setValue( "pluginEnabled", $pluginEnabled );
			$this->setValue( "smileyset", $smileySet );
			$this->setValue( "smileysets", $smileySets );
			
			parent::render();
		}
	}
?>