|
|
(14 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
− | __FORCETOC__
| + | #REDIRECT [[Calendar]] |
− | ==Installation==
| |
− | This is a calendaring application based on DPL functionality. It is very flexible because it is based on templates which you can modify and adapt to your needs.
| |
− | | |
− | ==Architecture==
| |
− | | |
− | {{#wgraph: svg| thumb=90 |
| |
− | node Current_events {type cal}
| |
− | | |
− | node 2007-09-28-Event_A {}
| |
− | node YYYY-10-04-Event_B {}
| |
− | node 2007-10-19-Event_C {}
| |
− | | |
− | node Event {type tpl}
| |
− | node CatEvent {type category label Events}
| |
− | node CatHoliday {type category label Holiday}
| |
− | edge Event CatEvent {type cat}
| |
− | node Event_template {type editsample}
| |
− | node Event_intro {type editintro}
| |
− | edge Event_intro Event_template {kind rightnear type editintro}
| |
− | edge 2007-09-28-Event_A Event {type incl}
| |
− | edge YYYY-10-04-Event_B Event {type incl}
| |
− | edge YYYY-10-04-Event_B CatHoliday {type catgeory}
| |
− | edge 2007-10-19-Event_C Event {type incl}
| |
− | edge Event_template 2007-09-28-Event_A {type edit}
| |
− | edge Event_template YYYY-10-04-Event_B {type edit}
| |
− | edge Event_template 2007-10-19-Event_C {type edit}
| |
− | edge Event_template Event {type incl}
| |
− | | |
− | edge Current_events Calendar_month {type incl}
| |
− | | |
− | node Calendar_month {type tpl}
| |
− | node CalendarSingle {type tpl}
| |
− | node Calendar_link {type tpl}
| |
− | edge Calendar_month 2007-09-28-Event_A {type dpl}
| |
− | edge Calendar_month YYYY-10-04-Event_B {type dpl}
| |
− | edge Calendar_month 2007-10-19-Event_C {type dpl}
| |
− | edge Calendar_month CalendarSingle {type incl}
| |
− | edge CalendarSingle Calendar_link {type incl}
| |
− | edge CalendarSingle Current_events {type link label 'next month<br>prev. month' }
| |
− | | |
− | node Calendar/MonthStartMon {type tpl}
| |
− | node Calendar/MonthStartTue {type tpl}
| |
− | | |
− | edge CalendarSingle Calendar/MonthStartMon {type incl}
| |
− | edge CalendarSingle Calendar/MonthStartTue {type incl}
| |
− | | |
− | nodetype tpl {color yellow }
| |
− | nodetype category {color lightgreen}
| |
− | nodetype cal {color lightblue }
| |
− | nodetype editsample {color lightcyan }
| |
− | nodetype editintro {color lightcyan }
| |
− | nodetype * {color #ffdddd bordercolor darkgray}
| |
− | | |
− | edgetype incl {color darkgray}
| |
− | edgetype link {color blue}
| |
− | edgetype cat {color darkgreen}
| |
− | edgetype dpl {color red thickness 4 label 'DPL query'}
| |
− | edgetype edit {linestyle dotted color blue}
| |
− | | |
− | node.fontname helvR10
| |
− | }}
| |
− | * Templates are in yellow.
| |
− | * The pages describing an event are in red. Their names must start with the date of the event (format: YYYY-MM-DD) or with 'YYYY-' plus month and day (for recurring yearly events).
| |
− | * We use two edit helpers (in cyan) when event pages are created.
| |
− | * The entry page for the calendar (''Current events'') is in blue.
| |
− | * Categories are in green.
| |
− | | |
− | The design is as follows:
| |
− | # The user calls the entry page("Current events"). Be careful if you change its name: The name of this page must be passed as an argument (named 'basepage') to the template 'Calendar month'.
| |
− | # The basepage can be called by the user without any arguments. Then it uses a date function to calculate the current month. It can also be called from another calendar page - in which case the desired year & month are passed as parameters via the [[Call extension]].
| |
− | # Template 'Calendar month' ...
| |
− | #* shows the calendar box. The calendar box contains links to the adjoining months. Days link to their event in the event list. You could change that to make the links point directrly to the event definitions.
| |
− | #* uses a DPL query to find all articles in category 'Event' which belong to the selected year/month
| |
− | #* shows the selected articles in a list, together with some selected chapters (like Participants ..) and with their categories
| |
− | #* offers an edit box to create a new event (using the edit template "Event template")
| |
− | | |
− | | |
− | == Steps needed to install the DPL calendar ==
| |
− | | |
− | === Install extensions ===
| |
− | | |
− | You need
| |
− | Download the following extensions:
| |
− | #[http://meta.wikimedia.org/wiki/ParserFunctions parserfunctions] from MW
| |
− | #[http://meta.wikimedia.org/wiki/Help:Inputbox inputbox] from MW
| |
− | # Veriables extensions from MW
| |
− | # StringFunctions extension from MW
| |
− | #[[Download|DPL extension]] from this site.
| |
− | # Call extension from this site (part of the above download).
| |
− | | |
− | ===Download the following templates, and create them into your wiki===
| |
− | | |
− | Download from this wiki and create identical pages in your wiki:
| |
− | | |
− | * [[Current events]]
| |
− | * [[Template:Calendar month]]
| |
− | * [[Template:CalendarSingle]]
| |
− | * [[Template:Calendar link]]
| |
− | * Seven templates (for each start day of a month)
| |
− | ** <small>[[Template:Calendar/MonthStartMon]]</small>
| |
− | ** <small>[[Template:Calendar/MonthStartTue]]</small>
| |
− | ** <small>[[Template:Calendar/MonthStartWed]]</small>
| |
− | ** <small>[[Template:Calendar/MonthStartThu]]</small>
| |
− | ** <small>[[Template:Calendar/MonthStartFri]]</small>
| |
− | ** <small>[[Template:Calendar/MonthStartSat]]</small>
| |
− | ** <small>[[Template:Calendar/MonthStartSun]]</small>
| |
− | * Little helpers
| |
− | ** [[Template:!]] //a template used for table formatting within #if
| |
− | ** [[Template:(!]] //a template used for table formatting within #if
| |
− | ** [[Template:!)]] //a template used for table formatting within #if
| |
− | * [[Event template]]
| |
− | * [[Event intro]]
| |
− | * [[Template:Event]]
| |
− | | |
− | === Using the calendar ===
| |
− | | |
− | Create new documents which describe events.
| |
− | * Follow the naming convention: The name must start with the date, followed by some short text dewscriobing the event
| |
− | *: Example: "2007-10-31 some important event"
| |
− | * Note that your document must belong to category 'Events'. This will normally automatically be the case by including the template "Event" in the first line of your evebt description.
| |
− | * You can add your document to other categories as well; these will show up in the event table below the calendar
| |
− | * You can defíne yearly recurring events by using 'YYYY' instead of the exact year.
| |
− | *: Example: "YYYY-12-24 Christmas Evening"
| |
− | | |
− | === Customizing ===
| |
− | | |
− | To customize the list of events that are displayed below each calendar, take a close look in the DPL manual at the [[include]] parameter and the [[format]] parameter. In our example in template [[Template:calendar month]], we have:
| |
− | <pre>
| |
− | #Summary,#Participants,#Location
| |
− | </pre>
| |
− | which means to take the content of ''Summary'', ''Participants'' and ''Location'' sections.
| |
− | | |
− | You could modify the name of sections, the number of sections or even take the parameters of a template inside the event page. Again, see the DPL manual.
| |
− | | |
− | ==Demo==
| |
− | Now we are going to include ''Current events'' which will give us the actual calendar right here:
| |
− | {{:Current events}}
| |
− | [[Category:Test]]
| |