Esempio n. 1
0
 /**
  * @param Registry $params
  */
 private function __construct(Registry $params)
 {
     JLoader::discover('WoWAdapter', __DIR__ . '/adapters/');
     JLoader::register('WoWModuleAbstract', __DIR__ . '/module/abstract.php');
     JFactory::getLanguage()->load('lib_wow');
     $this->params = $params;
 }
Esempio n. 2
0
 /**
  * Determines if compojoom comments is installed
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return	
  */
 public function exists()
 {
     $file = JPATH_ROOT . '/components/com_comment/helpers/utils.php';
     if (!JFile::exists($file)) {
         return false;
     }
     // Discover their library
     JLoader::discover('ccommentHelper', JPATH_ROOT . '/components/com_comment/helpers');
     return true;
 }
Esempio n. 3
0
 /**
  * Get the component rules
  *
  * @return array
  */
 public function getRules()
 {
     $rules = array();
     $files = JFolder::files(JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules', '.php$', false, false);
     JLoader::discover('jedcheckerRules', JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules/');
     foreach ($files as $file) {
         $rules[] = substr($file, 0, -4);
     }
     return $rules;
 }
Esempio n. 4
0
 /**
  * Returns the translated label for a value
  *
  * @param   object  $field      - the field config object
  * @param   string  $value      - string
  * @param   string  $component  - if we want to load overriden customfields provide the component where we should check
  *
  * @return mixed
  */
 public static function render($field, $value, $component = null)
 {
     $class = 'CompojoomFormCustomfields' . ucfirst($field->type);
     if ($component) {
         JLoader::discover('CompojoomFormCustomfields', JPATH_ADMINISTRATOR . '/components/' . $component . '/models/fields/customfields');
         JLoader::discover('CompojoomFormCustomfields', JPATH_SITE . '/templates/' . CompojoomTemplateHelper::getFrontendTemplate() . '/html/' . $component . '/fields/customfields');
     }
     if (!isset(self::$customFields[$class])) {
         self::$customFields[$class] = new $class();
     }
     return self::$customFields[$class]->render($field, $value);
 }
Esempio n. 5
0
 function upgrade()
 {
     ob_start();
     if (function_exists('error_reporting')) {
         //Store the current error reporting level
         $oldLevel = error_reporting();
         error_reporting(E_ERROR | E_WARNING | E_PARSE);
         if (JDEBUG) {
             error_reporting(E_ALL);
         }
     }
     $extension = JRequest::getVar('ext', 'virtuemart');
     $current_step = JRequest::getVar('step', 'start');
     $steps = JRequest::getVar('steps_' . $extension, array(), 'post', 'ARRAY');
     if (!count($steps)) {
         $step = array();
         $step['next'] = '';
         $step['log'] = 'You need to select at least one action';
         $step['log_type'] = 'error';
         echo json_encode($step);
         jexit();
     }
     jimport('joomla.application.component.model');
     JLoader::import('base', JPATH_ADMINISTRATOR . '/components/com_vmmigrate/models');
     JLoader::discover('VMMigrateModel', JPATH_COMPONENT_ADMINISTRATOR . '/migrators');
     //JLoader::discover('VMMigrateModel', JPATH_COMPONENT_ADMINISTRATOR . '/migratorsdemo');
     //JLoader::import( $extension, JPATH_ADMINISTRATOR.'/components/com_vmmigrate/migrators' );
     $model = JModelLegacy::getInstance($extension, 'VMMigrateModel');
     $first_step = $steps[0];
     $count_steps = count($steps);
     $last_step = $steps[$count_steps - 1];
     $model->setExtension($extension);
     if ($current_step == 'start') {
         $result = $model->execute_step($first_step, $steps);
     } else {
         $result = $model->execute_step($current_step, $steps);
     }
     if ($current_step == $last_step && $result['percentage'] == 100) {
         $result['allcompleted'] = true;
     }
     //Let's trap the errors that may have been sent to the buffer
     $buf = ob_get_clean();
     if ($buf) {
         $result['systemerror'] = $buf;
     }
     echo json_encode($result);
     if (function_exists('error_reporting')) {
         error_reporting($oldLevel);
     }
     jexit();
 }
Esempio n. 6
0
 public function check()
 {
     $rule = JRequest::getString('rule');
     JLoader::discover('jedcheckerRules', JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules/');
     $path = JFactory::getConfig()->get('tmp_path') . '/jed_checker/unzipped';
     $class = 'jedcheckerRules' . ucfirst($rule);
     // Stop if the class does not exist
     if (!class_exists($class)) {
         return false;
     }
     // Loop through each folder and police it
     $folders = $this->getFolders();
     foreach ($folders as $folder) {
         $this->police($class, $folder);
     }
     return true;
 }
Esempio n. 7
0
 /**
  * Discovers the table classes in all Projectfork related components.
  * Stores an instance in $table_cache.
  *
  * @return    void
  */
 public static function discover()
 {
     static $loaded = false;
     if ($loaded) {
         return;
     }
     $coms = PFApplicationHelper::getComponents();
     foreach ($coms as $com) {
         $path = JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $com->element . '/tables');
         $prefixes = array('PFtable', 'JTable', ucfirst(substr($com->element, 3)) . 'Table');
         if (!is_dir($path)) {
             continue;
         }
         $files = JFolder::files($path, '.php$');
         if (!count($files)) {
             continue;
         }
         // Discover the table class names with some guessing about the prefix
         foreach ($prefixes as $prefix) {
             JLoader::discover($prefix, $path, false);
             foreach ($files as $file) {
                 $name = JFile::stripExt($file);
                 $class = $prefix . $name;
                 $context = strtolower($com->element . '.' . $name);
                 if (class_exists($class)) {
                     // Class found, try to get an instance
                     $instance = JTable::getInstance($name, $prefix);
                     if (!$instance) {
                         continue;
                     }
                     self::$context_cache[] = $context;
                     self::$table_cache[$context] = $instance;
                     self::$methods_cache[$context] = array();
                     $methods = get_class_methods($instance);
                     foreach ($methods as $method) {
                         self::$methods_cache[$context][] = strtolower($method);
                     }
                 }
             }
         }
     }
     $loaded = true;
 }
 public function onContentPrepare($context, &$row, &$params, $page = 0)
 {
     if (JString::strpos($row->text, '{membermap}') === false) {
         return true;
     }
     $this->loadLanguage();
     JLoader::discover('MemberMapAdapter', __DIR__ . '/adapters/');
     $class = 'MemberMapAdapter' . $this->params->get('source');
     if (class_exists($class)) {
         $this->adapter = new $class($this->params);
     } else {
         JFactory::getApplication()->enqueueMessage(JText::sprintf('PLG_SYSTEM_MEMBERMAP_SOURCE_NOT_AVAILABLE', $this->params->get('source')), 'error');
         return true;
     }
     if ($this->loaded == true) {
         JFactory::getApplication()->enqueueMessage(JText::_('PLG_SYSTEM_MEMBERMAP_ONLY_ONE_INSTANCE'), 'error');
         return true;
     } else {
         $this->initMap();
         $this->loaded = true;
     }
     $row->text = JString::str_ireplace('{membermap}', '<div id="membermap"></div>', $row->text);
 }
Esempio n. 9
0
 * @package      Joomla.Site
 * @subpackage   com_visforms
 * @link         http://www.vi-solutions.de 
 * @license      GNU General Public License version 2 or later; see license.txt
 * @copyright    2012 vi-solutions
 * @since        Joomla 1.6 
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
//load control html classes
JLoader::discover('VisformsHtml', dirname(__FILE__) . '/html/control/', $force = true, $recurse = false);
JLoader::discover('VisformsHtmlControl', dirname(__FILE__) . '/html/control/decorator/', $force = true, $recurse = false);
JLoader::discover('VisformsHtmlControlDecorator', dirname(__FILE__) . '/html/control/decorator/decorators/', $force = true, $recurse = false);
JLoader::discover('VisformsHtmlControlVisforms', dirname(__FILE__) . '/html/control/default/', $force = true, $recurse = false);
JLoader::discover('VisformsHtmlControlBtdefault', dirname(__FILE__) . '/html/control/btdefault/', $force = true, $recurse = false);
JLoader::discover('VisformsHtmlControlBthorizontal', dirname(__FILE__) . '/html/control/bthorizontal/', $force = true, $recurse = false);
/**
 * Create HTML of a form field according to it's type
 *
 * @package		Joomla.Site
 * @subpackage	com_visforms
 * @since		1.6
 */
abstract class VisformsHtml
{
    /**
     * The field type.
     *
     * @var    string
     * @since  11.1
     */
Esempio n. 10
0
 public static function GetMigratorsPro($extensions = array())
 {
     if (!count($extensions)) {
         $extensions = VMMigrateHelperVMMigrate::GetMigrators();
     }
     JLoader::discover('VMMigrateModel', JPATH_COMPONENT_ADMINISTRATOR . '/migrators');
     //Load the migrator steps
     foreach ($extensions as $extension) {
         $model = JModelLegacy::getInstance($extension, 'VMMigrateModel');
         $proversions[$extension] = $model->isPro;
     }
     return $proversions;
 }
Esempio n. 11
0
<?php

/**
 * @package     Sichtweiten
 * @subpackage  Component.Site
 * @author      Thomas Hunziker <*****@*****.**>
 * @copyright   2015 - Thomas Hunziker
 * @license     http://www.gnu.org/licenses/gpl.html
 **/
defined('_JEXEC') or die;
// Register Helperclasses for autoloading
JLoader::discover('SichtweitenHelper', JPATH_COMPONENT . '/helpers');
// Load languages and merge with fallbacks
$jlang = JFactory::getLanguage();
$jlang->load('com_sichtweiten', JPATH_COMPONENT, 'en-GB', true);
$jlang->load('com_sichtweiten', JPATH_COMPONENT, null, true);
$controller = JControllerLegacy::getInstance('Sichtweiten');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();
Esempio n. 12
0
<?php

/**
 * @package    Cmc
 * @author     DanielDimitrov <*****@*****.**>
 * @date       28.08.13
 *
 * @copyright  Copyright (C) 2008 - 2013 compojoom.com . All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
defined('_JEXEC') or die('Restricted access');
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.controller');
JLoader::discover('CmcSyncer', JPATH_COMPONENT_ADMINISTRATOR . '/libraries/syncer');
/**
 * Class CmcControllerSync
 *
 * @since  1.2
 */
class CmcControllerSync extends CmcController
{
    /**
     * Initialize the sync process
     *
     * @return void
     */
    public function start()
    {
        // Check for a valid token. If invalid, send a 403 with the error message.
        JSession::checkToken('request') or $this->sendResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));
        // Put in a buffer to silence noise.
Esempio n. 13
0
 /**
  * Tests the JLoader::load method.
  *
  * @return  void
  *
  * @since   11.3
  * @covers  JLoader::load
  */
 public function testLoad()
 {
     JLoader::discover('Shuttle', __DIR__ . '/stubs/discover2', true);
     JLoader::load('ShuttleChallenger');
     $this->assertThat(JLoader::load('ShuttleChallenger'), $this->isTrue(), 'Tests that the class file was loaded.');
     $this->assertThat(defined('CHALLENGER_LOADED'), $this->isTrue(), 'Tests that the class file was loaded.');
     $this->assertThat(JLoader::load('Mir'), $this->isFalse(), 'Tests that an unknown class is ignored.');
     $this->assertThat(JLoader::load('JLoaderTest'), $this->isTrue(), 'Tests that a loaded class returns true.');
 }
Esempio n. 14
0
File: cmc.php Progetto: fracting/cmc
<?php

/**
 * @package    Cmc
 * @author     DanielDimitrov <*****@*****.**>
 * @date       06.09.13
 *
 * @copyright  Copyright (C) 2008 - 2013 compojoom.com . All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
defined('_JEXEC') or die('Restricted access');
JLoader::discover('cmcHelper', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/');
JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/tables');
jimport('joomla.application.component.controllerlegacy');
$controller = JControllerLegacy::getInstance('Cmc');
$controller->execute(JFactory::getApplication()->input->getCmd('task', ''));
$controller->redirect();
Esempio n. 15
0
    /**
     * Loads the comments from the installed/selected comment system. The comment system <code>type</code> should tell which comment system need to be used to load the comments from. The possible values are:<br><br>
     * jcomment - JComments (id and title are required) <br>
     * fbcomment - Facebook comment system (url is required)<br>
     * disqus - Disqus comment system (id, title, identifier and url are required)<br>
     * intensedebate - Intense Debate comment system (id, title, identifier and url are required)<br>
     * jacomment - JAComment system (id and title are required)<br>
     * jomcomment - JomComment (id is required)<br><br>
     * Passing any other value will silently skips the code. In all the above cases, <code>type</code> and <code>app_name</code> are required parameters. 
     * While <code>type</code> specifies the comment system to be used, <code>app_name</code> is the Joomla extension name (ex: com_appname) which is loading the comments for its content.
     *  
     * @param string $type comment system type
     * @param string $app_name extension name
     * @param int $id id of the content for which the comments are being loaded
     * @param string $title title of the content
     * @param string $url page url in case of facebook/disqus/intensedebate comment system.
     * @param string $identifier disqus username in case of disqus/intensedebate comment system.
     * @param object $item the item object for kommento
     * 
     * @return string the code to render the comments.
     */
    public static function load_comments($type, $app_name, $id = 0, $title = '', $url = '', $identifier = '', $item = null)
    {
        switch ($type) {
            case 'jcomment':
                $app = JFactory::getApplication();
                $path = JPATH_ROOT . DS . 'components' . DS . 'com_jcomments' . DS . 'jcomments.php';
                if (file_exists($path)) {
                    require_once $path;
                    return JComments::showComments($id, $app_name, $title);
                }
                break;
            case 'fbcomment':
                return '
					<div id="fb-root"></div>
					<script type="text/javascript">
						(function(d, s, id) {
							var js, fjs = d.getElementsByTagName(s)[0]; 
							if (d.getElementById(id)) return; 
							js = d.createElement(s); 
							js.id = id;
							js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3";
							fjs.parentNode.insertBefore(js, fjs); 
						}(document, "script", "facebook-jssdk"));
					</script>
					<div class="fb-comments" data-href="' . $url . '" data-num-posts="5" data-width="640"></div>';
            case 'disqus':
                return '
					<div id="disqus_thread"></div>
					<script type="text/javascript">
						var disqus_shortname = "' . $identifier . '";
// 						var disqus_developer = 1;
						var disqus_identifier = "' . $id . '";
						var disqus_url = "' . $url . '";
						var disqus_title = "' . $title . '";
						(function() {
							var dsq = document.createElement("script"); 
							dsq.type = "text/javascript"; 
							dsq.async = true;
							dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";
							(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
						})();
					</script>
					<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>';
            case 'intensedebate':
                return '
					<script>
						var idcomments_acct = "' . $identifier . '";
						var idcomments_post_id = "' . $id . '";
						var idcomments_post_url = "' . $url . '";
					</script>
					<span id="IDCommentsPostTitle" style="display:none"></span>
					<script type="text/javascript" src="http://www.intensedebate.com/js/genericCommentWrapperV2.js"></script>';
                break;
            case 'jacomment':
                if (!JRequest::getInt('print') && file_exists(JPATH_SITE . DS . 'components' . DS . 'com_jacomment' . DS . 'jacomment.php') && file_exists(JPATH_SITE . DS . 'plugins' . DS . 'system' . DS . 'jacomment.php')) {
                    $_jacCode = "#{jacomment(.*?) contentid=(.*?) option=(.*?) contenttitle=(.*?)}#i";
                    $_jacCodeDisableid = "#{jacomment(\\s)off.*}#i";
                    $_jacCodeDisable = "#{jacomment(\\s)off}#i";
                    if (!preg_match($_jacCode, $title) && !preg_match($_jacCodeDisable, $title) && !preg_match($_jacCodeDisableid, $title)) {
                        return '{jacomment contentid=' . $id . ' option=' . $app_name . ' contenttitle=' . $title . '}';
                    }
                }
                break;
            case 'jomcomment':
                $path = JPATH_PLUGINS . DS . 'content' . DS . 'jom_comment_bot.php';
                if (file_exists($path)) {
                    include_once $path;
                    return jomcomment($id, $app_name);
                }
                break;
            case 'kommento':
                $api = JPATH_ROOT . DS . 'components' . DS . 'com_komento' . DS . 'bootstrap.php';
                if (file_exists($api)) {
                    require_once $api;
                    $item->text = $item->introtext = !empty($item->description) ? $item->description : '';
                    return Komento::commentify($app_name, $item);
                }
                break;
            case 'ccomment':
                $utils = JPATH_ROOT . '/components/com_comment/helpers/utils.php';
                if (file_exists($utils)) {
                    JLoader::discover('ccommentHelper', JPATH_ROOT . '/components/com_comment/helpers');
                    return ccommentHelperUtils::commentInit($app_name, $item);
                }
                break;
        }
    }
Esempio n. 16
0
<?php

/**
 * @package		DigiCom
 * @author 		ThemeXpert http://www.themexpert.com
 * @copyright	Copyright (c) 2010-2015 ThemeXpert. All rights reserved.
 * @license 	GNU General Public License version 3 or later; see LICENSE.txt
 * @since 		1.0.0
 */
defined('_JEXEC') or die;
JLoader::discover('DigiComHelper', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
JLoader::discover('DigiComSiteHelper', JPATH_COMPONENT_SITE . '/helpers');
JHtml::_('behavior.tabstate');
if (!JFactory::getUser()->authorise('core.manage', 'com_digicom')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
$controller = JControllerLegacy::getInstance('Digicom');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();
DigiComHelperDigiCom::setSidebarRight();
Esempio n. 17
0
<?php

/**
 * Form component for Joomla
 *
 * @author       Aicha Vack
 * @package      Joomla.Site
 * @subpackage   com_visforms
 * @link         http://www.vi-solutions.de 
 * @license      GNU General Public License version 2 or later; see license.txt
 * @copyright    2012 vi-solutions
 * @since        Joomla 1.6 
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
JLoader::register('JHTMLVisforms', JPATH_ADMINISTRATOR . '/components/com_visforms/helpers/html/visforms.php');
JLoader::register('VisformsEditorHelper', dirname(__FILE__) . '/helpers/editor.php');
//load Visforms library main classes
JLoader::discover('Visforms', dirname(__FILE__) . '/lib/', $force = true, $recurse = false);
//JPATH_ADMINISTRATOR
// Create the controller
$controller = JControllerLegacy::getInstance('Visforms');
// Perform the Request task
$controller->execute(JFactory::getApplication()->input->get('task'));
// function to execute; if not specified in request it's display();
// Redirect if set by the controller
$controller->redirect();
Esempio n. 18
0
<?php

/**
 * @author      Guillermo Vargas <*****@*****.**>
 * @author      Branko Wilhelm <*****@*****.**>
 * @link        http://www.z-index.net
 * @copyright   (c) 2005 - 2009 Joomla! Vargas. All rights reserved.
 * @copyright   (c) 2015 Branko Wilhelm. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
JLoader::discover('XmapDisplayer', __DIR__ . '/displayer/');
JLoader::register('XmapHelper', __DIR__ . '/helpers/xmap.php');
$controller = JControllerLegacy::getInstance('Xmap');
$controller->execute(JFactory::getApplication()->input->get('task', 'display'));
$controller->redirect();
 /**
  * Tests if JLoader::applyAliasFor runs automatically when loading a class by its real name
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testApplyAliasForAutorun()
 {
     JLoader::discover('Shuttle', JPATH_TEST_STUBS . '/discover2', true);
     JLoader::registerAlias('ShuttleOV105', 'ShuttleEndeavour');
     $this->assertThat(JLoader::load('ShuttleEndeavour'), $this->isTrue(), 'Tests that the class file was loaded.');
     $this->assertTrue(class_exists('ShuttleOV105'), 'Tests that loading a class also loads its aliases');
 }
Esempio n. 20
0
 public function getInput()
 {
     JLoader::discover('VMMigrateHelper', JPATH_ADMINISTRATOR . '/components/com_vmmigrate/helpers');
     VMMigrateHelperVMMigrate::loadCssJs();
     return '';
 }
Esempio n. 21
0
<?php

/**
 * ZT News
 * 
 * @package     Joomla
 * @subpackage  Module
 * @version     2.0.0
 * @author      ZooTemplate 
 * @email       support@zootemplate.com 
 * @link        http://www.zootemplate.com 
 * @copyright   Copyright (c) 2015 ZooTemplate
 * @license     GPL v2
 */
defined('_JEXEC') or die('Restricted access');
require_once __DIR__ . '/helper.php';
JLoader::discover('ZtNews', __DIR__ . '/libraries');
JLoader::discover('ZtNewsSource', __DIR__ . '/libraries/source');
JLoader::discover('ZtNewsHelper', __DIR__ . '/helper');
$doc = JFactory::getDocument();
$doc->addStyleSheet(JUri::root() . 'modules/mod_zt_news/assets/css/default.css');
$doc->addStyleSheet(JUri::root() . 'modules/mod_zt_news/assets/css/' . $params->get('template_type', 'default') . '.css');
Esempio n. 22
0
jimport('joomla.filesystem.folder');
jimport('joomla.event.dispatcher');
// Define autoload function
spl_autoload_register('CFactory::autoload_models');
spl_autoload_register('CFactory::autoload_libraries');
spl_autoload_register('CFactory::autoload_helpers');
spl_autoload_register('CFactory::autoload_events');
spl_autoload_register('CFactory::autoload_tables');
// @todo: to be removed once the functions has be autoloaded
require_once JPATH_ROOT . '/components/com_community/defines.community.php';
/**
 * Register Joomla! autoloading
 */
/* Register our APIs classes */
JLoader::discover('CApi', COMMUNITY_PATH_SITE . '/apis');
JLoader::discover('C', COMMUNITY_PATH_SITE . '/libraries');
JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_community/tables');
JTable::addIncludePath(COMMUNITY_COM_PATH . '/tables');
// In case our core.php files are loaded by 3rd party extensions, we need to define the plugin path environments for Zend.
$paths = explode(PATH_SEPARATOR, get_include_path());
JFactory::getLanguage()->load('com_community');
class CFactory
{
    static $instances = array();
    // user instances
    /**
     * Function to allow caller to get a user object while
     * it is not authenticated provided that it has a proper tokenid
     * */
    public function getUserFromTokenId($tokenId, $userId)
    {
Esempio n. 23
0
<?php

/** 
 * @copyright Copyright (C) 2008 redCOMPONENT.com. All rights reserved. 
 * @license GNU/GPL, see LICENSE.php
 * redFORM can be downloaded from www.redcomponent.com
 * redFORM is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License 2
 * as published by the Free Software Foundation.
 * redFORM is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with redFORM; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * Frontend file
 */
/**
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
define('RDF_PATH_SITE', JPATH_SITE . DS . 'components' . DS . 'com_redform');
define('RDF_PATH_ADMIN', JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_redform');
JLoader::discover('RedformTable', RDF_PATH_ADMIN . DS . 'tables');
$language = JFactory::getLanguage();
$language->load('com_redform');
Esempio n. 24
0
<?php

/**
 * @package    Cmc
 * @author     DanielDimitrov <*****@*****.**>
 * @date       06.09.13
 *
 * @copyright  Copyright (C) 2008 - 2013 compojoom.com . All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
// No direct access
defined('_JEXEC') or die('Restricted access');
// get the cmcHelpers
JLoader::discover('CmcHelper', JPATH_ADMINISTRATOR . '/components/com_cmc/helpers/');
/**
 * Class plgSystemECom360Akeeba
 *
 * @since  1.3
 */
class plgSystemECom360Akeeba extends JPlugin
{
    /**
     * @param $row
     * @param $info
     *
     * @return bool
     */
    public function onAKSubscriptionChange($row, $info)
    {
        $app = JFactory::getApplication();
        // This plugin is only intended for the frontend
Esempio n. 25
0
 public static function getCommentHTML($blog, $comments = array(), $pagination = '')
 {
     $config = EasyBlogHelper::getConfig();
     $path = EBLOG_CLASSES . DIRECTORY_SEPARATOR . 'comments';
     $registration = $config->get('comment_registeroncomment');
     $commentSystems = array();
     // Double check this with Joomla's registration component
     if ($registration) {
         $params = JComponentHelper::getParams('com_users');
         $registration = $params->get('allowUserRegistration') == '0' ? false : $registration;
     }
     if ($config->get('comment_facebook')) {
         require_once $path . DIRECTORY_SEPARATOR . 'facebook.php';
         $commentSystems['FACEBOOK'] = EasyBlogCommentFacebook::getHTML($blog);
         if (!$config->get('main_comment_multiple')) {
             return $commentSystems['FACEBOOK'];
         }
     }
     $easysocial = EasyBlogHelper::getHelper('EasySocial');
     if ($config->get('comment_easysocial') && $easysocial->exists()) {
         $easysocial->init();
         $commentSystems['EASYSOCIAL'] = $easysocial->getCommentHTML($blog);
         if (!$config->get('main_comment_multiple')) {
             return $commentSystems['EASYSOCIAL'];
         }
     }
     if ($config->get('comment_compojoom')) {
         $file = JPATH_ROOT . '/administrator/components/com_comment/plugin/com_easyblog/josc_com_easyblog.php';
         if (JFile::exists($file)) {
             require_once $file;
             $commentSystems['COMPOJOOM'] = CommentEasyBlog::output($blog, array());
         }
         $file = JPATH_ROOT . '/components/com_comment/helpers/utils.php';
         if (JFile::exists($file)) {
             JLoader::discover('ccommentHelper', JPATH_ROOT . '/components/com_comment/helpers');
             $commentSystems['COMPOJOOM'] = ccommentHelperUtils::commentInit('com_easyblog', $blog);
         }
         if (!$config->get('main_comment_multiple')) {
             return $commentSystems['COMPOJOOM'];
         }
     }
     if ($config->get('comment_intensedebate')) {
         require_once $path . DIRECTORY_SEPARATOR . 'intensedebate.php';
         $commentSystems['INTENSEDEBATE'] = EasyBlogCommentIntenseDebate::getHTML($blog);
         if (!$config->get('main_comment_multiple')) {
             return $commentSystems['INTENSEDEBATE'];
         }
     }
     if ($config->get('comment_disqus')) {
         require_once $path . DIRECTORY_SEPARATOR . 'disqus.php';
         $commentSystems['DISQUS'] = EasyBlogCommentDisqus::getHTML($blog);
         if (!$config->get('main_comment_multiple')) {
             return $commentSystems['DISQUS'];
         }
     }
     if ($config->get('comment_jomcomment')) {
         $file = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_jomcomment' . DIRECTORY_SEPARATOR . 'jomcomment.php';
         // Test if jomcomment exists.
         if (JFile::exists($file)) {
             require_once $path . DIRECTORY_SEPARATOR . 'jomcomment.php';
             $commentSystems['JOMCOMMENT'] = EasyBlogCommentJomComment::getHTML($blog);
             if (!$config->get('main_comment_multiple')) {
                 return $commentSystems['JOMCOMMENT'];
             }
         }
     }
     if ($config->get('comment_livefyre')) {
         require_once $path . DIRECTORY_SEPARATOR . 'livefyre.php';
         $commentSystems['LIVEFYRE'] = EasyBlogCommentLiveFyre::getHTML($blog);
         if (!$config->get('main_comment_multiple')) {
             return $commentSystems['LIVEFYRE'];
         }
     }
     if ($config->get('comment_jcomments')) {
         $file = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_jcomments' . DIRECTORY_SEPARATOR . 'jcomments.php';
         if (JFile::exists($file)) {
             require_once $path . DIRECTORY_SEPARATOR . 'jcomments.php';
             $commentSystems['JCOMMENTS'] = EasyBlogCommentJComments::getHTML($blog);
             if (!$config->get('main_comment_multiple')) {
                 return $commentSystems['JCOMMENTS'];
             }
         }
     }
     if ($config->get('comment_rscomments')) {
         $file = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_rscomments' . DIRECTORY_SEPARATOR . 'rscomments.php';
         if (JFile::exists($file)) {
             include_once $path . DIRECTORY_SEPARATOR . 'rscomments.php';
             $commentSystems['RSCOMMENTS'] = EasyBlogCommentRSComments::getHTML($blog);
             if (!$config->get('main_comment_multiple')) {
                 return $commentSystems['RSCOMMENTS'];
             }
         }
     }
     if ($config->get('comment_easydiscuss')) {
         $enabled = JPluginHelper::isEnabled('content', 'easydiscuss');
         if ($enabled) {
             JPluginHelper::importPlugin('content', 'easydiscuss');
             $articleParams = new stdClass();
             $result = JFactory::getApplication()->triggerEvent('onDisplayComments', array(&$blog, &$articleParams));
             if (isset($result[0]) || isset($result[1])) {
                 // There could be komento running on the site
                 if (isset($result[1]) && $result[1]) {
                     $commentSystems['EASYDISCUSS'] = $result[1];
                 } else {
                     $commentSystems['EASYDISCUSS'] = $result[0];
                 }
                 if (!$config->get('main_comment_multiple')) {
                     return $commentSystems['EASYDISCUSS'];
                 }
             }
         }
     }
     if ($config->get('comment_komento')) {
         $file = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'bootstrap.php';
         if (JFile::exists($file)) {
             include_once $file;
             $commentSystems['KOMENTO'] = Komento::commentify('com_easyblog', $blog, array('trigger' => 'onDisplayComments'));
             if (!$config->get('main_comment_multiple')) {
                 return $commentSystems['KOMENTO'];
             }
         }
     }
     if (!$config->get('main_comment_multiple') || $config->get('comment_easyblog')) {
         //check if bbcode enabled or not.
         if ($config->get('comment_bbcode')) {
             EasyBlogCommentHelper::loadBBCode();
         }
         // If all else fail, try to use the default comment system
         $theme = new CodeThemes();
         // setup my own info to show in comment form area
         $my = JFactory::getUser();
         $profile = EasyBlogHelper::getTable('Profile', 'Table');
         $profile->load($my->id);
         $my->avatar = $profile->getAvatar();
         $my->displayName = $profile->getName();
         $my->url = $profile->url;
         $blogURL = base64_encode(EasyBlogRouter::_('index.php?option=com_easyblog&view=entry&id=' . $blog->id, false));
         $loginURL = EasyBlogHelper::getLoginLink($blogURL);
         $enableRecaptcha = $config->get('comment_recaptcha');
         $publicKey = $config->get('comment_recaptcha_public');
         // check if the user has subcribed to this thread
         $subscriptionId = false;
         if ($my->id > 0) {
             $blogModel = EasyblogHelper::getModel('Blog');
             $subscriptionId = $blogModel->isBlogSubscribedUser($blog->id, $my->id, $my->email);
             $subscriptionId = is_null($subscriptionId) ? false : $subscriptionId;
         }
         $theme->set('loginURL', $loginURL);
         $theme->set('blog', $blog);
         $theme->set('my', $my);
         $theme->set('config', $config);
         $theme->set('blogComments', $comments);
         $theme->set('pagination', $pagination);
         $theme->set('allowComment', true);
         $theme->set('canRegister', $registration);
         $theme->set('acl', EasyBlogACLHelper::getRuleSet());
         $theme->set('subscriptionId', $subscriptionId);
         $commentSystems['EASYBLOGCOMMENTS'] = $theme->fetch('blog.comment.box.php');
     }
     if (!$config->get('main_comment_multiple')) {
         return $commentSystems['EASYBLOGCOMMENTS'];
     }
     // If there's 1 system only, there's no point loading the tabs.
     if (count($commentSystems) == 1) {
         return $commentSystems[key($commentSystems)];
     }
     unset($theme);
     // Reverse the comment systems array so that easyblog comments are always the first item.
     $commentSystems = array_reverse($commentSystems);
     $theme = new CodeThemes();
     $theme->set('commentSystems', $commentSystems);
     return $theme->fetch('blog.comment.multiple.php');
 }
Esempio n. 26
0
<?php

/**
 * @package   Qlue.Gallery
 * @copyright Copyright (C) Qlue www.qlue.co.uk
 * @license   http://www.gnu.org/copyleft/gpl.html GNU General Public License version 2 or later;
 */
// No direct access
defined('_JEXEC') or die('Restricted Access');
// Register Helper Class
JLoader::register('QlueGalleryHelper', __DIR__ . '/helper.php');
JLoader::register('SourceInterface', __DIR__ . '/helpers/SourceInterface.php');
JLoader::discover('QlueGallerySource', __DIR__ . '/sources');
// Load our images
$images = QlueGalleryHelper::getItems($params, $params->get('image_source', 'folder'));
// Load the stylesheet
JHtml::_('stylesheet', 'mod_qluegallery/gallery.min.css', true, true, false, false, true);
JHtml::_('script', 'mod_qluegallery/gallery.min.js', true, true, false, false, true);
// Initiate the class
$document = JFactory::getDocument();
$document->addScriptDeclaration('(function($){
        window.addEvent("domready", function() {
            new QlueGallery("qlue-gallery-' . (int) $module->id . '", ' . $params->toString() . ');
        });
    })(document.id);');
// Load the module layout
require JModuleHelper::getLayoutPath('mod_qluegallery', $params->get('layout', 'default'));
Esempio n. 27
0
<?php

/**
 * @package     Joomla.Platform
 * @subpackage  Log
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
defined('JPATH_PLATFORM') or die;
jimport('joomla.log.logger');
JLoader::register('LogException', JPATH_PLATFORM . '/joomla/log/logexception.php');
JLoader::discover('JLogger', dirname(__FILE__) . '/loggers');
// @deprecated  12.1
jimport('joomla.filesystem.path');
/**
 * Joomla! Log Class
 *
 * This class hooks into the global log configuration settings to allow for user configured
 * logging events to be sent to where the user wishes them to be sent. On high load sites
 * SysLog is probably the best (pure PHP function), then the text file based loggers (CSV, W3C
 * or plain FormattedText) and finally MySQL offers the most features (e.g. rapid searching)
 * but will incur a performance hit due to INSERT being issued.
 *
 * @package     Joomla.Platform
 * @subpackage  Log
 * @since       11.1
 */
class JLog
{
    /**
Esempio n. 28
0
<?php

/**
 * @package		Joomla.Site
 * @subpackage	mod_visforms
 * @copyright	Copyright (C) vi-solutions, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
$base_dir = JPATH_SITE . '/components/com_visforms';
JLoader::register('JHTMLVisforms', JPATH_ADMINISTRATOR . '/components/com_visforms/helpers/html/visforms.php');
JLoader::register('VisformsEditorHelper', $base_dir . '/helpers/editor.php');
//load Visforms library main classes
JLoader::discover('Visforms', $base_dir . '/lib/', $force = true, $recurse = false);
// Include the syndicate functions only once
require_once dirname(__FILE__) . '/helper.php';
$lang = JFactory::getLanguage();
$extension = 'com_visforms';
$language_tag = $lang->getTag();
$reload = true;
$lang->load($extension, $base_dir, null, $language_tag, $reload);
$visforms = modVisformsHelper::getForm($params);
//check if user access level allows view
$user = JFactory::getUser();
$groups = $user->getAuthorisedViewLevels();
$access = isset($visforms->access) && in_array($visforms->access, $groups) ? true : false;
if ($access == false) {
    $app->setUserState('com_visforms.form' . $visforms->id . '.fields', null);
    $app->setUserState('com_visforms.form' . $visforms->id, null);
    echo JText::_('COM_VISFORMS_ALERT_NO_ACCESS');
Esempio n. 29
0
<?php

/**
 * @package     Joomla.Platform
 * @subpackage  Application
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
defined('JPATH_PLATFORM') or die;
JLoader::discover('JInput', dirname(__FILE__) . '/input');
/**
 * Joomla! Input Base Class
 *
 * This is an abstracted input class used to manage retrieving data from the application environment.
 *
 * @package     Joomla.Platform
 * @subpackage  Application
 * @since       11.1
 *
 * @method      integer  getInt()       getInt($name, $default)    Get a signed integer.
 * @method      integer  getUint()      getUint($name, $default)   Get an unsigned integer.
 * @method      float    getFloat()     getFloat($name, $default)  Get a floating-point number.
 * @method      boolean  getBool()      getBool($name, $default)   Get a boolean.
 * @method      string   getWord()      getWord($name, $default)
 * @method      string   getAlnum()     getAlnum($name, $default)
 * @method      string   getCmd()       getCmd($name, $default)
 * @method      string   getBase64()    getBase64($name, $default)
 * @method      string   getString()    getString($name, $default)
 * @method      string   getHtml()      getHtml($name, $default)
 * @method      string   getPath()      getPath($name, $default)
Esempio n. 30
0
 *
 * @copyright   Copyright (C) 2005 - 2013 Sven Bluege All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
require_once JPATH_COMPONENT_SITE . '/config.php';
// Include the component versioning
include_once JPATH_COMPONENT_ADMINISTRATOR . '/version.php';
//load tables
JTable::addIncludePath(JPATH_COMPONENT . DIRECTORY_SEPARATOR . 'tables');
JLoader::registerPrefix('Eventgallery', JPATH_COMPONENT_SITE);
JLoader::registerPrefix('Eventgallery', JPATH_COMPONENT);
JLoader::discover('EventgalleryPluginsShipping', JPATH_PLUGINS . DIRECTORY_SEPARATOR . 'eventgallery_ship', true, true);
JLoader::discover('EventgalleryPluginsSurcharge', JPATH_PLUGINS . DIRECTORY_SEPARATOR . 'eventgallery_sur', true, true);
JLoader::discover('EventgalleryPluginsPayment', JPATH_PLUGINS . DIRECTORY_SEPARATOR . 'eventgallery_pay', true, true);
$view = JFactory::getApplication()->input->get('view');
$task = JFactory::getApplication()->input->get('task');
//avoid rendering those messages during the sync.
if ($task != 'sync.process') {
    // check for the right Joomla Version
    if (version_compare(JVERSION, '2.5.11', 'lt') || version_compare(JVERSION, '3.0.0', 'gt') && version_compare(JVERSION, '3.2.0', 'lt')) {
        ?>
        <div class="alert alert-error">
        <?php 
        echo JText::_('COM_EVENTGALLERY_ERR_OLDJOOMLA');
        ?>
        </div><?php 
    }
    //Check foe the right PHP version
    if (version_compare(PHP_VERSION, '5.3.0') < 0) {