Jump to content

Module talk:Excerpt/portals

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Solidest (talk | contribs) at 04:39, 16 December 2024 (Option to show |list= block above excerpts). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Error

@Andrybak and Sophivorus: transclusions should not include Template:sfnmp. See for instance at introduction of Portal:Ancient Egypt. – Finnusertop (talkcontribs) 20:27, 2 February 2021 (UTC)[reply]

Extended-confirmed-protected edit request on 10 February 2022

Update the regex to take into account {{Efn [language] name}} to take care of these cases: Category:Explanatory footnote name templates which are currently being ignored.

(Which caused error described here). Thanks. Satricious (talk) 01:01, 10 February 2022 (UTC)[reply]

 Fixed Certes (talk) 01:25, 10 February 2022 (UTC)[reply]

Handling formatting tags

I've been trying to clear some of the few GIGO-esque errors left within Excerpt/portals, however I'm a little stumped on this last one. There are 2 articles (maybe more, but these are the ones I know) causing issues here, Cumbre Vieja tsunami hazard and National Treasure (Japan). Basically, before the lead, they have some sort of html tag by itself on a line. Unfortunately, the parsing code thinks said html tags are actually the start of the lead, and starts to grab them as if they're paragraphs. I have a test page here displaying the issues that happen when it does so. I've tried fitting some code in around here that would try see if the line matched something like ^%b<>%s*$, but I could only get the mapframe case to somewhat fix, and the div one had no luck (I have tried without the tags as a test to make sure its not the wikitables and it works fine then). Anyone have any ideas on how to fix this? Aidan9382 (talk) 20:31, 23 January 2023 (UTC)[reply]

I suppose it needs to match and discard <foo...> ... </foo>, carefully skipping nested tags (including foo tags) within in the way %b does. That sounds inefficient and potentially complicated by tags hidden in transcluded templates and other nonsense such as <foo> Discard this <!-- This isn't a </foo> tag --> Discard this too </foo>. Certes (talk) 21:36, 23 January 2023 (UTC)[reply]

Template:As of

As noted at Portal talk:Linux#Embedded article text fails, this module removes the text generated by {{As of}}, leading to garbled text in the portal excerpt. Template:As of? is an inline tag to be removed, Template:As of generates text that should not be removed. I'm not sure of the LUA expression syntax, so I'm not comfortable trying to fix this myself. -- John of Reading (talk) 14:42, 17 August 2024 (UTC)[reply]

Fixed in this change. Aidan9382 (talk) 20:24, 17 August 2024 (UTC)[reply]

Transclude selected excerpt can't use |list and |showall?

{{Transclude selected excerpt}} for some reason is not allowed to use |list= and |showall= params. But using them is no different from {{Transclude random excerpt}} case where they are allowed. I think they should be allowed for "selected" template as well? Solidest (talk) 04:13, 16 December 2024 (UTC)[reply]

Option to show |list= block above excerpts

Given the last edit I made to allow simultaneous use of list+showall, when you use |list= for maintenance, a tidier way would be to display the |list= output at the very top, above the excerpts. Generally, it would be cleaner to always see the list first, even if only a single excerpt is shown, because when the image is larger than the text, the list template looks inserted into the excerpt frame, which doesn't look good. It would nice to have an option to move the list above. Alternatively, it would be even better to add the output of the "list" table to the |showall= mode at the top, then my edit show be reverted. Solidest (talk) 04:13, 16 December 2024 (UTC)[reply]