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


PHP JEventsHTML::special方法代码示例

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


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

示例1: DefaultViewEventCatRowNew

function DefaultViewEventCatRowNew($view, $row, $args = "")
{
    // I choost not to use $row->fgcolor()
    $fgcolor = "inherit";
    $router = JRouter::getInstance("site");
    $vars = $router->getVars();
    $vars["catids"] = $row->catid();
    if (array_key_exists("Itemid", $vars) && is_null($vars["Itemid"])) {
        $vars["Itemid"] = JRequest::getInt("Itemid", 0);
    }
    $eventlink = "index.php?";
    foreach ($vars as $key => $val) {
        $eventlink .= $key . "=" . $val . "&";
    }
    $eventlink = substr($eventlink, 0, strlen($eventlink) - 1);
    $eventlink = JRoute::_($eventlink);
    ?>
		<a class="ev_link_cat" href="<?php 
    echo $eventlink;
    ?>
"  style="color:<?php 
    echo $fgcolor;
    ?>
;" title="<?php 
    echo JEventsHTML::special($row->catname());
    ?>
"><?php 
    echo $row->catname();
    ?>
</a>
		<?php 
}
开发者ID:madcsaba,项目名称:li-de,代码行数:32,代码来源:defaultvieweventcatrownew.php

示例2: calendarCell

 function calendarCell(&$currentDay, $year, $month, $i, $slot = "")
 {
     // pass $data by reference in order to update countdisplay
     $cfg = JEVConfig::getInstance();
     $Itemid = JEVHelper::getItemid();
     $event_day = $this->event->dup();
     $event_month = $this->event->mup();
     $id = $this->event->id();
     // this file controls the events component month calendar display cell output.  It is separated from the
     // showCalendar function in the events.php file to allow users to customize this portion of the code easier.
     // The event information to be displayed within a month day on the calendar can be modified, as well as any
     // overlay window information printed with a javascript mouseover event.  Each event prints as a separate table
     // row with a single column, within the month table's cell.
     // define start and end
     $cellStart = '<div';
     $cellStyle = 'padding:0;';
     $cellEnd = '</div>' . "\n";
     $linkStyle = "";
     // The title is printed as a link to the event's detail page
     $link = $this->event->viewDetailLink($year, $month, $currentDay['d0'], false);
     $link = JRoute::_($link . $this->_datamodel->getCatidsOutLink());
     $title = $this->event->title();
     // [mic] if title is too long, cut 'em for display
     $tmpTitle = $title;
     // set truncated title
     if (!isset($this->event->truncatedtitle)) {
         if (JString::strlen($title) >= $cfg->get('com_calCutTitle', 50)) {
             $tmpTitle = JString::substr($title, 0, $cfg->get('com_calCutTitle', 50)) . ' ...';
         }
         $tmpTitle = JEventsHTML::special($tmpTitle);
         $this->event->truncatedtitle = $tmpTitle;
     } else {
         $tmpTitle = $this->event->truncatedtitle;
     }
     // [new mic] if amount of displaing events greater than defined, show only a scmall coloured icon
     // instead of full text - the image could also be "recurring dependig", which means
     // for each kind of event (one day, multi day, last day) another icon
     // in this case the dfinition must moved down to be more flexible!
     // [tstahl] add a graphic symbol for all day events?
     $tmp_start_time = $this->start_time == $this->stop_time && !$this->event->noendtime() || $this->event->alldayevent() ? '' : $this->start_time;
     $templatedcell = false;
     // set truncated title
     if (!isset($this->event->truncatedtitle)) {
         $this->event->_title = $tmpTitle;
         $this->event->truncatedtitle = true;
     }
     if ($currentDay['countDisplay'] < $cfg->get('com_calMaxDisplay', 5)) {
         ob_start();
         $templatedcell = $this->loadedFromTemplate('month.calendar_cell', $this->event, 0);
         $res = ob_get_clean();
         if ($templatedcell) {
             $templatedcell = $res;
         } else {
             if ($this->_view) {
                 $this->_view->assignRef("link", $link);
                 $this->_view->assignRef("linkStyle", $linkStyle);
                 $this->_view->assignRef("tmp_start_time", $tmp_start_time);
                 $this->_view->assignRef("tmpTitle", $tmpTitle);
             }
             $title_event_link = $this->loadOverride("cellcontent");
             // allow fallback to old method
             if ($title_event_link == "") {
                 $title_event_link = "\n" . '<a class="cal_titlelink" href="' . $link . '" ' . $linkStyle . '>' . ($cfg->get('com_calDisplayStarttime') ? $tmp_start_time : '') . ' ' . $tmpTitle . '</a>' . "\n";
             }
             $cellStyle .= "border-left:8px solid " . $this->event->bgcolor() . ";padding-left:2px;";
         }
     } else {
         $eventIMG = '<img align="left" src="' . JURI::root() . 'components/' . JEV_COM_COMPONENT . '/images/event.png" alt="" style="height:12px;width:8px;border:1px solid white;background-color:' . $this->event->bgcolor() . '" />';
         $title_event_link = "\n" . '<a class="cal_titlelink" href="' . $link . '">' . $eventIMG . '</a>' . "\n";
         $cellStyle .= ' float:left;width:10px;';
     }
     $cellString = '';
     // allow template overrides for cell popups
     // only try override if we have a view reference
     if ($this->_view) {
         $this->_view->assignRef("ecc", $this);
         $this->_view->assignRef("cellDate", $currentDay["cellDate"]);
     }
     if ($cfg->get("com_enableToolTip", 1)) {
         if ($cfg->get("tooltiptype", 'overlib') == 'overlib') {
             $tooltip = $this->loadOverride("overlib");
             // allow fallback to old method
             if ($tooltip == "") {
                 $tooltip = $this->calendarCell_popup($currentDay["cellDate"]);
             }
             $cellString .= $tooltip;
         } else {
             // TT background
             if ($cfg->get('com_calTTBackground', 1) == '1') {
                 $bground = $this->event->bgcolor();
                 $fground = $this->event->fgcolor();
             } else {
                 $bground = "#000000";
                 $fground = "#ffffff";
             }
             JevHtmlBootstrap::popover('.hasjevtip', array("trigger" => "hover focus", "placement" => "top", "container" => "#jevents_body", "delay" => array("hide" => 150)));
             //$toolTipArray = array('className' => 'jevtip');
             //JHTML::_('behavior.tooltip', '.hasjevtip', $toolTipArray);
             $tooltip = $this->loadOverride("tooltip");
             // allow fallback to old method
//.........这里部分代码省略.........
开发者ID:poorgeek,项目名称:JEvents,代码行数:101,代码来源:calendar_cell.php

示例3: blockKids

 function blockKids($row, $itm, $tsk, $availableCatsIds, $activeParent = false, $activeSubCat = 0)
 {
     $catclass = "";
     if ($row->parent_id > 0) {
         $catclass = "childcat";
     }
     if ($row->parent_id > 0 && isset($row->activeBranch)) {
         $catclass = "activechildcat";
     }
     if ($row->parent_id > 0 && $activeParent) {
         $catclass = "activechildcat";
     }
     if ($row->parent_id > 0 && $activeSubCat > 0 && $row->id != $activeSubCat && !isset($row->activeNode)) {
         $catclass = "childcat";
     }
     $cat = $row->id > 0 ? "&catids={$row->id}" : "";
     //$rowparams = new JRegistry(isset($row->params)?$row->params:null);
     //$image = $rowparams->get("image",false);
     //$image = $image? "<img src = '".JURI::root().$image."' class='catimage'  alt='categoryimage' />" : "";
     $content = '<div class="event_legend_item ' . $catclass . '" style="border-color:' . $row->color . '">';
     $content .= '<div class="event_legend_name" style="border-color:' . $row->color . '">' . '<a href="' . JRoute::_("index.php?option=" . JEV_COM_COMPONENT . "{$cat}{$itm}{$tsk}") . '" title="' . JEventsHTML::special($row->name) . '">' . JEventsHTML::special($row->name) . '</a>';
     $content .= '</div>' . "\n";
     if (JString::strlen($row->description) > 0) {
         $content .= '<div class="event_legend_desc"  style="border-color:' . $row->color . '">' . $row->description . '</div>';
     }
     $content .= '</div>' . "\n";
     if (isset($row->activeBranch) && isset($row->subcats)) {
         $activeSubCat = 0;
         foreach ($row->subcats as $subcatid => $subcat) {
             if (isset($subcat->activeBranch)) {
                 $activeSubCat = $subcatid;
             }
         }
         foreach ($row->subcats as $subcatid => $subcat) {
             $content .= $this->blockKids($subcat, $itm, $tsk, $availableCatsIds, isset($row->activeNode), $activeSubCat);
         }
     }
     return $content;
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:39,代码来源:legend.php

示例4: calendarCell

 function calendarCell(&$currentDay, $year, $month, $i, $slot = "")
 {
     $cfg = JEVConfig::getInstance();
     // define start and end
     $cellStart = '<div';
     $cellClass = 'p0 ';
     $cellEnd = '</div>' . "\n";
     // add the event color as the column background color
     $cellStyle = ' background-color:' . $this->event->bgcolor() . ';color:' . $this->event->fgcolor() . ';';
     // MSIE ignores "inherit" color for links - stupid Microsoft!!!
     $linkStyle = 'style="color:' . $this->event->fgcolor() . ';"';
     // The title is printed as a link to the event's detail page
     $link = $this->event->viewDetailLink($year, $month, $currentDay['d0'], false);
     $link = JRoute::_($link . $this->_datamodel->getCatidsOutLink());
     $title = $this->event->title();
     // [mic] if title is too long, cut 'em for display
     $tmpTitle = $title;
     // set truncated title
     if (!isset($this->event->truncatedtitle)) {
         if (JString::strlen($title) >= $cfg->get('com_calCutTitle', 50)) {
             $tmpTitle = JString::substr($title, 0, $cfg->get('com_calCutTitle', 50)) . ' ...';
         }
         $tmpTitle = JEventsHTML::special($tmpTitle);
         $this->event->truncatedtitle = $tmpTitle;
     } else {
         $tmpTitle = $this->event->truncatedtitle;
     }
     // [new mic] if amount of displaing events greater than defined, show only a scmall coloured icon
     // instead of full text - the image could also be "recurring dependig", which means
     // for each kind of event (one day, multi day, last day) another icon
     // in this case the dfinition must moved down to be more flexible!
     // [tstahl] add a graphic symbol for all day events?
     $tmp_start_time = $this->start_time == $this->stop_time && !$this->event->noendtime() || $this->event->alldayevent() ? '' : $this->start_time;
     $templatedcell = false;
     if ($currentDay['countDisplay'] < $cfg->get('com_calMaxDisplay', 5)) {
         ob_start();
         $templatedcell = $this->loadedFromTemplate('month.calendar_cell', $this->event, 0);
         $res = ob_get_clean();
         if ($templatedcell) {
             $templatedcell = $res;
         } else {
             if ($this->_view) {
                 $this->_view->assignRef("link", $link);
                 $this->_view->assignRef("linkStyle", $linkStyle);
                 $this->_view->assignRef("tmp_start_time", $tmp_start_time);
                 $this->_view->assignRef("tmpTitle", $tmpTitle);
             }
             $title_event_link = $this->loadOverride("cellcontent");
             // allow fallback to old method
             if ($title_event_link == "") {
                 $title_event_link = '<a class="cal_titlelink" href="' . $link . '" ' . $linkStyle . '>' . ($cfg->get('com_calDisplayStarttime') ? $tmp_start_time : '') . ' ' . $tmpTitle . '</a>' . "\n";
             }
             $cellClass .= 'w100';
         }
     } else {
         $eventIMG = '<img align="left" class="b1sw" src="' . JURI::root() . 'components/' . JEV_COM_COMPONENT . '/images/event.png" class="h12px w8px" alt=""' . ' />';
         $title_event_link = '<a class="cal_titlelink" href="' . $link . '">' . $eventIMG . '</a>' . "\n";
         $cellClass .= ' fleft w10px';
     }
     $cellString = '';
     // allow template overrides for cell popups
     // only try override if we have a view reference
     if ($this->_view) {
         $this->_view->assignRef("ecc", $this);
         $this->_view->assignRef("cellDate", $currentDay["cellDate"]);
     }
     if ($cfg->get("com_enableToolTip", 1)) {
         if ($cfg->get("tooltiptype", 'joomla') == 'overlib') {
             $tooltip = $this->loadOverride("overlib");
             // allow fallback to old method
             if ($tooltip == "") {
                 $tooltip = $this->calendarCell_popup($currentDay["cellDate"]);
             }
             $cellString .= $tooltip;
         } else {
             JevHtmlBootstrap::popover('.hasjevtip', array("trigger" => "hover focus", "placement" => "top", "container" => "#jevents_body", "delay" => array("hide" => 150)));
             //$toolTipArray = array('className' => 'jevtip');
             //JHTML::_('behavior.tooltip', '.hasjevtip', $toolTipArray);
             $tooltip = $this->loadOverride("tooltip");
             // allow fallback to old method
             if ($tooltip == "") {
                 $tooltip = $this->calendarCell_tooltip($currentDay["cellDate"]);
             }
             $tooltip = $this->correctTooltipLanguage($tooltip);
             if (strpos($tooltip, "templated") === 0) {
                 $title = substr($tooltip, 9);
                 $cellString = "";
             } else {
                 // TT background
                 if ($cfg->get('com_calTTBackground', 1) == '1') {
                     $bground = $this->event->bgcolor();
                     $fground = $this->event->fgcolor();
                 } else {
                     $bground = "#000000";
                     $fground = "#ffffff";
                 }
                 $cellString .= '<div class="jevtt_text" >' . $tooltip . '</div>';
                 $title = '<div class="jevtt_title" style = "color:' . $fground . ';background-color:' . $bground . '">' . $this->title . '</div>';
             }
             if ($templatedcell) {
//.........这里部分代码省略.........
开发者ID:pguilford,项目名称:vcomcc,代码行数:101,代码来源:calendar_cell.php

示例5: processMatch

 protected function processMatch(&$content, $match, $dayEvent, $dateParm, $relDay)
 {
     $datenow = JEVHelper::getNow();
     $dispatcher = JDispatcher::getInstance();
     // get the title and start time
     $startDate = JevDate::strtotime($dayEvent->publish_up());
     if ($relDay > 0) {
         $eventDate = JevDate::strtotime($datenow->toFormat('%Y-%m-%d ') . JevDate::strftime('%H:%M', $startDate) . " +{$relDay} days");
     } else {
         $eventDate = JevDate::strtotime($datenow->toFormat('%Y-%m-%d ') . JevDate::strftime('%H:%M', $startDate) . " {$relDay} days");
     }
     $endDate = JevDate::strtotime($dayEvent->publish_down());
     list($st_year, $st_month, $st_day) = explode('-', JevDate::strftime('%Y-%m-%d', $startDate));
     list($ev_year, $ev_month, $ev_day) = explode('-', JevDate::strftime('%Y-%m-%d', $startDate));
     $task_events = 'icalrepeat.detail';
     switch ($match) {
         case 'endDate':
         case 'startDate':
         case 'eventDate':
             // Note we need to examine the date specifiers used to determine if language translation will be
             // necessary.  Do this later when script is debugged.
             if (!$this->disableDateStyle) {
                 $content .= '<span class="mod_events_latest_date">';
             }
             if (!$dayEvent->alldayevent() && $match == "endDate" && ($dayEvent->noendtime() && $dayEvent->getUnixStartDate() == $dayEvent->getUnixEndDate() || $dayEvent->getUnixStartTime() == $dayEvent->getUnixEndTime())) {
                 $time_fmt = "";
             } else {
                 if (!isset($dateParm) || $dateParm == '') {
                     if ($this->com_calUseStdTime) {
                         $time_fmt = $dayEvent->alldayevent() ? '' : IS_WIN ? ' @%I:%M%p' : ' @%l:%M%p';
                     } else {
                         $time_fmt = $dayEvent->alldayevent() ? '' : ' @%H:%M';
                     }
                     $dateFormat = $this->displayYear ? '%a %b %d, %Y' . $time_fmt : '%a %b %d' . $time_fmt;
                     $jmatch = new JevDate(${$match});
                     $content .= $jmatch->toFormat($dateFormat);
                     //$content .= JEV_CommonFunctions::jev_strftime($dateFormat, $$match);
                 } else {
                     // format endDate when midnight to show midnight!
                     if ($match == "endDate" && $dayEvent->sdn() == 59) {
                         $tempEndDate = $endDate + 1;
                         if ($dayEvent->alldayevent()) {
                             // if an all day event then we don't want to roll to the next day
                             $tempEndDate -= 86400;
                         }
                         $match = "tempEndDate";
                     }
                     // if a '%' sign detected in date format string, we assume JevDate::strftime() is to be used,
                     if (preg_match("/\\%/", $dateParm)) {
                         $jmatch = new JevDate(${$match});
                         $content .= $jmatch->toFormat($dateParm);
                     } else {
                         $content .= date($dateParm, ${$match});
                     }
                     if ($match == "tempDndDate") {
                         $match = "endDate";
                     }
                 }
             }
             if (!$this->disableDateStyle) {
                 $content .= "</span>";
             }
             break;
         case 'title':
             $title = $dayEvent->title();
             if (!empty($dateParm)) {
                 $parts = explode("|", $dateParm);
                 if (count($parts) > 0 && strlen($title) > intval($parts[0])) {
                     $title = substr($title, 0, intval($parts[0]));
                     if (count($parts) > 1) {
                         $title .= $parts[1];
                     }
                 }
             }
             if (!$this->disableTitleStyle) {
                 $content .= '<span class="mod_events_latest_content">';
             }
             if ($this->displayLinks) {
                 $link = $dayEvent->viewDetailLink($ev_year, $ev_month, $ev_day, false, $this->myItemid);
                 if ($this->modparams->get("ignorefiltermodule", 0)) {
                     $link = JRoute::_($link . $this->datamodel->getCatidsOutLink() . "&filter_reset=1");
                 } else {
                     $link = JRoute::_($link . $this->datamodel->getCatidsOutLink());
                 }
                 $content .= $this->_htmlLinkCloaking($link, JEventsHTML::special($title));
             } else {
                 $content .= JEventsHTML::special($title);
             }
             if (!$this->disableTitleStyle) {
                 $content .= '</span>';
             }
             break;
         case 'category':
             $catobj = $dayEvent->getCategoryName();
             $content .= JEventsHTML::special($catobj);
             break;
         case 'categoryimage':
             $catobj = $dayEvent->getCategoryImage();
             $content .= $catobj;
             break;
//.........这里部分代码省略.........
开发者ID:pguilford,项目名称:vcomcc,代码行数:101,代码来源:latest.php

示例6: calendarCell

 function calendarCell(&$currentDay, $year, $month, $i, $slot = "")
 {
     $cfg = JEVConfig::getInstance();
     $event = $currentDay["events"][$i];
     // Event publication infomation
     $event_up = new JEventDate($event->startDate());
     $event_down = new JEventDate($event->endDate());
     // BAR COLOR GENERATION
     $bgeventcolor = JEV_CommonFunctions::setColor($event);
     $start_publish = JevDate::mktime(0, 0, 0, $event->mup(), $event->dup(), $event->yup());
     $stop_publish = JevDate::mktime(0, 0, 0, $event->mdn(), $event->ddn(), $event->ydn());
     // this file controls the events component month calendar display cell output.  It is separated from the
     // showCalendar function in the events.php file to allow users to customize this portion of the code easier.
     // The event information to be displayed within a month day on the calendar can be modified, as well as any
     // overlay window information printed with a javascript mouseover event.  Each event prints as a separate table
     // row with a single column, within the month table's cell.
     // On mouse over date formats
     // Note that the date formats for the events can be easily changed by modifying the sprintf formatting
     // string below.  These are used for the default overlay window.  As well, the JevDate::strftime() function could
     // also be used instead to provide more powerful date formatting which supports locales if php function
     // set_locale() is being used.
     // define start and end
     $cellStart = '<div class="eventfull"><div class="eventstyle" ';
     $cellStyle = '';
     $cellEnd = '</div></div>' . "\n";
     // add the event color as the column background color
     include_once JPATH_ADMINISTRATOR . "/components/" . JEV_COM_COMPONENT . "/libraries/colorMap.php";
     //$colStyle .= $bgeventcolor ? ' background-color:' . $bgeventcolor . ';' : '';
     //$colStyle .= $bgeventcolor ? 'color:'.JevMapColor($bgeventcolor) . ';' : '';
     // MSIE ignores "inherit" color for links - stupid Microsoft!!!
     //$linkStyle = $bgeventcolor ? 'style="color:'.JevMapColor($bgeventcolor) . ';"' : '';
     $linkStyle = "";
     // The title is printed as a link to the event's detail page
     $link = $this->event->viewDetailLink($year, $month, $currentDay['d0'], false);
     $link = JRoute::_($link . $this->_datamodel->getCatidsOutLink());
     $title = $event->title();
     // [mic] if title is too long, cut 'em for display
     $tmpTitle = $title;
     // set truncated title
     if (!isset($this->event->truncatedtitle)) {
         if (JString::strlen($title) >= $cfg->get('com_calCutTitle', 50)) {
             $tmpTitle = JString::substr($title, 0, $cfg->get('com_calCutTitle', 50)) . ' ...';
         }
         $tmpTitle = JEventsHTML::special($tmpTitle);
         $this->event->truncatedtitle = $tmpTitle;
     } else {
         $tmpTitle = $this->event->truncatedtitle;
     }
     // [new mic] if amount of displaing events greater than defined, show only a scmall coloured icon
     // instead of full text - the image could also be "recurring dependig", which means
     // for each kind of event (one day, multi day, last day) another icon
     // in this case the dfinition must moved down to be more flexible!
     // [tstahl] add a graphic symbol for all day events?
     $tmp_start_time = $this->start_time == $this->stop_time && !$this->event->noendtime() || $this->event->alldayevent() ? '' : $this->start_time;
     $templatedcell = false;
     if ($currentDay['countDisplay'] < $cfg->get('com_calMaxDisplay', 5)) {
         ob_start();
         $templatedcell = $this->loadedFromTemplate('month.calendar_cell', $this->event, 0);
         $res = ob_get_clean();
         if ($templatedcell) {
             $templatedcell = $res;
         } else {
             if ($this->_view) {
                 $this->_view->assignRef("link", $link);
                 $this->_view->assignRef("linkStyle", $linkStyle);
                 $this->_view->assignRef("tmp_start_time", $tmp_start_time);
                 $this->_view->assignRef("tmpTitle", $tmpTitle);
             }
             $title_event_link = $this->loadOverride("cellcontent");
             // allow fallback to old method
             if ($title_event_link == "") {
                 $title_event_link = "\n" . '<a class="cal_titlelink" href="' . $link . '" ' . $linkStyle . '>' . ($cfg->get('com_calDisplayStarttime') ? $tmp_start_time : '') . ' ' . $tmpTitle . '</a>' . "\n";
             }
             $cellStyle .= "border-width:0px 0px 1px 8px;border-color:{$bgeventcolor};padding:0px 0px 1px 2px;";
         }
     } else {
         $eventIMG = '<img align="left" src="' . JURI::root() . 'components/' . JEV_COM_COMPONENT . '/images/event.png" alt="" style="height:12px;width:8px;border:1px solid white;background-color:' . $bgeventcolor . '" />';
         $title_event_link = "\n" . '<a class="cal_titlelink" href="' . $link . '">' . $eventIMG . '</a>' . "\n";
         $cellStyle .= ' float:left;width:10px;';
     }
     $cellString = '';
     // allow template overrides for cell popups
     // only try override if we have a view reference
     if ($this->_view) {
         $this->_view->assignRef("ecc", $this);
         $this->_view->assignRef("cellDate", $currentDay["cellDate"]);
     }
     if ($cfg->get("com_enableToolTip", 1)) {
         if ($cfg->get("tooltiptype", 'joomla') == 'overlib') {
             $tooltip = $this->loadOverride("overlib");
             // allow fallback to old method
             if ($tooltip == "") {
                 $tooltip = $this->calendarCell_popup($currentDay["cellDate"]);
             }
             $cellString .= $tooltip;
         } else {
             // TT background
             if ($cfg->get('com_calTTBackground', 1) == '1') {
                 $bground = $this->event->bgcolor();
                 $fground = $this->event->fgcolor();
//.........这里部分代码省略.........
开发者ID:poorgeek,项目名称:JEvents,代码行数:101,代码来源:calendar_cell.php

示例7: defined

<?php

defined('_JEXEC') or die('Restricted access');
$data = $this->data;
$Itemid = JEVHelper::getItemid();
$num_events = count($data['rows']);
if ($num_events > 0) {
    for ($r = 0; $r < $num_events; $r++) {
        $row = $data['rows'][$r];
        $rowlink = $row->viewDetailLink($row->yup(), $row->mup(), $row->dup(), true);
        ?>
		<a class="ev_link_row" href="<?php 
        echo $rowlink;
        ?>
"  title="<?php 
        echo JEventsHTML::special($row->title());
        ?>
"><?php 
        echo $row->title();
        ?>
</a>
		<br/>
		<?php 
    }
}
// Create the pagination object
if ($data["total"] > $data["limit"]) {
    $this->paginationForm($data["total"], $data["limitstart"], $data["limit"]);
}
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:29,代码来源:listevents_body.php

示例8: DefaultViewEventRowAdmin

function DefaultViewEventRowAdmin($view, $row, $manage = false)
{
    $popup = false;
    $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
    if ($params->get("editpopup", 0)) {
        JHTML::_('behavior.modal');
        JEVHelper::script('editpopup.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
        $popup = true;
        $popupw = $params->get("popupw", 800);
        $popuph = $params->get("popuph", 600);
    }
    $editLink = $row->editLink(true);
    $editLink = $popup ? "javascript:jevEditPopup('" . $editLink . "',{$popupw}, {$popuph});" : $editLink;
    $modifylink = "";
    if (!$manage && JEVHelper::canEditEvent($row)) {
        $modifylink = '<a href="' . $row->editlink(true) . '" title="' . JText::_('JEV_MODIFY') . '"><b>' . JText::_('JEV_MODIFY') . "</b></a>\n";
        $modifylink = '<a href="' . $editLink . '" title="' . JText::_('JEV_MODIFY') . '"><b>' . JText::_('JEV_MODIFY') . "</b></a>\n";
    }
    $deletelink = "";
    if (!$manage && JEVHelper::canDeleteEvent($row)) {
        $deletelink = '<a href="' . $row->deletelink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('JEV_DELETE') . '"><b>' . JText::_('JEV_DELETE') . "</b></a>\n";
    }
    if (!$manage && JEVHelper::canPublishEvent($row)) {
        if ($row->published()) {
            $publishlink = '<a href="' . $row->unpublishlink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('UNPUBLISH') . '"><b>' . JText::_('UNPUBLISH') . "</b></a>\n";
        } else {
            $publishlink = '<a href="' . $row->publishlink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('PUBLISH') . '"><b>' . JText::_('PUBLISH') . "</b></a>\n";
        }
    } else {
        $publishlink = "";
    }
    $eventlink = $row->viewDetailLink($row->yup(), $row->mup(), $row->dup(), false);
    $eventlink = JRoute::_($eventlink . $view->datamodel->getCatidsOutLink());
    $border = "border-color:" . $row->bgcolor() . ";";
    ?>
		
		<li class="ev_td_li" style="<?php 
    echo $border;
    ?>
">
			<a class="<?php 
    echo $row->state() ? 'ev_link_row' : 'ev_link_unpublished';
    ?>
" href="<?php 
    echo $eventlink;
    ?>
" title="<?php 
    echo JEventsHTML::special($row->title()) . ($row->state() ? '' : JText::_('JEV_UNPUBLISHED'));
    ?>
"><?php 
    echo $row->title() . ($row->state() ? '' : JText::_('JEV_UNPUBLISHED'));
    ?>
</a>
			&nbsp;<?php 
    echo JText::_('JEV_BY');
    ?>
			&nbsp;<i><?php 
    echo $row->contactlink('', true);
    ?>
</i>
			&nbsp;&nbsp;<?php 
    echo $deletelink;
    ?>
			&nbsp;&nbsp;<?php 
    echo $modifylink;
    ?>
			&nbsp;&nbsp;<?php 
    echo $publishlink;
    ?>
		</li>
		<?php 
}
开发者ID:madcsaba,项目名称:li-de,代码行数:72,代码来源:defaultvieweventrowadmin.php

示例9: blockKids

 function blockKids($row, $itm, $tsk, $availableCatsIds, $activeParent = false, $activeSubCat = 0)
 {
     $catclass = "";
     if ($row->parent_id > 0) {
         $catclass = "childcat";
     }
     if ($row->parent_id > 0 && isset($row->activeBranch)) {
         $catclass = "activechildcat";
     }
     if ($row->parent_id > 0 && $activeParent) {
         $catclass = "activechildcat";
     }
     if ($row->parent_id > 0 && $activeSubCat > 0 && $row->id != $activeSubCat && !isset($row->activeNode)) {
         $catclass = "childcat";
     }
     $cat = $row->id > 0 ? "&catids={$row->id}" : "";
     $content = '<div class="event_legend_item ' . $catclass . '" style="border-color:' . $row->color . '">';
     $content .= '<div class="event_legend_name" style="border-color:' . $row->color . '">' . '<a href="' . JRoute::_("index.php?option=" . JEV_COM_COMPONENT . "{$cat}{$itm}{$tsk}") . '" title="' . JEventsHTML::special($row->name) . '">' . JEventsHTML::special($row->name) . '</a>';
     $content .= '</div>' . "\n";
     if (strlen($row->description) > 0) {
         $content .= '<div class="event_legend_desc"  style="border-color:' . $row->color . '">' . $row->description . '</div>';
     }
     $content .= '</div>' . "\n";
     if (isset($row->activeBranch) && isset($row->subcats)) {
         $activeSubCat = 0;
         foreach ($row->subcats as $subcatid => $subcat) {
             if (isset($subcat->activeBranch)) {
                 $activeSubCat = $subcatid;
             }
         }
         foreach ($row->subcats as $subcatid => $subcat) {
             $content .= $this->blockKids($subcat, $itm, $tsk, $availableCatsIds, isset($row->activeNode), $activeSubCat);
         }
     }
     return $content;
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:36,代码来源:legend.php

示例10: DefaultLoadedFromTemplate

function DefaultLoadedFromTemplate($view, $template_name, $event, $mask, $template_value = false)
{
    $db = JFactory::getDBO();
    // find published template
    static $templates;
    static $fieldNameArray;
    if (!isset($templates)) {
        $templates = array();
        $fieldNameArray = array();
        $rawtemplates = array();
    }
    $specialmodules = false;
    if (!$template_value) {
        if (!array_key_exists($template_name, $templates)) {
            $db->setQuery("SELECT * FROM #__jev_defaults WHERE state=1 AND name= " . $db->Quote($template_name) . " AND " . 'language in (' . $db->quote(JFactory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')');
            $rawtemplates = $db->loadObjectList();
            $templates[$template_name] = array();
            if ($rawtemplates) {
                foreach ($rawtemplates as $rt) {
                    if (!isset($templates[$template_name][$rt->language])) {
                        $templates[$template_name][$rt->language] = array();
                    }
                    $templates[$template_name][$rt->language][$rt->catid] = $rt;
                }
            }
            if (count($templates[$template_name]) == 0) {
                $templates[$template_name] = null;
                return false;
            }
            if (isset($templates[$template_name][JFactory::getLanguage()->getTag()])) {
                $templateArray = $templates[$template_name][JFactory::getLanguage()->getTag()];
                // We have the most specific by language now fill in the gaps
                if (isset($templates[$template_name]["*"])) {
                    foreach ($templates[$template_name]["*"] as $cat => $cattemplates) {
                        if (!isset($templateArray[$cat])) {
                            $templateArray[$cat] = $cattemplates;
                        }
                    }
                }
                $templates[$template_name] = $templateArray;
            } else {
                if (isset($templates[$template_name]["*"])) {
                    $templates[$template_name] = $templates[$template_name]["*"];
                } else {
                    if (is_array($templates[$template_name]) && count($templates[$template_name]) == 0) {
                        $templates[$template_name] = null;
                    } else {
                        if (is_array($templates[$template_name]) && count($templates[$template_name]) > 0) {
                            $templates[$template_name] = current($templates[$template_name]);
                        } else {
                            $templates[$template_name] = null;
                        }
                    }
                }
            }
            $matched = false;
            foreach (array_keys($templates[$template_name]) as $catid) {
                if ($templates[$template_name][$catid]->value != "") {
                    if (isset($templates[$template_name][$catid]->params)) {
                        $templates[$template_name][$catid]->params = new JRegistry($templates[$template_name][$catid]->params);
                        $specialmodules = $templates[$template_name][$catid]->params;
                    }
                    // Adjust template_value to include dynamic module output then strip it out afterwards
                    if ($specialmodules) {
                        $modids = $specialmodules->get("modid", array());
                        if (count($modids) > 0) {
                            $modvals = $specialmodules->get("modval", array());
                            // not sure how this can arise :(
                            if (is_object($modvals)) {
                                $modvals = get_object_vars($modvals);
                            }
                            for ($count = 0; $count < count($modids) && $count < count($modvals) && trim($modids[$count]) != ""; $count++) {
                                $templates[$template_name][$catid]->value .= "{{module start:MODULESTART#" . $modids[$count] . "}}";
                                // cleaned later!
                                //$templates[$template_name][$catid]->value .= preg_replace_callback('|{{.*?}}|', 'cleanLabels', $modvals[$count]);
                                $templates[$template_name][$catid]->value .= $modvals[$count];
                                $templates[$template_name][$catid]->value .= "{{module end:MODULEEND}}";
                            }
                        }
                    }
                    // strip carriage returns other wise the preg replace doesn;y work - needed because wysiwyg editor may add the carriage return in the template field
                    $templates[$template_name][$catid]->value = str_replace("\r", '', $templates[$template_name][$catid]->value);
                    $templates[$template_name][$catid]->value = str_replace("\n", '', $templates[$template_name][$catid]->value);
                    // non greedy replacement - because of the ?
                    $templates[$template_name][$catid]->value = preg_replace_callback('|{{.*?}}|', 'cleanLabels', $templates[$template_name][$catid]->value);
                    $matchesarray = array();
                    preg_match_all('|{{.*?}}|', $templates[$template_name][$catid]->value, $matchesarray);
                    $templates[$template_name][$catid]->matchesarray = $matchesarray;
                }
            }
        }
        if (is_null($templates[$template_name])) {
            return false;
        }
        $catids = $event->catids() && count($event->catids()) ? $event->catids() : array($event->catid());
        $catids[] = 0;
        // find the overlap
        $catids = array_intersect($catids, array_keys($templates[$template_name]));
        // At present must be an EXACT category match - no inheriting allowed!
        if (count($catids) == 0) {
//.........这里部分代码省略.........
开发者ID:madcsaba,项目名称:li-de,代码行数:101,代码来源:defaultloadedfromtemplate.php

示例11: DefaultLoadedFromTemplate

function DefaultLoadedFromTemplate($view, $template_name, $event, $mask)
{
    $db = JFactory::getDBO();
    // find published template
    static $templates;
    if (!isset($templates)) {
        $templates = array();
    }
    if (!array_key_exists($template_name, $templates)) {
        $db->setQuery("SELECT * FROM #__jev_defaults WHERE state=1 AND name= " . $db->Quote($template_name));
        $templates[$template_name] = $db->loadObject();
    }
    if (is_null($templates[$template_name]) || $templates[$template_name]->value == "") {
        return false;
    }
    $template = $templates[$template_name];
    // now replace the fields
    $search = array();
    $replace = array();
    $blank = array();
    $jevparams = JComponentHelper::getParams(JEV_COM_COMPONENT);
    // Built in fields
    $search[] = "{{TITLE}}";
    $replace[] = $event->title();
    $blank[] = "";
    // Title link
    $rowlink = $event->viewDetailLink($event->yup(), $event->mup(), $event->dup(), false);
    $rowlink = JRoute::_($rowlink . $view->datamodel->getCatidsOutLink());
    ob_start();
    ?>
	<a class="ev_link_row" href="<?php 
    echo $rowlink;
    ?>
" style="font-weight:bold;" title="<?php 
    echo JEventsHTML::special($event->title());
    ?>
">
	<?php 
    $linkstart = ob_get_clean();
    $search[] = "{{LINK}}";
    $replace[] = $rowlink;
    $blank[] = "";
    $search[] = "{{LINKSTART}}";
    $replace[] = $linkstart;
    $blank[] = "";
    $search[] = "{{LINKEND}}";
    $replace[] = "</a>";
    $blank[] = "";
    $fulllink = $linkstart . $event->title() . '</a>';
    $search[] = "{{TITLE_LINK}}";
    $replace[] = $fulllink;
    $blank[] = "";
    $search[] = "{{URL}}";
    $replace[] = $event->url();
    $blank[] = "";
    $search[] = "{{TRUNCATED_DESC:.*}}";
    $replace[] = $event->content();
    $blank[] = "";
    //	$search[]="|{{TRUNCATED_DESC:(.*)}}|";$replace[]=$event->content();
    $search[] = "{{DESCRIPTION}}";
    $replace[] = $event->content();
    $blank[] = "";
    $search[] = "{{MANAGEMENT}}";
    ob_start();
    $view->_viewNavAdminPanel();
    $replace[] = ob_get_clean();
    $blank[] = "";
    $search[] = "{{CATEGORY}}";
    $replace[] = $event->catname();
    $blank[] = "";
    $bgcolor = $event->bgcolor();
    $search[] = "{{COLOUR}}";
    $replace[] = $bgcolor == "" ? "#ffffff" : $bgcolor;
    $blank[] = "";
    $search[] = "{{FGCOLOUR}}";
    $replace[] = $event->fgcolor();
    $blank[] = "";
    $search[] = "{{TTTIME}}";
    $replace[] = "[[TTTIME]]";
    $blank[] = "";
    $search[] = "{{EVTTIME}}";
    $replace[] = "[[EVTTIME]]";
    $blank[] = "";
    $search[] = "{{TOOLTIP}}";
    $replace[] = "[[TOOLTIP]]";
    $blank[] = "";
    $router = JRouter::getInstance("site");
    $vars = $router->getVars();
    $vars["catids"] = $event->catid();
    $eventlink = "index.php?";
    foreach ($vars as $key => $val) {
        $eventlink .= $key . "=" . $val . "&";
    }
    $eventlink = substr($eventlink, 0, strlen($eventlink) - 1);
    $eventlink = JRoute::_($eventlink);
    $catlink = '<a class="ev_link_cat" href="' . $eventlink . '"  title="' . JEventsHTML::special($event->catname()) . '">' . $event->catname() . '</a>';
    $search[] = "{{CATEGORYLNK}}";
    $replace[] = $catlink;
    $blank[] = "";
    $search[] = "{{CATEGORYIMG}}";
//.........这里部分代码省略.........
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:101,代码来源:defaultloadedfromtemplate.php

示例12: processMatch

 protected function processMatch(&$content, $match, $dayEvent, $dateParm, $relDay)
 {
     $datenow = JEVHelper::getNow();
     $dispatcher =& JDispatcher::getInstance();
     // get the title and start time
     $startDate = JevDate::strtotime($dayEvent->publish_up());
     if ($relDay > 0) {
         $eventDate = JevDate::strtotime($datenow->toFormat('%Y-%m-%d ') . JevDate::strftime('%H:%M', $startDate) . " +{$relDay} days");
     } else {
         $eventDate = JevDate::strtotime($datenow->toFormat('%Y-%m-%d ') . JevDate::strftime('%H:%M', $startDate) . " {$relDay} days");
     }
     $endDate = JevDate::strtotime($dayEvent->publish_down());
     list($st_year, $st_month, $st_day) = explode('-', JevDate::strftime('%Y-%m-%d', $startDate));
     list($ev_year, $ev_month, $ev_day) = explode('-', JevDate::strftime('%Y-%m-%d', $startDate));
     $task_events = 'icalrepeat.detail';
     switch ($match) {
         case 'endDate':
         case 'startDate':
         case 'eventDate':
             // Note we need to examine the date specifiers used to determine if language translation will be
             // necessary.  Do this later when script is debugged.
             if (!$this->disableDateStyle) {
                 $content .= '<span class="mod_events_latest_date">';
             }
             if (!$dayEvent->alldayevent() && $match == "endDate" && ($dayEvent->noendtime() || $dayEvent->getUnixStartTime() == $dayEvent->getUnixEndTime())) {
                 $time_fmt = "";
             } else {
                 if (!isset($dateParm) || $dateParm == '') {
                     if ($this->com_calUseStdTime) {
                         $time_fmt = $dayEvent->alldayevent() ? '' : ' @%l:%M%p';
                     } else {
                         $time_fmt = $dayEvent->alldayevent() ? '' : ' @%H:%M';
                     }
                     $dateFormat = $this->displayYear ? '%a %b %d, %Y' . $time_fmt : '<span class="eventDay">%a</span>  <span class="eventDate">%d<span class="eventMonth">%b</span></span>';
                     $jmatch = new JevDate(${$match});
                     $content .= $jmatch->toFormat($dateFormat);
                     //$content .= JEV_CommonFunctions::jev_strftime($dateFormat, $$match);
                 } else {
                     // format endDate when midnight to show midnight!
                     if ($match == "endDate" && $dayEvent->sdn() == 59) {
                         $tempEndDate = $endDate + 1;
                         if ($dayEvent->alldayevent()) {
                             // if an all day event then we don't want to roll to the next day
                             $tempEndDate -= 86400;
                         }
                         $match = "tempEndDate";
                     }
                     // if a '%' sign detected in date format string, we assume JevDate::strftime() is to be used,
                     if (preg_match("/\\%/", $dateParm)) {
                         $jmatch = new JevDate(${$match});
                         $content .= $jmatch->toFormat($dateParm);
                     } else {
                         $content .= date($dateParm, ${$match});
                     }
                     if ($match == "tempDndDate") {
                         $match = "endDate";
                     }
                 }
             }
             if (!$this->disableDateStyle) {
                 $content .= "</span>";
             }
             break;
         case 'title':
             $title = $dayEvent->title();
             if (!empty($dateParm)) {
                 $parts = explode("|", $dateParm);
                 if (count($parts) > 0 && strlen($title) > intval($parts[0])) {
                     $title = substr($title, 0, intval($parts[0]));
                     if (count($parts) > 1) {
                         $title .= $parts[1];
                     }
                 }
             }
             if (!$this->disableTitleStyle) {
                 $content .= '<span class="mod_events_latest_content">';
             }
             if ($this->displayLinks) {
                 $link = $dayEvent->viewDetailLink($ev_year, $ev_month, $ev_day, false, $this->myItemid);
                 $link = JRoute::_($link . $this->datamodel->getCatidsOutLink());
                 $content .= $this->_htmlLinkCloaking($link, JEventsHTML::special($title));
             } else {
                 $content .= JEventsHTML::special($title);
             }
             if (!$this->disableTitleStyle) {
                 $content .= '</span>';
             }
             break;
         case 'category':
             $catobj = $dayEvent->getCategoryName();
             $content .= JEventsHTML::special($catobj);
             break;
         case 'calendar':
             $catobj = $dayEvent->getCalendarName();
             $content .= JEventsHTML::special($catobj);
             break;
         case 'contact':
             // Also want to cloak contact details so
             $this->modparams->set("image", 1);
             $dayEvent->text = $dayEvent->contact_info();
//.........这里部分代码省略.........
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:101,代码来源:latest.php

示例13: DefaultViewEventRowNew

function DefaultViewEventRowNew($view, $row, $args = "")
{
    $cfg = JEVConfig::getInstance();
    $rowlink = $row->viewDetailLink($row->yup(), $row->mup(), $row->dup(), false);
    $rowlink = JRoute::_($rowlink . $view->datamodel->getCatidsOutLink());
    // I choost not to use $row->fgcolor
    $fgcolor = "inherit";
    $tmpTitle = $row->title();
    /*
    // [mic] if title is too long, cut 'em for display
    if( JString::strlen( $row->title() ) >= 50 ){
    	$tmpTitle = JString::substr( $row->title(), 0, 50 ) . ' ...';
    }
    */
    $jevtask = JRequest::getString("jevtask");
    $jevtask = str_replace(".listevents", "", $jevtask);
    $showyeardate = $cfg->get("showyeardate", 0);
    $times = "";
    if ($showyeardate && $jevtask == "year" || $jevtask == "search.results" || $jevtask == "cat" || $jevtask == "range") {
        $start_publish = $row->getUnixStartDate();
        $stop_publish = $row->getUnixEndDate();
        $start_date = JEventsHTML::getDateFormat($row->yup(), $row->mup(), $row->dup(), 0);
        $start_time = JEVHelper::getTime($row->getUnixStartTime(), $row->hup(), $row->minup());
        $stop_date = JEventsHTML::getDateFormat($row->ydn(), $row->mdn(), $row->ddn(), 0);
        $stop_time = JEVHelper::getTime($row->getUnixEndTime(), $row->hdn(), $row->mindn());
        if ($stop_publish == $start_publish) {
            if ($row->noendtime()) {
                $times = $start_time;
            } else {
                if ($row->alldayevent()) {
                    $times = "";
                } else {
                    if ($start_time != $stop_time) {
                        $times = $start_time . ' - ' . $stop_time;
                    } else {
                        $times = $start_time;
                    }
                }
            }
            $times = $start_date . " " . $times . "<br/>";
        } else {
            if ($row->noendtime()) {
                $times = $start_time;
            } else {
                if ($start_time != $stop_time && !$row->alldayevent()) {
                    $times = $start_time . '&nbsp;-&nbsp;' . $stop_time;
                }
            }
            $times = $start_date . ' - ' . $stop_date . " " . $times . "<br/>";
        }
    } else {
        if (($jevtask == "day" || $jevtask == "week") && $row->starttime() != $row->endtime() && !$row->alldayevent()) {
            $starttime = JEVHelper::getTime($row->getUnixStartTime(), $row->hup(), $row->minup());
            $endtime = JEVHelper::getTime($row->getUnixEndTime(), $row->hdn(), $row->mindn());
            if ($row->noendtime()) {
                if ($showyeardate && $jevtask == "year") {
                    $times = $starttime . '&nbsp;-&nbsp;' . $endtime . '&nbsp;';
                } else {
                    $times = $starttime . '&nbsp;';
                }
            } else {
                $times = $starttime . '&nbsp;-&nbsp;' . $endtime . '&nbsp;';
            }
        }
    }
    echo $times;
    ?>
			<a class="ev_link_row" href="<?php 
    echo $rowlink;
    ?>
" <?php 
    echo $args;
    ?>
 style="color:<?php 
    echo $fgcolor;
    ?>
;" title="<?php 
    echo JEventsHTML::special($row->title());
    ?>
"><?php 
    echo $tmpTitle;
    ?>
</a>
			<?php 
    if ($cfg->get('com_byview') == '1') {
        echo JText::_('JEV_BY') . '&nbsp;<i>' . $row->contactlink() . '</i>';
    }
    ?>
		<?php 
}
开发者ID:madcsaba,项目名称:li-de,代码行数:90,代码来源:defaultvieweventrownew.php


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