/**
  * Display the view
  */
 public function display($tpl = null)
 {
     // Include the component HTML helpers.
     JSNFactory::import('components.com_content.helpers.content');
     JSNFactory::import('components.com_content.helpers.html.contentadministrator');
     $JSNMedia = JSNFactory::getMedia();
     $JSNMedia->addStyleSheet(JSN_POWERADMIN_STYLE_URI . 'content.css');
     JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.content.js');
     if ($this->getLayout() == 'pagebreak') {
         // TODO: This is really dogy - should change this one day.
         $eName = JRequest::getVar('e_name');
         $eName = preg_replace('#[^A-Z0-9\\-\\_\\[\\]]#i', '', $eName);
         $document = JFactory::getDocument();
         $document->setTitle(JText::_('COM_CONTENT_PAGEBREAK_DOC_TITLE'));
         $this->assignRef('eName', $eName);
         parent::display($tpl);
         return;
     }
     // Initialiase variables.
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     $this->canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $language = JFactory::getLanguage();
     $language->load('com_content');
     parent::display($tpl);
 }
 function uninstall()
 {
     JSNFactory::import('components.com_installer.helpers.installer');
     $canDo = InstallerHelper::getActions();
     if (!$canDo->get('core.delete')) {
         $response = array('isUninstalled' => false);
         echo json_encode($response);
         jexit();
     }
     $id = JRequest::getVar('id', 0);
     if (!is_numeric($id) || $id <= 0) {
         return;
     }
     $dbo = JFactory::getDBO();
     $dbo->setQuery("SELECT e.extension_id FROM #__extensions e INNER JOIN #__template_styles s ON e.element=s.template WHERE e.type='template' AND s.id={$id} LIMIT 1");
     $extensionId = $dbo->loadResult();
     if ($extensionId > 0) {
         JFactory::getLanguage()->load('com_installer');
         JSNFactory::import('components.com_installer.models.manage');
         $model = $this->getModel('manage', 'InstallerModel', array('ignore_request' => true));
         $result = $model->remove(array($extensionId));
         $response = array('isUninstalled' => true);
         echo json_encode($response);
     }
     jexit();
 }
 /**
  * Method to do additional instant update according config change
  *
  * @param	string	Name of changed config parameter
  * @param	mixed	Recent config parameter value
  * @return	void
  */
 protected function instantUpdate($name, $value)
 {
     $input = JFactory::getApplication()->input;
     if ($name == 'disable_all_messages') {
         // Get name of messages table
         $table = '#__jsn_' . substr(JRequest::getCmd('option'), 4) . '_messages';
         // Enable/disable all messages
         $db = JFactory::getDbo();
         $db->setQuery("UPDATE `{$table}` SET published = " . (1 - $value) . " WHERE 1");
         $db->query();
     } elseif ($name == 'languagemanager') {
         // Get variable
         $lang = $input->getVar('languagemanager', array(), 'default', 'array');
         // Install backend languages
         if (isset($lang['a'])) {
             JSNFactory::import('components.com_poweradmin.helpers.language');
             JSNLanguageHelper::installSupportedExtLangs($lang['a']);
             JSNUtilsLanguage::install($lang['a']);
         }
         // Install frontend languages
         if (isset($lang['s'])) {
             JSNUtilsLanguage::install($lang['s'], true);
         }
     } else {
         return parent::instantUpdate($name, $value);
     }
     return true;
 }
