Template:Event

From syn2cat - HackerSpace.lu
(Difference between revisions)
Jump to: navigation, search
m (adhering to standards)
(making obsolete the recurring events template (trial))
Line 72: Line 72:
 
<!-- End Switch Category -->
 
<!-- End Switch Category -->
 
{{#set:Is U19={{{u19}}}|Has PageName={{FULLPAGENAME}}|Has coordinates={{#show: {{{location|}}} | ?Has coordinates|link=none}} }}
 
{{#set:Is U19={{{u19}}}|Has PageName={{FULLPAGENAME}}|Has coordinates={{#show: {{{location|}}} | ?Has coordinates|link=none}} }}
<!-- Only use the dates function on non-recurring events -->
+
<!-- Only use the dates function on non-recurring events, else add to the RecurringEvent category -->
{{#ifeq: {{{recurring}}} | no | {{#arraymap: {{#dates: | StartDate={{{from}}} | EndDate={{{till}}} }}|,|x|[[Has date::x| ]]| }} }}
+
{{#ifeq: {{{recurring}}} | no | {{#arraymap: {{#dates: | StartDate={{{from}}} | EndDate={{{till}}} }}|,|x|[[Has date::x| ]] | [[Category:RecurringEvent]] }} }}
<!-- Recurring Events Replace by switch?! -->
+
<!-- Set recurring data using a switch -->
{{#ifeq: {{{recurring|}}} | daily | {{RecurringEvent | startDate={{{from}}} | endDate={{{till}}} | unit=day | period=1 }} }}
+
{{#switch: {{{recurring}}}
{{#ifeq: {{{recurring|}}} | weekly | {{RecurringEvent | startDate={{{from}}} | endDate={{{till}}} | unit=week | period=1 }} }}
+
| daily = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=day |period=1 }}
{{#ifeq: {{{recurring|}}} | bi-weekly | {{RecurringEvent | startDate={{{from}}} | endDate={{{till}}} | unit=week | period=2 }} }}
+
| weekly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=week |period=1 }}
{{#ifeq: {{{recurring|}}} | monthly | {{RecurringEvent | startDate={{{from}}} | endDate={{{till}}} | unit=month | period=1 }} }}
+
| bi-weekly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=week |period=2 }}
{{#ifeq: {{{recurring|}}} | dayofweekinmonth | {{RecurringEvent | startDate={{{from}}} | endDate={{{till}}} | unit=dayofweekinmonth | period=1 }} }}
+
| monthly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=month |period=1 }}
{{#ifeq: {{{recurring|}}} | bi-monthly | {{RecurringEvent | startDate={{{from}}} | endDate={{{till}}} | unit=month | period=2 }} }}
+
| dayofweekinmonth = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=dayofweekinmonth |period=1 }}
{{#ifeq: {{{recurring|}}} | yearly | {{RecurringEvent | startDate={{{from}}} | endDate={{{till}}} | unit=year | period=1 }} }}
+
| bi-monthly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=month |period=2 }}
 +
| yearly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=year |period=1 }}
 +
}}
 
</includeonly>
 
</includeonly>
 
<noinclude>
 
<noinclude>

Revision as of 15:36, 1 November 2010


Usage

Copy and paste this code or simply use the Form:Event to add your event.
If you don't set a "till" date, the "from" date will be used.

{{Event
| logo = <filename>
| eventtype = <party, conference, camp, workshop, meeting>
| what = <event title>
| intro= <event description>
| from= <Datetime>
| till= <Datetime>
| recurring = <no, daily, weekly, bi-weekly, monthly, dayofweekinmonth, bi-monthly, yearly>
| cost=0€
| u19 = <yes/no>
| location=Hackerspace, Strassen
| contact= <comma-delimited list of the organisers>
| attendees = <string> Everyone
| url=http://www.website.com
}}
Personal tools
Namespaces

Variants
Actions
Navigation
syn2cat
Hackerspace
Activities
Initiatives
Community
Tools
Tools