Exemplo n.º 1
0
	function __construct(& $subject, $config) {
		// Check if Kunena API exists
		$api = JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
		if (! is_file ( $api ))
			return false;

		jimport ( 'joomla.application.component.helper' );
		// Check if Kunena component is installed/enabled
		if (! JComponentHelper::isEnabled ( 'com_kunena', true )) {
			return false;
		}

		// Load Kunena API
		require_once $api;

		// Fix Joomla 1.5 bugs and bad performance
		$version = new JVersion();
		if ($version->RELEASE == '1.5') {
			$lang = JFactory::getLanguage();
			if (JFactory::getApplication()->isAdmin()) {
				$lang->load('com_kunena.menu', JPATH_ADMINISTRATOR);
			} else {
				$filename = JLanguage::getLanguagePath( JPATH_BASE, $lang->_lang)."/{$lang->_lang}.com_kunena.ini";
				$lang->_paths['com_kunena'][$filename] = 1;
			}
		}

		parent::__construct ( $subject, $config );
	}
Exemplo n.º 2
0
 function plgHikashopMassaction_category(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->massaction = hikashop_get('class.massaction');
     $this->massaction->datecolumns = array('category_created', 'category_modified');
     $this->category = hikashop_get('class.category');
 }
Exemplo n.º 3
0
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $config = array_merge($config, array('ppName' => 'epaydk', 'ppKey' => 'PLG_PAYMENT_EPAYDK_TITLE', 'ppImage' => ''));
     //Define Payment Status codes in eway  And Respective Alias in Framework
     $this->responseStatus = array('C' => 'C', 'ERROR' => 'E');
 }
Exemplo n.º 4
0
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     if (!isset($this->params)) {
         $plugin = JPluginHelper::getPlugin('system', 'hikashopuser');
         if (version_compare(JVERSION, '2.5', '<')) {
             jimport('joomla.html.parameter');
             $this->params = new JParameter($plugin->params);
         } else {
             $this->params = new JRegistry($plugin->params);
         }
     }
     $app = JFactory::getApplication();
     $this->cart = $app->getUserState('com_hikashop.cart_id');
     $this->wishlist = $app->getUserState('com_hikashop.wishlist_id');
     $this->currency = $app->getUserState('com_hikashop.currency_id');
     $this->entries = $app->getUserState('com_hikashop.entries_fields');
     $this->checkout_fields_ok = $app->getUserState('com_hikashop.checkout_fields_ok', 0);
     $this->checkout_fields = $app->getUserState('com_hikashop.checkout_fields');
     $app = JFactory::getApplication();
     if ($app->isAdmin() && @$_GET['option'] == 'com_plugins' && @$_GET['view'] == 'plugin' && (@$_GET['layout'] == 'edit' || @$_GET['task'] == 'edit')) {
         $lang = JFactory::getLanguage();
         $lang->load('com_hikashop', JPATH_SITE, null, true);
     }
 }
Exemplo n.º 5
0
	function plgSystemmyApiOpenGraph(&$subject, $config){
		parent::__construct($subject, $config);
		if(!class_exists('plgSystemmyApiConnect')) return;
		
		$cache = & JFactory::getCache('plgSystemmyApiOpenGraph - FB Admins query');
		$cache->setCaching( 1 );
		$config 	=& JFactory::getConfig();
		$connect_plugin 	=& JPluginHelper::getPlugin('system', 'myApiConnect');
		$connect_params 	= new JParameter( $connect_plugin->params );
		
		$plugin =& JPluginHelper::getPlugin('system', 'myApiOpenGraph');
		$plugin_params = new JParameter( $plugin->params );
		
		$db_admins = $cache->call( array( 'plgSystemmyApiOpenGraph', 'getFbAdmins'));
		$param_admins = ($plugin_params->get('fbadmins') != '') ? explode(',',$plugin_params->get('fbadmins')) : array();
		$admins = array_merge($db_admins,$param_admins);
		
		$ogptags_default					= array();
		$ogptags_default['og:title']		= $config->getValue( 'config.sitename' );
		$ogptags_default['og:type'] 		= 'website';
		$ogptags_default['og:url'] 			= JURI::getInstance()->toString();
		$ogptags_default['og:site_name']	= $config->getValue( 'config.sitename' );
		$ogptags_default['fb:app_id'] 		= $connect_params->get('appId');
		$ogptags_default['fb:admins']		= implode(',',$admins);
		if($plugin_params->get('ogimage') != '' && $plugin_params->get('ogimage') != -1) $ogptags_default['og:image'] = JURI::base().'images/'.$plugin_params->get('ogimage');
		if($plugin_params->get('fbpageid') != '') $ogptags_default['fb:page_id'] = $plugin_params->get('fbpageid');
		
		
		plgSystemmyApiOpenGraph::setTags($ogptags_default);
	}
