本文整理汇总了PHP中JHTML::addIncludePath方法的典型用法代码示例。如果您正苦于以下问题:PHP JHTML::addIncludePath方法的具体用法?PHP JHTML::addIncludePath怎么用?PHP JHTML::addIncludePath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JHTML
的用法示例。
在下文中一共展示了JHTML::addIncludePath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadMootools
public function loadMootools()
{
if (KUNENA_JOOMLA_COMPAT == '1.5') {
jimport('joomla.plugin.helper');
$mtupgrade = JPluginHelper::isEnabled('system', 'mtupgrade');
if (!$mtupgrade) {
$app = JFactory::getApplication();
if (!class_exists('JHTMLBehavior')) {
if (is_dir(JPATH_PLUGINS . '/system/mtupgrade')) {
JHTML::addIncludePath(JPATH_PLUGINS . '/system/mtupgrade');
} else {
// TODO: translate
KunenaError::warning('<em>System - MooTools Upgrade</em> plug-in is not installed into your system. Many features, including the BBCode editor, may be broken.', 'notice');
}
}
}
JHTML::_('behavior.mootools');
// Get the MooTools version string
$mtversion = preg_replace('/[^\\d\\.]/', '', JFactory::getApplication()->get('MooToolsVersion'));
if (version_compare($mtversion, '1.2.4', '<')) {
// TODO: translate
KunenaError::warning('Your site is not using <em>System - MooTools Upgrade</em> (or compatible) plug-in. Many features, including the BBCode editor, may be broken.');
}
} else {
// Joomla 1.6+
JHTML::_('behavior.framework', true);
}
if (KunenaFactory::getConfig()->debug) {
// Debugging Mootools issues
CKunenaTools::addScript(KUNENA_DIRECTURL . 'template/default/js/debug-min.js');
}
}
示例2: onAfterInitialise
/**
* onAfterInitialise handler
*
* Adds the mtupgrade folder to the list of directories to search for JHTML helpers.
*
* @access public
* @return null
*/
function onAfterInitialise()
{
$app = JFactory::getApplication();
if ($app->isAdmin() and $this->params->get('admin_version') == "0" or $app->isSite() and $this->params->get('site_version') == "0") {
JHTML::addIncludePath(JPATH_PLUGINS . DS . 'system' . DS . 'mtupgrade');
}
}
示例3: __construct
/**
* Constructor
*
* @access protected
* @return void
* @since 1.5.5
*/
function __construct($config = array())
{
parent::__construct($config);
$this->_ambit = JoomAmbit::getInstance();
$this->_config = JoomConfig::getInstance();
$this->_mainframe = JFactory::getApplication('administrator');
$this->_user = JFactory::getUser();
$this->_doc = JFactory::getDocument();
$this->_doc->addStyleSheet($this->_ambit->getStyleSheet('admin.joomgallery.css'));
JHtmlBehavior::framework();
$this->_doc->addScript($this->_ambit->getScript('admin.js'));
JoomHelper::addSubmenu();
JHTML::addIncludePath(JPATH_COMPONENT . '/helpers/html');
// Check for available updates
if (!($checked = $this->_mainframe->getUserState('joom.update.checked'))) {
$controller = JRequest::getCmd('controller');
if ($this->_config->get('jg_checkupdate') && $controller && $controller != 'control') {
$dated_extensions = JoomExtensions::checkUpdate();
if (count($dated_extensions)) {
$this->_mainframe->enqueueMessage(JText::_('COM_JOOMGALLERY_ADMENU_SYSTEM_NOT_UPTODATE'), 'warning');
$this->_mainframe->setUserState('joom.update.checked', -1);
} else {
$this->_mainframe->setUserState('joom.update.checked', 1);
}
}
} else {
if ($checked == -1) {
$controller = JRequest::getCmd('controller');
if ($controller && $controller != 'control') {
$this->_mainframe->enqueueMessage(JText::_('COM_JOOMGALLERY_ADMENU_SYSTEM_NOT_UPTODATE'), 'warning');
}
}
}
}
示例4: cbTabHandler
function cbTabHandler() {
if(!file_exists(JPATH_SITE.DS.'components'.DS.'com_bids'.DS.'bids.php')) {
return "<div>You must First install <a href='http://www.thefactory.ro/shop/joomla-components/auction-factory.html'> Auction Factory </a></div>";
}
//need the whole framework loaded so we can access the price_item classes, in order to get the correct price for current user (verified, powerseller,...)
require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_bids'.DS.'thefactory'.DS.'application'.DS.'application.class.php');
$cnfigfile = JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_bids'.DS.'application.ini';
$MyApp = JTheFactoryApplication::getInstance($cnfigfile, true);
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_bids'.DS.'tables');
JHTML::addIncludePath(JPATH_SITE.DS.'components'.DS.'com_bids'.DS.'helpers'.DS.'html');
require_once(JPATH_ROOT.DS.'components'.DS.'com_bids'.DS.'options.php');
require_once(JPATH_ROOT.DS.'components'.DS.'com_bids'.DS.'defines.php');
require_once(JPATH_SITE.DS.'components'.DS.'com_bids'.DS.'helpers'.DS.'bids.php');
BidsHelper::LoadHelperClasses();
JFactory::getLanguage()->load('com_bids');
parent::cbTabHandler();
}
示例5: __construct
function __construct($config = array())
{
global $mainframe, $option;
JHTML::addIncludePath(HOTELGUIDE_HELPERS_HTML);
$document =& JFactory::getDocument();
$document->addStyleSheet('components/com_hotelguide/assets/css/hotelguidebackend.css');
parent::__construct($config);
$component_context = $option . '.';
$view_context = $option . '.' . $this->getName() . '.';
}
示例6: getInput
/**
* Returns the HTML for a category select box form field.
*
* @access protected
* @return object The category select box form field.
* @since 2.0
*/
function getInput()
{
require_once JPATH_ROOT . '/modules/mod_btimagegallery/helpers/helper.php';
$helper = new BTImageGalleryHelper();
if ($helper->checkJGalleryComponent()) {
require_once JPATH_ADMINISTRATOR . '/components/com_joomgallery/includes/defines.php';
JLoader::register('JoomExtensions', JPATH_ADMINISTRATOR . '/components/' . _JOOM_OPTION . '/helpers/extensions.php');
JLoader::register('JoomHelper', JPATH_BASE . '/components/' . _JOOM_OPTION . '/helpers/helper.php');
JLoader::register('JoomConfig', JPATH_BASE . '/components/' . _JOOM_OPTION . '/helpers/config.php');
JLoader::register('JoomAmbit', JPATH_BASE . '/components/' . _JOOM_OPTION . '/helpers/ambit.php');
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/' . _JOOM_OPTION . '/tables');
JHTML::addIncludePath(JPATH_BASE . '/components/' . _JOOM_OPTION . '/helpers/html');
$class = $this->element['class'] ? (string) $this->element['class'] : '';
if ($this->element['required'] && $this->element['required'] == true && strpos($class, 'required') === false) {
if (!empty($class)) {
$class .= ' ';
}
$class .= 'required';
}
if ($this->element['validate'] && (string) $this->element['validate'] == 'joompositivenumeric') {
$doc =& JFactory::getDocument();
// Add a validation script for form validation
$js_validate = "\n window.addEvent('domready', function() {\n document.formvalidator.setHandler('joompositivenumeric', function(value) {\n regex=/^[1-9]+[0-9]*\$/;\n return regex.test(value);\n })\n });";
$doc->addScriptDeclaration($js_validate);
// Element class needs attribute validate-...
if (!empty($class)) {
$class .= ' ';
}
$class .= 'validate-' . (string) $this->element['validate'];
// Add some style to make the slect box red bordered when invalid
$css = '
select.invalid {
border: 1px solid red;
}';
$doc->addStyleDeclaration($css);
}
$attr = '';
$attr .= !empty($class) ? ' class="' . $class . '"' : '';
$attr .= (string) $this->element['disabled'] == 'true' ? ' disabled="disabled"' : '';
$attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
$attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';
$action = $this->element['action'] ? (string) $this->element['action'] : 'core.create';
$exclude = $this->element['exclude'] ? (int) $this->element['exclude'] : null;
$task = $this->element['task'] ? (int) $this->element['task'] : null;
$html = JHTML::_('joomselect.categorylist', $this->value, $this->name, $attr, $exclude, '- ', $task, $action, $this->id);
return $html;
} else {
$class = $this->element['class'] ? (string) $this->element['class'] : '';
return "<div class='{$class}'>" . JText::_('MOD_BTIMAGEGALLERY_JOOMGALLERY_ALERT') . "</div>";
}
}
示例7: __construct
function __construct()
{
JHtml::_('behavior.framework');
$this->itempath = JPATH_COMPONENT_ADMINISTRATOR . DS . 'pricing' . DS . $this->itemname;
$config = array('view_path' => $this->itempath . DS . "views");
JLoader::register('JBidAdminComissionToolbar', $this->itempath . DS . 'toolbars' . DS . 'toolbar.php');
JLoader::register('JBidAdminComissionHelper', $this->itempath . DS . 'helpers' . DS . 'helper.php');
jimport('joomla.application.component.model');
JModel::addIncludePath($this->itempath . DS . 'models');
JTable::addIncludePath($this->itempath . DS . 'tables');
JHTML::addIncludePath($this->itempath . DS . 'helpers' . DS . 'html');
$lang = JFactory::getLanguage();
$lang->load(APP_PREFIX . '.' . $this->itemname);
$input = JFactory::getApplication()->input;
$this->commissionType = $input->get('commissionType');
parent::__construct($config);
}
示例8: _
/**
* Class loader method
*
* Additional arguments may be supplied and are passed to the sub-class.
* Additional include paths are also able to be specified for third-party use
*
* @param string The name of helper method to load, (prefix).(class).function
* prefix and class are optional and can be used to load custom
* html helpers.
*/
function _($type)
{
//Initialise variables
$prefix = 'JHTML';
$file = '';
$func = $type;
// Check to see if we need to load a helper file
$parts = explode('.', $type);
switch (count($parts)) {
case 3:
$prefix = preg_replace('#[^A-Z0-9_]#i', '', $parts[0]);
$file = preg_replace('#[^A-Z0-9_]#i', '', $parts[1]);
$func = preg_replace('#[^A-Z0-9_]#i', '', $parts[2]);
break;
case 2:
$file = preg_replace('#[^A-Z0-9_]#i', '', $parts[0]);
$func = preg_replace('#[^A-Z0-9_]#i', '', $parts[1]);
break;
}
$className = $prefix . ucfirst($file);
if (!class_exists($className)) {
jimport('joomla.filesystem.path');
if ($path = JPath::find(JHTML::addIncludePath(), strtolower($file) . '.php')) {
require_once $path;
if (!class_exists($className)) {
JError::raiseWarning(0, $className . '::' . $func . ' not found in file.');
return false;
}
} else {
JError::raiseWarning(0, $prefix . $file . ' not supported. File not found.');
return false;
}
}
if (is_callable(array($className, $func))) {
$temp = func_get_args();
array_shift($temp);
$args = array();
foreach ($temp as $k => $v) {
$args[] =& $temp[$k];
}
return call_user_func_array(array($className, $func), $args);
} else {
JError::raiseWarning(0, $className . '::' . $func . ' not supported.');
return false;
}
}
示例9: __construct
function __construct($config = array()) {
parent::__construct($config);
JHTML::addIncludePath(OSEMSC_F_HELPER);
// add detect
$detect = new Mobile_Detect();
//$this->isMobile = $detect->isMobile();
$this->isMobile = false;
$view = JRequest::getCmd('view');
if ($this->isMobile && !empty($view) && in_array($view, array('login', 'register', 'member'))) {
// Any mobile device.
$this->setLayout('mobile');
JRequest::setvar('tmpl', 'component');
oseHtml::loadTouchJs();
oseHTML::stylesheet('components/com_osemsc/assets/css/msc5mobile.css', '1.5');
} else {
$jversion = (JOOMLA16 == true) ? '1.6' : '1.5';
oseHTML::script('media/system/js/core.js', $jversion);
$this->loadViewJs();
}
}
示例10: Copyright
/*
# MOD_JVLATEST_NEWS - JV Latest News
# @version 3.x
# ------------------------------------------------------------------------
# author Open Source Code Solutions Co
# copyright Copyright (C) 2013 joomlavi.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL or later.
# Websites: http://www.joomlavi.com
# Technical Support: http://www.joomlavi.com/my-tickets.html
-------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$document = JFactory::getDocument();
$document->addStyleSheet(JURI::base() . 'modules/mod_jvlatest_news/tmpl/' . $jvtmpl . '/css/jvlatestnews.css');
JHTML::addIncludePath(JPATH_SITE . '/components/com_content/helpers');
JHTML::_('behavior.framework', true);
if (count($items)) {
if (!JRequest::getVar('jvlatestnews-ajax')) {
?>
<div id="jvlatestnews<?php
echo $module->id;
?>
" class="jvlatestnews <?php
echo $jvtmpl;
?>
">
<?php
if ($params->get('description') != '') {
?>
示例11: __construct
function __construct($config = array())
{
parent::__construct($config);
JHTML::addIncludePath(JPATH_COMPONENT . DS . 'libraries' . DS . 'html' . DS . 'helper');
}
示例12: define
// URLs
define ( 'KURL_COMPONENT', 'index.php?option=' . KUNENA_COMPONENT_NAME );
define ( 'KURL_SITE', JURI::Root () . KPATH_COMPONENT_RELATIVE . '/' );
define ( 'KURL_MEDIA', JURI::Root () . 'media/' . KUNENA_NAME . '/' );
// Register Joomla and Kunena autoloader
if (function_exists('__autoload')) spl_autoload_register('__autoload');
spl_autoload_register('KunenaAutoload');
// Give access to all Kunena tables
jimport('joomla.database.table');
JTable::addIncludePath(KPATH_ADMIN.'/libraries/tables');
// Give access to all JHTML functions
jimport('joomla.html.html');
JHTML::addIncludePath(KPATH_ADMIN.'/libraries/html/html');
/**
* Intelligent library importer.
*
* @param string A dot syntax path.
* @return boolean True on success
* @since 1.6
* @deprecated 2.0
*/
function kimport($path) {}
/**
* Kunena auto loader
*
* @param string $class Class to be registered (case sensitive)
示例13: defined
* @license GNU/GPL
*/
//--No direct access
defined('_JEXEC') or die('Resrtricted Access');
// DS has removed from J 3.0
if (!defined('DS')) {
define('DS', '/');
}
// Require the base controller
require_once JPATH_COMPONENT . '/controller.php';
jimport('joomla.application.component.model');
require_once JPATH_COMPONENT . '/models/model.php';
// Component Helper
jimport('joomla.application.component.helper');
//add Helperpath to JHTML
JHTML::addIncludePath(JPATH_COMPONENT . '/helpers');
//include Helper
require_once JPATH_COMPONENT . '/helpers/beallitasok.php';
//set the default view
$controller = JRequest::getWord('view', 'beallitasok');
//add submenu
BeallitasokHelper::addSubmenu($controller);
$ControllerConfig = array();
// Require specific controller if requested
if ($controller) {
$path = JPATH_COMPONENT . '/controllers/' . $controller . '.php';
$ControllerConfig = array('viewname' => strtolower($controller), 'mainmodel' => strtolower($controller), 'itemname' => ucfirst(strtolower($controller)));
if (file_exists($path)) {
require_once $path;
} else {
$controller = '';
示例14: __construct
public function __construct($subject, $config)
{
parent::__construct($subject, $config);
//If com_ninja don't exist, abort execution to prevent errors
if (!is_dir(JPATH_ADMINISTRATOR . '/components/com_ninja')) {
return;
}
//If the diagnose failed, FFS don't do anything!
if (!$this->_diagnose()) {
return;
}
//@TODO this is legacy, update your code to use the right identifiers
KFactory::map('lib.koowa.application', 'lib.joomla.application');
KFactory::map('lib.koowa.language', 'lib.joomla.language');
KFactory::map('lib.koowa.document', 'lib.joomla.document');
KFactory::map('lib.koowa.user', 'lib.joomla.user');
KFactory::map('lib.koowa.editor', 'lib.joomla.editor');
KFactory::map('lib.koowa.database', 'lib.koowa.database.adapter.mysqli');
/**
* Safety Extender compatability
*
* @TODO suggest patch for Nooku Framework's plgSystemKoowa after testing
*
* @author Margus Kaidja <abi@zone.ee>
*/
if (extension_loaded("safeex") && strpos("tmpl", ini_get("safeex.url_include_proto_whitelist")) === false) {
$s = ini_get("safeex.url_include_proto_whitelist");
ini_set("safeex.url_include_proto_whitelist", (strlen($s) ? $s . ',' : '') . 'tmpl');
}
//Override JModuleHelper if j!1.6.x
if (JVersion::isCompatible('1.6.0')) {
$override = JPATH_ADMINISTRATOR . '/components/com_ninja/overrides/modulehelper.php';
if (file_exists($override)) {
require_once $override;
}
}
$napiElement = JPATH_ADMINISTRATOR . '/components/com_ninja/elements/napi.php';
if (!class_exists('JElementNapi', false) && file_exists($napiElement)) {
require_once $napiElement;
}
$app = JFactory::getApplication();
if ($app->isSite()) {
return;
}
if (!is_dir(JPATH_ADMINISTRATOR . '/components/com_ninja')) {
return;
}
$path = KFactory::get('admin::com.ninja.helper.application')->getPath('com_xml');
if (!$path) {
return;
}
$xml = simplexml_load_file($path);
if (!class_exists('KRequest')) {
return;
}
$name = str_replace('com_', '', KRequest::get('get.option', 'cmd'));
if (!$xml['mootools']) {
return;
}
if (version_compare($xml['mootools'], '1.2', '<')) {
return;
}
if (JVersion::isCompatible('1.6.0')) {
KFactory::get('admin::com.ninja.helper.default')->js('/mootools12.js');
KFactory::get('admin::com.ninja.helper.default')->js('/moocompat.js');
} else {
JHTML::addIncludePath(JPATH_ROOT . '/administrator/components/com_ninja/html');
//Loading Mootools 1.2
if (class_exists('JHTMLBehavior')) {
return;
}
JHTML::_('behavior.framework');
}
}
示例15: defined
<?php
/**
* @version 0.0.1
* @package ARCNAAnimals
* @author Phil Snell
* @author mail phil@snellcode.com
* @link http://snellcode.com
* @copyright Copyright (C) 2010 Phil Snell - All rights reserved.
* @license GNU/GPL
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.view');
JHTML::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/helpers/html');
class ARCNAAnimalsViewAnimals extends JView
{
/**
/* displays the list of records
*/
function display($tpl = null)
{
// initialize variables
$user =& JFactory::getUser();
$uri =& JFactory::getURI();
$state =& $this->get('state');
$items =& $this->get('items');
$pagination =& $this->get('pagination');
// assign variables to template
$this->assignRef('state', $state);
$this->assignRef('items', $items);