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


PHP JEV_CommonFunctions::setColor方法代码示例

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


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

示例1: bgcolor

 function bgcolor($val = "")
 {
     if (JString::strlen($val) == 0) {
         if (!isset($this->_bgcolor)) {
             $this->_bgcolor = JEV_CommonFunctions::setColor($this);
         }
         return $this->_bgcolor;
     } else {
         $this->_bgcolor = $val;
     }
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:11,代码来源:jeventcal.php

示例2: listItemTask

?>
</th>
				</tr>

				<?php 
$k = 0;
$nullDate = $db->getNullDate();
for ($i = 0, $n = count($this->rows); $i < $n; $i++) {
    $row =& $this->rows[$i];
    ?>
					<tr class="row<?php 
    echo $k;
    ?>
">
						<td width="20" style="background-color:<?php 
    echo JEV_CommonFunctions::setColor($row);
    ?>
">
							<?php 
    echo JHtml::_('grid.id', $i, $row->id());
    ?>
						</td>
						<td >
							<a href="#edit" onclick="return listItemTask('cb<?php 
    echo $i;
    ?>
','icalevent.edit')" title="<?php 
    echo JText::_('JEV_CLICK_TO_EDIT');
    ?>
"><?php 
    echo $row->title();
开发者ID:poorgeek,项目名称:JEvents,代码行数:31,代码来源:overview.php

示例3: 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

示例4: getDataForAdmin

 function getDataForAdmin($creator_id, $limit, $limitstart, $showrepeats = false, $orderby = "")
 {
     $data = array();
     $is_event_editor = JEVHelper::isEventCreator();
     $user =& JFactory::getUser();
     $Itemid = JEVHelper::getItemid();
     $user =& JFactory::getUser();
     $db =& JFactory::getDBO();
     $cfg =& JEVConfig::getInstance();
     include_once JPATH_ADMINISTRATOR . "/components/" . JEV_COM_COMPONENT . "/libraries/colorMap.php";
     // Note that these are the vevents not the repeats
     if (!$showrepeats) {
         $total = $this->queryModel->countIcalEventsByCreator($creator_id);
     } else {
         $total = $this->queryModel->countIcalEventRepeatsByCreator($creator_id);
     }
     $data['total'] = $total;
     $data['limit'] = $limit;
     if ($data["total"] <= $data["limit"]) {
         $limitstart = 0;
     }
     $data["limitstart"] = $limitstart;
     // Note that these are the vevents not the repeats
     if (!$showrepeats) {
         $rows = $this->queryModel->listIcalEventsByCreator($creator_id, $limitstart, $limit, $orderby);
     } else {
         $rows = $this->queryModel->listIcalEventRepeatsByCreator($creator_id, $limitstart, $limit, $orderby);
     }
     $adminView = true;
     $num_events = count($rows);
     if ($num_events > 0) {
         for ($r = 0; $r < $num_events; $r++) {
             $row =& $rows[$r];
             $row->catname($row->getCategoryName());
             $row->contactlink(JEventsHTML::getUserMailtoLink($row->id(), $row->created_by(), true));
             $row->bgcolor = JEV_CommonFunctions::setColor($row);
             $row->fgcolor = JevMapColor($row->bgcolor);
         }
     }
     $data['rows'] = $rows;
     return $data;
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:42,代码来源:datamodel.php

示例5: setColours

 public static function setColours($row)
 {
     $cfg = JEVConfig::getInstance();
     if (!$cfg->get("multicategory", 0)) {
         return array(JEV_CommonFunctions::setColor($row));
     }
     static $catData;
     if (!isset($catData)) {
         $catData = JEV_CommonFunctions::getCategoryData();
     }
     $colours = array();
     foreach ($row->catids() as $catid) {
         if (is_object($row) && strtolower(get_class($row)) != "stdclass") {
             if ($cfg->get('com_calForceCatColorEventForm', 2) == '2') {
                 $colors[] = $catid > 0 && isset($catData[$catid]) ? $catData[$catid]->color : '#333333';
             } else {
                 $colors[] = $row->useCatColor() ? $catid > 0 && isset($catData[$catid]) ? $catData[$catid]->color : '#333333' : $row->color_bar();
             }
         } else {
             if ($cfg->get('com_calForceCatColorEventForm', 2) == '2') {
                 $colors[] = $row->catid > 0 && isset($catData[$catid]) ? $catData[$row->catid]->color : '#333333';
             } else {
                 $colors[] = $row->useCatColor ? $row->catid > 0 && isset($catData[$catid]) ? $catData[$row->catid]->color : '#333333' : $row->color_bar;
             }
         }
     }
     return $colors;
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:28,代码来源:commonfunctions.php


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