Exemplo n.º 6
0
 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->loadLanguage();
     $this->_jqpath = '';
     $this->_jquipath = '';
     $this->_jquicsspath = '';
     $this->_jqnoconflictpath = '';
     $this->_jqmigratepath = '';
     $this->_supplement_scripts = array();
     $this->_supplement_stylesheets = array();
     $this->_showreport = false;
     $this->_verbose_array = array();
     $this->_usejQuery = false;
     $this->_usejQueryUI = false;
     //$this->_usejQueryfromJoomla = false;
     //$this->_usejQueryUIfromJoomla = false;
     $this->_enabled = true;
     $this->_timeafterroute = 0;
     $this->_timebeforerender = 0;
     $this->_timeafterrender = 0;
     $this->_jquery_loaded_by_template = false;
     $this->_jqueryui_loaded_by_template = false;
     $this->_bootstrap_loaded_by_template = false;
     $this->_back_compat_path = false;
 }
Exemplo n.º 7
0
 public function onContentPrepare($context, &$article, &$params, $limitstart)
 {
     $app = JFactory::getApplication();
     /* @var $app JApplication */
     // Do not render the buttons in administration area
     if ($app->isAdmin()) {
         return;
     }
     $doc = JFactory::getDocument();
     /* @var $doc JDocumentHtml */
     $docType = $doc->getType();
     // Joomla! must render content of this plugin only in HTML document
     if (strcmp("html", $docType) != 0) {
         return;
     }
     $currentOption = JRequest::getCmd("option");
     if ($currentOption != "com_content" or !isset($article) or empty($article->id) or !isset($this->params)) {
         return;
     }
     JPlugin::loadLanguage('plg_mvsocialbuttons');
     $buttons = $this->getButtons($article);
     $position = $this->params->get('position');
     switch ($position) {
         case 1:
             $article->text = $buttons . $article->text;
             break;
         case 2:
             $article->text = $article->text . $buttons;
             break;
         default:
             $article->text = $buttons . $article->text . $buttons;
             break;
     }
     return true;
 }
	function __construct( &$subject, $config )
	{
		parent::__construct( $subject, $config );

		$app = JFactory::getApplication();
		if ( $app->isSite() ) {
			return;
		}

		$template = $app->getTemplate();
		if ( $template == 'adminpraise3' ) {
			$document = JFactory::getDocument();
			$document->addStyleSheet( JURI::root( true ).'/plugins/system/nnframework/css/ap3.css?v='.$this->_version );
		}
		if ( in_array( JRequest::getCmd( 'option' ), array(
			'com_advancedmodules',
			'com_contenttemplater',
			'com_nonumbermanager',
			'com_rereplacer',
			'com_snippets',
		) )
		) {
			$document = JFactory::getDocument();
			$document->addScriptDeclaration( 'var is_nn = 1;' );
		}
	}
