diff -r -u phpwiki-1.2.0/index.php phpwiki/index.php --- phpwiki-1.2.0/index.php Wed Nov 8 15:34:06 2000 +++ phpwiki/index.php Thu Aug 30 18:45:09 2001 @@ -36,6 +36,8 @@ include "lib/pageinfo.php"; } elseif (isset($diff)) { include "lib/diff.php"; + } elseif (isset($calendar)) { + include "lib/calendar.php"; } else { include "lib/display.php"; // defaults to FrontPage } diff -r -u phpwiki-1.2.0/lib/config.php phpwiki/lib/config.php --- phpwiki-1.2.0/lib/config.php Wed Jan 31 07:38:10 2001 +++ phpwiki/lib/config.php Thu Aug 30 18:44:02 2001 @@ -142,6 +142,7 @@ // formats are given as format strings to PHP date() function $datetimeformat = "F j, Y"; // may contain time of day $dateformat = "F j, Y"; // must not contain time + $caldateformat = "m/d/Y"; // must not contain time // this defines how many page names to list when displaying // the MostPopular pages; the default is to show the 20 most popular pages Only in phpwiki/lib: config.php.orig diff -r -u phpwiki-1.2.0/lib/stdlib.php phpwiki/lib/stdlib.php --- phpwiki-1.2.0/lib/stdlib.php Mon Jan 15 12:32:57 2001 +++ phpwiki/lib/stdlib.php Thu Aug 30 18:41:19 2001 @@ -10,6 +10,7 @@ RenderQuickSearch($value) RenderFullSearch($value) RenderMostPopular() + RenderCalendar($month, $year) CookSpaces($pagearray) class Stack (push(), pop(), cnt(), top()) SetHTMLOutputMode($newmode, $depth) @@ -105,6 +106,69 @@ return $result; } + function RenderCalendar($month, $year, $more_link=TRUE) { + global $caldateformat, $ScriptUrl, $dbi; + + exec( "/usr/bin/cal $month $year", $result ); + array_pop($result); + + $output = "
'; + $output .= ereg_replace(" ", " ", + ereg_replace(" {2,}", "", array_shift($result))); + $output .= " | ||||||
'; + $output .= ereg_replace(" ", " | \n", + array_shift($result)); + $output .= " | |||||
' : ' | '; + + $output .= IsWikiPage($dbi, $page) ? + "" : + ""; + $output .= "$day"; + + $output .= " | \n"; + } + $output .= "|||||
'; + $output .= "more..."; + $output .= " |