/** * 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); }
/** * Creates the output for venue submissions * * @since 0.5 * @param int $tpl */ function display($tpl = null) { global $mainframe; $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 =& $mainframe->getParams('com_eventlist'); $id ? $title = JText::_('EDIT VENUE') : ($title = JText::_('ADD VENUE')); //pathway $pathway =& $mainframe->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')); $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); parent::display($tpl); }
/** * Creates the output for event submissions * * @since 0.4 * */ function display($tpl = null) { global $mainframe; if ($this->getLayout() == 'selectvenue') { $this->_displayselectvenue($tpl); return; } // Initialize variables $editor =& JFactory::getEditor(); $doc =& JFactory::getDocument(); $elsettings =& ELHelper::config(); //Get Data from the model $row = $this->Get('Event'); $categories = $this->Get('Categories'); //Get requests $id = JRequest::getInt('id'); //Clean output JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'datdescription'); JHTML::_('behavior.formvalidation'); JHTML::_('behavior.tooltip'); JHTML::_('behavior.modal', 'a.modal'); //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]-->'); //Set page title $id ? $title = JText::_('EDIT EVENT') : ($title = JText::_('ADD EVENT')); $doc->setTitle($title); // Get the menu object of the active menu item $menu =& JSite::getMenu(); $item = $menu->getActive(); $params =& $mainframe->getParams('com_eventlist'); //pathway $pathway =& $mainframe->getPathWay(); $pathway->setItemName(1, $item->name); $pathway->addItem($title, ''); //Has the user access to the editor and the add venue screen $editoruser = ELUser::editoruser(); $delloclink = ELUser::validate_user($elsettings->locdelrec, $elsettings->deliverlocsyes); //transform <br /> and <br> back to \r\n for non editorusers if (!$editoruser) { $row->datdescription = ELHelper::br2break($row->datdescription); } //Get image information $dimage = ELImage::flyercreator($row->datimage, 'event'); //Set the info image $infoimage = JHTML::_('image', 'components/com_eventlist/assets/images/icon-16-hint.png', JText::_('NOTES')); //Create the stuff required for the venueselect functionality $url = $mainframe->isAdmin() ? $mainframe->getSiteURL() : JURI::base(); $js = "\r\n\t\tfunction elSelectVenue(id, venue) {\r\n\t\t\tdocument.getElementById('a_id').value = id;\r\n\t\t\tdocument.getElementById('a_name').value = venue;\r\n\t\t\tdocument.getElementById('sbox-window').close();\r\n\t\t}"; $doc->addScriptDeclaration($js); // include the recurrence script $doc->addScript($url . 'components/com_eventlist/assets/js/recurrence.js'); // include the unlimited script $doc->addScript($url . 'components/com_eventlist/assets/js/unlimited.js'); $this->assignRef('row', $row); $this->assignRef('categories', $categories); $this->assignRef('editor', $editor); $this->assignRef('dimage', $dimage); $this->assignRef('infoimage', $infoimage); $this->assignRef('delloclink', $delloclink); $this->assignRef('editoruser', $editoruser); $this->assignRef('elsettings', $elsettings); $this->assignRef('item', $item); $this->assignRef('params', $params); parent::display($tpl); }
/** * Creates the output for event submissions * * @since 0.4 * */ function display($tpl = null) { $app =& JFactory::getApplication(); $session =& JFactory::getSession(); $user =& JFactory::getUser(); if (!$user->id) { $app->redirect(JRoute::_($_SERVER["HTTP_REFERER"]), JText::_('Please login to be able to submit events'), 'error'); } if ($this->getLayout() == 'choosevenue') { $this->_displaychoosevenue($tpl); return; } // Initialize variables $editor =& JFactory::getEditor(); $doc =& JFactory::getDocument(); $elsettings =& ELHelper::config(); //Get Data from the model $row = $this->get('Event'); //Cause of group limits we can't use class here to build the categories tree $categories = $this->get('Categories'); //sticky form categorie data if ($session->has('eventform', 'com_eventlist')) { $eventform = $session->get('eventform', 0, 'com_eventlist'); $selectedcats = $eventform['cid']; } else { $selectedcats =& $this->get('Catsselected'); } //build selectlists $categories = eventlist_cats::buildcatselect($categories, 'cid[]', $selectedcats, 0, 'multiple="multiple" size="8 class="inputbox required validate-cid"'); //Get requests $id = JRequest::getInt('id'); //Clean output JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'datdescription'); JHTML::_('behavior.formvalidation'); JHTML::_('behavior.tooltip'); JHTML::_('behavior.modal', 'a.modal'); //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]-->'); //Set page title $id ? $title = JText::_('EDIT EVENT') : ($title = JText::_('ADD EVENT')); $doc->setTitle($title); // Get the menu object of the active menu item $menu =& JSite::getMenu(); $item = $menu->getActive(); $params =& $app->getParams('com_eventlist'); //pathway $pathway =& $app->getPathWay(); $pathway->setItemName(1, $item->name); $pathway->addItem($title, ''); //Has the user access to the editor and the add venue screen $editoruser = ELUser::editoruser(); $delloclink = ELUser::validate_user($elsettings->locdelrec, $elsettings->deliverlocsyes); //transform <br /> and <br> back to \r\n for non editorusers if (!$editoruser) { $row->datdescription = ELHelper::br2break($row->datdescription); } //Get image information $dimage = ELImage::flyercreator($row->datimage, 'event'); //Set the info image $infoimage = JHTML::_('image', 'components/com_eventlist/assets/images/icon-16-hint.png', JText::_('NOTES')); //Create the stuff required for the venueselect functionality $url = $app->isAdmin() ? $app->getSiteURL() : JURI::base(); $js = "\n\t\tfunction elSelectVenue(id, venue) {\n\t\t\tdocument.getElementById('a_id').value = id;\n\t\t\tdocument.getElementById('a_name').value = venue;\n\t\t\tdocument.getElementById('sbox-window').close();\n\t\t}\n\t\t\n\t\tfunction closeAdd() {\n\t\t\tdocument.getElementById('sbox-window').close(); \n \t}\n \t"; $doc->addScriptDeclaration($js); // include the recurrence script $doc->addScript($url . 'components/com_eventlist/assets/js/recurrence.js'); // include the unlimited script $doc->addScript($url . 'components/com_eventlist/assets/js/unlimited.js'); $lists = array(); // recurrence type $rec_type = array(); $rec_type[] = JHTML::_('select.option', 0, JText::_('NOTHING')); $rec_type[] = JHTML::_('select.option', 1, JText::_('DAYLY')); $rec_type[] = JHTML::_('select.option', 2, JText::_('WEEKLY')); $rec_type[] = JHTML::_('select.option', 3, JText::_('MONTHLY')); $rec_type[] = JHTML::_('select.option', 4, JText::_('WEEKDAY')); $lists['recurrence_type'] = JHTML::_('select.genericlist', $rec_type, 'recurrence_type', '', 'value', 'text', $row->recurrence_type); //if only owned events are allowed if ($elsettings->ownedvenuesonly) { $venues =& $this->get('UserVenues'); //build list $venuelist = array(); $venuelist[] = JHTML::_('select.option', '0', JText::_('NO VENUE')); $venuelist = array_merge($venuelist, $venues); $lists['venueselect'] = JHTML::_('select.genericlist', $venuelist, 'locid', 'size="1" class="inputbox"', 'value', 'text', $row->locid); } $this->assignRef('row', $row); $this->assignRef('categories', $categories); $this->assignRef('editor', $editor); $this->assignRef('dimage', $dimage); $this->assignRef('infoimage', $infoimage); $this->assignRef('delloclink', $delloclink); $this->assignRef('editoruser', $editoruser); $this->assignRef('elsettings', $elsettings); $this->assignRef('item', $item); $this->assignRef('params', $params); $this->assignRef('lists', $lists); parent::display($tpl); }