Exemplo n.º 9
0
 public function __construct(&$subject, $config)
 {
     // Do not load if Kunena version is not supported or Kunena is offline
     if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('3.0') && KunenaForum::installed())) {
         return;
     }
     $app = JFactory::getApplication();
     // Do not load if CommunityBuilder is not installed
     $path = JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
     if (!is_file($path)) {
         return;
     }
     require_once $path;
     cbimport('cb.database');
     cbimport('cb.tables');
     cbimport('language.front');
     cbimport('cb.tabs');
     cbimport('cb.field');
     global $ueConfig;
     parent::__construct($subject, $config);
     $this->loadLanguage('plg_kunena_comprofiler.sys', JPATH_ADMINISTRATOR) || $this->loadLanguage('plg_kunena_comprofiler.sys', KPATH_ADMIN);
     require_once __DIR__ . "/integration.php";
     if ($app->isAdmin() && (!isset($ueConfig['version']) || version_compare($ueConfig['version'], $this->minCBVersion) < 0)) {
         $app->enqueueMessage(JText::sprintf('PLG_KUNENA_COMPROFILER_WARN_VERSION', $this->minCBVersion), 'notice');
     }
 }
Exemplo n.º 10
0
 /**
  * Constructor
  *
  * For php4 compatibility we must not use the __constructor as a constructor for plugins
  * because func_get_args ( void ) returns a copy of all passed arguments NOT references.
  * This causes problems with cross-referencing necessary for the observer design pattern.
  *
  * @param   object  &$subject  The object to observe
  * @param   array   $config    An array that holds the plugin configuration
  *
  * @since	1.0
  */
 public function plgSystemFabrik(&$subject, $config)
 {
     /**
      * Moved these from defines.php to here, to fix an issue with Kunena.  Kunena imports the J!
      * JForm class in their system plugin, in the class constructor  So if we wait till onAfterInitialize
      * to do this, we blow up.  So, import them here, and make sure the Fabrik plugin has a lower ordering
      * than Kunena's.  We might want to set our default to -1.
      */
     $app = JFactory::getApplication();
     $version = new JVersion();
     $base = 'components.com_fabrik.classes.' . str_replace('.', '', $version->RELEASE);
     // Test if Kunena is loaded - if so notify admins
     if (class_exists('KunenaAccess')) {
         $msg = 'Fabrik: Please ensure the Fabrik System plug-in is ordered before the Kunena system plugin';
         if ($app->isAdmin()) {
             $app->enqueueMessage($msg, 'error');
         }
     } else {
         JLoader::import($base . '.field', JPATH_SITE . '/administrator', 'administrator.');
         JLoader::import($base . '.form', JPATH_SITE . '/administrator', 'administrator.');
     }
     if (version_compare($version->RELEASE, '3.1', '<=')) {
         JLoader::import($base . '.layout.layout', JPATH_SITE . '/administrator', 'administrator.');
         JLoader::import($base . '.layout.base', JPATH_SITE . '/administrator', 'administrator.');
         JLoader::import($base . '.layout.file', JPATH_SITE . '/administrator', 'administrator.');
         JLoader::import($base . '.layout.helper', JPATH_SITE . '/administrator', 'administrator.');
     }
     parent::__construct($subject, $config);
 }
Exemplo n.º 11
0
 function __construct($subject, $config)
 {
     parent::__construct($subject, $config);
     $this->loadLanguage();
     $this->app = JFactory::getApplication();
     $this->_params = $this->params;
 }
Exemplo n.º 12
0
 /**
  * Constructor.
  *
  * @param   object  &$subject  The object to observe
  * @param   array   $config    An optional associative array of configuration settings.
  *
  * @since   1.6
  */
 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     // Set the error handler for E_ERROR to be the class handleError method.
     JError::setErrorHandling(E_ERROR, 'callback', array('PlgSystemRedirect', 'handleError'));
     set_exception_handler(array('PlgSystemRedirect', 'handleError'));
 }
