Location: PHPKode > scripts > Avatar Tools > helpers/extensions.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 PlgAvatarExtensions {
	
	/**
	 * get Installed extensions
	 * @param array name extension
	 * @return array installed extenions
	 */
	 
	 public static function checkInstalled ($extensions)
	 {
	 	$exts = array();
		
		if (is_array($extensions)) 
		{
			$db = JFactory::getDBO();
			foreach ($extensions as $ex)
			{
				$query = $db->getQuery(true);
				$query->select('count(extension_id)')
				->from('#__extensions')
				->where('element LIKE'. $db->quote('%'.$ex.'%'))
				->where('enabled = 1')
				->where('type = '.$db->quote('component'));
				
				$db->setQuery($query);
				
				if ($db->loadResult()){
					$exts[] = $ex;
				}
			}	
		} 
		
		return $exts;
	 }
}
Return current item: Avatar Tools