Difference between revisions of "Calendar"

From Organic Design wiki
(Starting a calender to see how it goes)
 
m
 
(36 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<?
+
__NOEDITSECTION__
 +
*This calendar uses the [[MW:Extension:SimpleCalendar|SimpleCalendar extension]]
 +
{{#calendar:query=preload=Template:Create_news}}
  
function month( $m, $y ) {
+
[[Category:No files or comments]]
$c = ' align=center';
 
if ( !$day = date( 'w', $ts = mktime( 0, 0, 0, $m, 1, $y) ) ) $day = 7;
 
$month = date( 'F', $ts );
 
$article = "<table border=0><tr><th colspan=7$c>$month";
 
$article .= "\n<th><td$c>M<td$c>T<td$c>W<td$c>T<td$c>F<td$c>S<td$c>S\n";
 
if ( $d > 1 ) $article .= '<tr>'.str_repeat( '<td>', $d-1 );
 
for ( $i = $d; $i < 32; $i++ ) if ( checkdate( $m, $i, $y ) ) {
 
if ( $i%7 == 1 ) $article .= "\n<tr>";
 
$day = $d < 10 ? "0$d" : $d;
 
$article .= "<td$c><b>[[$d $m $y|$d]]</b>";
 
}
 
$article .= "\n</table>";
 
return $article;
 
}
 
 
 
$article = "<table width=100% border=0 cellpadding=5 cellspacing=5><tr><td>\n";
 
$m = 1;
 
$y = date( 'Y' );
 
for ( $rows = 0; $rows < 3; $rows++ ) {
 
$article .= "\n<tr>";
 
for ( $cols = 0; $cols < 3; $cols++ )
 
$article .= "\n<td style='border:groove 2px #eeeeee'>".month( $m++, $y );
 
 
 
      }
 
$article .= '</table>';
 
?>
 

Latest revision as of 15:01, 19 June 2015

{{#calendar:query=preload=Template:Create_news}}