當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JHelp類代碼示例

本文整理匯總了PHP中JHelp的典型用法代碼示例。如果您正苦於以下問題:PHP JHelp類的具體用法?PHP JHelp怎麽用?PHP JHelp使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了JHelp類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getSites

 /**
  * Basically a copy of the getOptions method from the helpsite form field
  */
 protected function getSites()
 {
     jimport('joomla.language.help');
     // Merge any additional options in the XML definition.
     $options = JHelp::createSiteList(JPATH_ADMINISTRATOR . '/help/helpsites.xml');
     return $options;
 }
開發者ID:rcorral,項目名稱:com_api-plugins,代碼行數:10,代碼來源:helpsite.php

示例2: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     jimport('joomla.language.help');
     $helpsites = JHelp::createSiteList(JPATH_ADMINISTRATOR . DS . 'help' . DS . 'helpsites-15.xml', $value);
     array_unshift($helpsites, JHTML::_('select.option', '', JText::_('local')));
     return JHTML::_('select.genericlist', $helpsites, '' . $control_name . '[' . $name . ']', ' class="inputbox"', 'value', 'text', $value, $control_name . $name);
 }
開發者ID:RangerWalt,項目名稱:ecci,代碼行數:7,代碼來源:helpsites.php

示例3: _getCommand

 /**
  * Get the JavaScript command for the button
  *
  * @access	private
  * @param	object	$definition	Button definition
  * @return	string	JavaScript command string
  * @since	1.5
  */
 function _getCommand($ref, $com)
 {
     // Get Help URL
     jimport('joomla.language.help');
     $url = JHelp::createURL($ref, $com);
     $cmd = "popupWindow('{$url}', '" . JText::_('Help', true) . "', 640, 480, 1)";
     return $cmd;
 }
開發者ID:stonyyi,項目名稱:anahita,代碼行數:16,代碼來源:help.php

示例4: _getCommand

 /**
  * Get the JavaScript command for the button
  *
  * @param   string   $ref        The name of the help screen (its key reference).
  * @param   boolean  $com        Use the help file in the component directory.
  * @param   string   $override   Use this URL instead of any other.
  * @param   string   $component  Name of component to get Help (null for current component)
  *
  * @return  string   JavaScript command string
  *
  * @since   12.1
  */
 protected function _getCommand($ref, $com, $override, $component)
 {
     // Get Help URL
     $url = JHelp::createURL($ref, $com, $override, $component);
     $url = htmlspecialchars($url, ENT_QUOTES);
     $cmd = "Joomla.popupWindow('{$url}', '" . JText::_('JHELP', true) . "', 700, 500, 1)";
     return $cmd;
 }
開發者ID:nogsus,項目名稱:joomla-platform,代碼行數:20,代碼來源:help.php

示例5:

 /**
  * Method to get the page
  */
 public function &getPage()
 {
     if (is_null($this->page)) {
         $page = JFactory::getApplication()->input->get('page', 'JHELP_START_HERE');
         $this->page = JHelp::createUrl($page);
     }
     return $this->page;
 }
開發者ID:JKoelman,項目名稱:JEM-3,代碼行數:11,代碼來源:help.php

示例6: getOptions

 /**
  * Method to get the help site field options.
  *
  * @return  array  The field option objects.
  *
  * @since   11.1
  */
 protected function getOptions()
 {
     // Get Joomla version.
     $version = new JVersion();
     $jver = explode('.', $version->getShortVersion());
     // Merge any additional options in the XML definition.
     $options = array_merge(parent::getOptions(), JHelp::createSiteList(JPATH_ADMINISTRATOR . '/help/helpsites.xml', $this->value));
     return $options;
 }
開發者ID:Radek-Suski,項目名稱:joomla-platform,代碼行數:16,代碼來源:helpsite.php

示例7: _getCommand

 /**
  * Get the JavaScript command for the button
  *
  * @param   string   $ref		The name of the help screen (its key reference).
  * @param   boolean  $com		Use the help file in the component directory.
  * @param   string   $override	Use this URL instead of any other.
  * @param   string   $component	Name of component to get Help (null for current component)
  *
  * @return  string   JavaScript command string
  * @since   11.1
  */
 protected function _getCommand($ref, $com, $override, $component, $width, $height)
 {
     // Get Help URL
     jimport('joomla.language.help');
     $url = JHelp::createURL($ref, $com, $override, $component);
     $url = htmlspecialchars($url, ENT_QUOTES);
     $cmd = "popupWindow('{$url}', '" . JText::_('JHELP', true) . "', {$width}, {$height}, 1)";
     return $cmd;
 }