Beispiel #4
0
 public function installPaExtension()
 {
     $this->model = $this->getModel('installer');
     JSNFactory::import('components.com_installer.helpers.installer');
     $canDo = InstallerHelper::getActions();
     if ($canDo->get('core.manage')) {
         try {
             $rs = $this->model->download();
             $this->input->set('package', $rs);
             // Set extension parameters
             $_GET['package'] = $rs;
             $_GET['type'] = 'plugin';
             $_GET['folder'] = 'jsnpoweradmin';
             $_GET['publish'] = 1;
             $_GET['client'] = 'site';
             $_GET['name'] = str_ireplace(JSN_POWERADMIN_EXT_IDENTIFIED_NAME_PREFIX, '', $_GET['identified_name']);
             $this->model->install($rs);
             if ($this->model->install($rs)) {
                 require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/extensions.php';
                 // Enable extension suport
                 $_GET['name'] = str_ireplace(JSN_POWERADMIN_EXT_IDENTIFIED_NAME_PREFIX, '', $_GET['identified_name']);
                 try {
                     JSNPaExtensionsHelper::enableExt($identifiedName);
                 } catch (Exception $ex) {
                     exit('notenabled');
                 }
             }
         } catch (Exception $ex) {
             exit($ex->getMessage());
         }
         exit('success');
     }
 }
 public function display($tpl = null)
 {
     $JSNMedia = JSNFactory::getMedia();
     $JSNMedia->addStyleSheet(JSN_POWERADMIN_STYLE_URI . 'styles.css');
     JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . "jsn.mousecheck.js");
     JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . "jsn.submenu.js");
     JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . "jsn.manage-styles.js");
     $JSNMedia->addStyleDeclaration("\n\t\t.template-item {\n\t\t\tbackground: url(" . JSN_POWERADMIN_IMAGES_URI . "icons-24/icon-24-loading-circle.gif) no-repeat center center;\n\t\t}\n\t\t.loading {\n\t\t\tbackground: url(" . JSN_POWERADMIN_IMAGES_URI . "icons-16/icon-16-loading-circle.gif) no-repeat center right;\n\t\t}\n\t\t");
     $JSNMedia->addScriptDeclaration("\n            (function (\$){\n               \$(document).ready(function (){\n                    \$('#client-switch').change(function (e) {\n                        var val =\$(this).attr('value');\n                        if(val == 0){\n                            \$('.template-list').hide();\n                            \$('#site').show();\n                        }else{\n                            \$('.template-list').hide();\n                            \$('#admin').show();\n                        }\n                    })\n\t           });\n            })(JoomlaShine.jQuery);\n        ");
     // Add javascript lang translation
     $jsnLang = new JSNJavascriptLanguages();
     $jsnLang->addLang('JSN_POWERADMIN_TM_MAKE_DEFAULT');
     $jsnLang->addLang('JSN_POWERADMIN_TM_UNINSTALL_TEMPLATE');
     $jsnLang->addLang('JSN_POWERADMIN_TM_MAKE_DEFAULT');
     $jsnLang->addLang('JSN_POWERADMIN_TM_UNINSTALL_TEMPLATE');
     $jsnLang->addLang('JSN_POWERADMIN_TM_CLOSE_BEFORE_DELETE');
     $jsnLang->addLang('JSN_POWERADMIN_TM_CLOSE_BEFORE_UNINSTALL');
     $jsnLang->addLang('JSN_POWERADMIN_TM_ALREADY_DEFAULT');
     $jsnLang->addLang('JSN_POWERADMIN_TM_CANNOT_DELETE_DEFAULT');
     $jsnLang->addLang('JSN_POWERADMIN_TM_CANNOT_UNINSTALL_DEFAULT');
     $jsnLang->addLang('JSN_POWERADMIN_TM_DELETE_STYLE_CONFIRM');
     $jsnLang->addLang('JSN_POWERADMIN_TM_UNINSTALL_TEMPLATE_CONFIRM');
     $JSNMedia->addScriptDeclaration($jsnLang->loadLang());
     $model = $this->getModel('templates');
     $rows = $model->getTemplates();
     $adminRows = $model->getTemplates(1);
     // Check permission for removing styles.
     JSNFactory::import('components.com_templates.helpers.templates');
     $canDo = version_compare(JVERSION, '3.2.2', 'ge') ? JHelperContent::getActions('com_templates') : TemplatesHelper::getActions();
     $canDelete = $canDo->get('core.delete');
     $canDelete = '<input type="hidden" id="candelete" value="' . $canDelete . '"></input>';
     echo $canDelete;
     // Check permission for uninstalling template.
     JSNFactory::import('components.com_installer.helpers.installer');
     $canDo = version_compare(JVERSION, '3.2.2', 'ge') ? JHelperContent::getActions('com_installer') : TemplatesHelper::getActions();
     $canUninstall = $canDo->get('core.delete');
     $canUninstall = '<input type="hidden" id="canuninstall" value="' . $canUninstall . '"></input>';
     echo $canUninstall;
     //assign to view
     $this->assign('templates', $rows);
     $this->assign('adminTemplates', $adminRows);
     $this->assign('canDelete', $canDelete);
     return parent::display();
 }
 /**
  * Method for removing extension
  *
  * @return	void
  */
 function removeExtension()
 {
     $user = JFactory::getUser();
     $component = JRequest::getCmd('component');
     $coreComponents = array('com_content', 'com_admin', 'com_config', 'com_checkin', 'com_cache', 'com_login', 'com_users', 'com_menus', 'com_categories', 'com_media', 'com_messages', 'com_redirect', 'com_search');
     if ($user->get('id') && preg_match('/^com_/i', $component) && !in_array($component, $coreComponents)) {
         $dbo = JFactory::getDBO();
         $dbo->setQuery("SELECT extension_id FROM #__extensions WHERE element LIKE '{$component}' AND type LIKE 'component' LIMIT 1");
         $componentId = $dbo->loadResult();
         if (empty($componentId) || !is_numeric($componentId)) {
             $this->setRedirect('index.php');
             return;
         }
         JFactory::getLanguage()->load('com_installer');
         JSNFactory::import('components.com_installer.models.manage');
         $model = $this->getModel('manage', 'InstallerModel', array('ignore_request' => true));
         $result = $model->remove(array($componentId));
         $this->setRedirect('index.php?option=com_installer&view=manage');
         return;
     }
     $this->setRedirect('index.php');
 }
