Template:Infobox event: Difference between revisions

From AnOtherWiki, the free encyclopedia written by, for, and about the Otherkin community.
(Debugging cargo.)
(Removing SMW)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{#cargo_declare: _table = CommunityEvents
<noinclude>{{#cargo_declare: _table = CommunityEvents
| Organizers = List (,) of Page
| Organizers = Wikitext
| Status = String (allowed values=Active,On Hiatus,Defunct,TBD)
| Status = String (allowed values=Active,On Hiatus,Defunct,TBD)
| FirstDate = Date
| FirstDate = Date
Line 7: Line 7:
| NextDateEnd = Date
| NextDateEnd = Date
| Eventnotscheduled = Boolean
| Eventnotscheduled = Boolean
| Setting = String
| Setting = Wikitext
| Attendees = Integer
| Attendees = Integer
| Website = URL
| Website = URL
Line 13: Line 13:
| City = String
| City = String
| State = String
| State = String
| EventType = String (allowed values=Gather,Minigather,Meetup)
| Category = List (,) of Page
}}
}}
[[Category:Infobox templates|{{PAGENAME}}]]
[[Category:Infobox templates|{{PAGENAME}}]]
</noinclude>
</noinclude>{{Infobox

{{Infobox
|name = {{FULLPAGENAME}}
|name = {{FULLPAGENAME}}
|bodystyle =
|bodystyle =
Line 35: Line 33:
|header2 =
|header2 =
|label2 = Status
|label2 = Status
|data2 = [[Status::{{{status|<noinclude>Active</noinclude>}}}]]
|data2 = {{{status|<noinclude>Active</noinclude>}}}
|header3 =
|header3 =
|label3 = Location
|label3 = Location
|data3 = {{#if:{{{country|}}}|{{{city|}}}, {{{state|}}} {{{country|}}} {{#set:city={{{city|}}}|state={{{state|}}}|country={{{country|}}}}} [[Location::{{#geocode:{{{city|}}}, {{{state|}}} {{{country|}}}}}{{!}} ]]|}}
|data3 = {{#if:{{{country|}}}|{{{city|}}}, {{{state|}}} {{{country|}}}|}}
|header4 =
|header4 =
|label4 = Average Attendees
|label4 = Average Attendees
Line 45: Line 43:
|label5 = Next held on
|label5 = Next held on
|data5 = {{#if:{{{nextdate|}}}
|data5 = {{#if:{{{nextdate|}}}
|{{#set:Eventstartdate={{#time: F j, Y | {{{nextdate}}} }} }}{{#time: F j, Y | {{{nextdate|}}}}} |}} {{#if:{{{nextends|}}}|to [[Eventends::{{#time: F j, Y | {{{nextends|}}}}}]]|}}
|{{#time: F j, Y | {{{nextdate|}}}}} |}} {{#if:{{{nextends|}}}|to {{#time: F j, Y | {{{nextends|}}}}}|}}
{{#if:{{{nextdate|}}}|{{#switch: {{{nextdate|}}}| TBD = {{#set:Eventnotscheduled=TRUE}}| {{#set:Eventnotscheduled=FALSE}}
}}
|{{#set:Eventnotscheduled=TRUE}}
}}
|header6 =
|header6 =
|label6 = First held on
|label6 = First held on
Line 61: Line 55:
|header9 =
|header9 =
|label9 = Website
|label9 = Website
|data9 = <div class="plainlinks" style="overflow:auto;width:100%;padding:2px;margin;0">[[eventwebsite::{{{url|<noinclude>http://ww.example.com</noinclude>}}}]]</div>
|data9 = <div class="plainlinks" style="overflow:auto;width:100%;padding:2px;margin;0">{{{url|<noinclude>http://ww.example.com</noinclude>}}}</div>
|header10 =
|header10 =
|label10 = Subscribe
|label10 = Subscribe
|data10 = {{#ask:
|data10 = {{#cargo_query:
tables=CommunityEvents
[[Eventstartdate::>{{#time: Y-m-d | -2 days }}]]
|fields=CommunityEvents._pageName, CommunityEvents.NextDateStart
[[Eventstartdate::<{{#time: Y-m-d | {{CURRENTYEAR}}-12-31}}]]
|where=COALESCE(NextDateEnd,NextDateStart) > DATE_ADD(NOW(), INTERVAL -2 DAY) and _pageName = '{{FULLPAGENAME}}'
[[{{FULLPAGENAME}}]]
|order by=CommunityEvents.NextDateStart ASC
[[Status::Active]]
|format=feed
|? Eventstartdate#ISO = date
|format=rss
|feed type=rss
|link text=RSS
|sort=Eventstartdate
|feed title=Upcoming {{FULLPAGENAME}} Events
|order=ASC
|feed description=A feed of upcoming {{FULLPAGENAME}} events.
|searchlabel= RSS
}} {{b|·}} {{#cargo_query:
|rsstitle=Upcoming {{FULLPAGENAME}}
tables=CommunityEvents
|rssdescription=Upcoming {{FULLPAGENAME}}
|fields=CommunityEvents._pageName, CommunityEvents.NextDateStart, CommunityEvents.NextDateEnd
}} {{b|·}} {{#ifexpr: {{#ask: [[Eventstartdate::+]] [[{{FULLPAGENAME}}]] [[Status::Active]] |format=count}} > 0
|where=COALESCE(NextDateEnd,NextDateStart) > DATE_ADD(NOW(), INTERVAL -2 DAY) and _pageName = '{{FULLPAGENAME}}'

|order by=CommunityEvents.NextDateStart ASC
| {{#ask:
|format=icalendar
[[Eventstartdate::>{{#time: Y-m-d | -2 days }}]]
|link text=iCal
[[Eventstartdate::<{{#time: Y-m-d | {{CURRENTYEAR}}-12-31}}]]
|filename=calendar.ics
[[{{FULLPAGENAME}}]]
|icalendar name=Upcoming {{FULLPAGENAME}} Events
[[Status::Active]]
|icalendar description=A calendar of upcoming {{FULLPAGENAME}} events
|? Eventstartdate = start
|? Eventenddate = end

|format=iCalendar
|sort=eventstartdate
|order=ASC
|searchlabel=iCal
|title={{FULLPAGENAME}}
}}
| <span class="error">No iCal available.</span>
}}
}}


|belowstyle = background:#ddf;
|belowstyle = background:#ddf;
|below =
|below =
Line 106: Line 89:
|
|
}}
}}
{{#cargo_store:_table=CommunityEvents}}
{{#cargo_store:_table=CommunityEvents
| Organizers = {{{organizer|}}}
{|
| Status = {{{status|TBD}}}
! Organizer(s)
| FirstDate = {{{began|}}}
| {{#arraymap:{{{organizer|}}}|,|xx|{{#formredlink:form=Person|target=xx}}}}
| LastDate = {{{lastheld|}}}
|-
| NextDateStart = {{{nextdate|}}}
! Status
| {{{status|TBD}}}
| NextDateEnd = {{{nextends|}}}
| Eventnotscheduled = {{#if:{{{nextdate|}}}|{{#switch: {{{nextdate|}}}| TBD = 1| 0}}|1}}
|-
| Setting = {{{setting|}}}
! First date held
| {{{began|}}}
| Attendees = {{{attendees|}}}
| Website = {{{url|}}}
|-
| Country = {{{country|}}}
! Last date held
| {{{lastheld|}}}
| City = {{{city|}}}
| State = {{{state|}}}
|-
| EventType = {{{eventtype|}}}s
! Next date held
}}
| {{#ifeq:{{{nextdate|}}}|TBD||{{{nextdate|}}}}}
|-
! Next date ends
| {{{nextends|}}}
|-
! Event not scheduled
| {{#if:{{{nextdate|}}}|{{#switch: {{{nextdate|}}}| TBD = 1| 0}}|1}}
|-
! Setting
| {{{setting|}}}
|-
! Average Attendees
| {{{attendees|}}}
|-
! Website
| {{{url|}}}
|-
! Country
| {{{country|}}}
|-
! City
| {{{city|}}}
|-
! State
| {{{state|}}}
|-
! Category
| {{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:{{{eventtype|}}}s]]}},{{#switch:{{{status|}}}|Active=[[Category:Active {{{eventtype}}}s]]|Defunct=[[Category:Defunct {{{eventtype}}}s]]|TBD=[[Category:{{{eventtype}}}s of Indeterminate Status]]|}}}}
|}
</includeonly>
</includeonly>
<noinclude>
<templatedata>
{
"params": {
"image": {},
"url": {},
"caption": {},
"organizer": {},
"status": {},
"country": {},
"city": {},
"state": {},
"attendees": {},
"nextdate": {},
"nextends": {},
"began": {},
"lastheld": {},
"setting": {},
"eventtype": {}
}
}
</templatedata>
</noinclude>

Latest revision as of 20:34, 17 April 2026

This template defines the table "CommunityEvents". View table.

Infobox event
{{#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.

[Edit template data]

Template parameters

ParameterDescriptionTypeStatus
imageimage

no description

Unknownoptional
urlurl

no description

Unknownoptional
captioncaption

no description

Unknownoptional
organizerorganizer

no description

Unknownoptional
statusstatus

no description

Unknownoptional
countrycountry

no description

Unknownoptional
citycity

no description

Unknownoptional
statestate

no description

Unknownoptional
attendeesattendees

no description

Unknownoptional
nextdatenextdate

no description

Unknownoptional
nextendsnextends

no description

Unknownoptional
beganbegan

no description

Unknownoptional
lastheldlastheld

no description

Unknownoptional
settingsetting

no description

Unknownoptional
eventtypeeventtype

no description

Unknownoptional