Template:Event
From syn2cat - HackerSpace.lu
(Difference between revisions)
m (logo) |
m (Get rid of error message if alternative picture value is nil) |
||
(80 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{#ifexpr:{{#time: U | {{{till|}}} }}<{{#time: U }}|<div style="border: 2px solid #007A20; padding: 0.5em 1em 0.3em 0.5em; color: #007A20;">'''Note:''' this article is about a passed event.</div>|}} | + | <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>|}} <!-- |
− | {| class="" cellpadding="2" cellspacing="0" <!-- | + | --> {{#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>|}} }} |
+ | {| class="wikitable" cellpadding="2" cellspacing="0" <!-- | ||
--> style="float: right; width: 300px; margin: 0 0 1em 1em; border: 2px solid #AAAAAA; background-color: #FFFFFF" | --> style="float: right; width: 300px; margin: 0 0 1em 1em; border: 2px solid #AAAAAA; background-color: #FFFFFF" | ||
|+ '''[[Form:Event|Add your Event]]''' | |+ '''[[Form:Event|Add your Event]]''' | ||
Line 17: | Line 18: | ||
<div style="font-size:110%;text-align:right;padding-right:3px;">[[Has subtitle::{{{subtitle|}}}]]</div> | <div style="font-size:110%;text-align:right;padding-right:3px;">[[Has subtitle::{{{subtitle|}}}]]</div> | ||
|- | |- | ||
− | | colspan="2" style="padding: 10px 0px; text-align:center;" |<!-- setting custom image if available-->[[File:{{#if: {{{logo|}}} |{{{logo}}}| | + | | colspan="2" style="padding: 10px 0px; text-align:center;" |<!-- setting custom image if available-->[[File:{{#if:{{{logo|}}}|{{{logo}}}|Weareinnovative.png}}|240px|link=]] |
|- | |- | ||
| style="padding: 0 7px;" | '''[[Template:Event#EventType|Type of Event]]''': || [[Is Event of Type::{{{eventtype}}}]] | | style="padding: 0 7px;" | '''[[Template:Event#EventType|Type of Event]]''': || [[Is Event of Type::{{{eventtype}}}]] | ||
Line 24: | Line 25: | ||
|- | |- | ||
| style="padding: 0 7px;" | '''[[Template:Event#Till|Till]]''': || [[EndDate::{{{till}}}]] | | style="padding: 0 7px;" | '''[[Template:Event#Till|Till]]''': || [[EndDate::{{{till}}}]] | ||
− | |||
− | |||
|- | |- | ||
| style="padding: 0 7px;" | '''[[Template:Event#Recurring|Recurring]]''': || [[Is Recurring::{{{recurring|}}}]] | | style="padding: 0 7px;" | '''[[Template:Event#Recurring|Recurring]]''': || [[Is Recurring::{{{recurring|}}}]] | ||
|- | |- | ||
− | | style="padding: 0 7px;" | '''[[Template:Event# | + | | style="padding: 0 7px;" | '''[[Template:Event#Organizer|Organizer]]''': || {{#arraymap:{{{organizer|}}}|,|x|[[Has organizer::Organisation:x|x]]}} |
− | + | ||
− | + | ||
|- | |- | ||
| style="padding: 0 7px;" | '''[[Template:Event#Cost|Cost]]''': || [[Has cost::{{{cost|}}}]] | | style="padding: 0 7px;" | '''[[Template:Event#Cost|Cost]]''': || [[Has cost::{{{cost|}}}]] | ||
|- | |- | ||
− | | style="padding: 0 7px;" | '''[[Template:Event# | + | | 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;" | '''[[Template:Event#Attendees|Attendees]]''': | + | | 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> | ||
|- | |- | ||
| 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;" | '''[[Template:Event#Contact Person|Contact Person(s)]]''': || {{#arraymap:{{{contact|}}}|,|x|[[Has Contact::User:x|x]] ([[Special:EmailUser/x|mail]]) }} | ||
Line 45: | Line 65: | ||
| colspan="2" style="padding: 0.5em; color: white; background-color: #AAAAAA" | <span style="font-size: 120%;">Location</span> | | colspan="2" style="padding: 0.5em; color: white; background-color: #AAAAAA" | <span style="font-size: 120%;">Location</span> | ||
|- | |- | ||
− | | style="padding: 0 7px;" | '''[[Template:Event#Where|Where]]''': || [[Has location::{{{location|}}}]] | + | | 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}}}}) |
|- | |- | ||
| style="vertical-align:top; padding: 0 7px;" | '''[[Template:Event#Map|Map]]''': | | style="vertical-align:top; padding: 0 7px;" | '''[[Template:Event#Map|Map]]''': | ||
| | | | ||
− | {{# | + | {{#display_map:{{#show:{{{location|}}}|?Has coordinates}} |
− | {{#show: {{{location|}}} | ?Has | + | |layers=osm-mapnik, osm-cyclemap |
− | |service= | + | |service=openlayers |
|width=250 | |width=250 | ||
|height=250 | |height=250 | ||
− | | | + | |controls=pan,zoom,type |
}} | }} | ||
|- | |- | ||
Line 60: | Line 80: | ||
|- | |- | ||
| style="padding: 0 7px;" | '''[[Template:Event#QrCode|QrCode]]''': || {{#qrcode:}} | | style="padding: 0 7px;" | '''[[Template:Event#QrCode|QrCode]]''': || {{#qrcode:}} | ||
+ | |- | ||
+ | | 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}} }} | ||
+ | |- | ||
+ | | style="padding: 0 7px;" | '''[[Template:Event#Alternate|Alternate picture]]''': || {{#if: {{{alternate_picture|}}} | [[Media:{{{alternate_picture|}}}|View]] | None }} | ||
+ | |- | ||
+ | | style="padding: 0 7px;" | '''[[Template:Event#Announce|Announce globally]]''': || [[Do Announce::{{#if: {{{description|}}} | {{{announce|}}} | no }}]] | ||
|} | |} | ||
<!-- *** displaying the description in the main section now *** --> | <!-- *** displaying the description in the main section now *** --> | ||
{{#if: {{{description|}}} | <div style="font-size:120%;">''[[Has description::{{{description|}}}]]''</div> | }} | {{#if: {{{description|}}} | <div style="font-size:120%;">''[[Has description::{{{description|}}}]]''</div> | }} | ||
− | |||
<!-- *** Let's automate the semantic info *** --> | <!-- *** Let's automate the semantic info *** --> | ||
{{#ifeq: {{{u19|}}} | yes | [[Category:U19]] }} | {{#ifeq: {{{u19|}}} | yes | [[Category:U19]] }} | ||
− | |||
<!-- *** Set variables that are not displayed on the page *** --> | <!-- *** Set variables that are not displayed on the page *** --> | ||
{{#set: | {{#set: | ||
Line 73: | Line 97: | ||
| Has coordinates={{#show: {{{location|}}} | ?Has coordinates|link=none}} | | Has coordinates={{#show: {{{location|}}} | ?Has coordinates|link=none}} | ||
| Has picture=File:{{{logo|}}} | | Has picture=File:{{{logo|}}} | ||
+ | | Has alternate picture={{#if:{{{alternate_picture|}}}|File:{{{alternate_picture|}}} }} | ||
| Has extraInfo={{{extrainfo|}}} | | Has extraInfo={{{extrainfo|}}} | ||
− | | Is External={{#ifeq: {{{ | + | | Is External={{#ifeq: {{{location|}}} | Hackerspace, Strassen | no | yes }} |
+ | | Has mandatory registration={{{req|}}} | ||
+ | | Url={{{url|}}} | ||
}} | }} | ||
− | |||
<!-- Switch Category on eventtype --> | <!-- Switch Category on eventtype --> | ||
{{#switch: {{{eventtype}}} | {{#switch: {{{eventtype}}} | ||
Line 87: | Line 113: | ||
| #default = [[Category:Event]] | | #default = [[Category:Event]] | ||
}} <!-- End Switch Category --> | }} <!-- End Switch Category --> | ||
− | |||
<!-- Only use the dates function on non-recurring events, else add to the RecurringEvent 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]] }} | {{#ifeq: {{{recurring|}}} | no | {{#arraymap: {{#dates: | StartDate={{{from}}} | EndDate={{{till}}} }}|,|x|[[Has date::x| ]] | }} | [[Category:RecurringEvent]] }} | ||
<!-- Set recurring data using a switch --> | <!-- Set recurring data using a switch --> | ||
− | {{#switch: {{{recurring}}} | + | {{#if: {{{from|}}} | |
− | | daily = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=day |period=1 }} | + | {{#switch: {{{recurring}}} |
− | | weekly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=week |period=1 }} | + | | daily = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=day |period=1 }} |
− | | bi-weekly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=week |period=2 }} | + | | weekly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=week |period=1 }} |
− | | monthly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=month |period=1 }} | + | | bi-weekly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=week |period=2 }} |
− | | dayofweekinmonth = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=dayofweekinmonth |period=1 }} | + | | monthly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=month |period=1 }} |
− | | bi-monthly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=month |period=2 }} | + | | dayofweekinmonth = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{till}}} |unit=dayofweekinmonth |period=1 }} |
− | | yearly = {{#set_recurring_event: property=Has date |start={{{from}}} | end={{{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> | ||
Line 104: | Line 131: | ||
<noinclude> | <noinclude> | ||
==Usage== | ==Usage== | ||
− | + | Please use the '''[[Form:Event|event form]]''' to add your event. It will validate your input.<br/> | |
− | + | <!-- | |
<br/> | <br/> | ||
<pre> | <pre> | ||
Line 122: | Line 149: | ||
| cost=0€ | | cost=0€ | ||
| u19 = <yes/no> | | u19 = <yes/no> | ||
− | | location= | + | | location=Level2 |
+ | | coordinates= | ||
| contact= <comma-delimited list of the organisers> | | contact= <comma-delimited list of the organisers> | ||
| attendees = <string> Everyone | | attendees = <string> Everyone | ||
Line 128: | Line 156: | ||
}} | }} | ||
</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.