<?php

/*------------------------------------------------------------------------
# JSN PowerAdmin
# ------------------------------------------------------------------------
# author    JoomlaShine.com Team
# copyright Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
# Websites: http://www.joomlashine.com
# Technical Support:  Feedback - http://www.joomlashine.com/joomlashine/contact-us.html
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# @version $Id: view.html.php 12506 2012-05-09 03:55:24Z hiennh $
-------------------------------------------------------------------------*/
// No direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.view');
JSNFactory::import('components.com_categories.helpers.categories');
/**
 * HTML View class for the Categories component
 *
 * @static
 * @package		Joomla.Administrator
 * @subpackage	com_categories
 */
class PoweradminViewCategory extends JViewLegacy
{
    protected $form;
    protected $item;
    protected $state;
    /**
     * Display the view
     */
Beispiel #8
0
 /**
  *
  * This function to helper save config for article
  *
  * @param: (Number) ($articleId) is id of article in content table
  * @param: (Array) ($options) is array setting need to change the config
  * @return: Save to table of database
  */
 public static function article($aId, $options)
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select("attribs");
     $query->from("#__content");
     $query->where("id = " . $db->quote($aId));
     $db->setQuery($query);
     $paramsString = $db->loadResult();
     if (!empty($paramsString)) {
         if (!class_exists('JRegistry')) {
             JSNFactory::import('libraries.joomla.registry.registry', 'site');
         }
         $jParams = new JRegistry();
         $jParams->loadObject(json_decode($paramsString));
         $params = $jParams->toArray();
         foreach ($options as $k => $val) {
             $params[$k] = (string) $val;
         }
         $jParams->loadArray($params);
         $query->clear();
         $query->update("#__content");
         $query->set("attribs = " . $db->quote($jParams->toString('JSON'), false));
         $query->where("id = " . $db->quote($aId));
         $db->setQuery($query);
         $db->query();
         return true;
     }
     return false;
 }
 /** Constructor function **/
 function __construct(&$subject, $config)
 {
     // Check if JSN Framework installed & enabled.
     $jsnframework = JPluginHelper::getPlugin('system', 'jsnframework');
     if (!$jsnframework || !file_exists(JPATH_ROOT . '/plugins/system/jsnframework')) {
         return;
     }
     JSNFactory::import('plugins.system.jsnframework.libraries.joomlashine.config.helper', 'site');
     JSNFactory::import('plugins.system.jsnframework.libraries.joomlashine.utils.xml', 'site');
     $this->_params = JSNConfigHelper::get('com_poweradmin');
     $this->_application = JFactory::getApplication();
     $this->_user = JFactory::getUser();
     $this->_session = JFactory::getSession();
     $this->_preview = new JSNPowerAdminBarPreview();
     $this->loadLanguage('plg_system_jsnpoweradmin');
     $this->_removeAdminBarPlugin();
     $app = JFactory::getApplication();
     $input = $app->input;
     $poweradmin = $input->getCmd('poweradmin', 0);
     $showTemplatePosition = $input->getCmd('tp', 0);
     if ($app->isAdmin()) {
         $user = JFactory::getUser();
         if ($input->getVar('view', '') == 'jsnrender' && $user->id == 0) {
             jimport('joomla.application.component.controller');
             JController::setRedirect(JSN_VISUALMODE_PAGE_URL);
             JController::redirect();
         }
     }
     if ($poweradmin == 1) {
         /**
          * Auto-enable Preview Module Positions of template setting
          */
         if ($showTemplatePosition == 1) {
             $PreviewModulePositionsIsEnabled = JComponentHelper::getParams('com_content')->get('template_positions_display', 0) == 1 ? true : false;
             if (!$PreviewModulePositionsIsEnabled) {
                 /**
                  * Get config class
                  */
                 JSNFactory::localimport('libraries.joomlashine.config');
                 JSNConfig::extension('com_templates', array('template_positions_display' => 1));
             }
         }
         /** load JSNPOWERADMIN template library **/
         $template = JSNFactory::getTemplate();
         $this->_templateAuthor = $template->getAuthor();
         /*if T3 Framework*/
         if ($this->_templateAuthor == 'joomlart') {
             //check folder jat3 exists
             $t3FrameworkFolder = JPATH_ROOT . 'plugins/system/jat3';
             if (is_dir($t3FrameworkFolder)) {
                 if (!class_exists('T3Common')) {
                     jimport('joomla.html.parameter');
                     JSNFactory::import('plugins.system.jat3.jat3.core.common', 'site');
                 }
                 if (!class_exists('T3Framework')) {
                     JSNFactory::import('plugins.system.jat3.jat3.core.framework', 'site');
                     $jt3Plg = JPluginHelper::getPlugin('system', 'jat3');
                     T3Framework::t3_init($jt3Plg->params);
                 }
                 JSNFactory::import('plugins.system.jsnpoweradmin.libraries.jsnjoomlart', 'site');
             }
         } else {
             if ($this->_templateAuthor == 'yootheme') {
                 return;
             } else {
                 if ($this->_templateAuthor == 'gavick') {
                     JSNFactory::import('libraries.joomla.environment.browser', 'site');
                     $browser = JBrowser::getInstance();
                     $browser->setBrowser('JSNPoweradmin');
                 } else {
                     if ($this->_templateAuthor == 'joomlaxtc') {
                         JSNFactory::import('plugins.system.jsnpoweradmin.libraries.jsnjoomlaxtc', 'site');
                     }
                 }
             }
         }
         $this->_helper = JSNPLGHelper::getInstance();
     }
     parent::__construct($subject, $config);
 }