Exemplo n.º 13
0
 /**
  *
  * Construct method
  * @param object $subject
  * @param object $config
  */
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     JHTML::_('behavior.framework', true);
     $this->plugin = JPluginHelper::getPlugin('content', 'jadisqus_debate_echo');
     $this->plgParams = new JRegistry();
     $this->plgParams->loadString($this->plugin->params);
     $this->source = $this->plgParams->get('source', 'both');
     $provider = $this->plgParams->get('provider', 'intensedebate');
     $this->postion_display_listing = $this->plgParams->get('postion_display_listing', 'onContentBeforeDisplay');
     $this->postion_display_details = $this->plgParams->get('postion_display_details', 'onContentBeforeDisplay');
     $this->position = $this->plgParams->get('position', 'onContentAfterDisplay');
     switch ($provider) {
         case 'disqus':
             $provider = 'disqus';
             break;
         case 'jskit':
             $provider = 'jskit';
             break;
         case 'intensdebate':
             $provider = 'intensedebate';
             break;
         default:
             $provider = 'intensedebate';
             break;
     }
     $this->provider = $provider;
     if ($this->provider == 'disqus') {
         $countscript = $this->loadLayout($this->plugin, 'disqus_count');
         //$body = str_replace('</body>', $countscript . "\n</body>", $body);
         $doc = JFactory::getDocument();
         $doc->addScriptDeclaration($countscript);
     }
     $this->stylesheet($this->plugin);
 }
Exemplo n.º 14
0
 /**
  * Constructor
  *
  * @access      protected
  *
  * @param       object $subject The object to observe
  * @param       array  $config  An array that holds the plugin configuration
  *
  * @since       1.0.0
  */
 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     if (JFactory::getApplication()->isAdmin()) {
         $this->loadLanguage();
     }
 }
Exemplo n.º 15
0
 function onProfileDisplay()
 {
     JPlugin::loadLanguage('plg_community_events', JPATH_ADMINISTRATOR);
     $config = CFactory::getConfig();
     if (!$config->get('enableevents')) {
         return JText::_('PLG_EVENTS_EVENT_DISABLED');
     }
     $document = JFactory::getDocument();
     $mainframe = JFactory::getApplication();
     $user = CFactory::getRequestUser();
     $caching = $this->params->get('cache', 1);
     $model = CFactory::getModel('Events');
     $my = CFactory::getUser();
     $this->loadUserParams();
     //CFactory::load( 'helpers' , 'event' );
     $event = JTable::getInstance('Event', 'CTable');
     $handler = CEventHelper::getHandler($event);
     $events = $model->getEvents(null, $user->id, $this->params->get('sorting', 'latest'), null, true, false, null, null, $handler->getContentTypes(), $handler->getContentId(), $this->userparams->get('count', 5));
     if ($this->params->get('hide_empty', 0) && !count($events)) {
         return '';
     }
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $creatable = $my->canCreateEvents();
     $cache = JFactory::getCache('plgCommunityEvents');
     $cache->setCaching($caching);
     $callback = array($this, '_getEventsHTML');
     $content = $cache->call($callback, true, $events, $user, $config, $model->getEventsCount($user->id), $creatable);
     return $content;
 }
Exemplo n.º 16
0
 function __construct(&$subject, $config)
 {
     $app = JFactory::getApplication();
     if ($app->isAdmin()) {
         return;
     }
     $version = new JVersion();
     $joomla_main_version = substr($version->RELEASE, 0, strpos($version->RELEASE, '.'));
     if ($version->PRODUCT == 'Joomla!' and $joomla_main_version != '3') {
         throw new Exception(JText::_('PLG_CONTENT_SIGE_NEEDJ3'), 404);
     }
     parent::__construct($subject, $config);
     $this->loadLanguage('plg_content_sige', JPATH_ADMINISTRATOR);
     if (isset($_SESSION['sigcount'])) {
         unset($_SESSION['sigcount']);
     }
     if (isset($_SESSION['sigcountarticles'])) {
         unset($_SESSION['sigcountarticles']);
     }
     $this->absolute_path = JPATH_SITE;
     $this->live_site = JURI::base();
     if (substr($this->live_site, -1) == '/') {
         $this->live_site = substr($this->live_site, 0, -1);
     }
     $this->plugin_parameter = array();
 }
 /**
  * Constructor
  *
  * @param   object &$subject   The object to observe
  * @param   array  $config     An optional associative array of configuration settings.
  *                             Recognized key values include 'name', 'group', 'params', 'language'
  *                             (this list is not meant to be comprehensive).
  *
  * @since   3.7.0
  *
  * @throws  Exception
  */
 public function __construct(&$subject, $config = array())
 {
     // Auto-load the language
     $this->autoloadLanguage = true;
     $this->doc = JFactory::getDocument();
     parent::__construct($subject, $config);
 }
