Current File : /home/pacjaorg/public_html/kmm/plugins/quickicon/djcfquickicon/djcfquickicon.php
<?php
/**
 * @package DJ-Classifieds
 * @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: http://dj-extensions.com
 * @author email contact@dj-extensions.com
 */

defined('_JEXEC') or die;

class plgQuickiconDjcfquickicon extends JPlugin
{
	public function onGetIcons($context)
	{	
		if($context != $this->params->get('context', 'mod_quickicon')){
			return;
		}

		require_once(JPATH_ROOT.'/administrator/components/com_djclassifieds/lib/djtheme.php');
		DJClassifiedsTheme::loadAdminLanguage();
		
		$icons = array();

		if(version_compare(JVERSION, '4', '>=')){
			$icons[] = array(
				'link' => 'index.php?option=com_djclassifieds',
				'image' => 'icon-djcf',
				'text' => JText::_('COM_DJCLASSIFIEDS').'<span class="icon-options" title="DJ-Classifieds - '.JText::_('JOPTIONS').'"></span>',
				'id' => 'plg_djcf_quickicon'
			);

			JFactory::getDocument()->addStyleDeclaration("
				.icon-djcf:after {
					display: block;
					content: '';
					height: 60px;
					width: 50px;
					background: url(".JUri::root()."administrator/components/com_djclassifieds/assets/images/dj-classifieds.svg);
					background-size: 50px;
					background-repeat: no-repeat;
				}
				#plg_djcf_quickicon {
					position: relative;
				}
				#plg_djcf_quickicon .icon-options {
					position: absolute;
					top: 5px;
					right: 5px;
				}
			");
			JFactory::getDocument()->addScriptDeclaration("jQuery(function($){
				$('#plg_djcf_quickicon .icon-options').click(function(e){
					e.preventDefault();
					window.location.href = 'index.php?option=com_config&view=component&component=com_djclassifieds';
				});
			});");
		}else{
			$icons[] = array(
				'link' => 'index.php?option=com_djclassifieds',
				'image' => 'list',
				'text' => JText::_('COM_DJCLASSIFIEDS'),
				'id' => 'plg_djcf_quickicon'
			);
		}

		return $icons;
	}
}
Site is undergoing maintenance

PACJA Events

Maintenance mode is on

Site will be available soon. Thank you for your patience!