Beispiel #10
0
<?php

/**
 * @author JoomlaShine.com Team
 * @copyright JoomlaShine.com
 * @link joomlashine.com
 * @package JSN PowerAdmin support for com_content
 * @version $Id$
 * @license GNU/GPL v2 http://www.gnu.org/licenses/gpl-2.0.html
 */
defined('_JEXEC') or die('Restricted access');
JSNFactory::import('components.com_users.models.login', 'site');
//JSNFactory::import('components.com_content.helpers.route', 'site');
/**
 * @package		Joomla.Administrator
 * @subpackage	com_poweradmin extend com_content
 * @since		1.7
 */
class PoweradminUsersModelLogin extends UsersModelLogin
{
    /**
     *
     * Get params of current view
     */
    protected function populateState()
    {
        $params = JComponentHelper::getParams('com_users');
        $this->setState('params', $params);
    }
    public function getItems($pk)
    {
Beispiel #11
0
<?php

/*------------------------------------------------------------------------
# JSN PowerAdmin
# ------------------------------------------------------------------------
# author    JoomlaShine.com Team
# copyright Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
# Websites: http://www.joomlashine.com
# Technical Support:  Feedback - http://www.joomlashine.com/joomlashine/contact-us.html
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# @version $Id: article.php 13311 2012-06-14 12:31:48Z hiepnv $
-------------------------------------------------------------------------*/
// No direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.modeladmin');
JSNFactory::import('components.com_content.helpers.content');
/**
 * @package		Joomla.Administrator
 * @subpackage	com_poweradmin extend com_content
 * @since		1.7
 */
class PoweradminModelArticle extends JModelAdmin
{
    /**
     * @var		string	The prefix to use with controller messages.
     * @since	1.6
     */
    protected $text_prefix = 'COM_POWERADMIN';
    /**
     * Method to test whether a record can be deleted.
     *
Beispiel #12
0
<?php

/*------------------------------------------------------------------------
# JSN PowerAdmin
# ------------------------------------------------------------------------
# author    JoomlaShine.com Team
# copyright Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
# Websites: http://www.joomlashine.com
# Technical Support:  Feedback - http://www.joomlashine.com/joomlashine/contact-us.html
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# @version $Id: article.php 15009 2012-08-13 09:18:32Z hiepnv $
-------------------------------------------------------------------------*/
// no direct access
defined('_JEXEC') or die;
JSNFactory::import('components.com_content.controllers.article');
JSNFactory::localimport('libraries.joomlashine.modules');
/**
 * @package		Joomla.Administrator
 * @subpackage	com_poweradmin extend com_content
 * @since		1.7
 */
class PoweradminControllerArticle extends ContentControllerArticle
{
    /**
     * 
     * Redirect to poweradmin article-edit
     */
    public function edit()
    {
        $editId = JRequest::getVar('id', 0, 'int');
        $app = JFactory::getApplication();
<?php

/**
 * @author JoomlaShine.com Team
 * @copyright JoomlaShine.com
 * @link joomlashine.com
 * @package JSN PowerAdmin support for com_content
 * @version $Id$
 * @license GNU/GPL v2 http://www.gnu.org/licenses/gpl-2.0.html
 */
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.categories');
JSNFactory::import('components.com_contact.models.categories', 'site');
//JSNFactory::import('components.com_content.helpers.route', 'site');
/**
 * @package		Joomla.Administrator
 * @subpackage	com_poweradmin extend com_content
 * @since		1.7
 */
class PoweradminContactModelCategories extends ContactModelCategories
{
    /**
     *
     * Get params of current view
     */
    protected function populateState()
    {
        // Load the parameters.
        $this->setState('filter.extension', 'com_contact');
        // Get the parent id if defined.
        $parentId = JRequest::getInt('id');
 /**
  * Move item to new position
  *
  * @param: int $itemid
  * @param: int $parentid
  * @param: int $ordering
  *
  * @return: Save to database new position for menu item
  */
 public function moveItem($itemId, $parentid, $orders)
 {
     JSNFactory::import('components.com_menus.models.menu');
     $oldParentId = $this->getParentId($itemId);
     $menuInstance = new MenusModelMenu();
     $table = $menuInstance->getTable('Menu');
     if ($oldParentId != $parentid) {
         // Update parent id then rebuild menu table.
         $table->load($itemId);
         $table->setLocation($parentid, 'last-child');
         $table->store();
         $table->rebuildPath($table->id);
     }
     // Save items orders.
     $pks = $orders;
     $_order = array();
     for ($i = 1; $i <= count($orders); $i++) {
         $_order[] = $i;
     }
     $table->saveorder($pks, $_order);
     return true;
 }
<?php

/*------------------------------------------------------------------------
# JSN PowerAdmin
# ------------------------------------------------------------------------
# author    JoomlaShine.com Team
# copyright Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
# Websites: http://www.joomlashine.com
# Technical Support:  Feedback - http://www.joomlashine.com/joomlashine/contact-us.html
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# @version $Id: category.php 12506 2012-05-09 03:55:24Z hiennh $
-------------------------------------------------------------------------*/
// No direct access
defined('_JEXEC') or die('Restricted access');
JSNFactory::import('components.com_categories.models.category');
/**
 * @package		Joomla.Administrator
 * @subpackage	com_poweradmin extend com_content
 * @since		1.7
 */
class PoweradminModelCategory extends CategoriesModelCategory
{
}
<?php

/*------------------------------------------------------------------------
# JSN PowerAdmin
# ------------------------------------------------------------------------
# author    JoomlaShine.com Team
# copyright Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
# Websites: http://www.joomlashine.com
# Technical Support:  Feedback - http://www.joomlashine.com/joomlashine/contact-us.html
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# @version $Id: category.php 12645 2012-05-14 07:45:58Z binhpt $
-------------------------------------------------------------------------*/
// no direct access
defined('_JEXEC') or die;
JSNFactory::import('components.com_categories.controllers.category');
JSNFactory::localimport('libraries.joomlashine.modules');
/**
 * @package		Joomla.Administrator
 * @subpackage	com_poweradmin extend com_categories
 * @since		1.7
 */
class PoweradminControllerCategory extends CategoriesControllerCategory
{
    /**
     * 
     * Redirect to poweradmin article-edit
     */
    public function edit()
    {
        $editId = JRequest::getVar('id', 0, 'int');
        $app = JFactory::getApplication();
 * @version     $Id$
 * @package     JSNPoweradmin
 * @subpackage  item
 * @author      JoomlaShine Team <*****@*****.**>
 * @copyright   Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
 * @license     GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
 *
 * Websites: http://www.joomlashine.com
 * Technical Support:  Feedback - http://www.joomlashine.com/contact-us/get-support.html
 *
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
//error_reporting(0);
jimport('joomla.application.categories');
JSNFactory::import('components.com_weblinks.models.category', 'site');
class PoweradminWeblinksModelCategory extends WeblinksModelCategory
{
    protected $_item = null;
    protected $_articles = null;
    protected $_siblings = null;
    protected $_children = null;
    protected $_parent = null;
    /**
     *
     * Get params of current view
     */
    protected function populateState($ordering = null, $direction = null)
    {
        $params = JComponentHelper::getParams('com_weblinks');
        $this->setState('params', $params);
Beispiel #18
0
<?php

/**
 * @author JoomlaShine.com Team
 * @copyright JoomlaShine.com
 * @link joomlashine.com
 * @package JSN PowerAdmin support for com_content
 * @version $Id$
 * @license GNU/GPL v2 http://www.gnu.org/licenses/gpl-2.0.html
 */
defined('_JEXEC') or die('Restricted access');
JSNFactory::import('components.com_users.models.reset', 'site');
/**
 * @package		Joomla.Administrator
 * @subpackage	com_poweradmin extend com_content
 * @since		1.7
 */
class PoweradminUsersModelReset extends UsersModelReset
{
    /**
     *
     * Get params of current view
     */
    protected function populateState()
    {
        $params = JComponentHelper::getParams('com_users');
        $this->setState('params', $params);
    }
    public function getItems($pk)
    {
        return;
<?php

/**
 * @author JoomlaShine.com Team
 * @copyright JoomlaShine.com
 * @link joomlashine.com
 * @package JSN PowerAdmin support for com_content
 * @version $Id$
 * @license GNU/GPL v2 http://www.gnu.org/licenses/gpl-2.0.html
 */
defined('_JEXEC') or die('Restricted access');
JSNFactory::import('components.com_users.models.registration', 'site');
/**
 * @package		Joomla.Administrator
 * @subpackage	com_poweradmin extend com_content
 * @since		1.7
 */
class PoweradminUsersModelRegistration extends UsersModelRegistration
{
    /**
     *
     * Get params of current view
     */
    protected function populateState()
    {
        $params = JComponentHelper::getParams('com_users');
        $this->setState('params', $params);
    }
    public function getItems($pk)
    {
        return;
Beispiel #20
0
<?php

/*------------------------------------------------------------------------
# JSN PowerAdmin
# ------------------------------------------------------------------------
# author    JoomlaShine.com Team
# copyright Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
# Websites: http://www.joomlashine.com
# Technical Support:  Feedback - http://www.joomlashine.com/joomlashine/contact-us.html
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# @version $Id: module.php 12779 2012-05-18 02:55:18Z binhpt $
-------------------------------------------------------------------------*/
defined('_JEXEC') or die('Restricted access');
JSNFactory::import('components.com_modules.models.module');
class PoweradminModelModule extends ModulesModelModule
{
    /**
     * Duplicate module
     * 
     * @param: Array $pks
     */
    public function duplicate(&$pks)
    {
        // Initialise variables.
        $user = JFactory::getUser();
        $db = $this->getDbo();
        // Access checks.
        if (!$user->authorise('core.create', 'com_modules')) {
            throw new Exception(JText::_('JERROR_CORE_CREATE_NOT_PERMITTED'));
        }
        $table = $this->getTable();
<?php

/*------------------------------------------------------------------------
# JSN PowerAdmin
# ------------------------------------------------------------------------
# author    JoomlaShine.com Team
# copyright Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
# Websites: http://www.joomlashine.com
# Technical Support:  Feedback - http://www.joomlashine.com/joomlashine/contact-us.html
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# @version $Id: selectmoduletypes.php 12506 2012-05-09 03:55:24Z hiennh $
-------------------------------------------------------------------------*/
// no direct access
defined('_JEXEC') or die;
JSNFactory::import('components.com_modules.controllers.module');
class PoweradminControllerSelectmoduletypes extends ModulesControllerModule
{
    public function setModuleType()
    {
        // Initialise variables.
        $app = JFactory::getApplication();
        // Get the result of the parent method. If an error, just return it.
        $result = parent::add();
        if (JError::isError($result)) {
            return $result;
        }
        // Look for the Extension ID.
        $extensionId = JRequest::getInt('eid');
        $position = JRequest::getVar('position');
        if (empty($extensionId)) {
            $this->setRedirect(JRoute::_('index.php?option=com_poweradmin&view=selectmoduletypes&tmpl=component&position=' . $position, false));
 * @subpackage  item
 * @author      JoomlaShine Team <*****@*****.**>
 * @copyright   Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
 * @license     GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
 *
 * Websites: http://www.joomlashine.com
 * Technical Support:  Feedback - http://www.joomlashine.com/contact-us/get-support.html
 *
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
//error_reporting(0);
JSNFactory::import('components.com_content.models.category', 'site');
JSNFactory::import('components.com_content.helpers.query', 'site');
JSNFactory::import('components.com_content.helpers.route', 'site');
JSNFactory::import('components.com_content.models.articles', 'site');
class PoweradmincontentModelCategory extends ContentModelCategory
{
    protected $_data;
    protected $_context = 'com_poweradmin.category';
    /**
     *
     * Get params of current view
     */
    protected function populateState($ordering = null, $direction = null)
    {
        $params = JComponentHelper::getParams('com_content');
        $this->setState('params', $params);
    }
    /**
     *
Beispiel #23
0
<?php

/*------------------------------------------------------------------------
# JSN PowerAdmin
# ------------------------------------------------------------------------
# author    JoomlaShine.com Team
# copyright Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
# Websites: http://www.joomlashine.com
# Technical Support:  Feedback - http://www.joomlashine.com/joomlashine/contact-us.html
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# @version $Id: article.php 12506 2012-05-09 03:55:24Z hiennh $
-------------------------------------------------------------------------*/
defined('_JEXEC') or die('Restricted access');
JSNFactory::import('components.com_content.models.article', 'site');
JSNFactory::import('components.com_content.helpers.route', 'site');
/**
 * @package		Joomla.Administrator
 * @subpackage	com_poweradmin extend com_content
 * @since		1.7
 */
class PoweradminContentModelArticle extends ContentModelArticle
{
    /**
     *
     * Get params of current view
     */
    protected function populateState()
    {
        // Load the parameters.
        $params = JComponentHelper::getParams('com_content');
        $this->setState('params', $params);
<?php

/**
 * @author JoomlaShine.com Team
 * @copyright JoomlaShine.com
 * @link joomlashine.com
 * @package JSN PowerAdmin support for com_content
 * @version $Id$
 * @license GNU/GPL v2 http://www.gnu.org/licenses/gpl-2.0.html
 */
defined('_JEXEC') or die('Restricted access');
JSNFactory::import('components.com_contact.models.featured', 'site');
/**
 * @package		Joomla.Administrator
 * @subpackage	com_poweradmin extend com_content
 * @since		1.7
 */
class PoweradminContactModelFeatured extends ContactModelFeatured
{
    /**
     *
     * Get params of current view
     */
    protected function populateState()
    {
        // Load the parameters.
        $params = JComponentHelper::getParams('com_contact');
        $this->setState('params', $params);
    }
    public function getItem($pk = array())
    {