Exemplo n.º 18
0
 /**
  * Ajax function to save a new wall entry
  *
  * @param message	A message that is submitted by the user
  * @param uniqueId	The unique id for this group
  *
  **/
 function onProfileDisplay()
 {
     JPlugin::loadLanguage('plg_community_mytaggedvideos', JPATH_ADMINISTRATOR);
     $mainframe = JFactory::getApplication();
     // Attach CSS
     $document = JFactory::getDocument();
     // $css		= JURI::base() . 'plugins/community/myvideos/style.css';
     // $document->addStyleSheet($css);
     $user = CFactory::getRequestUser();
     $userid = $user->id;
     $this->loadUserParams();
     $def_limit = $this->params->get('count', 10);
     $limit = JRequest::getVar('limit', $def_limit, 'REQUEST');
     $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST');
     $row = $this->getVideos($userid);
     $total = count($row);
     if ($this->params->get('hide_empty', 0) && !$total) {
         return '';
     }
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyTaggedVideos');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyTaggedVideos', '_getLatestVideosHTML');
     $content = $cache->call($callback, $userid, $this->userparams->get('count', 5), $limitstart, $row, $total);
     return $content;
 }
Exemplo n.º 19
0
 public function __construct(&$subject, $config = array())
 {
     if (!defined('DS')) {
         define('DS', DIRECTORY_SEPARATOR);
     }
     parent::__construct($subject, $config);
 }
Exemplo n.º 20
0
 /**
  * Initialises the System - Admin Tools plugin
  *
  * @param  object $subject The object to observe
  * @param  array  $config  Configuration information
  */
 public function __construct(&$subject, $config = array())
 {
     // Autoload the language strings
     $this->autoloadLanguage = true;
     // Call the parent constructor
     parent::__construct($subject, $config);
     // Under Joomla 2.5 we have to explicitly load the application and the database,
     // the parent class won't do that for us.
     if (is_null($this->app)) {
         $this->app = JFactory::getApplication();
     }
     if (is_null($this->db)) {
         $this->db = JFactory::getDbo();
     }
     // Store a reference to the global input object
     $this->input = JFactory::getApplication()->input;
     // Load the component parameters
     $this->loadComponentParameters();
     // Work around IP issues with transparent proxies etc
     $this->workaroundIP();
     // Load the GeoIP library, if necessary
     $this->loadGeoIpProvider();
     // Preload the security exceptions handler object
     $this->loadExceptionsHandler();
     // Load the WAF Exceptions
     $this->loadWAFExceptions();
     // Load and register the plugin features
     $this->loadFeatures();
 }
Exemplo n.º 21
0
    function __construct(&$subject, $config)
    {
        $this->loadLanguage('plg_content_sige', JPATH_ADMINISTRATOR);

        $version = new JVersion();

        if($version->PRODUCT == 'Joomla!' AND $version->RELEASE != '2.5')
        {
            JError::raiseWarning(100, JText::_('PLG_CONTENT_SIGE_NEEDJ25'));
            return;
        }

        parent::__construct($subject, $config);

        if(isset($_SESSION["sigcount"]))
        {
            unset($_SESSION["sigcount"]);
        }

        if(isset($_SESSION["sigcountarticles"]))
        {
            unset($_SESSION["sigcountarticles"]);
        }

        $this->_absolute_path = JPATH_SITE;
        $this->_live_site = JURI::base();

        if(substr($this->_live_site, -1) == "/")
        {
            $this->_live_site = substr($this->_live_site, 0, -1);
        }

        $this->_params = array();
    }
