Location: PHPKode > scripts > Avatar Tools > helpers/view.php
<?php
/**
 * @version		$Id: coolfeed.php 100 2012-04-14 17:42:51Z hide@address.com $
 * @copyright	JoomAvatar.com
 * @author		Nguyen Quang Trung
 * @link		http://joomavatar.com
 * @license		License GNU General Public License version 2 or later http://www.gnu.org/licenses/gpl-2.0.html
 * @package		Avatar Dream Framework Template
 * @facebook 	http://www.facebook.com/pages/JoomAvatar/120705031368683
 * @twitter	    https://twitter.com/#!/JoomAvatar
 * @support 	http://joomavatar.com/forum/
 */

// no direct access
defined('_JEXEC') or die;

class PlgAvatarView 
{
	public $_extensions;
	public $_assets;
	
	public function __construct() 
	{
		if (!$this->_extensions) {
			$extensions = JFolder::folders(AT_PATH_EXTENSIONS, '.');
			require_once AT_PATH_HELPERS.DS.'extensions.php';
			$this->_extensions = PlgAvatarExtensions::checkInstalled($extensions);
		}
	}
	
	public function main() 
	{
		require_once AT_PATH.DS.'views/seo.php';
		require_once AT_PATH.DS.'views/articles.php';
		require_once AT_PATH.DS.'views/subview_access.php';
		require_once AT_PATH.DS.'views/subview_categories.php';
		require_once AT_PATH.DS.'views/subview_users.php';
		
		require_once AT_PATH.DS.'views/extensions.php';
		require_once AT_PATH.DS.'views/extensions_modules.php';
		require_once AT_PATH.DS.'views/subview_position.php';
		require_once AT_PATH.DS.'views/subview_ordering.php';
		require_once AT_PATH.DS.'views/subview_assignment.php';
		require_once AT_PATH.DS.'views/extensions_templates.php';
		require_once AT_PATH.DS.'views/extensions_menus.php';
		require_once AT_PATH.DS.'views/subview_menutype.php';
		require_once AT_PATH.DS.'views/subview_menu_parent.php';
		require_once AT_PATH.DS.'views/about.php';
	}
	
	public function extensionDisplay()
	{
		foreach ($this->_extensions as $ext) 
		{
			$path = AT_PATH_EXTENSIONS.DS.$ext.DS.'views';
			$files = JFolder::files($path, '.php$');
			
			if ($files) {
				foreach ($files as $file) {
					require_once $path.DS.$file;
				}	
			}
		}
	}
	
	public function extensionInstalled () {
		
	}
	
	public function extensionMenu() 
	{
		$html = '';
		
		foreach ($this->_extensions as $ext) {
			$html .= '<li><a id="'.$ext.'" class="menu-item" href="#" >-- '.ucfirst($ext).'</a></li>';
		}	
		
		return $html;
	}

	public function css($path = '') 
	{
		if (!isset($this->_assets['css'])) {
			$this->_assets['css'] = array();
		}

		if ($path) {
			$this->_assets['css'][] = $path; 					
		}

		return $this->_assets['css'];
	}
}
Return current item: Avatar Tools