本文整理汇总了PHP中JToolBarHelper::media_manager方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolBarHelper::media_manager方法的具体用法?PHP JToolBarHelper::media_manager怎么用?PHP JToolBarHelper::media_manager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolBarHelper
的用法示例。
在下文中一共展示了JToolBarHelper::media_manager方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _edit
function _edit()
{
JToolBarHelper::save('save', JTEXT::_('SAVE'));
JToolBarHelper::apply('apply', JTEXT::_('APPLY'));
JToolBarHelper::cancel('cancelIcon', JTEXT::_('CANCEL'));
JToolBarHelper::media_manager('', JTEXT::_('MEDIAMGR'));
JToolBarHelper::help('screen.cquickicons.config.html', true);
}
示例2: display
function display($tpl = null)
{
global $mainframe;
//Load pane behavior
jimport('joomla.html.pane');
//initialise variables
$editor =& JFactory::getEditor();
$document =& JFactory::getDocument();
$user =& JFactory::getUser();
$pane =& JPane::getInstance('sliders');
//get vars
$cid = JRequest::getVar('cid');
//add css to document
$document->addStyleSheet('components/com_eventlist/assets/css/eventlistbackend.css');
//create the toolbar
if ($cid) {
JToolBarHelper::title(JText::_('EDIT CATEGORY'), 'categoriesedit');
} else {
JToolBarHelper::title(JText::_('ADD CATEGORY'), 'categoriesedit');
//set the submenu
JSubMenuHelper::addEntry(JText::_('EVENTLIST'), 'index.php?option=com_eventlist');
JSubMenuHelper::addEntry(JText::_('EVENTS'), 'index.php?option=com_eventlist&view=events');
JSubMenuHelper::addEntry(JText::_('VENUES'), 'index.php?option=com_eventlist&view=venues');
JSubMenuHelper::addEntry(JText::_('CATEGORIES'), 'index.php?option=com_eventlist&view=categories');
JSubMenuHelper::addEntry(JText::_('ARCHIVE'), 'index.php?option=com_eventlist&view=archive');
JSubMenuHelper::addEntry(JText::_('GROUPS'), 'index.php?option=com_eventlist&view=groups');
JSubMenuHelper::addEntry(JText::_('HELP'), 'index.php?option=com_eventlist&view=help');
if ($user->get('gid') > 24) {
JSubMenuHelper::addEntry(JText::_('SETTINGS'), 'index.php?option=com_eventlist&controller=settings&task=edit');
}
}
JToolBarHelper::apply();
JToolBarHelper::spacer();
JToolBarHelper::save();
JToolBarHelper::spacer();
JToolBarHelper::media_manager();
JToolBarHelper::spacer();
JToolBarHelper::cancel();
JToolBarHelper::spacer();
JToolBarHelper::help('el.editcategories', true);
//Get data from the model
$model =& $this->getModel();
$row =& $this->get('Data');
$groups =& $this->get('Groups');
// fail if checked out not by 'me'
if ($row->id) {
if ($model->isCheckedOut($user->get('id'))) {
JError::raiseWarning('SOME_ERROR_CODE', $row->catname . ' ' . JText::_('EDITED BY ANOTHER ADMIN'));
$mainframe->redirect('index.php?option=com_eventlist&view=categories');
}
}
//clean data
JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'catdescription');
//build selectlists
$Lists = array();
$javascript = "onchange=\"javascript:if (document.forms[0].image.options[selectedIndex].value!='') {document.imagelib.src='../images/stories/' + document.forms[0].image.options[selectedIndex].value} else {document.imagelib.src='../images/blank.png'}\"";
$Lists['imagelist'] = JHTML::_('list.images', 'image', $row->image, $javascript, '/images/stories/');
$Lists['access'] = JHTML::_('list.accesslevel', $row);
//build grouplist
$grouplist = array();
$grouplist[] = JHTML::_('select.option', '0', JText::_('NO GROUP'));
$grouplist = array_merge($grouplist, $groups);
$Lists['groups'] = JHTML::_('select.genericlist', $grouplist, 'groupid', 'size="1" class="inputbox"', 'value', 'text', $row->groupid);
//assign data to template
$this->assignRef('Lists', $Lists);
$this->assignRef('row', $row);
$this->assignRef('editor', $editor);
$this->assignRef('pane', $pane);
parent::display($tpl);
}
示例3: display
function display($tpl = null)
{
$mainframe =& JFactory::getApplication();
//Load pane behavior
jimport('joomla.html.pane');
//initialise variables
$editor =& JFactory::getEditor();
$document =& JFactory::getDocument();
$user =& JFactory::getUser();
$pane =& JPane::getInstance('sliders');
$tabs =& JPane::getInstance('tabs');
//get vars
$cid = JRequest::getVar('cid');
$url = JURI::root();
$document->setTitle(JText::_('COM_REDEVENT_PAGETITLE_EDITCATEGORY'));
//add css to document
$document->addStyleSheet($url . '/administrator/components/com_redevent/assets/css/redeventbackend.css');
$document->addScript($url . '/components/com_redevent/assets/js/attachments.js');
$document->addScriptDeclaration('var removemsg = "' . JText::_('COM_REDEVENT_ATTACHMENT_CONFIRM_MSG') . '";');
// js color picker
$document->addStyleSheet($url . '/administrator/components/com_redevent/assets/css/colorpicker.css');
$document->addScript($url . '/administrator/components/com_redevent/assets/js/colorpicker.js');
//create the toolbar
if ($cid) {
JToolBarHelper::title(JText::_('COM_REDEVENT_EDIT_CATEGORY'), 'categoriesedit');
} else {
JToolBarHelper::title(JText::_('COM_REDEVENT_ADD_CATEGORY'), 'categoriesedit');
//set the submenu
JSubMenuHelper::addEntry(JText::_('COM_REDEVENT'), 'index.php?option=com_redevent');
JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_EVENTS'), 'index.php?option=com_redevent&view=events');
JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_VENUES'), 'index.php?option=com_redevent&view=venues');
JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_CATEGORIES'), 'index.php?option=com_redevent&view=categories');
JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_ARCHIVESCREEN'), 'index.php?option=com_redevent&view=archive');
JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_GROUPS'), 'index.php?option=com_redevent&view=groups');
JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_HELP'), 'index.php?option=com_redevent&view=help');
}
JToolBarHelper::apply();
JToolBarHelper::spacer();
JToolBarHelper::save();
JToolBarHelper::spacer();
JToolBarHelper::media_manager();
JToolBarHelper::spacer();
JToolBarHelper::cancel();
JToolBarHelper::spacer();
//JToolBarHelper::help( 'el.editcategories', true );
//Get data from the model
$model =& $this->getModel();
$row =& $this->get('Data');
$form =& $this->get('Form');
$groups =& $this->get('Groups');
// fail if checked out not by 'me'
if ($row->id) {
if ($model->isCheckedOut($user->get('id'))) {
JError::raiseWarning('REDEVENT_GENERIC_ERROR', $row->catname . ' ' . JText::_('COM_REDEVENT_EDITED_BY_ANOTHER_ADMIN'));
$mainframe->redirect('index.php?option=com_redevent&view=categories');
}
}
//clean data
JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'catdescription');
/* Initiate the Lists array */
$lists = array();
/* Build a select list for categories */
$lists['categories'] = $this->get('Categories');
//build selectlists
$lists['access'] = JHTML::_('list.accesslevel', $row);
//build grouplist
$grouplist = array();
$grouplist[] = JHTML::_('select.option', '0', JText::_('COM_REDEVENT_NO_GROUP'));
$grouplist = array_merge($grouplist, $groups);
$lists['groups'] = JHTML::_('select.genericlist', $grouplist, 'groupid', 'size="1" class="inputbox"', 'value', 'text', $row->groupid);
$lists['access'] = JHTML::_('list.accesslevel', $row);
//assign data to template
$this->assignRef('lists', $lists);
$this->assignRef('row', $row);
$this->assignRef('form', $form);
$this->assignRef('editor', $editor);
$this->assignRef('pane', $pane);
$this->assignRef('tabs', $tabs);
$this->assignRef('access', redEVENTHelper::getAccesslevelOptions());
JHTML::_('behavior.tooltip');
parent::display($tpl);
}
示例4: defined
<?php
defined('_JEXEC') or die('Restricted access');
JToolBarHelper::title(JText::_($pagetitle), 'addedit.png');
JToolBarHelper::save();
JToolBarHelper::media_manager();
JToolBarHelper::back();
$editor =& JFactory::getEditor();
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
if ( form.name.value == '' ){
alert("<?php
echo JText::_('Project must have a title', true);
?>
");
} else {
<?php
echo $editor->save('details');
?>
submitform(pressbutton);
}
}
</script>