本文整理汇总了PHP中JApplication::addCustomHeadTag方法的典型用法代码示例。如果您正苦于以下问题:PHP JApplication::addCustomHeadTag方法的具体用法?PHP JApplication::addCustomHeadTag怎么用?PHP JApplication::addCustomHeadTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JApplication
的用法示例。
在下文中一共展示了JApplication::addCustomHeadTag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
* @copyright Copyright (C) 2008 Netdream - Como,Italy. All rights reserved.
* @license GNU/GPLv2
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
$db =& JFactory::getDBO();
$query = "SELECT element,name" . " FROM #__plugins" . " WHERE folder = 'editors'" . " AND published = 1";
$db->setQuery($query);
$rows = $db->loadObjectList();
$user =& JFactory::getUser();
$script = '
<script type="text/javascript">' . "\r\n\twindow.addEvent('domready', function(){\r\n\t var nd_edsw=new NDEditorSwitchPlugin({submiturl: '" . JURI::base() . "index.php?option=com_ndeditorswitch'});\r\n\t});" . '</script>
<script type="text/javascript" src="' . JURI::base() . 'components/com_ndeditorswitch/js/ndeditorswitchplugin.js"></script>';
if (!isset($addScriptNDEditorSwitchPlugin)) {
$addScriptNDEditorSwitchPlugin = 1;
JApplication::addCustomHeadTag($script);
}
?>
<div id="ndEditorFormBox" style="display:inline;">
<form action="index.php?option=com_ndeditorswitch" method="post" id="ndEditorForm" name="ndEditorForm" style="display:inline;">
<select name="editor" id="ndeditor_assigned" class="inputbox" size="1" style="background-color:#ffffdd;margin-top:3px;margin-right:3px;">
<option value="">- <?php
echo JText::_('CHANGE_EDITOR');
?>
-</option>
<?php
foreach ($rows as $row) {
?>
<option value="<?php
echo htmlspecialchars($row->element, ENT_QUOTES, 'UTF-8');
?>