当前位置: 首页>>代码示例>>PHP>>正文


PHP JFactory::getEditor方法代码示例

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


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

示例1: display

 /**
  * display method of Hello view
  * @return void
  **/
 function display($tpl = null)
 {
     $spiel =& $this->get('Data');
     $isNew = $spiel->id < 1;
     $text = $isNew ? JText::_('New') : JText::_('Edit');
     JToolBarHelper::title(JText::_('Spiel') . ': <small>[ ' . $text . ' ]</small>');
     JToolBarHelper::save();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'Close');
     }
     if ($spiel->idMannschaft1 == 0) {
         // setze Standard Mannschaft
         $spiel->idMannschaft1 = $this->getStandardMannschaftID();
     }
     if ($spiel->idMannschaft2 == 0) {
         // setze Standard Mannschaft
         $spiel->idMannschaft2 = $this->getStandardMannschaftID();
     }
     // Load the JEditor object
     $editor =& JFactory::getEditor();
     $this->assignRef('spiel', $spiel);
     $this->assignRef('mannschaft1', $this->__getMannschaftSelect($spiel->idMannschaft1, 1));
     $this->assignRef('mannschaft2', $this->__getMannschaftSelect($spiel->idMannschaft2, 2));
     $this->assignRef('editor', $editor);
     $this->assignRef('jsSpielerDaten', $this->__getJSSpielerDaten($spiel->id));
     $this->assignRef('spieltyp', $this->__getSpieltypSelect($spiel->idSpiel_typ));
     parent::display($tpl);
 }
开发者ID:ManniManfred,项目名称:JoomlaFussballManager,代码行数:35,代码来源:view.html.php