開發者ID:Rikisha,項目名稱:proj,代碼行數:20,代碼來源:migurhelp.php

示例8: fetchElement

 /**
  *
  * @since   11.1
  *
  * @deprecated
  */
 public function fetchElement($name, $value, &$node, $control_name)
 {
     jimport('joomla.language.help');
     // Get Joomla version.
     $version = new JVersion();
     $jver = explode('.', $version->getShortVersion());
     $helpsites = JHelp::createSiteList(JPATH_ADMINISTRATOR . '/help/helpsites.xml', $value);
     array_unshift($helpsites, JHtml::_('select.option', '', JText::_('local')));
     return JHtml::_('select.genericlist', $helpsites, $control_name . '[' . $name . ']', array('id' => $control_name . $name, 'list.attr' => 'class="inputbox"', 'list.select' => $value));
 }
開發者ID:carmerin,項目名稱:cesae-web,代碼行數:16,代碼來源:helpsites.php

示例9: getOptions

 /**
  * Method to get the help site field options.
  *
  * @return  array  The field option objects.
  *
  * @since   1.6.0
  */
 protected function getOptions()
 {
     // Merge any additional options in the XML definition.
     $opts = array();
     if (file_exists(PATH_CORE . '/help/helpsites.xml')) {
         $opts = JHelp::createSiteList(PATH_CORE . '/help/helpsites.xml', $this->value);
     } else {
         $opts[] = JHtml::_('select.option', 'English (GB) - HUBzero help', 'http://hubzero.org/documentation/');
     }
     $options = array_merge(parent::getOptions(), $opts);
     return $options;
 }
開發者ID:mined-gatech,項目名稱:hubzero-cms,代碼行數:19,代碼來源:helpsite.php

示例10: gethelpsites

 /**
  * Returns the updated options for help site selector
  *
  * @return  void
  *
  * @since   3.5
  * @throws  Exception
  */
 public function gethelpsites()
 {
     jimport('joomla.filesystem.file');
     // Set FTP credentials, if given
     JClientHelper::setCredentialsFromRequest('ftp');
     if (($data = file_get_contents('https://update.joomla.org/helpsites/helpsites.xml')) === false) {
         throw new Exception(JText::_('COM_CONFIG_ERROR_HELPREFRESH_FETCH'), 500);
     } elseif (!JFile::write(JPATH_ADMINISTRATOR . '/help/helpsites.xml', $data)) {
         throw new Exception(JText::_('COM_CONFIG_ERROR_HELPREFRESH_ERROR_STORE'), 500);
     }
     $options = array_merge(array(JHtml::_('select.option', '', JText::_('JOPTION_USE_DEFAULT'))), JHelp::createSiteList(JPATH_ADMINISTRATOR . '/help/helpsites.xml'));
     echo json_encode($options);
     JFactory::getApplication()->close();
 }
開發者ID:lyrasoft,項目名稱:lyrasoft.github.io,代碼行數:22,代碼來源:profile_base_json.php

示例11: fetchElement

 /**
  * Fetch a calendar element
  *
  * @param   string  $name          Element name
  * @param   string  $value         Element value
  * @param   object  &$node         XMLElement node object containing the settings for the element
  * @param   string  $control_name  Control name
  * @return  string
  */
 public function fetchElement($name, $value, &$node, $control_name)
 {
     $helpsites = \JHelp::createSiteList(PATH_CORE . '/help/helpsites.xml', $value);
     array_unshift($helpsites, Builder\Select::option('', \App::get('language')->txt('local')));
     return Builder\Select::genericlist($helpsites, $control_name . '[' . $name . ']', array('id' => $control_name . $name, 'list.attr' => 'class="inputbox"', 'list.select' => $value));
 }
開發者ID:mined-gatech,項目名稱:framework,代碼行數:15,代碼來源:Helpsites.php