Exemplo n.º 22
0
 /**
  * Constructor
  *
  * For php4 compatability we must not use the __constructor as a constructor for
  * plugins because func_get_args ( void ) returns a copy of all passed arguments
  * NOT references.  This causes problems with cross-referencing necessary for the
  * observer design pattern.
  */
 function plgContentCpTags(&$subject)
 {
     parent::__construct($subject);
     // load plugin parameters
     $this->_plugin =& JPluginHelper::getPlugin('content', 'cptags');
     $this->_params = new JParameter($this->_plugin->params);
 }
Exemplo n.º 23
0
 /**
  * Ajax function to save a new wall entry
  *
  * @param message    A message that is submitted by the user
  * @param uniqueId    The unique id for this group
  *
  **/
 function onProfileDisplay()
 {
     JPlugin::loadLanguage('plg_community_myvideos', JPATH_ADMINISTRATOR);
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     $user = CFactory::getRequestUser();
     $userid = $user->id;
     $this->loadUserParams();
     $def_limit = $this->params->get('count', 10);
     $limit = JRequest::getVar('limit', $def_limit, 'REQUEST');
     $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST');
     $row = $this->getVideos($userid, $limitstart, $limit);
     $total = count($row);
     if ($this->params->get('hide_empty', 0) && !$total) {
         return '';
     }
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyVideos');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyVideos', '_getLatestVideosHTML');
     $count = $this->userparams->get('count', $def_limit);
     $dbg = "<!--DEFLIMIT {$def_limit} USERPARAMLIMIT {$count}-->";
     $content = $dbg . $cache->call($callback, $userid, $count, $limitstart, $row, $total);
     return $content;
 }
Exemplo n.º 24
0
 /**
  * Ajax function to save a new wall entry
  *
  * @param message	A message that is submitted by the user
  * @param uniqueId	The unique id for this group
  *
  * */
 function onProfileDisplay()
 {
     //Load language file.
     JPlugin::loadLanguage('plg_community_myarticles', JPATH_ADMINISTRATOR);
     // Attach CSS
     $document = JFactory::getDocument();
     $css = JURI::base() . 'plugins/community/myarticles/myarticles/style.css';
     $document->addStyleSheet($css);
     if (JRequest::getVar('task', '', 'REQUEST') == 'app') {
         $app = 1;
     } else {
         $app = 0;
     }
     $user = CFactory::getRequestUser();
     $userid = $user->id;
     $def_limit = $this->params->get('count', 10);
     $limit = JRequest::getVar('limit', $def_limit, 'REQUEST');
     $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST');
     $row = $this->getArticle($userid, $limitstart, $limit, $this->section);
     $cat = $this->getCatAlias();
     $total = $this->countArticle($userid, $this->section);
     if ($this->params->get('hide_empty', 0) && !$total) {
         return '';
     }
     $mainframe = JFactory::getApplication();
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyArticles');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyArticles', '_getArticleHTML');
     $content = $cache->call($callback, $userid, $limit, $limitstart, $row, $app, $total, $cat, $this->params);
     return $content;
 }
Exemplo n.º 25
0
 public function plgHikashopKashflow(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $pluginsClass = hikashop_get('class.plugins');
     $plugin = $pluginsClass->getByName('hikashop', 'kashflow');
     $this->params = @$plugin->params;
 }