示例2: display

 function display($tpl = null)
 {
     $mainframe =& JFactory::getApplication();
     if ($mainframe->isSite()) {
         $params = $mainframe->getParams('com_rsticketspro');
         $this->assignRef('params', $params);
     }
     $this->assign('signature', RSTicketsProHelper::getSignature());
     $this->assignRef('editor', JFactory::getEditor());
     $this->assign('show_footer', RSTicketsProHelper::getConfig('rsticketspro_link'));
     $this->assign('footer', RSTicketsProHelper::getFooter());
     if (RSTicketsProHelper::isJ16() && $mainframe->isSite()) {
         // Description
         if ($params->get('menu-meta_description')) {
             $this->document->setDescription($params->get('menu-meta_description'));
         }
         // Keywords
         if ($params->get('menu-meta_keywords')) {
             $this->document->setMetadata('keywords', $params->get('menu-meta_keywords'));
         }
         // Robots
         if ($params->get('robots')) {
             $this->document->setMetadata('robots', $params->get('robots'));
         }
     }
     parent::display();
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:27,代码来源:view.html.php

示例3: getInput

 protected function getInput()
 {
     jimport('joomla.application.component.helper');
     $icagendaParams = JComponentHelper::getParams('com_icagenda');
     $Explode = explode('_', $this->name);
     $TypeName = $Explode[0] . ']';
     $replace = array("jform", "params", "[", "]");
     $name = str_replace($replace, "", $TypeName);
     $Type = JRequest::getVar('type');
     $Type_default = $name . '_default';
     $Type_article = $name . '_article';
     $Type_url = $name . '_url';
     $editor = JFactory::getEditor();
     $html = array();
     $html[] = '<div id="' . $Type_url . '"><fieldset class="span9 iCleft">';
     $html[] = '<input type="url" name="' . $this->name . '" value="' . $this->value . '" />';
     $html[] = '</fieldset></div>';
     if ($Type == '1') {
         $html[] = '<script type="text/javascript">';
         $html[] = 'document.getElementById("' . $Type_article . '").style.display = "block";';
         $html[] = 'document.getElementById("' . $Type_url . '").style.display = "none";';
         $html[] = '</script>';
     } elseif ($Type == '2') {
         $html[] = '<script type="text/javascript">';
         $html[] = 'document.getElementById("' . $Type_article . '").style.display = "none";';
         $html[] = 'document.getElementById("' . $Type_url . '").style.display = "block";';
         $html[] = '</script>';
     } else {
         $html[] = '<script type="text/javascript">';
         $html[] = 'document.getElementById("' . $Type_article . '").style.display = "none";';
         $html[] = 'document.getElementById("' . $Type_url . '").style.display = "none";';
         $html[] = '</script>';
     }
     return implode("\n", $html);
 }
开发者ID:richardgarcia7,项目名称:apc-softdev-gd121mi122-06,代码行数:35,代码来源:iclink_url.php

示例4: getInput

 /**
  * Method to get the field input markup.
  */
 protected function getInput()
 {
     $icName = $this->name;
     $icDefault = $this->default;
     $icValue = $this->value;
     if (strpos($icValue, '\\n') !== false) {
         $array_newline = array('\\n', '\\n');
         $icValue = str_replace($array_newline, '<br />', $icValue);
     }
     $get_period_string = JText::_('COM_ICAGENDA_REGISTRATION_EMAIL_USER_PERIOD_DEFAULT_BODY');
     $get_date_string = JText::_('COM_ICAGENDA_REGISTRATION_EMAIL_USER_DATE_DEFAULT_BODY');
     if ($icValue == 'COM_ICAGENDA_REGISTRATION_EMAIL_USER_PERIOD_DEFAULT_BODY') {
         $icBody = $get_period_string;
     } elseif ($icValue == 'COM_ICAGENDA_REGISTRATION_EMAIL_USER_DATE_DEFAULT_BODY') {
         $icBody = $get_date_string;
     } else {
         $icBody = $icValue;
     }
     $editor = JFactory::getEditor();
     $html = array();
     $html[] = '<div id="' . $this->name . '_ic_editor"><fieldset class="span9 iCleft">';
     $html[] = $editor->display($this->name, $icBody, "100%", "300", "300", "20", 1, null, null, null, array('mode' => 'advanced'));
     $html[] = '</fieldset></div>';
     return implode("\n", $html);
 }
开发者ID:richardgarcia7,项目名称:apc-softdev-gd121mi122-06,代码行数:28,代码来源:ic_editor.php

示例5: display

 public function display($tpl = null)
 {
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $buttons_plugin = JPluginHelper::getPlugin('editors-xtd');
     if ($buttons_plugin) {
     }
     $groupModel = JModelLegacy::getInstance('Groups', 'TZ_Portfolio_PlusModel', array('ignore_request' => true));
     $groupModel->setState('filter_order', 'name');
     $groupModel->setState('filter_order_Dir', 'ASC');
     $this->groups = $groupModel->getItems();
     $editor = JFactory::getEditor();
     $this->assign('editor', $editor);
     if ($this->item->id == 0) {
         $this->item->published = 'P';
     } else {
         if ($this->item->published == 1) {
             $this->item->published = 'P';
         } else {
             $this->item->published = 'U';
         }
     }
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:templaza,项目名称:tz_portfolio_plus,代码行数:25,代码来源:view.html.php

示例6: Mails

 function Mails()
 {
     $current_mail_type = JRequest::getVar('mail_type');
     $model = JModel::getInstance('Mailman', 'JTheFactoryModel');
     $rows = $model->getMailList();
     $current_mail = $rows[0];
     $options = array();
     foreach ($rows as $row) {
         $options[] = JHtml::_('select.option', $row->mail_type, JText::_(APP_PREFIX . '_mail_' . $row->mail_type));
         if ($row->mail_type == $current_mail_type) {
             $current_mail = $row;
         }
     }
     $select_html = JHtml::_('select.genericlist', $options, 'mail_type', "onchange='this.form.submit();'", 'value', 'text', $current_mail_type);
     $title = JText::_(APP_PREFIX . '_mail_' . $current_mail->mail_type);
     $help = JText::_(APP_PREFIX . '_mail_' . $current_mail->mail_type . '_help');
     $editor = JFactory::getEditor();
     $view = $this->getView('mails');
     $view->assignRef('mail_type', $current_mail_type);
     $view->assignRef('rows', $rows);
     $view->assignRef('current_mail', $current_mail);
     $view->assignRef('title', $title);
     $view->assignRef('help', $help);
     $view->assignRef('mailtype_select', $select_html);
     $view->assignRef('editor', $editor);
     $view->assign('shortcuts', $model->getShortcuts());
     $view->display('mail');
     return;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:29,代码来源:mailman.php

示例7: defaultTpl

 function defaultTpl($tpl = null)
 {
     $this->addToolbar();
     $editor = JFactory::getEditor();
     $this->assignRef('editor', $editor);
     parent::display($tpl);
 }
开发者ID:lautarodragan,项目名称:ideary,代码行数:7,代码来源:view.html.php

示例8: config

 function config()
 {
     jimport('joomla.html.editor');
     JHtml::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'htmlelements');
     $model = JModel::getInstance('Comission', 'J' . APP_PREFIX . 'PricingModel');
     $r = $model->getItemPrices($this->commissionType);
     JModel::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'thefactory' . DS . 'category' . DS . 'models');
     $catModel = JModel::getInstance('Category', 'JTheFactoryModel');
     $cattree = $catModel->getCategoryTree();
     $pricing = $model->loadPricingObject();
     $params = new JParameter($pricing->params);
     $editor = JFactory::getEditor();
     $viewMenu = $this->getView('menu');
     $viewMenu->display();
     $view = $this->getView('Config');
     $view->assign('default_price', $r->default_price);
     $view->assign('price_powerseller', $r->price_powerseller);
     $view->assign('price_verified', $r->price_verified);
     $view->assign('category_pricing_enabled', $r->category_pricing_enabled);
     $view->assign('category_pricing', $r->category_pricing);
     $view->assign('category_tree', $cattree);
     $view->assign('itemname', $this->itemname);
     $view->assign('editor', $editor);
     $view->assign('email_text', base64_decode($params->get('email_text')));
     $view->display();
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:26,代码来源:admin.php

示例9: display

    function display($tpl = null)
    {
        $text_name = $this->param1;
        // param1 is the text name, 'top_text' or 'bottom_text'
        if ($text_name == 'top_text') {
            FCP_Admin::make_title('COM_FLEXICONTACT_V_TOP_TEXT', $this->config_data, $this->config_count);
        } else {
            FCP_Admin::make_title('COM_FLEXICONTACT_V_BOTTOM_TEXT', $this->config_data, $this->config_count);
        }
        JToolBarHelper::apply();
        JToolBarHelper::save();
        JToolBarHelper::cancel();
        // setup the wysiwg editor
        $editor = JFactory::getEditor();
        ?>
	<form action="index.php" method="post" name="adminForm" id="adminForm" >
	<input type="hidden" name="option" value="<?php 
        echo LAFC_COMPONENT;
        ?>
" />
	<input type="hidden" name="controller" value="menu" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="view" value="config_text" />
	<input type="hidden" name="param1" value="<?php 
        echo $text_name;
        ?>
" />
	
	<?php 
        echo $editor->display($text_name, htmlspecialchars($this->config_data->config_data->{$text_name}, ENT_QUOTES), '700', '350', '60', '20', array('pagebreak', 'readmore'));
        ?>
	</form>
	<?php 
    }
开发者ID:vstorm83,项目名称:propertease,代码行数:34,代码来源:view.html.php

示例10: explode

 /**
  * Get the editor object.
  *
  * @return	object
  */
 protected function &_getEditor()
 {
     if (empty($this->_editor)) {
         // editor attribute can be in the form of:
         // editor="desired|alternative"
         if ($editorName = trim((string) $this->_element->attributes()->editor)) {
             $parts = explode('|', $editorName);
             $db =& JFactory::getDbo();
             $query = 'SELECT element' . ' FROM #__extensions' . ' WHERE element	= ' . $db->Quote($parts[0]) . '  AND folder = ' . $db->Quote('editors') . '  AND enabled = 1';
             $db->setQuery($query);
             if ($db->loadResult()) {
                 $editorName = trim($parts[0]);
             } else {
                 if (isset($parts[1])) {
                     $editorName = trim($parts[1]);
                 } else {
                     $editorName = '';
                 }
             }
             $this->_element->attributes()->editor = $editorName;
         }
         $this->_editor = JFactory::getEditor($editorName ? $editorName : null);
     }
     return $this->_editor;
 }
开发者ID:joebushi,项目名称:joomla,代码行数:30,代码来源:editor.php

示例11: _render

    /**
     * Renders the Joomla-HTML widget.
     * This widget is too specific to render with One_Script and should not be rendered otherwise,
     * hence this does not use the One_Form_Container_Abstract::parse() function
     *
     * @param One_Model $model
     * @param One_Dom $d
     * @access protected
     */
    protected function _render($model, One_Dom $d)
    {
        $editor = JFactory::getEditor();
        JHTML::_('behavior.tooltip');
        $width = $this->getParameter('width') ? $this->getParameter('width') : '100%';
        $height = $this->getParameter('height') ? $this->getParameter('height') : '550';
        //TODO: clean this up, should add a 'save editor' part for each control, multiple controls do not work now
        ob_start();
        ?>

		<script language="javascript" type="text/javascript">
		<!--
		function submitbutton(pressbutton)
		{
			var form = document.adminForm;

			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			//save
				<?php 
        echo $editor->save($this->getFormName());
        ?>
				submitform( pressbutton );
		}
		//-->
		</script>

		<?php 
        echo preg_replace('/<div class="button2-left"><div class="translate">(.*?)(<\\/div><\\/div>)/is', '', $editor->display($this->getFormName(), $this->getValue($model), $width, $height, '75', '20'));
        $edit = ob_get_clean();
        if (!is_null($this->getCfg('buttons')) && in_array($this->getCfg('buttons'), array('no', '0', 'false'))) {
            $edit = preg_replace('/<div class="button2-left">(.*?)(<\\/div><\\/div>)/is', '', $edit);
        }
        JHTML::_('behavior.modal');
        JHTML::_('behavior.modal', 'a.modal-button');
        $dom = One_Repository::createDom();
        $dom->add('<span class="OneWidget clearfix">');
        // should we show a label?
        if (!is_null($this->getLabel()) && !$this->getCfg('noLabel')) {
            $label = '<label class="OneFieldLabel" for="' . $this->getID() . '">' . $this->getLabel() . ($this->isRequired() ? ' *' : '') . '</label>' . "\n";
        }
        // start with label?
        if ($label && !$this->getCfg('lblLast')) {
            $dom->add($label);
        }
        $app = JFactory::getApplication();
        $jDoc = JFactory::getDocument();
        $dom->add('<div class="OneWidgetEditor">');
        $dom->add($edit);
        $dom->add('</div>');
        // end with label?
        if ($label && $this->getCfg('lblLast')) {
            $dom->add($label);
        }
        $dom->add('</span>');
        $d->addDom($dom);
    }
开发者ID:pdelbar,项目名称:onethree,代码行数:69,代码来源:html_tbd.php

示例12: _displayForm

 /**
  *  Displays the form
  * @param string $tpl   
  */
 public function _displayForm($tpl)
 {
     JHtml::_('behavior.formvalidation');
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $user = JFactory::getUser();
     $form = $this->get('Form');
     $lists = array();
     $editor = JFactory::getEditor();
     //get the item
     $item = $this->get('item');
     //Get Versions
     $model = $this->getModel();
     $archive = strtolower($item->name);
     $item->files = $model->getFiles($archive);
     if (!version_compare(JVERSION, '3.0', 'lt')) {
         $form->bind(JArrayHelper::fromObject($item));
     } else {
         $form->bind($item);
     }
     $isNew = $item->id < 1;
     // Edit or Create?
     if ($isNew) {
         // initialise new record
         $item->published = 1;
     }
     $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $item->published);
     $this->form = $form;
     $this->lists = $lists;
     $this->item = $item;
     $this->isNew = $isNew;
     parent::display($tpl);
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:37,代码来源:view.html.php

示例13: display

 /**
  * Creates the output for venue submissions
  *
  * @since 0.5
  * @param int $tpl
  */
 function display($tpl = null)
 {
     $app =& JFactory::getApplication();
     $user =& JFactory::getUser();
     if (!$user->id) {
         $app->redirect(JRoute::_($_SERVER["HTTP_REFERER"]), JText::_('Please login to be able to submit venues'), 'error');
     }
     $editor =& JFactory::getEditor();
     $doc =& JFactory::getDocument();
     $elsettings =& ELHelper::config();
     // Get requests
     $id = JRequest::getInt('id');
     //Get Data from the model
     $row = $this->Get('Venue');
     JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'locdescription');
     JHTML::_('behavior.formvalidation');
     JHTML::_('behavior.tooltip');
     //add css file
     $doc->addStyleSheet($this->baseurl . '/components/com_eventlist/assets/css/eventlist.css');
     $doc->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #eventlist dd { height: 1%; }</style><![endif]-->');
     // Get the menu object of the active menu item
     $menu =& JSite::getMenu();
     $item = $menu->getActive();
     $params =& $app->getParams('com_eventlist');
     $id ? $title = JText::_('EDIT VENUE') : ($title = JText::_('ADD VENUE'));
     //pathway
     $pathway =& $app->getPathWay();
     $pathway->setItemName(1, $item->name);
     $pathway->addItem($title, '');
     //Set Title
     $doc->setTitle($title);
     //editor user
     $editoruser = ELUser::editoruser();
     //transform <br /> and <br> back to \r\n for non editorusers
     if (!$editoruser) {
         $row->locdescription = ELHelper::br2break($row->locdescription);
     }
     //Get image
     $limage = ELImage::flyercreator($row->locimage);
     //Set the info image
     $infoimage = JHTML::_('image', 'components/com_eventlist/assets/images/icon-16-hint.png', JText::_('NOTES'));
     // country list
     $countries = array();
     $countries[] = JHTML::_('select.option', '', JText::_('Select country'));
     $countries = array_merge($countries, ELHelper::getCountryOptions());
     $lists['countries'] = JHTML::_('select.genericlist', $countries, 'country', 'class="inputbox"', 'value', 'text', $row->country);
     unset($countries);
     $this->assignRef('row', $row);
     $this->assignRef('editor', $editor);
     $this->assignRef('editoruser', $editoruser);
     $this->assignRef('limage', $limage);
     $this->assignRef('infoimage', $infoimage);
     $this->assignRef('elsettings', $elsettings);
     $this->assignRef('item', $item);
     $this->assignRef('params', $params);
     $this->assignRef('lists', $lists);
     $this->assignRef('title', $title);
     $this->assignRef('mode', JRequest::getVar('mode', ''));
     parent::display($tpl);
 }
开发者ID:julienV,项目名称:testrepo,代码行数:66,代码来源:view.html.php

示例14: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     $editor = JFactory::getEditor();
     /* @var $editor JEditor */
     $code = $editor->display($control_name . '[' . $name . ']', $value, 800, 500, 1, 1);
     return $code;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:7,代码来源:editor.php

示例15: display

 function display($tpl = null)
 {
     global $option;
     if ($this->getLayout() == 'form') {
         $this->_getFormToolBar();
         $item = $this->get('item');
         $directory = JPATH_SITE . DS . 'images' . DS . 'stories';
         $lists = array();
         JHTML::_('behavior.modal');
         $lists['image'] = '<div class="button2-left"><div class="image">';
         $lists['image'] .= "<a rel=\"{handler: 'iframe', size: {x: 570, y: 400}}\" href=\"" . JURI::base() . "index.php?option=com_media&amp;view=images&amp;tmpl=component&amp;e_name=image&folder=" . $directory . "\" title=\"" . JText::_('Image') . "\" class=\"modal\">" . JText::_('Image') . "</a>";
         $lists['image'] .= '</div></div>';
         $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $item->published);
         $lists['promote'] = JHTML::_('select.booleanlist', 'is_promotion', 'class="inputbox"', $item->is_promotion);
         $lists['catid'] = JHTML::_('list.category', 'catid', $option, intval($item->catid));
         $editor =& JFactory::getEditor();
         $this->assignRef('lists', $lists);
         $this->assignRef('editor', $editor);
         $this->assignRef('item', $item);
     } else {
         $this->_getListToolBar();
         // Get data from the model
         $items =& $this->get('items');
         $this->assignRef('items', $items);
     }
     parent::display($tpl);
 }
开发者ID:dalinhuang,项目名称:joomla-goods-china,代码行数:27,代码来源:view.html.php


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