示例12:

 /**
  * Method to get the latest version check
  *
  * @return  string  Latest Version Check URL
  */
 public function &getLatestVersionCheck()
 {
     if (!$this->latest_version_check) {
         $override = 'http://help.joomla.org/proxy/index.php?option=com_help&keyref=Help{major}{minor}:Joomla_Version_{major}_{minor}_{maintenance}';
         $this->latest_version_check = JHelp::createUrl('JVERSION', false, $override);
     }
     return $this->latest_version_check;
 }
開發者ID:TFToto,項目名稱:playjoom-builds,代碼行數:13,代碼來源:help.php

示例13: foreach

			<legend><?php 
echo JText::_('Admin_Alphabetical_Index');
?>
</legend>

			<div class="helpIndex">
				<ul class="subext">
					<?php 
foreach ($this->toc as $k => $v) {
    ?>
						<li>
							<?php 
    if ($this->help_url) {
        ?>
								<?php 
        echo JHtml::_('link', JHelp::createUrl($k), $v, array('target' => 'helpFrame'));
        ?>
							<?php 
    } else {
        ?>
								<?php 
        echo JHtml::_('link', JURI::base() . 'help/' . $this->lang_tag . '/' . $k, $v, array('target' => 'helpFrame'));
        ?>
							<?php 
    }
    ?>
						</li>
					<?php 
}
?>
				</ul>
開發者ID:joebushi,項目名稱:joomla,代碼行數:31,代碼來源:default.php

示例14: loadTemplate

 /**
  * Load a template file -- This is a special implementation that tries to find the files within the distribution help
  * dir first. There localized versions of these files can be stored!
  *
  * @access	public
  * @param string $tpl The name of the template source file ...
  * automatically searches the template paths and compiles as needed.
  * @return string The output of the the template script.
  */
 public function loadTemplate($tpl = null)
 {
     global $mainframe, $option;
     // clear prior output
     $this->_output = null;
     $file = isset($tpl) ? $this->_layout . '_' . $tpl : $this->_layout;
     // Add specific prefix to the file for usage within the help directry
     $file = 'help.' . $file;
     // clean the file name
     $file = preg_replace('/[^A-Z0-9_\\.-]/i', '', $file);
     // Get Help URL
     jimport('joomla.language.help');
     $filetofind = JHelp::createURL($file, true);
     // TODO: reactivate - this construct can not deal with symbolic links!
     //$this->_template = JPath::find(JPATH_ADMINISTRATOR, $filetofind);
     $fullname = JPATH_ADMINISTRATOR . DS . $filetofind;
     $this->_template = JFile::exists($fullname) ? $fullname : false;
     if ($this->_template != false) {
         // unset so as not to introduce into template scope
         unset($tpl);
         unset($file);
         // never allow a 'this' property
         if (isset($this->this)) {
             unset($this->this);
         }
         // start capturing output into a buffer
         ob_start();
         // include the requested template filename in the local scope
         // (this will execute the view logic).
         include $this->_template;
         // done with the requested template; get the buffer and
         // clear it.
         $this->_output = ob_get_contents();
         ob_end_clean();
         return $this->_output;
     } else {
         return parent::loadTemplate($tpl);
     }
 }
開發者ID:raulrotundo,項目名稱:jpmoser_guide,代碼行數:48,代碼來源:view.php

示例15: replaceToolbar

 function replaceToolbar($body)
 {
     $t3toolbar = T3_ADMIN_PATH . '/admin/tpls/toolbar.php';
     $input = JFactory::getApplication()->input;
     if (file_exists($t3toolbar) && class_exists('JToolBar')) {
         //get the existing toolbar html
         jimport('joomla.language.help');
         $params = T3::getTplParams();
         $toolbar = JToolBar::getInstance('toolbar')->render('toolbar');
         $helpurl = JHelp::createURL($input->getCmd('view') == 'template' ? 'JHELP_EXTENSIONS_TEMPLATE_MANAGER_TEMPLATES_EDIT' : 'JHELP_EXTENSIONS_TEMPLATE_MANAGER_STYLES_EDIT');
         $helpurl = htmlspecialchars($helpurl, ENT_QUOTES);
         //render our toolbar
         ob_start();
         include $t3toolbar;
         $t3toolbar = ob_get_clean();
         //replace it
         $body = str_replace($toolbar, $t3toolbar, $body);
     }
     return $body;
 }
開發者ID:joshjim27,項目名稱:jobsglobal,代碼行數:20,代碼來源:admin.php


注:本文中的JHelp類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。