• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JClientHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中JClientHelper的典型用法代码示例。如果您正苦于以下问题:PHP JClientHelper类的具体用法?PHP JClientHelper怎么用?PHP JClientHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了JClientHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: display

 public function display($tpl = null)
 {
     JToolBarHelper::title(JText::_('Template Manager'), 'thememanager');
     JToolBarHelper::custom('edit', 'back.png', 'back_f2.png', 'Back', false, false);
     require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'templates.php';
     // Initialise some variables
     $option = JRequest::getCmd('option');
     $id = JRequest::getVar('id', '', 'method', 'int');
     $template = TemplatesHelper::getTemplateName($id);
     $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int'));
     $tp = true;
     $url = $client->id ? JURI::base() : JURI::root();
     if (!$template) {
         return JError::raiseWarning(500, JText::_('Template not specified'));
     }
     // Set FTP credentials, if given
     jimport('joomla.client.helper');
     JClientHelper::setCredentialsFromRequest('ftp');
     $this->assignRef('option', $option);
     $this->assignRef('client', $client);
     $this->assignRef('id', $id);
     $this->assignRef('template', $template);
     $this->assignRef('tp', $tp);
     $this->assignRef('url', $url);
     parent::display($tpl);
 }
开发者ID:joebushi,项目名称:joomla,代码行数:26,代码来源:view.html.php


