} elseif ($this->art == 2) { $linksbild = MatukioHelperUtilsBasic::getComponentImagePath() . "2801.png"; $funktion = array(JTEXT::_('COM_MATUKIO_EDIT_EVENT'), 9); if ($row->publisher == $my->id) { $zusimage = MatukioHelperUtilsBasic::getComponentImagePath() . "2607.png"; } } if ($my->id == 0) { $zusimage = ""; } if ($row->cancelled == 1) { $linksbild = MatukioHelperUtilsBasic::getComponentImagePath() . "2604.png"; $zusimage = MatukioHelperUtilsBasic::getComponentImagePath() . "2200.png"; } if ($row->image != "" and MatukioHelperSettings::getSettings('event_image', 1) == 1) { $linksbild = MatukioHelperUtilsBasic::getEventImagePath(1) . $row->image; $zusbild = 1; } $htxt = "<div style=\"position:relative;top:0px;left:0px;\"><a title=\"" . $funktion[0] . "\" href=\"" . $link . "\">\r\n <img src=\"" . $linksbild . "\" border=\"0\">"; if ($zusbild == 1 and $zusimage != "" and MatukioHelperSettings::getSettings('event_image', 1) > 0) { $htxt .= "<div style=\"position:absolute;top:4px;left:4px;\"><img src=\"" . $zusimage . "\"></div>"; } $htxt .= "</a></div>"; $html .= MatukioHelperUtilsEvents::getTableCell($htxt, 'd', 'l', '', "sem_row"); // Gebuehren anzeigen $htxt = ""; if ($row->fees > 0) { $gebuehr = MatukioHelperUtilsEvents::getFormatedCurrency($row->fees); $klasse = "sem_fees"; if ($this->art == 1 and $buchopt[0] == 2) { if (count($buchopt[2]) > 0) {
/** * Gets the upcoming events * * @param object $events - The events * @param object $user - The user * * @return string - The html code */ public static function getUpcomingEventsHTML($events, $user) { JHTML::_('stylesheet', 'media/com_matukio/css/upcoming.css'); $html = ""; if (count($events)) { $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $params = JComponentHelper::getParams('com_matukio'); foreach ($events as $event) { $buchopt = MatukioHelperUtilsEvents::getEventBookableArray(0, $event, $user->id); // Link $eventid_l = $event->id . ':' . JFilterOutput::stringURLSafe($event->title); $catid_l = $event->catid . ':' . JFilterOutput::stringURLSafe(MatukioHelperCategories::getCategoryAlias($event->catid)); $link = JRoute::_(MatukioHelperRoute::getEventRoute($eventid_l, $catid_l), false); // Event image -- TODO Add / Check for category image $linksbild = MatukioHelperUtilsBasic::getComponentImagePath() . "2601.png"; if ($event->image != "" and MatukioHelperSettings::getSettings('event_image', 1) == 1) { $linksbild = MatukioHelperUtilsBasic::getEventImagePath(1) . $event->image; } $hot = $event->hot_event ? " " : ""; $top = $event->top_event ? " mat_top_event" : ""; // Starting Row $html .= '<div class="mat_single_event' . $hot . $top . '">'; $html .= ' <div class="mat_event_header">'; $html .= ' <div class="mat_event_header_inner">'; $html .= ' <div class="mat_event_header_line">'; $html .= ' <div class="mat_event_image">'; $html .= ' <img src="' . $linksbild . '" alt="' . $event->title . '" align="absmiddle" />'; $html .= ' </div>'; $html .= ' <div class="mat_event_title">'; $html .= ' <h2><a href="' . $link . '" title="' . $event->title . '">' . $event->title . '</a></h2>'; $html .= ' </div>'; $html .= ' </div>'; $html .= ' <div class="mat_event_location">'; $begin = JHTML::_('date', $event->begin, MatukioHelperSettings::getSettings('date_format', 'd-m-Y, H:i')); $location = $event->place; $locobj = null; if ($event->place_id > 0) { $locobj = MatukioHelperUtilsEvents::getLocation($event->place_id); $placelink = JRoute::_("index.php?option=com_matukio&view=location&id=" . $locobj->id . ":" . JFilterOutput::stringURLSafe($locobj->title)); $location = '<a href="' . $placelink . '">' . $locobj->location . '</a>'; } if (MatukioHelperSettings::getSettings('show_timezone', '1')) { $begin .= " (GMT " . JHTML::_('date', $event->booked, 'P') . ")"; } if ($event->webinar == 1) { $locimg = MatukioHelperUtilsBasic::getComponentImagePath() . "webinar.png"; $html .= '<h4><img src="' . $locimg . '" title="' . JText::_("COM_MATUKIO_WEBINAR") . '" style="width: 22px; vertical-align:middle" /> ' . $location . " " . JText::_("COM_MATUKIO_AT") . " " . $begin . '</h4>'; } else { // TODO add map link $locimg = MatukioHelperUtilsBasic::getComponentImagePath() . "home.png"; $html .= '<h4><img src="' . $locimg . '" title="' . JText::_("COM_MATUKIO_FIELDS_CITY") . '" style="width: 22px; vertical-align:middle" /> ' . $location . " " . JText::_("COM_MATUKIO_AT") . " " . $begin . '</h4>'; } $html .= ' </div>'; $html .= ' </div>'; $html .= ' </div>'; $html .= ' <div class="mat_event_description">'; $html .= $event->shortdesc; $html .= '</div>'; $html .= ' <div class="mat_event_footer">'; $html .= ' <div class="mat_event_footer_inner">'; $html .= ' <div class="mat_event_infoline">'; $catlink = JRoute::_("index.php?option=com_matukio&view=eventlist&art=0&catid=" . $event->catid . ":" . JFilterOutput::stringURLSafe($event->category)); $html .= '<a href="' . $catlink . '">' . JTEXT::_($event->category) . '</a>'; // Infoline $gebucht = MatukioHelperUtilsEvents::calculateBookedPlaces($event); if (MatukioHelperSettings::getSettings('event_showinfoline', 1) == 1) { $html .= " | "; // Veranstaltungsnummer anzeigen if ($event->semnum != "") { $html .= JTEXT::_('COM_MATUKIO_NUMBER') . ": " . $event->semnum . " | "; } $html .= JTEXT::_('COM_MATUKIO_BOOKABLE') . ": " . $buchopt[4]; } // Seminarleiter anzeigen if ($event->teacher != "") { $html .= " | " . $event->teacher; } // Fees if ($event->fees > 0) { $html .= " | "; $gebuehr = MatukioHelperUtilsEvents::getFormatedCurrency($event->fees); $currency = MatukioHelperSettings::getSettings('currency_symbol', '$'); if ($currency == '€') { $html .= JTEXT::_('COM_MATUKIO_FEES') . ': ' . $gebuehr . " " . $currency; } else { $html .= JTEXT::_('COM_MATUKIO_FEES') . ': ' . $currency . " " . $gebuehr; } } $html .= '</div>'; $html .= ' <div class="mat_event_footer_buttons" align="right">'; // Detail Link $html .= " <a title=\"" . $event->title . "\" href=\"" . $link . "\">" . "<span class=\"mat_button\"><img src=\"" . MatukioHelperUtilsBasic::getComponentImagePath() . "0012.png\" border=\"0\" align=\"absmiddle\"> " . JTEXT::_('COM_MATUKIO_EVENT_DETAILS') . "</span></a> "; // Booking Link if (($user->id != 0 || MatukioHelperSettings::getSettings('booking_unregistered', 1) == 1) && MatukioHelperSettings::getSettings('oldbookingform', 0) != 1) { if ($event->nrbooked > 0) { $bookinglink = JRoute::_("index.php?option=com_matukio&view=bookevent&cid=" . $event->id . ":" . JFilterOutput::stringURLSafe($event->title)); $html .= " <a title=\"" . JTEXT::_('COM_MATUKIO_BOOK') . "\" href=\"" . $bookinglink . "\"><span class=\"mat_button mat_book\" type=\"button\"><img src=\"" . MatukioHelperUtilsBasic::getComponentImagePath() . "1116.png\" border=\"0\" align=\"absmiddle\"> " . JTEXT::_('COM_MATUKIO_BOOK') . "</span></a>"; } } $html .= ' <br />'; $results = $dispatcher->trigger('onContentAfterButton', array('com_matukio.upcomingevent', &$event, &$params, 0)); $html .= trim(implode("\n", $results)); $html .= ' </div>'; $html .= ' </div>'; $html .= ' </div>'; $html .= ' </div>'; } } return $html; }