Template talk:Featured topic box
This is the talk-page for: Template:Featured topic box.
Created
editThe data-box Template:Featured topic box was created on 8 January 2007, to display a box-style table about a wp:featured topic, and also list the related featured articles or good articles. The sandbox is:
- Template:Featured topic box/sandbox – created 31 December 2013
The markup inside the template has been expanded for styles and colors. -Wikid77 16:09, 31 December 2013 (UTC)
Reducing template post-expand size
editBy 27 December 2013, the wp:post-expand include size, of the Template:Featured topic box, with title had reached over 2,100 bytes, excluding the columns of page titles. The size gets increased by several links which contain the page title, expanding an empty template of 700 bytes to over 2,100. Several tactics can be used to reduce the size:
- Omit any table-style markup which uses default options.
- Reduce the nesting of #if or #switch functions, which repeat the text.
- Reduce links of {fullurl:} to use {urlencode} on just part of the URL.
- Reduce the amount of text processed by other wp:parser functions.
- Cut any spaces inside style or span-tag contents.
With the typical size over 2,100 post-expand bytes, then {Featured topic box} had been using over half the space in a list of 3 or 4 page titles. -Wikid77 16:09, 31 December 2013 (UTC)
Proposal: Add an optional "view" link
edit- Summary
For good topics that have explanations on the topic's page, nested within "nowiki" tags, a link be added to the box to view the topic's page (in addition to the option to edit it, see the book, etc). Topics that would benefit include Laureus World Sports Awards Padma Bhushan, and Marvel Cinematic Universe films.
- Template code
I request that the code:
{{#ifeq:{{lc:{{{view}}}}}|yes|[//en.wiki.x.io/w/index.php?title=Wikipedia:Featured_topics/{{
urlencode:{{{title|}}}}} view] {{!}} [//en.wiki.x.io/w/index.php?title=Wikipedia:Featured_topics/{{
urlencode:{{{title|}}}}}&action=edit edit]|[//en.wiki.x.io/w/index.php?title=Wikipedia:Featured_topics/{{
urlencode:{{{title|}}}}}&action=edit edit]}}
Be used instead of the current:
[//en.wiki.x.io/w/index.php?title=Wikipedia:Featured_topics/{{
urlencode:{{{title|}}}}}&action=edit edit]
- Result
The new featured topic box would accept the optional parameter |view=yes
. If this parameter were not added, or added as "no", no change would occur. To see this in action, see User:DannyS712/sandbox#Good_topic. I use the same exact template twice, once with the view parameter, and once without it. (the template I use is a version of the current template with my modification included, located in my sandbox at User:DannyS712/sandbox/box)
Although I could make this edit myself, I'd prefer to have at least some external support before doing so. --DannyS712 (talk)
Update: I have boldly gone ahead with this change. --DannyS712 (talk) 19:41, 29 November 2018 (UTC)
Automatic badge detector
editThanks to Thayts, it's now possible to get a page's badge, among other information, from Wikidata by page's title. Currently, we use the |column=
parameter here, which isn't automatic. This creates problems:
- The nominator has to work with {{icon}} template to insert the right badge,
- If the article is promoted/demoted, then someone should manually change the badge.
I think we can solve this problem by getting the information from Wikidata. So, I propose we just use Module:Wd, with a {{#Switch:...
function, to automatically detect each article's badge. I will apply the change if no opposes rise in two or three days.
Please note that I will not remove current parameters, so this will not "break" anything. Ahmadtalk 18:03, 1 February 2020 (UTC)
Is it worth considering a fourth column for large topics?
editAs raised by Grapple X at Wikipedia:Featured and good topic candidates/Billboard number-one country songs/archive1, it worth adding a fourth column for large topics so that do not look as visually unwieldly? Ping @FGTC coordinators: director and delegates for input. Regards Spy-cicle💥 Talk? 15:00, 19 November 2021 (UTC)
- Seems like a great idea! I'll find a place for it in the promotion instructions. Aza24 (talk) 07:19, 24 November 2021 (UTC)
- Hmm, I didn't notice that the template only supported three (I assumed it supported as many as were entered), not sure how to approach the technical side of this. Aza24 (talk) 07:21, 24 November 2021 (UTC)
Some adjustments
editI've made it possible to use normal bullets (*
) in the template, which should be preferred as they are more correct than using :
(per WP:ACCESS). This is something I think could be requested at bot requests, but I'm checking to see if anyone knows of a template where that should be checked first.
It would also be preferable to use only one input and then use columns CSS (like in {{div col}}) because this would be even more accessible, but again, I'd like to see if there's anything preventing a migration that way. Izno (talk) 21:19, 8 April 2023 (UTC)