Changeset 869


Ignore:
Timestamp:
12/20/07 22:00:53 (4 years ago)
Author:
bogdanpasoi@…
Message:

Calendar macro.

Location:
trunk
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/smf/SSI.php

    r868 r869  
    17161716                        LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = cal.ID_BOARD) 
    17171717                        LEFT JOIN {$db_prefix}topics AS t ON (t.ID_TOPIC = cal.ID_TOPIC) 
    1718                 WHERE cal.startDate <= '" . strftime('%Y-%m-%d', forum_time(false)) . "' 
    1719                         AND cal.endDate >= '" . strftime('%Y-%m-%d', forum_time(false)) . "' 
     1718                WHERE cal.endDate >= '" . strftime('%Y-%m-%d', forum_time(false)) . "' 
    17201719                        AND (cal.ID_BOARD = 0 OR $user_info[query_see_board]) 
    1721                 ORDER BY cal.startDate DESC 
     1720                ORDER BY cal.startDate 
    17221721                LIMIT $max_events", __FILE__, __LINE__); 
    17231722        $return = array(); 
     
    17611760 
    17621761        // Well the output method is echo. 
    1763         echo ' 
    1764                         <span style="color: #' . $modSettings['cal_eventcolor'] . ';">' . $txt['calendar4'] . '</span> '; 
     1762    echo '<div class="calendar">'; 
     1763    echo '<div class="header">'; 
     1764    echo '<a href="'.IA_URL.'/forum?action=calendar">In curand..</a></div>'; 
    17651765        foreach ($return as $mday => $array) 
     1766    { 
     1767        echo '<div class="date">'.strftime("%A, %d %B", strtotime($mday)).'</div>'; 
    17661768                foreach ($array as $event) 
    17671769                { 
    1768                         if ($event['can_edit']) 
    1769                                 echo ' 
    1770                                 <a href="' . $event['modify_href'] . '" style="color: #FF0000;">*</a> '; 
    1771  
    1772                         echo ' 
    1773                                 ' . $event['link'] . (!$event['is_last'] ? ', ' : ''); 
     1770            echo '<div class="event">'; 
     1771                        if ($event['can_edit']) { 
     1772                                echo '<a href="' . $event['modify_href'] . '" style="color: #FF0000;">&raquo;</a> '; 
     1773            } else { 
     1774                echo '&raquo'; 
     1775            } 
     1776                        echo '' . $event['link'] . (!$event['is_last'] ? ', ' : ''); 
     1777            echo '</div>'; 
    17741778                } 
     1779    } 
     1780    echo '</div>'; 
    17751781} 
    17761782 
  • trunk/www/static/css/screen.css

    r868 r869  
    12361236} 
    12371237 
     1238/* calendar */ 
     1239 
     1240.calendar { 
     1241    border: 1px solid #cccccc; 
     1242    background: url(../images/date.png) no-repeat top left; 
     1243    width: 170px; 
     1244    padding-left: 0.5ex; 
     1245    padding-right: 0.5ex; 
     1246    margin: 0pt auto; 
     1247    line-height: 1.2em; 
     1248    -moz-border-radius: 7px; 
     1249} 
     1250 
     1251.calendar .date { 
     1252    font-size: 8pt; 
     1253    font-weight: bold; 
     1254    margin-top: 4pt; 
     1255} 
     1256.calendar .header { 
     1257    text-align: center; 
     1258    font-weight: bold; 
     1259    padding-top: 2pt; 
     1260    padding-bottom: 3pt; 
     1261    border-bottom: 1px solid #cccccc; 
     1262} 
     1263 
     1264.calendar a { 
     1265    color: #6a6a6b; 
     1266} 
     1267 
     1268.calendar .header img { 
     1269    vertical-align: middle; 
     1270} 
     1271 
     1272.calendar .event { 
     1273    font-size: 8pt; 
     1274} 
     1275 
    12381276/* quote */ 
    12391277.quote { 
Note: See TracChangeset for help on using the changeset viewer.