Template:Event

From syn2cat - HackerSpace.lu
(Difference between revisions)
Jump to: navigation, search
m
m (Get rid of error message if alternative picture value is nil)
 
(205 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{| align="right" cellpadding="0" cellspacing="5"  style="position:relative; margin: 0 0 0.5em 1em; border-collapse: collapse; border: 1px solid #aaa; background: #fff; float: right; clear: right; width: 20em"
+
<includeonly>{{#ifexpr:{{#time: U | {{{till|}}} }}<{{#time: U }}|<div style="border: 2px solid #007A20; padding: 0.5em 1em 0.3em 0.5em; color: #007A20; width:840px;">'''Note:''' this article is about a passed event.</div>|}} <!--
| align="center" colspan="2" style="background-color: white; text-align: center;" |
+
--> {{#if:{{{description|}}}||{{#ifeq: {{{announce|}}}|yes|<div style="border: 2px solid #007A20; padding: 0.5em 1em 0.3em 0.5em; color: red; width:840px;">'''Warning:''' this event is set to '''announce globally''' but does not have a description. Thus the property has been set to "'''no'''".</div>|}} }}
{| width="100%"
+
{| class="wikitable" cellpadding="2" cellspacing="0" <!--
|- class="ext-header"
+
--> style="float: right; width: 300px; margin: 0 0 1em 1em; border: 2px solid #AAAAAA; background-color: #FFFFFF"
! style="padding: 7px; font-size: 1.5em; color: white; background: #000066" align="center" | [[Image:Event.png|left|40px]] {{PAGENAME}}
+
|+ '''[[Form:Event|Add your Event]]'''
 
|-
 
|-
| style="padding: 10px 0px;" | {{#if: {{{logo|}}} | [[Image:{{{logo}}}|250px]] | [[Image:G8033.png|200px]] }}
+
! colspan="2" <!-- This is the header
 +
--> style="padding: 0.5em 0 0 0.5em; color: white; background-color: #AAAAAA" <!--
 +
Switch Icons on eventtype
 +
--> |
 +
{{#switch: {{{eventtype}}}
 +
| Workshop = [[Image:Workshop.png|link=|left|40px]]
 +
| Meeting = [[Image:Meeting.png|link=|left|40px]]
 +
| Party = [[Image:Party.png|link=|left|40px]]
 +
| Camp = [[Image:Camp.png|link=|left|40px]]
 +
| #default = [[Image:Event.png|link=|left|40px]]
 +
}}<div style="font-size: 150%;text-align:right;padding-right:3px;">{{#if:{{{what|}}}|{{{what}}}|{{PAGENAME}} }}</div>
 +
<div style="font-size:110%;text-align:right;padding-right:3px;">[[Has subtitle::{{{subtitle|}}}]]</div>
 
|-
 
|-
! style="padding: 0 7px; background: #CCCCFF" | Title:
+
| colspan="2" style="padding: 10px 0px; text-align:center;" |<!-- setting custom image if available-->[[File:{{#if:{{{logo|}}}|{{{logo}}}|Weareinnovative.png}}|240px|link=]]
 
|-
 
|-
| {{{what}}}
+
| style="padding: 0 7px;"  | '''[[Template:Event#EventType|Type of Event]]''': || [[Is Event of Type::{{{eventtype}}}]]
 
|-
 
|-
! style="padding: 0 7px; background: #CCCCFF" | Tagline:
+
| style="padding: 0 7px;"  | '''[[Template:Event#From|From]]''': || [[StartDate::{{{from}}}]]
 
|-
 
|-
| [[Description::{{{tagline|}}}]]
+
| style="padding: 0 7px;"  | '''[[Template:Event#Till|Till]]''': || [[EndDate::{{{till}}}]]
 
|-
 
|-
! style="padding: 0 7px; background: #CCCCFF" | From:
+
| style="padding: 0 7px;"  | '''[[Template:Event#Recurring|Recurring]]''': || [[Is Recurring::{{{recurring|}}}]]
 
|-
 
|-
| [[StartDate::{{{from}}}]]
+
| style="padding: 0 7px;"  | '''[[Template:Event#Organizer|Organizer]]''': || {{#arraymap:{{{organizer|}}}|,|x|[[Has organizer::Organisation:x|x]]}}
 
|-
 
|-
! style="padding: 0 7px; background: #CCCCFF" | Till:
+
| style="padding: 0 7px;" | '''[[Template:Event#Cost|Cost]]''': || [[Has cost::{{{cost|}}}]]
 
|-
 
|-
| {{#if: {{{till|}}} | {{{till}}} | {{{from}}} }}
+
| style="padding: 0 7px;" | '''[[Template:Event#Registration|Mandatory registration]]''':  || {{{reg|}}}
 +
{{#if: {{{ticket_url|}}} |
 +
{{-}}
 +
{{!}} style="padding: 0 7px;" {{!}} '''[[Template:Event#Ticket_URL|Tickets]]''':  {{!!}} [[Has ticket url::{{{ticket_url|}}}|Buy a ticket!]]
 +
| }}
 +
{{#if: {{{url|}}} |
 +
{{-}}
 +
{{!}} style="padding: 0 7px;" {{!}} '''[[Template:Event#Website|Website]]''':  {{!!}} {{#ifexpr: {{#len: {{{url}}} }} > 26 | [{{{url}}} {{#sub:{{{url}}}|0|25}}...] | {{{url|}}} }}
 +
| }}
 
|-
 
|-
! style="padding: 0 7px; background: #CCCCFF" | Where:
+
| style="padding: 0 7px;" | '''[[Template:Event#Attendees|Attendees]]''': || {{#arraymap:{{{attendees|}}}|,|x|[[Has attendee::User:x|x]]}}<br/><span style="font-weight:bold;text-decoration:underline;margin-left:6px;"><!--
 +
-->{{#ifanon: [[Special:UserLogin|Log-in to RSVP]] |
 +
{{#autoedit:form=Event
 +
|target={{FULLPAGENAME}}
 +
|link text=»Add me!«
 +
|query string=Event[attendees]={{#arraymap:
 +
{{#ask:[[{{FULLPAGENAME}}]]
 +
|?Has attendee
 +
|format=list
 +
|headers=hide
 +
|mainlabel=-
 +
|link=none
 +
}}
 +
|,|x|{{#sub:x|5|0}}
 +
}}, {{#username:}} | reload}}
 +
}}</span>
 
|-
 
|-
| [[city::{{{city}}}]], {{#if: {{{state|}}} | {{{state}}}, }} [[country::{{{country}}}]]
+
| style="padding: 0 7px;" | '''[[Template:Event#Contact Person|Contact Person(s)]]''': || {{#arraymap:{{{contact|}}}|,|x|[[Has Contact::User:x|x]] ([[Special:EmailUser/x|mail]]) }}
 
|-
 
|-
! style="padding: 0 7px; background: #CCCCFF" | Cost:
+
| style="padding: 0 7px;" | '''[[Template:Event#Keywords|Keywords]]''': || {{#arraymap:{{{keywords|}}}|,|x|[[Has keyword::x|x]] }}
 
|-
 
|-
| {{{cost|}}}
+
| colspan="2" style="padding: 0.5em; color: white; background-color: #AAAAAA" | <span style="font-size: 120%;">Location</span>
 
|-
 
|-
! style="padding: 0 7px; background: #CCCCFF" | Organiser:
+
| style="padding: 0 7px;" | '''[[Template:Event#Where|Where]]''': || [[Has location::{{{location|}}}]] ({{Address|{{#show: {{{location|}}} | ?Has address|link=none}}|{{#show: {{{location|}}} | ?Has city}}|{{#show: {{{location|}}}|?Has country}}}})
 
|-
 
|-
| {{#arraymap: {{{organisers|}}}|,|x|[[Organiser::User:x|x]]|,}}
+
| style="vertical-align:top; padding: 0 7px;" | '''[[Template:Event#Map|Map]]''':
 +
|
 +
{{#display_map:{{#show:{{{location|}}}|?Has coordinates}}
 +
|layers=osm-mapnik, osm-cyclemap
 +
|service=openlayers
 +
|width=250
 +
|height=250
 +
|controls=pan,zoom,type
 +
}}
 
|-
 
|-
! style="padding: 0 7px; background: #CCCCFF" | Who can attend:
+
| colspan="2" style="padding: 0.5em; color: white; background-color: #AAAAAA" | <span style="font-size: 120%;">Tools</span>
 
|-
 
|-
| [[Attendees::{{{attendees|}}}]]
+
| style="padding: 0 7px;"  | '''[[Template:Event#QrCode|QrCode]]''': || {{#qrcode:}}
 
|-
 
|-
! style="padding: 0 7px; background: #CCCCFF" | URL:
+
| style="padding: 0 7px;"  | '''[[Template:Event#iCal|Add to your calendar]]''': || Download {{#show: {{PAGENAME}}  | ?Has PageName | ?StartDate = start | ?EndDate = end | format=icalendar |icalendartitle=syn2cat-{{PAGENAME}} }}
 
|-
 
|-
| [[url::{{{url|}}}]]
+
| style="padding: 0 7px;" | '''[[Template:Event#Alternate|Alternate picture]]''': || {{#if: {{{alternate_picture|}}} | [[Media:{{{alternate_picture|}}}|View]] | None }}
 
|-
 
|-
! style="padding: 0 7px; background: #CCCCFF" | Map:
+
| style="padding: 0 7px;"  | '''[[Template:Event#Announce|Announce globally]]''': || [[Do Announce::{{#if: {{{description|}}} | {{{announce|}}} | no }}]]
|-
+
| {{#if: {{{coordinates|}}} | {{SmallMap|coordinates={{{coordinates}}} }} }}
+
|}
+
 
|}
 
|}
 +
<!-- *** displaying the description in the main section now *** -->
 +
{{#if: {{{description|}}} | <div style="font-size:120%;">''[[Has description::{{{description|}}}]]''</div> | }}
 
<!-- *** Let's automate the semantic info *** -->
 
<!-- *** Let's automate the semantic info *** -->
{{#if: {{{till|}}} |[[EndDate::{{{till}}}| ]] | [[EndDate::{{{from}}}| ]]}}
+
{{#ifeq: {{{u19|}}} | yes | [[Category:U19]] }}
{{#arraymap: {{#dates: | StartDate={{{from}}} | EndDate={{{till}}} }}|,|x|[[Has date::x| ]]| }}
+
<!-- *** Set variables that are not displayed on the page *** -->
[[location::{{{city}}}, {{{country}}}| ]]
+
{{#set:
{{#if: {{{state|}}} | [[state::{{{state}}}| ]] }}
+
Is U19={{{u19}}}  
{{#if: {{{cost|}}} | [[cost::{{{cost}}}| ]] }}
+
| Has PageName={{FULLPAGENAME}}
{{#if: {{{coordinates|}}} | [[Has coordinates::{{{coordinates}}}| ]] }}
+
| Has coordinates={{#show: {{{location|}}} | ?Has coordinates|link=none}}
[[Is Recurring::no| ]]
+
| Has picture=File:{{{logo|}}}  
[[Category:Event]]</includeonly>
+
| Has alternate picture={{#if:{{{alternate_picture|}}}|File:{{{alternate_picture|}}} }}
 +
| Has extraInfo={{{extrainfo|}}}
 +
| Is External={{#ifeq: {{{location|}}} | Hackerspace, Strassen | no | yes }}
 +
| Has mandatory registration={{{req|}}}
 +
| Url={{{url|}}}
 +
}}
 +
<!-- Switch Category on eventtype -->
 +
{{#switch: {{{eventtype}}}
 +
| Meeting = [[Category:Meeting]]
 +
| Workshop = [[Category:Workshop]]
 +
| Camp = [[Category:Camp]]
 +
| Conference = [[Category:Conference]]
 +
| Party = [[Category:Party]]
 +
| Event = [[Category:Event]]
 +
| #default = [[Category:Event]]
 +
}} <!-- End Switch Category -->
 +
<!-- 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| ]] | }} | [[Category:RecurringEvent]] }}
 +
<!-- Set recurring data using a switch -->
 +
{{#if: {{{from|}}} |
 +
{{#switch: {{{recurring}}}
 +
| daily = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=day |period=1 }}
 +
| weekly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=week |period=1 }}
 +
| bi-weekly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=week |period=2 }}
 +
| monthly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=month |period=1 }}
 +
| dayofweekinmonth = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=dayofweekinmonth |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>
  
 
<noinclude>
 
<noinclude>
 
==Usage==
 
==Usage==
Copy and paste this code or simply use the [[Form:Event]] to add your event.<br/>
+
Please use the '''[[Form:Event|event form]]''' to add your event. It will validate your input.<br/>
If you don't set a "till" date, the "from" date will be used.
+
<!--
 
<br/>
 
<br/>
 
<pre>
 
<pre>
 
{{Event
 
{{Event
 
| logo = <filename>
 
| logo = <filename>
| what = <event title>
+
| what = <alternate name to pagename, optional>
| tagline= <event description>
+
| eventtype = <party, conference, camp, workshop, meeting>
 +
| subtitle = <event subtitle>
 +
| description= <event description>
 +
| extrainfo = <information that will be displayed on the frontpage on the day this event takes place>
 
| from= <Datetime>
 
| from= <Datetime>
 
| till= <Datetime>
 
| till= <Datetime>
| country = Luxembourg
+
| organizer=<string> (If this is set to anything other than syn2cat, the event will be marked as external)
 +
| announce=<no,yes> (Whether an event is supposed to be announced on twitter, facebook and external agendas)
 +
| recurring = <no, daily, weekly, bi-weekly, monthly, dayofweekinmonth, bi-monthly, yearly>
 
| cost=0€
 
| cost=0€
| state=n.a.
+
| u19 = <yes/no>
| city=Strassen
+
| location=Level2
| organisers= <comma-delimited list of the organisers>
+
| coordinates=
 +
| contact= <comma-delimited list of the organisers>
 
| attendees = <string> Everyone
 
| attendees = <string> Everyone
| url=http://www.external.com
+
| url=http://www.website.com
| coordinates=xyz.abc° N, uio.asd° E
+
 
}}
 
}}
 
</pre>
 
</pre>
 +
-->
 
</noinclude>
 
</noinclude>

Latest revision as of 13:03, 7 September 2014


[edit] Usage

Please use the event form to add your event. It will validate your input.

Personal tools
Namespaces

Variants
Actions
Navigation
syn2cat
Hackerspace
Activities
Initiatives
Community
Tools
Tools