Exemplo n.º 26
0
     $model = CFactory::getModel('Photos');
     $photos = $model->getAllPhotos($albumId);
     $content .= '<div class="photoList">';
     foreach ($photos as $rows) {
         $img = '<img src=\\"' . $rows->image . '\\" border=\\"0\\" alt=\\"Tree\\" />';
         $content .= '<div class="picture">';
         $content .= '<a href=\'#\' onClick=\'window.parent.jInsertEditorText("' . $img . '", "' . $e_name . '");window.parent.document.getElementById("sbox-window").close();return;\'>';
         $content .= '<img src="' . $rows->thumbnail . '" alt="' . $rows->caption . '" border="0">';
         $content .= '</a>';
         $content .= '</div>';
     }
     $content .= '<div style="clear:both;"></div></div>';
     $response->addAssign('iFrameContent', 'innerHTML', $backButton . $content);
     return $response;
 }
 function ajaxGetAlbum($response, $e_name)
 {
     $response->addAssign('iFrameContent', 'innerHTML', $this->_getAlbumHTML($e_name));
     return $response;
 }
 function _getAlbumHTML($e_name)
 {
     //Include language file
     JPlugin::loadLanguage('plg_editormyphotos', JPATH_ADMINISTRATOR);
     $user = JFactory::getUser();
     $model = CFactory::getModel('photos');
     $albums = $model->getAlbums($user->id, true, true);
     $content = '<div class="title">' . JText::_('ALBUM LIST') . '</div>';
     if (count($albums) > 0) {
Exemplo n.º 27
0
 public function __construct(&$subject, $config)
 {
     JHTML::_('behavior.keepalive');
     // Keep session
     parent::__construct($subject, $config);
     $this->loadLanguage();
 }
Exemplo n.º 28
0
 /**
  * Constructor
  *
  * @access      protected
  * @param       object  $subject The object to observe
  * @param       array   $config  An array that holds the plugin configuration
  * 
  */
 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     if (isset($config['layout'])) {
         $this->layout = str_replace('_:', '', $config['layout']);
     }
 }
Exemplo n.º 29
0
 function plgAcymailingContentplugin(&$subject, $config)
 {
     parent::__construct($subject, $config);
     if (!isset($this->params)) {
         $plugin = JPluginHelper::getPlugin('acymailing', 'contentplugin');
         $this->params = new acyParameter($plugin->params);
     }
     $this->paramsContent = JComponentHelper::getParams('com_content');
     JPluginHelper::importPlugin('content');
     $this->dispatcherContent = JDispatcher::getInstance();
     $excludedHandlers = array('plgContentEmailCloak', 'pluginImageShow');
     $excludedNames = array('system' => array('SEOGenerator', 'SEOSimple'), 'content' => array('webeecomment', 'highslide', 'smartresizer', 'phocagallery'));
     $excludedType = array_keys($excludedNames);
     if (!ACYMAILING_J16) {
         foreach ($this->dispatcherContent->_observers as $id => $observer) {
             if (is_array($observer) and in_array($observer['handler'], $excludedHandlers)) {
                 $this->dispatcherContent->_observers[$id]['event'] = '';
             } elseif (is_object($observer)) {
                 if (in_array($observer->_type, $excludedType) and in_array($observer->_name, $excludedNames[$observer->_type])) {
                     $this->dispatcherContent->_observers[$id] = null;
                 }
             }
         }
     }
     if (!class_exists('JSite')) {
         include_once ACYMAILING_ROOT . 'includes' . DS . 'application.php';
     }
 }
Exemplo n.º 30
0
 /**
  * Constructor
  *
  * @access public
  * @param   object  &$subject  The object to observe
  */
 public function __construct(&$subject)
 {
     if (isset($_GET['sgCacheCheck']) && $_GET['sgCacheCheck'] == md5('joomlaCheck')) {
         die('OK');
     }
     parent::__construct($subject);
     $plugin = JPluginHelper::getPlugin('system', 'jSGCache');
     $this->params = new JRegistry();
     $this->params->loadString($plugin->params, 'JSON');
     $this->_cacheEnabled = $this->params->get('cache_enabled');
     if ($this->_cacheEnabled === null) {
         $this->_cacheEnabled == 1;
     }
     $this->_autoflush = $this->params->get('autoFlush');
     if ($this->_autoflush === null) {
         $this->_autoflush = 1;
     }
     $this->_autoflush3rdParty = $this->params->get('autoFlush-ThirdParty');
     if ($this->_autoflush3rdParty === null) {
         $this->_autoflush3rdParty = 1;
     }
     $this->_autoflushClientSide = $this->params->get('autoFlush-ClientSide');
     if ($this->_autoflushClientSide === null) {
         $this->_autoflushClientSide = 0;
     }
 }