Template:Infobox event: Difference between revisions
No edit summary |
(Removing SMW) |
||
| (105 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<noinclude>{{#cargo_declare: _table = CommunityEvents |
|||
{| class="infobox bordered" border="1" cellpadding="3" style="border-collapse:collapse;width: 22em; font-size: smaller; text-align: left; float:right;margin-left:5px;" |
|||
| Organizers = Wikitext |
|||
! colspan="2" style="background-color: #ddddff; font-size: larger; text-align: center;" | ''{{{title}}}'' |
|||
| Status = String (allowed values=Active,On Hiatus,Defunct,TBD) |
|||
|- |
|||
| FirstDate = Date |
|||
{{#if:{{{image|}}}| |
|||
| LastDate = Date |
|||
{{!}} colspan="2" style="font-size: 6; text-align: center;" {{!}} {{{image|}}}<br />{{{caption|}}} {{#set:hasimage=True}} |
|||
| NextDateStart = Date |
|||
| NextDateEnd = Date |
|||
| Eventnotscheduled = Boolean |
|||
| Setting = Wikitext |
|||
| Attendees = Integer |
|||
| Website = URL |
|||
| Country = String |
|||
| City = String |
|||
| State = String |
|||
| EventType = String (allowed values=Gather,Minigather,Meetup) |
|||
}} |
}} |
||
[[Category:Infobox templates|{{PAGENAME}}]] |
|||
|- |
|||
</noinclude>{{Infobox |
|||
! style="background-color: #ddddff;" | Organizer(s) |
|||
|name = {{FULLPAGENAME}} |
|||
| {{{organizer}}} |
|||
|bodystyle = |
|||
|- |
|||
|title = {{PAGENAME}} |
|||
! style="background-color: #ddddff;" | Website |
|||
|titlestyle = background:#ccf; |
|||
| style="padding:0" cellpadding="0" | <div class="plainlinks" style="overflow:auto;width:100%;padding:2px;margin;0">[[eventwebsite::{{{url}}}]]</div> |
|||
|image ={{#if:{{{image|<noinclude>File:Example.png</noinclude>}}}|[[{{{image|<noinclude>File:Example.png</noinclude>}}}|200px|link={{{url|<noinclude>http://www.example.com</noinclude>}}}]]{{#set:hasimage=True}}}} |
|||
|- |
|||
|imagestyle = |
|||
{{#if:{{{country|}}}| |
|||
|caption = {{{caption|<noinclude>Caption goes here</noinclude>}}} |
|||
! style="font-weight:bold;background-color: #ddddff; white-space: nowrap;" {{!}} Location |
|||
|captionstyle = |
|||
{{!}} {{{city|}}}, {{{state|}}} {{{country|}}} {{#set:city={{{city}}}|state={{{state}}}|country={{{country}}}}} {{#set:Location={{#geocode:{{{city|}}}, {{{state|}}} {{{country|}}}}}}} |
|||
|headerstyle = background:#ccf; |
|||
|labelstyle = background:#ddf; |
|||
|datastyle = background:#f9f9f9; |
|||
|header1 = |
|||
|label1 = Organizer(s) |
|||
|data1 = {{{organizer|<noinclude>Organizer(s)</noinclude>}}} |
|||
|header2 = |
|||
|label2 = Status |
|||
|data2 = {{{status|<noinclude>Active</noinclude>}}} |
|||
|header3 = |
|||
|label3 = Location |
|||
|data3 = {{#if:{{{country|}}}|{{{city|}}}, {{{state|}}} {{{country|}}}|}} |
|||
|header4 = |
|||
|label4 = Average Attendees |
|||
|data4 = {{#if:{{{attendees|}}}|{{{attendees|<noinclude>100</noinclude>}}}|}} |
|||
|header5 = |
|||
|label5 = Next held on |
|||
|data5 = {{#if:{{{nextdate|}}} |
|||
|{{#time: F j, Y | {{{nextdate|}}}}} |}} {{#if:{{{nextends|}}}|to {{#time: F j, Y | {{{nextends|}}}}}|}} |
|||
|header6 = |
|||
|label6 = First held on |
|||
|data6 = {{#if:{{{began|<noinclude>February 2, 2008</noinclude>}}}|{{#time: F j, Y |{{{began|<noinclude>February 2, 2008</noinclude>}}}}}}} |
|||
|header7 = |
|||
|label7 = Last held on |
|||
|data7 = {{#if:{{{lastheld|<noinclude>February 28, 2008</noinclude>}}}|{{#time: F d, Y |{{{lastheld|<noinclude>February 28, 2008</noinclude>}}}}}}} |
|||
|header8 = |
|||
|label8 = Setting |
|||
|data8 = {{{setting|<noinclude>Camping</noinclude>}}} |
|||
|header9 = |
|||
|label9 = Website |
|||
|data9 = <div class="plainlinks" style="overflow:auto;width:100%;padding:2px;margin;0">{{{url|<noinclude>http://ww.example.com</noinclude>}}}</div> |
|||
|header10 = |
|||
|label10 = Subscribe |
|||
|data10 = {{#cargo_query: |
|||
tables=CommunityEvents |
|||
|fields=CommunityEvents._pageName, CommunityEvents.NextDateStart |
|||
|where=COALESCE(NextDateEnd,NextDateStart) > DATE_ADD(NOW(), INTERVAL -2 DAY) and _pageName = '{{FULLPAGENAME}}' |
|||
|order by=CommunityEvents.NextDateStart ASC |
|||
|format=feed |
|||
|feed type=rss |
|||
|link text=RSS |
|||
|feed title=Upcoming {{FULLPAGENAME}} Events |
|||
|feed description=A feed of upcoming {{FULLPAGENAME}} events. |
|||
}} {{b|·}} {{#cargo_query: |
|||
tables=CommunityEvents |
|||
|fields=CommunityEvents._pageName, CommunityEvents.NextDateStart, CommunityEvents.NextDateEnd |
|||
|where=COALESCE(NextDateEnd,NextDateStart) > DATE_ADD(NOW(), INTERVAL -2 DAY) and _pageName = '{{FULLPAGENAME}}' |
|||
|order by=CommunityEvents.NextDateStart ASC |
|||
|format=icalendar |
|||
|link text=iCal |
|||
|filename=calendar.ics |
|||
|icalendar name=Upcoming {{FULLPAGENAME}} Events |
|||
|icalendar description=A calendar of upcoming {{FULLPAGENAME}} events |
|||
}} |
}} |
||
|belowstyle = background:#ddf; |
|||
|- |
|||
|below = |
|||
{{#if:{{{status|}}}| |
|||
! style="font-weight:bold;background-color: #ddddff; white-space: nowrap;" {{!}} Status |
|||
{{!}} [[Status::{{{status|}}}]] |
|||
}} |
}} |
||
<includeonly>{{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:{{{eventtype|}}}s]]}} |
|||
{{#switch: {{{status|}}} |
|||
|- |
|||
|Active = [[Category:Active {{{eventtype}}}s]] |
|||
{{#if:{{{attendees|}}}| |
|||
|Defunct = [[Category:Defunct {{{eventtype}}}s]] |
|||
! style="font-weight:bold;background-color: #ddddff; white-space: nowrap;" {{!}} Average attendees |
|||
|TBD = [[Category:{{{eventtype}}}s of Indeterminate Status]] |
|||
{{!}} {{{attendees|}}} |
|||
| |
|||
}} |
}} |
||
{{#cargo_store:_table=CommunityEvents |
|||
|- |
|||
| Organizers = {{{organizer|}}} |
|||
{{#if:{{{nextdate|}}}| |
|||
| Status = {{{status|TBD}}} |
|||
! style="font-weight:bold;background-color: #ddddff; white-space: nowrap;" {{!}} {{#set:Eventstartdate={{#time: Y-m-d | {{{nextdate}}}}}}} Next held on |
|||
| FirstDate = {{{began|}}} |
|||
{{!}} {{#if:{{{nextends|}}}|{{{nextdate|}}}|[[Eventdate::{{{nextdate|}}}]]}} {{#if:{{{nextends|}}}|to [[Eventends::{{{nextends|}}}]]}} |
|||
| LastDate = {{{lastheld|}}} |
|||
}} |
|||
| NextDateStart = {{{nextdate|}}} |
|||
|- |
|||
| NextDateEnd = {{{nextends|}}} |
|||
{{#if:{{{began|}}}| |
|||
| Eventnotscheduled = {{#if:{{{nextdate|}}}|{{#switch: {{{nextdate|}}}| TBD = 1| 0}}|1}} |
|||
! style="font-weight:bold;background-color: #ddddff; white-space: nowrap;" {{!}} First held on |
|||
| Setting = {{{setting|}}} |
|||
{{!}} [[Begandate::{{{began|}}}]] |
|||
| Attendees = {{{attendees|}}} |
|||
}} |
|||
| Website = {{{url|}}} |
|||
|- |
|||
{{ |
| Country = {{{country|}}} |
||
| City = {{{city|}}} |
|||
! style="font-weight:bold;background-color: #ddddff; white-space: nowrap;" {{!}} Last held on |
|||
| State = {{{state|}}} |
|||
| EventType = {{{eventtype|}}}s |
|||
}} |
|||
|- |
|||
{{#if:{{{setting|}}}| |
|||
! style="font-weight:bold;background-color: #ddddff; white-space: nowrap;" {{!}} Setting |
|||
{{!}} {{{setting|}}} |
|||
}} |
|||
|} |
|||
{{#if:{{{nextends|}}}|{{#set_internal_recurring_event:Is instance of |
|||
|property=Eventdate |
|||
|start={{{nextdate}}} |
|||
|end={{{nextends}}} |
|||
|unit=day |
|||
|period=1}} |
|||
}} |
}} |
||
</includeonly> |
|||
<noinclude> |
<noinclude> |
||
<templatedata> |
|||
==Usage== |
|||
{ |
|||
{| style="background: transparent;" |
|||
"params": { |
|||
|<pre>{{Infobox event |
|||
"image": {}, |
|||
| title = |
|||
"url": {}, |
|||
| image = |
|||
"caption": {}, |
|||
"organizer": {}, |
|||
"status": {}, |
|||
| url = |
|||
"country": {}, |
|||
"city": {}, |
|||
| state = |
|||
"state": {}, |
|||
| city = |
|||
"attendees": {}, |
|||
| status = |
|||
"nextdate": {}, |
|||
| attendees = |
|||
"nextends": {}, |
|||
| nextdate = |
|||
"began": {}, |
|||
| nextends = |
|||
"lastheld": {}, |
|||
| began = |
|||
"setting": {}, |
|||
| lastheld = |
|||
"eventtype": {} |
|||
| setting = |
|||
} |
|||
} |
|||
</pre> |
|||
</templatedata> |
|||
|} |
|||
[[Category:Infobox templates|{{PAGENAME}}]] |
|||
</noinclude> |
</noinclude> |
||
Latest revision as of 20:34, 17 April 2026
This template defines the table "CommunityEvents". View table.
{{#set:hasimage=True}}Caption goes here | |
| Organizer(s) | Organizer(s) |
|---|---|
| Status | Active |
| First held on | February 2, 2008 |
| Last held on | February 28, 2008 |
| Setting | Camping |
| Website | |
| Subscribe | RSS · iCal |
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| image | image | no description | Unknown | optional |
| url | url | no description | Unknown | optional |
| caption | caption | no description | Unknown | optional |
| organizer | organizer | no description | Unknown | optional |
| status | status | no description | Unknown | optional |
| country | country | no description | Unknown | optional |
| city | city | no description | Unknown | optional |
| state | state | no description | Unknown | optional |
| attendees | attendees | no description | Unknown | optional |
| nextdate | nextdate | no description | Unknown | optional |
| nextends | nextends | no description | Unknown | optional |
| began | began | no description | Unknown | optional |
| lastheld | lastheld | no description | Unknown | optional |
| setting | setting | no description | Unknown | optional |
| eventtype | eventtype | no description | Unknown | optional |
