ewiki

module/calendar

The calendar plugin enables you to add an editable calendar to
every WikiPage+. It is not a fully integral part of ewiki, and needs
additional calls from yoursite.php to integrate nicely into your
sites layout.

You even don't need to allow a calendar to be added to every page,
you can just include the plugin file and use the _one_ page called
"Calendar" or "YearCalendar+", where everybody can make additions.

The coolest about this plugin is, that it nicely integrates into
the common WikiNameSpace+.

Just include("plugins/calendar.php"); so it gets available.
In yoursite.php integrate it as follows:

<?php
    ...

    echo ewiki_page();    // print current pages content, as usual

    ...

    if (  calendar_exists()  )
    {
       ...
       echo calendar();      // print calendar for current page
    }
    else {
       ...                   // else only a link to the cal. page
       echo "<a href=\"?id=calendar/$ewiki_id\">ShowCalendar+</a>";
    }

?>

The calendar() function call emits the html for the calendar of the
currently viewed page (see ewiki_page() call).

The function calendar_exists() only checks for already existing
event entries in the calendar, so the calendar won't show up, if
there isn't yet anything inside (so only the "ShowCalendar+" link at
the bottom of the page will link to the still empty calendar). You
can of course leave out this function call or alternatively call
it with calendar_exists($always=true) if you want the calendar to
appear most of the time / or for all pages.

Please note the "fragments/calendar.css" file, which illustrates
how to tweak layout and look of the generated calendars.

This plugin was contributed by Carsten Senf (originally
implemented for good old PhpWiki+).
prev << "module/calendar"
next >> "module/downloads"


You cannot modify the README.plugins file, but anyhow any ideas or suggestion should as usually get filed on BugReports, UserSuggestions or even better the README.plugins.Discussion.