示例2: displayTask

 /**
  * Display a list of uninstalled extensions
  *
  * @return  void
  */
 public function displayTask()
 {
     $model = new Models\Manage();
     $this->view->state = $model->getState();
     $this->view->items = $model->getItems();
     $this->view->pagination = $model->getPagination();
     $this->view->form = $model->getForm();
     // Check for errors.
     if (count($errors = $model->getErrors())) {
         App::abort(500, implode("\n", $errors));
     }
     //Check if there are no matching items
     if (!count($this->view->items)) {
         Notify::warning(Lang::txt('COM_INSTALLER_MSG_MANAGE_NOEXTENSION'));
     }
     $this->view->ftp = \JClientHelper::setCredentialsFromRequest('ftp');
     $showMessage = false;
     if (is_object($this->view->state)) {
         $message1 = $this->view->state->get('message');
         $message2 = $this->view->state->get('extension_message');
         $showMessage = $message1 || $message2;
     }
     $this->view->showMessage = $showMessage;
     // Include the component HTML helpers.
     Html::addIncludePath(dirname(__DIR__) . '/helpers/html');
     $this->view->display();
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:32,代码来源:manage.php


示例3: display

 /**
  * Execute and display a template script.
  *
  * @param   string $tpl The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a Error object.
  *
  * @since   3.6
  */
 public function display($tpl = null)
 {
     $this->user = JFactory::getUser();
     $this->bar = JToolbar::getInstance('toolbar');
     $ftp = !JClientHelper::hasCredentials('ftp');
     $images = $this->get('images');
     $subfolders = $this->get('folders');
     $folders = $this->getModel()->getFolders(COM_MEDIA_BASE);
     $currentFolder = $this->getModel()->getCurrentFolder();
     $state = $this->get('state');
     $this->session = JFactory::getSession();
     $this->config = JComponentHelper::getParams('com_media');
     $this->state = $this->get('state');
     $this->require_ftp = $ftp;
     $this->images = $images;
     $this->folders = $folders;
     $this->current_folder = $currentFolder;
     $this->subfolders = $subfolders;
     $this->state = $state;
     if ($this->state->folder === "") {
         $this->state->folder = COM_MEDIA_BASEURL;
     }
     // Set the toolbar
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:joomla-projects,项目名称:media-manager-improvement,代码行数:35,代码来源:view.html.php


示例4: display

 /**
  * Method to display the view.
  */
 public function display($tpl = null)
 {
     $form = $this->get('Form');
     $data = $this->get('Data');
     $user = JFactory::getUser();
     // Check for model errors.
     if ($errors = $this->get('Errors')) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Bind the form to the data.
     if ($form && $data) {
         $form->bind($data);
     }
     // Get the params for com_users.
     $usersParams = JComponentHelper::getParams('com_users');
     // Get the params for com_media.
     $mediaParams = JComponentHelper::getParams('com_media');
     // Load settings for the FTP layer.
     $ftp = JClientHelper::setCredentialsFromRequest('ftp');
     $this->form =& $form;
     $this->data =& $data;
     $this->ftp =& $ftp;
     $this->usersParams =& $usersParams;
     $this->mediaParams =& $mediaParams;
     $this->components = ConfigHelperComponent::getComponentsWithConfig();
     ConfigHelperComponent::loadLanguageForComponents($this->components);
     $this->userIsSuperAdmin = $user->authorise('core.admin');
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:Tommar,项目名称:remate,代码行数:34,代码来源:view.html.php


示例5: saveParams

 /**
  * TuiyoParameter::saveParams()
  * 
  * @param mixed $postParams
  * @param mixed $key
  * @param string $type
  * @return
  */
 public function saveParams($postParams, $key, $type = "system")
 {
     jimport('joomla.filesystem.file');
     jimport('joomla.client.helper');
     // Set FTP credentials, if given
     JClientHelper::setCredentialsFromRequest('ftp');
     $ftp = JClientHelper::getCredentials('ftp');
     $file = TUIYO_CONFIG . DS . strtolower($key) . ".ini";
     if (JFile::exists($file)) {
         JFile::write($file);
     }
     if (count($postParams)) {
         $registry = new JRegistry();
         $registry->loadArray($postParams);
         $iniTxt = $registry->toString();
         // Try to make the params file writeable
         if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0755')) {
             JError::raiseNotice('SOME_ERROR_CODE', _('Could not make the template parameter file writable'));
             return false;
         }
         //Write the file
         $return = JFile::write($file, $iniTxt);
         // Try to make the params file unwriteable
         if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0555')) {
             JError::raiseNotice('SOME_ERROR_CODE', _('Could not make the template parameter file unwritable'));
             return false;
         }
         if (!$return) {
             JError::raiseError(TUIYO_SERVER_ERROR, _("Could not save the template parameters"));
             return false;
         }
         return $return;
     }
 }
开发者ID:night-coder,项目名称:ignite,代码行数:42,代码来源:parameter.php


示例6: display

 function display($tpl = null)
 {
     $config = JComponentHelper::getParams('com_media');
     $app = JFactory::getApplication();
     $lang = JFactory::getLanguage();
     $append = '';
     $clave = JRequest::getVar('clave');
     JHtml::_('behavior.framework', true);
     JHtml::_('script', 'media/popup-imagemanager.js', true, true);
     JHtml::_('stylesheet', 'media/popup-imagemanager.css', array(), true);
     if ($lang->isRTL()) {
         JHtml::_('stylesheet', 'media/popup-imagemanager_rtl.css', array(), true);
     }
     /*
      * Display form for FTP credentials?
      * Don't set them here, as there are other functions called before this one if there is any file write operation
      */
     $ftp = !JClientHelper::hasCredentials('ftp');
     $this->session = JFactory::getSession();
     $this->config = $config;
     $this->state = $this->get('state');
     $this->folderList = $this->get('folderList');
     $this->require_ftp = $ftp;
     parent::display($tpl);
 }
开发者ID:networksoft,项目名称:seekerplus2.com,代码行数:25,代码来源:view.html.php


示例7: com_install

function com_install()
{
    global $mainframe;
    jimport('joomla.filesystem.folder');
    // Initialize variables
    jimport('joomla.client.helper');
    $FTPOptions = JClientHelper::getCredentials('ftp');
    $language =& JFactory::getLanguage();
    $language->load('com_jce_imgmanager_ext', JPATH_SITE);
    $cache = $mainframe->getCfg('tmp_path');
    // Check for tmp folder
    if (!JFolder::exists($cache)) {
        // Create if does not exist
        if (!JFolder::create($cache)) {
            $mainframe->enqueueMessage(JText::_('NO CACHE DESC'), 'error');
        }
    }
    // Check if folder exists and is writable or the FTP layer is enabled
    if (JFolder::exists($cache) && (is_writable($cache) || $FTPOptions['enabled'] == 1)) {
        $mainframe->enqueueMessage(JText::_('CACHE DESC'));
    } else {
        $mainframe->enqueueMessage(JText::_('NO CACHE DESC'), 'error');
    }
    // Check for GD
    if (!function_exists('gd_info')) {
        $mainframe->enqueueMessage(JText::_('NO GD DESC'), 'error');
    } else {
        $info = gd_info();
        $mainframe->enqueueMessage(JText::_('GD DESC') . ' - ' . $info['GD Version']);
    }
}
开发者ID:Ratmir15,项目名称:Joomla---formula-of-success,代码行数:31,代码来源:install.php


示例8: upload

 /**
  * Upload a file
  * @param	string	$source			File to upload
  * @param	string	$destination	Upload to here
  * @return True on success
  */
 public static function upload($source, $destination)
 {
     $err = null;
     $ret = false;
     // Set FTP credentials, if given
     jimport('joomla.client.helper');
     JClientHelper::setCredentialsFromRequest('ftp');
     // Load configurations.
     $config = CFactory::getConfig();
     // Make the filename safe
     jimport('joomla.filesystem.file');
     if (!isset($source['name'])) {
         JError::raiseNotice(100, JText::_('COM_COMMUNITY_INVALID_FILE_REQUEST'));
         return $ret;
     }
     $source['name'] = JFile::makeSafe($source['name']);
     if (is_dir($destination)) {
         jimport('joomla.filesystem.folder');
         JFolder::create($destination, (int) octdec($config->get('folderpermissionsvideo')));
         JFile::copy(JPATH_ROOT . '/components/com_community/index.html', $destination . '/index.html');
         $destination = JPath::clean($destination . '/' . strtolower($source['name']));
     }
     if (JFile::exists($destination)) {
         JError::raiseNotice(100, JText::_('COM_COMMUNITY_FILE_EXISTS'));
         return $ret;
     }
     if (!JFile::upload($source['tmp_name'], $destination)) {
         JError::raiseWarning(100, JText::_('COM_COMMUNITY_UNABLE_TO_UPLOAD_FILE'));
         return $ret;
     } else {
         $ret = true;
         return $ret;
     }
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:40,代码来源:file.php


示例9: display

 function display($tpl = null)
 {
     global $mainframe;
     $config =& JComponentHelper::getParams('com_media');
     $app = JFactory::getApplication();
     $append = '';
     if ($app->getClientId() == 1) {
         $append = 'administrator/';
     }
     JHTML::_('script', 'popup-imagemanager.js', $append . 'components/com_media/assets/');
     JHTML::_('stylesheet', 'popup-imagemanager.css', $append . 'components/com_media/assets/');
     if ($config->get('enable_flash', 1)) {
         JHTML::_('behavior.uploader', 'file-upload', array('onAllComplete' => 'function(){ ImageManager.refreshFrame(); }'));
     }
     /*
      * Display form for FTP credentials?
      * Don't set them here, as there are other functions called before this one if there is any file write operation
      */
     jimport('joomla.client.helper');
     $ftp = !JClientHelper::hasCredentials('ftp');
     $this->assignRef('session', JFactory::getSession());
     $this->assignRef('config', $config);
     $this->assignRef('state', $this->get('state'));
     $this->assignRef('folderList', $this->get('folderList'));
     $this->assign('require_ftp', $ftp);
     parent::display($tpl);
 }
开发者ID:RangerWalt,项目名称:ecci,代码行数:27,代码来源:view.html.php


示例10: admin_postinstall_eaccelerator_action

/**
 * Disables the unsupported eAccelerator caching method, replacing it with the
 * "file" caching method.
 *
 * @return  void
 *
 * @since   3.2
 */
function admin_postinstall_eaccelerator_action()
{
    $prev = new JConfig();
    $prev = JArrayHelper::fromObject($prev);
    $data = array('cacheHandler' => 'file');
    $data = array_merge($prev, $data);
    $config = new Registry('config');
    $config->loadArray($data);
    jimport('joomla.filesystem.path');
    jimport('joomla.filesystem.file');
    // Set the configuration file path.
    $file = JPATH_CONFIGURATION . '/configuration.php';
    // Get the new FTP credentials.
    $ftp = JClientHelper::getCredentials('ftp', true);
    // Attempt to make the file writeable if using FTP.
    if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0644')) {
        JError::raiseNotice('SOME_ERROR_CODE', JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'));
    }
    // Attempt to write the configuration file as a PHP class named JConfig.
    $configuration = $config->toString('PHP', array('class' => 'JConfig', 'closingtag' => false));
    if (!JFile::write($file, $configuration)) {
        JFactory::getApplication()->enqueueMessage(JText::_('COM_CONFIG_ERROR_WRITE_FAILED'), 'error');
        return;
    }
    // Attempt to make the file unwriteable if using FTP.
    if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0444')) {
        JError::raiseNotice('SOME_ERROR_CODE', JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'));
    }
}
开发者ID:grlf,项目名称:eyedock,代码行数:37,代码来源:eaccelerator.php


示例11: com_install

function com_install()
{
    $mainframe = JFactory::getApplication();
    jimport('joomla.filesystem.folder');
    // Initialize variables
    jimport('joomla.client.helper');
    $FTPOptions = JClientHelper::getCredentials('ftp');
    $language = JFactory::getLanguage();
    $language->load('com_jce_imgmanager_ext', JPATH_SITE);
    $cache = $mainframe->getCfg('tmp_path');
    // Check for tmp folder
    if (!JFolder::exists($cache)) {
        // Create if does not exist
        if (!JFolder::create($cache)) {
            $mainframe->enqueueMessage(WFText::_('WF_IMGMANAGER_EXT_NO_CACHE_DESC'), 'error');
        }
    }
    // Check if folder exists and is writable or the FTP layer is enabled
    if (JFolder::exists($cache) && (is_writable($cache) || $FTPOptions['enabled'] == 1)) {
        $mainframe->enqueueMessage(WFText::_('WF_IMGMANAGER_EXT_CACHE_DESC'));
    } else {
        $mainframe->enqueueMessage(WFText::_('WF_IMGMANAGER_EXT_NO_CACHE_DESC'), 'error');
    }
    // Check for GD
    if (!function_exists('gd_info')) {
        $mainframe->enqueueMessage(WFText::_('WF_IMGMANAGER_EXT_NO_GD_DESC'), 'error');
    } else {
        $info = gd_info();
        $mainframe->enqueueMessage(WFText::_('WF_IMGMANAGER_EXT_GD_DESC') . ' - ' . $info['GD Version']);
    }
    // remove wideimage folder
    if (JFolder::exists(dirname(__FILE) . '/classes/wideimage')) {
        @JFolder::delete(dirname(__FILE) . '/classes/wideimage');
    }
}
开发者ID:adjaika,项目名称:J3Base,代码行数:35,代码来源:install.php


示例12: display

 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_COMPONENT . '/helpers/installer.php';
     // Get the document object.
     $document = JFactory::getDocument();
     // Set the default view name and format from the Request.
     $vName = JRequest::getCmd('view', 'install');
     $vFormat = $document->getType();
     $lName = JRequest::getCmd('layout', 'default');
     // Get and render the view.
     if ($view = $this->getView($vName, $vFormat)) {
         $ftp = JClientHelper::setCredentialsFromRequest('ftp');
         $view->assignRef('ftp', $ftp);
         // Get the model for the view.
         $model = $this->getModel($vName);
         // Push the model into the view (as default).
         $view->setModel($model, true);
         $view->setLayout($lName);
         // Push document object into the view.
         $view->assignRef('document', $document);
         // Load the submenu.
         InstallerHelper::addSubmenu($vName);
         $view->display();
     }
     return $this;
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:35,代码来源:controller.php


示例13: display

 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	2.5.4
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Get the document object.
     $document = JFactory::getDocument();
     // Set the default view name and format from the Request.
     $vName = JRequest::getCmd('view', 'default');
     $vFormat = $document->getType();
     $lName = JRequest::getCmd('layout', 'default');
     // Get and render the view.
     if ($view = $this->getView($vName, $vFormat)) {
         $ftp = JClientHelper::setCredentialsFromRequest('ftp');
         $view->assignRef('ftp', $ftp);
         // Get the model for the view.
         $model = $this->getModel($vName);
         // Perform update source preference check and refresh update information
         $model->applyUpdateSite();
         $model->refreshUpdates();
         // Push the model into the view (as default).
         $view->setModel($model, true);
         $view->setLayout($lName);
         // Push document object into the view.
         $view->assignRef('document', $document);
         $view->display();
     }
     return $this;
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:35,代码来源:controller.php


示例14: create

 /**
  * create
  *
  * Creates and then Installs a Molajo Extension as per user instructions
  *
  * Note: was not able to use the create controller - the form submit of create.create did not find the folder/file
  * Change the task to create and added the create method to the display controller
  * JLoader::register('InstallerControllerCreate', MOLAJO_LIBRARY_COM_JFOOBARER.'/controllers/create.php');
  * require_once MOLAJO_LIBRARY_COM_JFOOBARER.'/controllers/create.php';
  *
  * @return	boolean result of install
  */
 function create()
 {
     /** set ftp credentials, if used **/
     JClientHelper::setCredentialsFromRequest('ftp');
     /** component */
     if ($this->getState('create.createtype') == 'component') {
         return $this->_createComponent();
     } else {
         if ($this->getState('create.createtype') == 'module') {
             return $this->_createModule();
         } else {
             if ($this->getState('create.createtype') == 'plugin') {
                 return $this->_createPlugin();
             } else {
                 if ($this->getState('create.createtype') == 'layout') {
                     return $this->_createLayout();
                 } else {
                     if ($this->getState('create.createtype') == 'template') {
                         return $this->_createTemplate();
                     } else {
                         JFactory::getApplication()->enqueueMessage(JText::_('PLG_SYSTEM_CREATE_INVALID_EXTENSION_TYPE_FAILED') . ': ' . $this->getState('create.createtype'), 'error');
                         return false;
                     }
                 }
             }
         }
     }
 }
开发者ID:naka211,项目名称:jydsk,代码行数:40,代码来源:create.php


示例15: display

 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     JHTML::stylesheet('media/com_phocagallery/css/administrator/phocagallery.css');
     $this->state = $this->get('State');
     $this->item = $this->get('Item');
     $this->form = $this->get('Form');
     $this->ftp = JClientHelper::setCredentialsFromRequest('ftp');
     $this->tmpl = new StdClass();
     $model = $this->getModel();
     // Set CSS for codemirror
     JFactory::getApplication()->setUserState('editor.source.syntax', 'css');
     // New or edit
     if (!$this->form->getValue('id') || $this->form->getValue('id') == 0) {
         $this->form->setValue('source', null, '');
         $this->form->setValue('type', null, 2);
         $this->tmpl->suffixtype = JText::_('COM_PHOCAGALERY_WILL_BE_CREATED_FROM_TITLE');
     } else {
         $this->source = $model->getSource($this->form->getValue('id'), $this->form->getValue('filename'), $this->form->getValue('type'));
         $this->form->setValue('source', null, $this->source->source);
         $this->tmpl->suffixtype = '';
     }
     // Only help input form field - to display Main instead of 1 and Custom instead of 2
     if ($this->form->getValue('type') == 1) {
         $this->form->setValue('typeoutput', null, JText::_('COM_PHOCAGALLERY_MAIN_CSS'));
     } else {
         $this->form->setValue('typeoutput', null, JText::_('COM_PHOCAGALLERY_CUSTOM_CSS'));
     }
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:01J,项目名称:skazkipronebo,代码行数:37,代码来源:view.html.php


示例16: displayTask

 /**
  * Display a list of uninstalled extensions
  *
  * @return  void
  */
 public function displayTask()
 {
     $model = new Models\Database();
     // Get data from the model
     $this->view->state = $model->getState();
     $this->view->changeSet = $model->getItems();
     $this->view->errors = $this->view->changeSet->check();
     $this->view->results = $this->view->changeSet->getStatus();
     $this->view->schemaVersion = $this->getSchemaVersion();
     $this->view->updateVersion = $this->getUpdateVersion();
     $this->view->filterParams = $this->getDefaultTextFilters();
     $this->view->schemaVersion = $this->view->schemaVersion ? $this->view->schemaVersion : Lang::txt('JNONE');
     $this->view->updateVersion = $this->view->updateVersion ? $this->view->updateVersion : Lang::txt('JNONE');
     $this->view->pagination = $model->getPagination();
     $this->view->errorCount = count($this->errors);
     $errors = count($this->view->errors);
     if ($this->view->schemaVersion != $this->view->changeSet->getSchema()) {
         $this->view->errorCount++;
     }
     if (!$this->view->filterParams) {
         $this->view->errorCount++;
     }
     if (version_compare($this->view->updateVersion, JVERSION) != 0) {
         $this->view->errorCount++;
     }
     $this->view->ftp = \JClientHelper::setCredentialsFromRequest('ftp');
     $showMessage = false;
     if (is_object($this->view->state)) {
         $message1 = $this->view->state->get('message');
         $message2 = $this->view->state->get('extension_message');
         $showMessage = $message1 || $message2;
     }
     $this->view->showMessage = $showMessage;
     $this->view->display();
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:40,代码来源:database.php


示例17: display

 function display($tpl = null)
 {
     global $mainframe;
     $style = $mainframe->getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word');
     $listStyle = "\n\t\t\t<ul id=\"submenu\">\n\t\t\t\t<li><a id=\"thumbs\" onclick=\"MediaManager.setViewType('thumbs')\">" . JText::_('Thumbnail View') . "</a></li>\n\t\t\t\t<li><a id=\"details\" onclick=\"MediaManager.setViewType('details')\">" . JText::_('Detail View') . "</a></li>\n\t\t\t</ul>\n\t\t";
     $document =& JFactory::getDocument();
     $document->setBuffer($listStyle, 'module', 'submenu');
     JHTML::_('behavior.mootools');
     $document->addScript('components/com_media/assets/mediamanager.js');
     $document->addStyleSheet('components/com_media/assets/mediamanager.css');
     JHTML::_('behavior.modal');
     $document->addScriptDeclaration("\n\t\twindow.addEvent('domready', function() {\n\t\t\tdocument.preview = SqueezeBox;\n\t\t});");
     JHTML::script('mootree.js');
     JHTML::stylesheet('mootree.css');
     JHTML::_('behavior.uploader', 'file-upload', array('onAllComplete' => 'function(){ MediaManager.refreshFrame(); }'));
     $base = str_replace("\\", "/", JPATH_ROOT);
     $js = "\n\t\t\tvar basepath = '" . $base . '/images' . "';\n\t\t\tvar viewstyle = '" . $style . "';\n\t\t";
     $document->addScriptDeclaration($js);
     /*
      * Display form for FTP credentials?
      * Don't set them here, as there are other functions called before this one if there is any file write operation
      */
     jimport('joomla.client.helper');
     $ftp = !JClientHelper::hasCredentials('ftp');
     $this->assignRef('session', JFactory::getSession());
     $this->assignRef('config', JComponentHelper::getParams('com_media'));
     $this->assignRef('state', $this->get('state'));
     $this->assign('require_ftp', $ftp);
     $this->assign('folders_id', ' id="media-tree"');
     $this->assign('folders', $this->get('folderTree'));
     // Set the toolbar
     $this->_setToolBar();
     parent::display($tpl);
     echo JHTML::_('behavior.keepalive');
 }
开发者ID:Fellah,项目名称:govnobaki,代码行数:35,代码来源:view.html.php


示例18: jimport

 /**
  * Creates a new stream object with appropriate prefix
  * @param boolean Prefix the connections for writing
  * @param boolean Use network if available for writing; use false to disable (e.g. FTP, SCP)
  * @param string UA User agent to use
  * @param boolean User agent masking (prefix Mozilla)
  */
 function &getStream($use_prefix = true, $use_network = true, $ua = null, $uamask = false)
 {
     RokUpdater::import('joomla.filesystem.stream');
     RokUpdater::import('pasamio.pversion');
     jimport('joomla.client.helper');
     // Setup the context; Joomla! UA and overwrite
     $context = array();
     $version = new PVersion();
     // set the UA for HTTP and overwrite for FTP
     $context['http']['user_agent'] = $version->getUserAgent($ua, $uamask);
     $context['ftp']['overwrite'] = true;
     if ($use_prefix) {
         $FTPOptions = JClientHelper::getCredentials('ftp');
         $SCPOptions = JClientHelper::getCredentials('scp');
         if ($FTPOptions['enabled'] == 1 && $use_network) {
             $prefix = 'ftp://' . $FTPOptions['user'] . ':' . $FTPOptions['pass'] . '@' . $FTPOptions['host'];
             $prefix .= $FTPOptions['port'] ? ':' . $FTPOptions['port'] : '';
             $prefix .= $FTPOptions['root'];
         } else {
             if ($SCPOptions['enabled'] == 1 && $use_network) {
                 $prefix = 'ssh2.sftp://' . $SCPOptions['user'] . ':' . $SCPOptions['pass'] . '@' . $SCPOptions['host'];
                 $prefix .= $SCPOptions['port'] ? ':' . $SCPOptions['port'] : '';
                 $prefix .= $SCPOptions['root'];
             } else {
                 $prefix = JPATH_ROOT . DS;
             }
         }
         $retval = new JStream($prefix, JPATH_ROOT, $context);
     } else {
         $retval = new JStream('', '', $context);
     }
     return $retval;
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:40,代码来源:pfactory.php


示例19: themeinstall

 function themeinstall()
 {
     // Check for request forgeries
     JRequest::checkToken() or die('Invalid Token');
     $post = JRequest::get('post');
     $theme = array();
     if (isset($post['theme_component'])) {
         $theme['component'] = 1;
     }
     if (isset($post['theme_categories'])) {
         $theme['categories'] = 1;
     }
     if (isset($post['theme_category'])) {
         $theme['category'] = 1;
     }
     if (!empty($theme)) {
         $ftp =& JClientHelper::setCredentialsFromRequest('ftp');
         $model =& $this->getModel('phocagalleryt');
         if ($model->install($theme)) {
             $cache =& JFactory::getCache('mod_menu');
             $cache->clean();
             $msg = JText::_('New Theme Installed');
         }
     } else {
         $msg = JText::_('Select Application Area');
     }
     $this->setRedirect('index.php?option=com_phocagallery&view=phocagalleryt', $msg);
 }
开发者ID:RangerWalt,项目名称:ecci,代码行数:28,代码来源:phocagalleryt.php


示例20: display

 /**
  * Method to display a view.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  JController  This object to support chaining.
  *
  * @since   1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_ADMINISTRATOR . '/components/com_installer/helpers/installer.php';
     // Get the document object.
     $document = JFactory::getDocument();
     // Set the default view name and format from the Request.
     $vName = $this->input->get('view', 'install');
     $vFormat = $document->getType();
     $lName = $this->input->get('layout', 'default', 'string');
     // Get and render the view.
     if ($view = $this->getView($vName, $vFormat)) {
         $ftp = JClientHelper::setCredentialsFromRequest('ftp');
         $view->ftp =& $ftp;
         // Get the model for the view.
         $model = $this->getModel($vName);
         // Push the model into the view (as default).
         $view->setModel($model, true);
         $view->setLayout($lName);
         // Push document object into the view.
         $view->document = $document;
         // Load the submenu.
         InstallerHelper::addSubmenu($vName);
         $view->display();
     }
     return $this;
 }
开发者ID:TFToto,项目名称:playjoom-builds,代码行数:36,代码来源:controller.php



注:本文中的JClientHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JComments类代码示例发布时间:2022-05-23
下一篇:
PHP JClientFtp类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap