Jump to content

Template talk:Infobox event

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Template-protected edit request on 22 January 2025

[edit]

Non-fatal injuries should be changed to injuries. Arsabent (talk) 21:41, 22 January 2025 (UTC)[reply]

 Not done for now: please establish a consensus for this alteration before using the {{Edit template-protected}} template. This wording has been used since 2015, when it was changed to "Non-fatal injuries" for consistency with other templates in Special:Diff/676129907. —⁠andrybak (talk) 19:04, 23 January 2025 (UTC)[reply]

Title would look a lot better inside the border box

[edit]

This template's appearance would look a lot better if the "title" were displayed inside the border box. Many (most?) InfoBox templates put the title inside the box, including Template:Infobox civilian attack or Template:Infobox person. Was there a discussion that established a consensus to leave the title outside (above) the box? Does anyone think the title looks better outside? Noleander (talk) 18:46, 24 April 2025 (UTC)[reply]

Pushpin map

[edit]

Hi, please add these codes to the template for showing pushpin maps

|image4 = {{#if:{{#property:P625}}|{{#if:{{{pushpin_map|}}}|{{Location map|{{{pushpin_map|}}}
|relief = 1
|label = {{{name|<includeonly>{{PAGENAME}}</includeonly>}}}
|mark = Blue_pog.svg
|marksize = 9
|float = center	
}}
}}
}}

Thanks, Hooman Mallahzadeh (talk) 14:40, 28 April 2025 (UTC)[reply]

Sandboxed and tested successfully at Template:Infobox event/sandbox. Hooman Mallahzadeh (talk) 14:45, 28 April 2025 (UTC)[reply]
What is the purpose of this change, and how is it supposed to work? It looks like it duplicates the existing map parameter, which accepts location map templates, but for some reason it tests for the existence of Wikidata property P625. What is that property and why is there a test for it? Please show this change in use at an article by temporarily changing the article to use the sandbox template with this new parameter, and then changing it back. – Jonesey95 (talk) 23:59, 29 April 2025 (UTC)[reply]
Hi, P625 is "coordinate location" is Wikidata, we check its existence to avoid lua error in events that don't have this property.
  • The purpose is to show pushpin_map in addition to OSM where needed.
  • If we set the pushpin_map argument to a map, for example to "Asia", then it shows its pushpin map in the specified map.
For example for the article Port of Shahid Rajaee explosion, please change its infobox to this one and them click show preview to test it:
{{Infobox event/sandbox
| image = Smoke billowing from Shahid Rajaee port explosion, 26 April 2025.jpg
| caption = Smoke billowing after the explosion
| date = {{Start date|2025|04|26|df=y}}
| location = [[Port of Shahid Rajaee]], [[Bandar Abbas]], Hormozgan, Iran
| coordinates = {{WikidataCoord|Q134125330|region:IR-22_type:event|display=inline,title}}
| time = 12:20&nbsp;[[Iran Standard Time|IRST]]
| timezone = [[UTC+03:30]]
| type = Gas substances explosion
| cause = Fire
| reported deaths = 70
| reported injuries = 1,210
| reported missing =  
| pushpin_map = Iran
}}
Hooman Mallahzadeh (talk) 04:01, 30 April 2025 (UTC)[reply]
@Jonesey95 Pushpin maps are sometimes better than OSM. The test for me is successful. Would you please apply this change? Hooman Mallahzadeh (talk) 14:51, 30 April 2025 (UTC)[reply]
 Done. I had to fix a bunch of small problems with the proposed code, but I think I have it working. In the future, I recommend that you copy code from a template that is already working in the way that you want. This pushpin_map implementation could probably use some refinement, but it appears to be functional for now. – Jonesey95 (talk) 15:09, 30 April 2025 (UTC)[reply]
@Jonesey95 Thanks. 🌻 Hooman Mallahzadeh (talk) 15:16, 30 April 2025 (UTC)[reply]
@Jonesey95 Sorry. Label and caption is in this implementation the same. It is not appropriate. So I propose to apply the sandbox. Hooman Mallahzadeh (talk) 15:30, 30 April 2025 (UTC)[reply]
You need to test your edits. I suspect that your version will show a blank caption if |event= or |name= is present but empty. Also, using |caption= wraps the image in a thumbnail border, which is not ideal, and you have an extra pipe in that parameter value. – Jonesey95 (talk) 16:21, 30 April 2025 (UTC)[reply]
@Jonesey95 We have redundant and repetitive data in this implementation. Anyway, please add "/sandbox" to the infobox of Port of Shahid Rajaee explosion article to see test of my edits. Hooman Mallahzadeh (talk) 16:31, 30 April 2025 (UTC)[reply]
I already did that, which is why I suggested that your proposed version has problems and needs testing. See this version with an empty event parameter; there is no label on the pushpin map dot. – Jonesey95 (talk) 21:05, 30 April 2025 (UTC)[reply]