Wikipedia talk:WikiProject Portals/Design/Archive 2

= Discussions about possible cool new features =

What about portals that can read themselves out loud?
For accessibility, for example. &mdash; The Transhumanist  03:11, 28 May 2018 (UTC)


 * Potentially possible. Services such as Amazon Polly can do this automatically via an API. But I would imagine we would need an open source version for it to be used on Wikipedia. The Wikimedia Foundation is notoriously tight-assed on forbidding external services (notably Google nocaptcha/recaptcha) for various reasons such as data collection and editorial independence. An alternative would be for volunteers to read it out and save them as MP3 files, but there is alot of work required for that. JLJ001 (talk) 18:34, 28 May 2018 (UTC)


 * Text-to-speech can be handled client-side; I know Google Chromebooks have a keyboard shortcut that enables software that reads text out to the user. I think the best we can do I write clean markup for these engines to parse. On this topic, perhaps we should enable the ALT= parameter in the image syntax of PortalButton (I left it out) and add a default ALT for the button itself?  Cesde v a  (talk) 19:21, 28 May 2018 (UTC)


 * Agreed. Purely for accessibility reasons we really should make a point of doing that. In fact doing that with all templates we use would be a good idea. 19:24, 28 May 2018 (UTC)


 * ✅ Cesde v a  (talk) 19:34, 28 May 2018 (UTC)


 * I'm not sure I follow. What does the ALT= parameter do? What is the name of the software on Chromebooks? (Perhaps it is available in other forms).  &mdash; The Transhumanist   21:00, 16 June 2018 (UTC)

Can we bypass the intermediary purge page?
When purging, you get this page, rather than an actual purge: https://en.wikipedia.org/w/index.php?title=Portal:Sacramento,_California&action=purge

Is there any way we can make purge links purge directly, without the confirmation page? &mdash; The Transhumanist  00:41, 6 June 2018 (UTC)
 * It can be done with javascript, like the UTC clock gadget (which is also a single-click purge link). For it to work with logged out users, it would have to be an on-by-default gadget. - Evad37 &#91;talk] 00:52, 6 June 2018 (UTC)
 * (ec) A user can make purges they request happen directly: see WP:Purge. I don't know of a way to configure a page to bypass confirmation for all users. Certes (talk) 00:55, 6 June 2018 (UTC)


 * That works great. Thank you.
 * I noticed that clicking on the purge item in the More tab, and using the hot key bypasses the purge confirmation box. What is the difference between these and the purge buttons on portals?   &mdash; The Transhumanist   22:15, 11 June 2018 (UTC)
 * Yes, something different is happening. More→Purge doesn't require confirmation.  The purge link does (though, if you followed the suggestion in my link above, the confirmation screen disappears quickly as the JavaScript clicks Yes for you).  Both methods load the same URL, but More→Purge uses POST whilst wikilinks always use GET.  The MediaWiki code seems to handle the two differently. Certes (talk) 23:48, 11 June 2018 (UTC)
 * The way it works is that javascript catches the click on the link and then sends a POST request. We could do this (I would assume) if we add some javascript to catch the click on the link to send the post request. However, we will want to be sure that we could stop annons spamming the purge button (as this is why presumably annons have the purge confirmation screen). Wpgbrown talk &#124; contribs 07:20, 12 June 2018 (UTC)
 * We could make our own purge template that is a HTML form which sends a post request. This is what is done on the purge page. Wpgbrown talk &#124; contribs 13:40, 12 June 2018 (UTC)
 * That sounds good. Can you provide an example?  I haven't managed to find the source of the purge page, only that of the article I'm pretending to purge. Certes (talk) 13:59, 12 June 2018 (UTC)
 * I just tried to make an example, but the source code of MediaWiki does not allow the use of forms (the only exception being their parameter useless for those articles.

It would be really cool if these templates and their corresponding lua module could be enhanced so that the  parameter recognizes pictures at the top of the article's infobox. Thoughts? &mdash; The Transhumanist  03:11, 17 June 2018 (UTC)
 * The templates attempt to extract images from infoboxes. However, there are dozens of different syntaxes for specifying images, and Module:Excerpt may not deal with them all.  Do you have an example of a portal where the image fails to appear? Certes (talk) 10:35, 17 June 2018 (UTC)


 * I wasn't aware that infoboxes were included. That's good news. Here are some examples of articles for which the infobox pictures do not show up:


 * I hope these help.  &mdash; The Transhumanist   03:59, 18 June 2018 (UTC)


 * It looks like the mw:Extension:Popups catches these. Perhaps the method it uses to identify them would be applicable to Lua? Are regexes easily converted to lua search strings?  &mdash; The Transhumanist   04:21, 18 June 2018 (UTC)
 * , at least for the cases where the infobox wasn't detected because it didn't have "infobox" in the template name - Evad37 &#91;talk] 06:17, 18 June 2018 (UTC)
 * Wow, you can see a big difference in Portal:Reptiles and Portal:Amphibians. Lots more pictures show up. Nice.  &mdash; The Transhumanist   08:39, 18 June 2018 (UTC)


 * Found another: the picture in Snake doesn't show up. I'll post more as I find them. Here's what it looks like in a box...  &mdash; The Transhumanist   09:06, 18 June 2018 (UTC)


 * Ok, so this one isn't just a case of  (I can fix those). With Snake, the image we're after is inside  tags within an infobox template parameter. I'm leaving that one to the experts! WaggersTALK  09:35, 18 June 2018 (UTC)
 * ✅ - Evad37 &#91;talk] 04:40, 19 June 2018 (UTC)

What innovative features do Wikipedia forks have?
I've heard that Wikipedia forks augment WP's content in various ways. Are you aware of any? Perhaps we could implement something similar or better. &mdash; The Transhumanist  08:41, 17 June 2018 (UTC)

Automatic slideshow
Is this possible? &mdash; The Transhumanist  06:14, 20 June 2018 (UTC)
 * Only with javascript, as far as I am aware (so its unlikely we would be able to have it on for everyone by default). And not at all with the mobile website, which we can't even get to show a regular slideshow. - Evad37 &#91;talk] 03:21, 21 June 2018 (UTC)
 * If you mean a slideshow that automatically changes images with a fixed interval, I find them generally annoying. Probably heavy on bandwidth too. Why would anyone want one? If it is a slideshow that is static until you click on "run slideshow button" (possibly the standard right pointing arrowhead used for video), then maybe. Manual slideshow is more useful most of the time and we have it already. Getting it to deal with text excerpts is a far more useful goal. &middot; &middot; &middot; Peter (Southwood) (talk): 07:30, 25 June 2018 (UTC)

Section editing for portals
See User:Evad37/sandbox/portal for a possible implementation. It doesn't look quite right in some skins, but I think that should be fixable once TemplateStyles is available. - Evad37 &#91;talk] 03:17, 21 June 2018 (UTC)
 * I like this too. Will use when available. &middot; &middot; &middot; Peter (Southwood) (talk): 07:50, 25 June 2018 (UTC)

Mobile view support
Can a section be done in such a way that it is one thing for mobile viewers, and something else for non-mobile viewers?

For example, can Picture slideshow sections be presented as Selected picture sections for mobile viewers? Otherwise, portals with picture slideshows are essentially broken to a majority of our viewers. Thoughts? &mdash; The Transhumanist  01:44,? 30 June 2018 (UTC)
 * Is there code to exclude display from mobile view and other code that only displays on mobile? Similar idea to noinclude and includeonly. With that we could provide two options until this becomes possible some better way. &middot; &middot; &middot; Peter (Southwood) (talk): 14:52, 30 June 2018 (UTC)
 * Hiding things from mobile is possible by using elements with the class, but I don't think there's any equivalent for hiding things on desktop only. - Evad37 &#91;talk] 15:35, 9 July 2018 (UTC)
 * was working on something to make portals view better in mobile devices.  &mdash; The Transhumanist   08:01, 11 July 2018 (UTC)

Template:Transclude thumbnail image from page
This would be similar to Transclude list item excerpt, but instead of gathering list items, it would gather thumbnail pictures (thumbnails, because those have captions). Then it would pick one at random and display it, adjusted to fit the width of the section it is in (like the picture size is adjusted in Random slideshow. This one, however is not intended to be a slideshow, but is for powering "Selected picture" sections.   &mdash; The Transhumanist   09:19, 15 July 2018 (UTC)

= Discussions about overall portal design =

Concerns regarding the one page portal model
Short on time, so briefly and bluntly: Is it possible to implement the ability to edit each "section" of the portal within the current one page portal model. If not, it may not be a good direction to continue in because I would actually argue that having a subpages for each section makes it easier to edit and manage the portal. Personally, I've never seen a problem with having 10 or so subpages for each portal. If being able to easily discern how many portals there are is the perceived issue, a category (e.g. Category:Main portal page) could be created along with a bot to place it on every portal page that is not a subpage (i.e. titles without a slash). — Godsy (TALK CONT ) 05:36, 7 June 2018 (UTC)
 * I think Portal:Sacramento, California is a bit big for a single page and would benefit from splitting into a handful of subpages with standard names, but it's a matter of opinion and the current arrangement is not wrong. Certes (talk) 10:49, 7 June 2018 (UTC)
 * Fundamentally this isn't a problem with the one-page idea - instead I think the problem lies with the use of and  templates to divide portal pages into "sections" instead of using actual sections. The reason we use the boxes is to control the layout of the page and allow 2 (or more?) columns instead of all the content going down the page in a straight line.
 * Perhaps we should work on an alternative to and, utilising proper section headings but using css to make them appear as boxes. I'll have a tinker with that idea. W<b style="color:#97E">a</b><b style="color:#86D">g</b><b style="color:#75C">ge</b><b  style="color:#83C">r</b><b  style="color:#728">s</b><small  style="color:#080">TALK  11:29, 7 June 2018 (UTC)
 * Hmm, so after some very brief experimenting it seems there's no way to do this currently: While we can assign inline styles to particular elements, and customise our personal css styles, adding ... tags to a page to attemt to control the style across the whole page is a no go. <b style="color:#98F">W</b><b style="color:#97E">a</b><b style="color:#86D">g</b><b style="color:#75C">ge</b><b style="color:#83C">r</b><b  style="color:#728">s</b><small  style="color:#080">TALK  11:42, 7 June 2018 (UTC)
 * One subpage per box is certainly worth considering as a compromise. It could make editing a lot easier, while keeping the general concept of massively reducing redundant subpages where they are not really useful. The important thing is that whatever we develop should work and make maintenance easier or unnecessary. The 750 or so box-footers we got rid of were not doing anything useful at all. Using random transclusion templates means a large number of subpages can be reduced to one per box, while still being easier to edit and maintain than the old one-article - one subpage system. I still think that one page portals are a fine ambition though. &middot; &middot; &middot; Peter (Southwood) (talk): 17:16, 7 June 2018 (UTC)
 * TemplateStyles will be coming soon (in a month or so IIRC) which should fix that problem Galobtter (pingó mió) 17:19, 7 June 2018 (UTC)
 * I don't believe every portal needs to go to a fully single-page design. In all cases, we should attempt to reduce the number of subpages to only what's necessary, but forcing everything into the single-page format is probably not going to work out too well. I think one-page-per-section is a happy medium for those cases. That said, many portals, if not most, would still benefit from the single-page model. &mdash; AfroThundr (u &middot; t &middot; c) 20:34, 7 June 2018 (UTC)

List of one-page portals
We should track these. By "one-page portal", I mean one that has no subpages of is own, not even header or footer subpages. &mdash; The Transhumanist  19:28, 7 June 2018 (UTC)


 * See Category:Single-page portals for a list. Add portals to the category by placing at the top of the portal. - Evad37 &#91;talk] 00:42, 20 June 2018 (UTC)

What portals are nearly there? (So we can finish them)

 * Portal:Amphibians
 * Portal:Community of Christ
 * Portal:History of the Latter Day Saint movement

Non-portal pages

 * Portal:Example
 * Portal:Georgia (a disambiguation page)
 * Portal:Human (a disambiguation page)


 * I've tagged the first list with so they're all tracked now. &mdash; AfroThundr (u &middot; t &middot; c) 12:40, 15 June 2018 (UTC)

The other kind of banner
Quite a few portals use a banner image in the introduction or above it. By this I mean a wide panorama style image. Sometimes it includes an image of text, other times it is just for decorative purposes. There are technical problems with most of them. If it does already, I have consistently failed to find either an example or an explanation of how to do it.
 * 1) An image of text is not machine-readable, making this an accessibility problem. This should be fixable by using alt text.
 * 2) There does not seem to be a way to make them mobile view compatible. If the page is narrower than the image width, the page stops fitting the screen, and a scroll bar appears at the bottom, which does not look good, and makes reading the text a nightmare. This problem of not having a way to make the image width follow the page width is a general problem, and also manifests with galleries and slideshows. It looks really bad when the image extends beyond the box margin. Wikivoyage has a banner extension which manages this problem well, but I think Wikipedia needs to be able to handle percentage width for images.

Is this a thing anyone here knows how to fix? &middot; &middot; &middot; Peter (Southwood) (talk): 07:36, 6 July 2018 (UTC)
 * You'd have to use CSS to target the img element, where you could then set width:100% or whatever you like (see this answer). That would require TemplateStyles though, as it can't currently be done inline. — AfroThundr (u · t · c) 12:01, 6 July 2018 (UTC)


 * Do you still get those problems when {{tl|{{wide image}} is used, such as on Portal:Munich and Portal:Vienna? Please provide some links, so we can see some specific examples of what doesn't work. (Please ping me in your reply).  &mdash; The Transhumanist   23:33, 19 July 2018 (UTC)

What's wrong with subportals?
P.S. I'm also trying to understand why portal subpages are bad. I've created portals with and without subpages and can see merits in both... but perhaps I need to go back and re-read the discussion, lol. Bermicourt (talk) 22:09, 14 May 2018 (UTC)
 * There's more than one way to produce a good portal. The templates are just one tool on offer; I hope there will be no pressure to use them where editors are happy to maintain the pages in other ways. Certes (talk) 23:32, 14 May 2018 (UTC)
 * One possible way would be to select them from a category, but for that the category must exist, and the template must be able to select from categories. I envision a system where the template selects randomly from a set of categories, like the FA, GA and B-class articles in a project. A further refinement would be selecting or deselecting biographies, so FA, GA and B-class articles which are not bioraphies for the selected article, and FA, GA and B-class which are biographies for the selected biography. Selected images could be drawn from a list of images used in the articles of the set of categories. &middot; &middot; &middot; Peter (Southwood) (talk): 16:31, 15 May 2018 (UTC)
 * Having the template select from a category is an unsolved problem. A VPT discussion came up with nothing better than having a bot copy the category listing periodically into a data page. Certes (talk) 18:31, 15 May 2018 (UTC)
 * There is a bot that can update a list with entries from categories. See Mathbot. That provides us with proof of concept.  &mdash; The Transhumanist   21:55, 15 May 2018 (UTC)
 * An alternative is to select from an Outline list, assuming that the outline list exists. A well annotated outline could be better. It may be useful to separate any images in the outline with, depending on how the list is to be used. &middot; &middot; &middot; Peter (Southwood) (talk): 06:01, 9 June 2018 (UTC)
 * Subpages are undesirable for 3 main reasons: 1) the more pages you have, the harder they are to maintain. We have 1500 portals that include about 150,000 subpages. Bots are allowed to process one page every six seconds. That's ten per minute. So, it would take about 150 minutes (2 hours, 30 minutes) for a bot to work through 1500 one-page portals, but 15,000 minutes (250 hours) to work through 150,000 pages (that's over 10 days, working 24/7). Human editors would take even longer (10,000 edits per year is considered a lot for an editor). 2) We have limited editor participation, and must use our labor wisely. 3) With portal maintenance and development active again, portal popularity is likely to rise, along with a slew of new portals. The number of portals could easily double over the next few years, much more than that and much more quickly if we find a way to automate the construction of quality portals. So, imagine 300,000 subpages for 3,000 portals if created manually, or 10,000 portals with a million subpages if created by bot or tool script. Therefore, it is very important to migrate subpage functions to the base pages. I see that our main job here initially is to tame this monster. The easiest way to do that is with a shrink ray. Broter has been very active in this regard. Perhaps he could shed some more light on this issue. I look forward to your thoughts, and any further questions you may have.   &mdash; The Transhumanist   22:59, 15 May 2018 (UTC)
 * I contest this. The more specialized thos subpages are the more easy it is to maintain, by bot or otherways. For example in the German WP we have a boot which actualizes frequently (weekly or daily) the new pages subpages. Well, therefor, there is the need to maintain a functionable category system. Pityfully the EN:WP totally lacks off a system at all. It's a chaos. For eample: if a bot should list all new articles concerning Germany for the Portal:Germany he/it can't do so because you have also all landforms of France articles within the Category:Rhine which is part of the Category:Geography of Germany. [How the bot works: see for example de:Wikipedia:WikiProjekt Vereinigte Staaten/Neue Artikel; documentation (German) @ de:Benutzer:MerlBot/InAction. Note, that 1) in this case the new articles are listed on the WikiProject's subpage; and 2) MerlBot is inactive so TaxonBota took over. Similar lists the bot creates with lists of articles with maintenance tags.]
 * What definitely is needed is standardization of the portals so that users won't have to find out every time the edit in a different portal how it is organized. --Matthiasb (talk) 01:11, 26 May 2018 (UTC)
 * I am removing a fair few obsolete subpages. I would consider a subpage obsolete if:
 * The content on the subpage is not used anywhere on Wikipedia (such as most of the '/Wikimedia' pages)
 * The content on the subpage is so small that it does merit its own subpage (such as '/Categories' pages that use one or two category trees and '/Intro' pages that use and maybe a few images)
 * If they did not meet the above, I would not remove the sub page. Wpgbrown (talk) 16:37, 28 May 2018 (UTC)
 * Keep in mind that any portal subpage that is transcluded onto a portal base page, or onto a page that is in turn transcluded onto a portal base page, should not be deleted. Until no longer transcluded.  &mdash; The Transhumanist   23:24, 28 May 2018 (UTC)

Use Wikidata for image
I edited Portal:Gujarat which was dead since two years. I found that the Template:Transclude lead excerpt and similar Template:Transclude selected excerpt does not excerpt images from Infoboxes so I have to manually add relevant image. This introductory images are helpful such as maps, country flags, images on biography etc. We can use Wikidata to display that image because Wikidata items have relevant images. I am not technical person so I can suggest only. What do you people think?--Nizil (talk) 13:03, 30 May 2018 (UTC)
 * The templates do not currently find images from within Infobox settlement because they are not marked with a recognised parameter name such as .  Instead it has three images marked as image_seal, image_skyline (did you mean image_shylion?) and image_map.  As it's not clear which image is most appropriate, it's probably best to select the image manually in these circumstances, as you have done.  (Also leave files= off, in case this alpha module changes later to pick one of them up automatically).  I would avoid using using Wikidata, as that can leave editors scratching their heads for hours trying to work out where the image is coming from. Certes (talk) 13:46, 30 May 2018 (UTC)
 * I know as a fact there is some serious debate over not using Wikidata for these things. The details escape me but it's didn't seem resolved last I checked. It is easy enough to add the image manually, so I would say we should continue to add the image manually. JLJ001 (talk) 13:55, 30 May 2018 (UTC)

What would be needed to implement a slideshow feature?
Purging the page is cludgy. What would it take for the user to be able to click "next picture", and the picture instantly appears in the selected picture section? &mdash; The Transhumanist  21:14, 27 May 2018 (UTC)


 * This is already possible. See Help:Gallery tag & MW:Help:Images. Basically you need to enable a gallery in  JLJ001 (talk) 18:38, 28 May 2018 (UTC)


 * are you aware of this? It could be quite useful for the overall one page setup. JLJ001 (talk) 19:02, 28 May 2018 (UTC)


 * It would be great if we could shuffle the list of images or make it so the first image shown is selected at random, rather than always displaying the first image in the list.
 * It is possible to shuffle a list like so:
 * But enclosing that output with  does not produce the desired effect. <b style="color:#98F">W</b><b style="color:#97E">a</b><b style="color:#86D">g</b><b style="color:#75C">ge</b><b  style="color:#83C">r</b><b  style="color:#728">s</b><small  style="color:#080">TALK  07:18, 2 June 2018 (UTC)
 * You would need to use  syntax, see the bottom of mw:Help:Magic words. But it's probably better to make a new template rather using it directly. - Evad37 &#91;talk] 07:50, 2 June 2018 (UTC)
 * ✅, see Template:Random slideshow - Evad37 &#91;talk] 15:46, 3 June 2018 (UTC)
 * This template is awesome! I've tested it out on Portal:Sacramento, California. To emphasize it as a feature, I've changed the section name to "Picture slideshow".  &mdash; The Transhumanist   00:55, 6 June 2018 (UTC)
 * Wonderful idea, but I am unable to get  to work. 100% is just too big in a full width box, but dynamic sizing is a really desirable feature. What I would like most is a maximum size parameter, and dynamic sizing to 100% for box widths less than the maximum, so width and height would be less than maxsize=50em or whatever one chose, but as large as possible within that and the column width.  Cheers, &middot; &middot; &middot; Peter (Southwood) (talk): 17:31, 7 June 2018 (UTC)
 * Wonderful idea, but I am unable to get  to work. 100% is just too big in a full width box, but dynamic sizing is a really desirable feature. What I would like most is a maximum size parameter, and dynamic sizing to 100% for box widths less than the maximum, so width and height would be less than maxsize=50em or whatever one chose, but as large as possible within that and the column width.  Cheers, &middot; &middot; &middot; Peter (Southwood) (talk): 17:31, 7 June 2018 (UTC)

Random file from Commons category?
The discussion above got me thinking and looking around a little more. As I am concerned about showing only high quality content for the selected image on a portal, specifically on Portal:Trains, I found that there are a few categories for Featured and Quality rail transport images on Commons, and linked to them on the candidates page. There are some pretty blatant gaps in the categorization (it seems the vast majority of the quality images categories show European subjects when there are plenty more of examples of quality images from the rest of the world), but this is a start. Because they don't present a comprehensive worldwide view of rail transport, these categories aren't enough to just make a random selection for the portal. They are a good start for a candidate suggestion when I update that section each week. What I would like is a template like Random page in category that would show a random page from a category on Commons. Slambo <small style="color: black;">(Speak) 12:11, 4 June 2018 (UTC)

Commons:Special:RandomInCategory doesn't appear to recurse subcategories or multiple category names at once. Slambo <small style="color: black;">(Speak) 12:22, 4 June 2018 (UTC)

Refining the Picture slideshow
, this is amazing, and a major step in the right direction. Thank you!

I have couple questions/suggestions...

Is it possible to place the controls beneath the picture?

What does the middle doohickey do?

Could the size of the pictures be adjusted to the width of the frame?

Everybody, please post your comments and suggestions here. Thank you. &mdash; The Transhumanist  02:19, 7 June 2018 (UTC)
 * Not easily, at least not on-wiki. The controls are generated by the gallery tag itself, so any changes would need to be requested on Phabricator.
 * It toggles between slideshow mode and standard gallery mode the display of a standard gallery display below the slideshow
 * Possibly... would need to experiment with the outer 's CSS
 * ✅, this is now the default but other widths can still be specified - Evad37 &#91;talk] 04:02, 7 June 2018 (UTC)
 * - Evad37 &#91;talk] 02:31, 7 June 2018 (UTC); updated 04:02, 7 June 2018 (UTC)


 * That's an interesting feature, however it fails to credit the photographer and to provide a link to the most related article. -- M h hossein   talk 06:50, 7 June 2018 (UTC)
 * The captions are just wikitext, so you can fix it - Evad37 &#91;talk] 07:25, 7 June 2018 (UTC)
 * Plus credit is provided in the same way as every other image on Wikipedia, via the image description page shown by clicking on the image - Evad37 &#91;talk] 07:28, 7 June 2018 (UTC)
 * The navigation part is too wide for my width as I get the right arrow on a second line under the toggle thumbnails symbol. Also may be you could remove/reduce the white space under the image when not displaying the thumbnails. Keith D (talk) 10:32, 7 June 2018 (UTC)
 * I've reduced the whitespace at the bottom, but there's not much we can do about the controls. I've reported the issue at T196722. - Evad37 &#91;talk] 05:10, 8 June 2018 (UTC)
 * This looks great. One minor issue: when I change pictures, a thumbnail of the new picture appears briefly and the text below moves up, before the full size picture loads and everything flicks back into place.  (I suspect the timing varies between seconds and too quick to notice, depending on internet speed.)  Is there an easy way to fix that? Certes (talk) 23:42, 7 June 2018 (UTC)
 * Again, not much we can do here. I've passed on your comments in T196723 - Evad37 &#91;talk] 05:19, 8 June 2018 (UTC)

The picture slideshow is a very cool tool and I’d love to incorporate this in a number of portals that I maintain. However, I see the below shortcomings:
 * Most portals prefer to separately highlight the photo credit, like it is done for the Featured Picture on the main page. In the current template, photo credit can be added to the description, if needed, but it does not stand out as a separate paragraph like the main page or how most portals currently do it.
 * Suggestion: Can we have a separate field to put the photo credit? Even better if the template can automatically draw this from the image page if the field is left blank.


 * Since the image names and descriptions are required to be input in the template itself, the complete volume of code for this template alone will be large when the number of images in the pool will be many. When this is going to be added to an already code-heavy portal page, the outcome would become difficult to manage and maintain.
 * Suggestion: can we have the images, descriptions and credits in a fixed format in separate one or more archive page(s), from which the main template can draw in random fashion?  Arman  ( Talk ) 10:25, 10 June 2018 (UTC)
 * First question: I'm not sure how difficult it would be to pull the data from the  page. I suppose it would depend on if that data is accessible via Lua, in which case that functionality could be added to the module.  do you guys know if this is possible?
 * Second question: I'm not sure if this template has the ability to draw from a list like some of the other ones do. You could just put the slideshow code on a subpage and transclude it into the relevant portal section if you need to keep the portal page size down. &mdash; AfroThundr (u &middot; t &middot; c) 13:11, 10 June 2018 (UTC)
 * That's a good suggestion AfroThundr3007730, I'll try that.  Arman  ( Talk ) 04:19, 11 June 2018 (UTC)
 * Lua can read the  page.  Module:Excerpt does so, to guess whether an image is non-free and hence might upset people if it appeared in a portal.  The relevant code is at the end of function checkimage. Module:Excerpt also reads lists from subpages in a variety of ways, so that's also possible.  I wonder if we should consider splitting Excerpt to produce a module of common utilities which can also be called from Module:Random slideshow and future developments. Certes (talk) 14:36, 10 June 2018 (UTC)
 * Lua can only see local file description pages, not ones on Commons. Which is fine for checking for non-free images, but won't work for the general case of extracting image information. - Evad37 &#91;talk] 15:53, 10 June 2018 (UTC)
 * You can now specify credits using credit1, credit2, etc parameters. They will appear in small text below the the caption (as a separate paragraph) - Evad37 &#91;talk] 15:48, 10 June 2018 (UTC)
 * Great, will surely try.  Arman  ( Talk ) 04:19, 11 June 2018 (UTC)
 * Thank you folks - I have successfully implemented this feature in Portal:Bangladesh with excellent results.  Arman  ( Talk ) 09:21, 11 June 2018 (UTC)

I have a rather odd use-case, but it might apply to other groups of portals too. There are portals for each of the counties in South East England, and an over-arching South East England portal that pulls content from each of the county portals. provides a great solution for selected articles and biographies, but I'm not sure I'd be able to get to work in the same way for images; i.e. for each county portal to show a slideshow of images related to that county, and P:SEE to show a slideshow of all those images together (without having to duplicate the list). <b style="color:#98F">W</b><b style="color:#97E">a</b><b style="color:#86D">g</b><b style="color:#75C">ge</b><b style="color:#83C">r</b><b  style="color:#728">s</b><small  style="color:#080">TALK  13:27, 11 June 2018 (UTC)
 * ✅, see Transclude files as random slideshow. It can work with any page that has images, so you could also specify a whole lot of articles to grab images from, and randomise into a slideshow gallery ( - Evad37 &#91;talk] 09:14, 12 June 2018 (UTC)
 * Nice. What about captions?  &mdash; The Transhumanist   11:30, 12 June 2018 (UTC)
 * Captions are also transcluded (minus references, footnotes, and some templates). - Evad37 &#91;talk] 12:00, 12 June 2018 (UTC)
 * That's properly awesome, many thanks. I love that it can do multiple pages AND specific sections - so flexible! Will get that up and running on the portals I mentioned above very soon. <b style="color:#98F">W</b><b style="color:#97E">a</b><b style="color:#86D">g</b><b style="color:#75C">ge</b><b style="color:#83C">r</b><b  style="color:#728">s</b><small  style="color:#080">TALK  14:52, 12 June 2018 (UTC)

Test case: Cenozoic
If anyone is testing new image displays, Portal:Cenozoic might make a good test case. The entire portal has been nominated for deletion on the grounds that its picture is not visible. Certes (talk) 08:37, 16 June 2018 (UTC)

Slideshows and the mobile skin
This is really great. Thank you for your work.

However, on the mobile site, or while using the mobile skin, the only thing that displays is the standard gallery without the slideshow. You can test this on Portal:Cenozoic or any portal that currently has the slideshow template. This also is even more of a problem if used in a selected article slideshow, as above. Is there any way to fix this on wiki, or would someone need to submit a Phabricator request? Greatedits1 (I hope so &#124; If not, let me know) 19:34, 16 June 2018 (UTC)
 * I don't think there's anything we can do on-wiki. The  element is not just hidden, but completely missing from the html of the mobile site. There's probably also some missing javascript. - Evad37 &#91;talk] 07:07, 18 June 2018 (UTC)
 * Maybe when we get TemplateStyles we can hide everything in the gallery apart from the first image and caption - Evad37 &#91;talk] 00:10, 20 June 2018 (UTC)
 * Yeah, I think that would probably be a good alternative for pictures on the mobile site until this can be resolved. However, that would not be a good alternative for article excerpts, since their "caption" is a lot longer. Greatedits1 (I hope so &#124; If not, let me know) 19:42, 22 June 2018 (UTC)
 * If everything else gets hidden, then the first caption element can be styled to take up all of the available width - Evad37 &#91;talk] 01:33, 23 June 2018 (UTC)

The issue has previously been reported at T194887 - Evad37 &#91;talk] 07:03, 22 June 2018 (UTC)
 * Thanks to TemplateStyles, slideshows now have a sensible fallback for mobile: four random images are shown, rather than every image in the slideshow. - Evad37 &#91;talk] 16:31, 19 July 2018 (UTC)
 * Nice.  &mdash; The Transhumanist   22:54, 19 July 2018 (UTC)

Is there a way to automate Did you know sections?
Is there a way for a computer program to fetch Did you know items based on subject? &mdash; The Transhumanist  09:52, 25 April 2018 (UTC)


 * If you had several of them as subpages of a portal, you could easily select one at random. But if you want to emulate the main DYK process, where the listed items specifically relate to new or updated content, then I'm not sure there's a straightforward way to do that without a fair chunk of manual maintenance. <b style="color:#98F">W</b><b style="color:#97E">a</b><b style="color:#86D">g</b><b style="color:#75C">ge</b><b style="color:#83C">r</b><b  style="color:#728">s</b><small  style="color:#080">TALK  14:00, 25 April 2018 (UTC)
 * I'd want the new or updated content automatically placed on a subpage, so that it can cycle through the random generator along with the rest. Making and populating subpages by hand for 1500 portals would take years off your life. If we can figure out how to get the computer to do it, then we will still be young when the task is complete. :) `  &mdash; The Transhumanist   06:54, 27 April 2018 (UTC)

I think it should be possible (although I don't have the technical know-how to do it myself) to create a bot that would look for hooks with specific search words at T:DYK and copy them to a portal subpage. For each new hook it would also have to remove/archive the bottom one to keep the overall number of hooks constant. Perhaps it would be even feasible to check whether the new hook has an associated image and if it does, then replace the current hook-with-image on the subpage. This way, you would always have one hook with an image at the top and a constant number of others without. A similar process could be implemented for an "in the news" section with blurbs copied from Portal:Current events (much better than Wikinews). What do you guys think? — Kpalion(talk) 15:22, 26 April 2018 (UTC)
 * How would you specify the search words for a given portal? &middot; &middot; &middot; Peter (Southwood) (talk): 15:43, 26 April 2018 (UTC)
 * It might be easier for some portals than others. For Portal:Poland, to take an example that is familiar to me, "Poland" and "Polish" would be obvious choices (for "Polish" it would have to be case-specific, though). If you have doubts whether this would work, I've been doing this manually for nine years; if you look at Portal:Poland/Did you know/archive, you'll see that the vast majority of the hooks contain at least one of these two words. Of course, this could be further fine-tuned with time. — Kpalion(talk) 15:55, 26 April 2018 (UTC)
 * Another thought: the bot would be looking at the wikicode, not the visible text, which means that it would be enough for the search term to appear in a piped link. You could also create a template (invisible to readers, but visible to the bot) to tag a DYK hook as pertaining to particular portal's topic and agree with member of the relevant wikiproject to remember to include the template in their DYK hooks (again, it might depend on the topic, but I believe in most cases wikiproject members would be the authors of most relevant hooks). — Kpalion(talk) 16:08, 26 April 2018 (UTC)


 * Another possibility would be for the bot to examine the wikilinks in the hook and determine which categories the target articles are in, and add the book to the DYK page of portals related to that category. That in turns requiring a way of determining which portals are interested in which categories, but I would suggest managing a list of categories would be simpler and more accurate than managing a list of key words, and this approach doesn't require any hidden code to be added to the hook itself. <b style="color:#98F">W</b><b style="color:#97E">a</b><b style="color:#86D">g</b><b style="color:#75C">ge</b><b style="color:#83C">r</b><b  style="color:#728">s</b><small  style="color:#080">TALK  09:40, 27 April 2018 (UTC)


 * Yeah, that might work, especially if it were able to look at parent categories as well, although it would probably be slower (but likely still feasible). — Kpalion(talk) 10:02, 27 April 2018 (UTC)


 * Or it could look to see if the article is tagged by a particular WikiProject and use that to determine associated portals. I appreciate the relationship between portals and WikiProjects isn't always 1:1, but this could work for the majority of cases. <b style="color:#98F">W</b><b style="color:#97E">a</b><b style="color:#86D">g</b><b style="color:#75C">ge</b><b style="color:#83C">r</b><b  style="color:#728">s</b><small  style="color:#080">TALK  11:51, 27 April 2018 (UTC)


 * Good idea! This actually would be the best solution. — Kpalion(talk) 14:28, 27 April 2018 (UTC)

Other language Wikipedias have portals. The Spanish portals have Did you Know entries in them. I just copied some over. Can we mine those automatically? I copied/pasted them while in Chromium, which translated the whole page I was looking at. I copied them into subpage DYK/4 of Portal:Ancient Near East. That portal is set up with automatically rotating content. &mdash; The Transhumanist  06:59, 27 April 2018 (UTC)


 * But isn't the purpose of a DYK section to showcase the most recently created or expanded articles on the given topic? If so, then mining our own wikipedia's main page DYKs makes sense, but translating them from other wikipedias does not. And if not, then I don't know what other purpose it might have. — Kpalion(talk) 08:52, 27 April 2018 (UTC)


 * I always thought they were interesting little tidbits. But you do have a good point: What's the point of presenting a factoid in a portal if it isn't included in the cited article?   &mdash; The Transhumanist   09:08, 27 April 2018 (UTC)
 * In my view, every portal should do what they want on DYK, whether it is feeding off the main page DYK process, finding interesting stuff on other language Wikipedias or inventing their own wheel. Showcasing recent content or showcasing fun content or showcasing whatever should all be acceptable. (If we think of portals as mini-main pages, one of the great advantages they have over the real main page is the flexibility to try new things). For DYK bots, I would probably prefer something semi-automated: a bot that flags up candidates that I can then decide to paste into the portal DYK if I believe them to be appropriate. —Kusma (t·c) 09:26, 27 April 2018 (UTC)
 * Of course, it should be flexible. I was just talking about what makes most sense to me. I believe having a tool like this would be good, not that its use should be mandatory. It should be fairly easy to make the process either fully or semi-automated, depending on your preferences. The bot could copy the matching hooks to a page you specify; it could be a DYK subpage that is transcluded on the portal or it could be a proposal/waiting list that you could then use to select the hooks you want on your portal. — Kpalion(talk) 09:50, 27 April 2018 (UTC)

Instead of creating portal subpages, is there any other way to put the DYK items as a numbered list in one archive page and the portal main page to draw items at random from that list? If currently there is no such way, can we develop that? This would eliminate the need of thoousand of portal "sub-pages".  Arman  ( Talk ) 10:06, 3 June 2018 (UTC)
 * One solution could be to use { {User:JL-Bot/Project content|content-did-you-know-articles|category=…}} in its own section on a data page, then use on the page where the random article is to appear.  If you can link a concrete example of a portal that should do this, then I'm willing to have a go at setting it up as a model. Certes (talk) 10:41, 3 June 2018 (UTC)
 * Dear Certes, Please feel free to try this for Portal:Bangladesh. In the worst case we can always revert back to the original.  Arman  ( Talk ) 11:17, 4 June 2018 (UTC)
 * I've created Portal:Bangladesh/Recognized content. Once the bot populates that page, I can look at changing Portal:Bangladesh itself to use it.  This method won't be able to discriminate between DYKs on geography, literature, etc. Certes (talk) 12:13, 4 June 2018 (UTC)
 * The bot has finally run. This won't work as-is, because DYK shows content which isn't in the actual article.  I'll keep trying but  § Transclude Did you know items from the WP:DYKA archives describes an alternative which may be better . Certes (talk) 09:29, 8 June 2018 (UTC)

Is there any way of using a bot to take the list of DYKs from a project (ie JL-Bot recognized content listing output) and turn it into a wiki-coded text output with the DYKs (recent ones are now stored on the article's talk page). This would be a great help for small/sluggish projects where the new automated template doesn't produce much, if any, recent output, but the project has lots of old DYKs. I've previously done them myself by going to the talk page and cutting & pasting, but it's very time-consuming. Espresso Addict (talk) 13:24, 8 July 2018 (UTC)
 * Answering my own question, it looks like JL-Bot will do it -- has anyone tried playing around with this option? Espresso Addict (talk) 13:37, 8 July 2018 (UTC)

= Discussions about portal-related templates =

New Markers
I have created some new flags, which in my view should be added to all portals as a kind of classification system.


 * Non-standard portal flag – use to mark a portal which cannot be easily maintained where there is no known maintainer.
 * Talk page instead. JLJ001 (talk) 20:41, 29 May 2018 (UTC)


 * Maintained portal flag – use to mark a portal which has maintainers.
 * Portal flag – use to mark a portal where the layout is standard and all new features and updates are wanted.
 * This will be marked on the talk page instead. JLJ001 (talk) 13:52, 29 May 2018 (UTC)

If the portal has a peculiar layout or is an example of a design incompatible with the latest updates, tag it with Non-standard portal flag, to avoid introducing errors, project bots and AWB users should skip pages with this flag.

Any portal with one or more active maintainers should be tagged with Maintained portal flag, those maintainers should be responsible for deploying any updates, therefore project bots and AWB users should skip pages with this flag.

Portals which are not maintained, or where the maintainers want all the latest updates automatically, can be tagged with Portal flag, project bots and AWB users should make sure to keep these portals up to date and free from errors.

All these flags are optional, but will make things much easier for everyone working on the project. I can add any additional features to these flags if needed. JLJ001 (talk) 10:15, 29 May 2018 (UTC)


 * Nice Cesde v a  (talk) 11:35, 29 May 2018 (UTC)

Consolidate Them?

 * Perhaps it would be better to collapse these into a single template? Something like:
 * Each of these flags should represent a single state/purpose and be set independently, which allows for more situations than mentioned above.
 * This is also more portable and would simplify management with a single template, that can be extended as needed. (We'll likely need to.) — AfroThundr (t•c) 12:17, 29 May 2018 (UTC)
 * Also, instead of adding them to the portal page, would it be better to tag the talk page instead, like we do with WikiProject Banners? — AfroThundr (t•c) 12:19, 29 May 2018 (UTC)
 * They must be visible while loading the page in JWB, so although the talk pages may be tagged as well, the actual pages must have a visible template on them. The idea of having them all in a single template is good, but note that although they indicate the state, JWB & etc will match a string, so there must be a common string for excluding edits from it. I suggest we tag these additional parameters in another template just for the talk page. (eg Portal flag talk) but retain the simple solution for bot/auto (in)exclusion. JLJ001 (talk) 12:27, 29 May 2018 (UTC)
 * If that's the case then we should probably stick with just tagging the portal vice the talk page. No need for excessive duplication of effort. And the  parameter above was for flagging if auto editing was allowed. — AfroThundr (t•c) 13:42, 29 May 2018 (UTC)
 * Ok taking into account that the majority of portals will be wanting updates, I suggest that is kept on the talk page. This leaves the other two acting more or less like the maintenance tags placed on articles, only less obviously. JLJ001 (talk) 13:52, 29 May 2018 (UTC)
 * If the merged template suggestion (similar to above) is used, we wouldn't need to add that particular tag to the talk page separately, it would just be an additional (optional) parameter for the (soon to be) already existing tag. — AfroThundr (t•c) 15:13, 29 May 2018 (UTC)
 * I still can't get JWB to read the talk page for the presence of a tag telling it to not edit the page, but if this was possible, then we wouldn't need to tag the portal page itself. JLJ001 (talk) 15:18, 29 May 2018 (UTC)
 * I still can't get JWB to read the talk page for the presence of a tag telling it to not edit the page, but if this was possible, then we wouldn't need to tag the portal page itself. JLJ001 (talk) 15:18, 29 May 2018 (UTC)


 * I made a start, what sort of parameters are you looking for? JLJ001 (talk) 12:35, 29 May 2018 (UTC)
 * At the moment, just collapsing the existing states into the one template. We want to minimize our technical footprint on portals without sprinkling maintenance templates all over. { Not sure if a parameter for flagging the existence of subpages would be necessary since we have PrefixSearch. I'll probably have more ideas later. Can you think of any other useful things this project might like to tag portals with? — AfroThundr (t•c) 13:42, 29 May 2018 (UTC)
 * If the subpages are needed for the portal the noting their existence as desired could be useful? JLJ001 (talk) 13:52, 29 May 2018 (UTC)
 * So  then. Parameters are cheap. Updated the example above. — AfroThundr (t•c) 15:17, 29 May 2018 (UTC)


 * The talk page template could be made part of the wikiproject banner? JLJ001 (talk) 14:03, 29 May 2018 (UTC)
 * This would be a good idea, if we start tagging talk pages, just use the banner. This would mean we'd only need a single tag template for the portal page, and any other data could be added to the talk page banner. — AfroThundr (t•c) 15:13, 29 May 2018 (UTC)
 * I suggest we merge this task into the task to assess portal suggested by Evad at the bottom of the page. JLJ001 (talk) 15:18, 29 May 2018 (UTC)

Template Fixes
what is the flag icon at the top of the page that Maintained portal flag generates supposed to link to? At present it just links to a non-existent page  "The page to link to. This is where you will be taken when clicking the icon" , which obviously takes you to the wiki page inviting you to start the non-existent article. Perhaps you could fix this? I'm reluctant to deploy this template until it's working 100% Cactus.man   &#9997;  17:19, 29 May 2018 (UTC)
 * An oversight on my part that. I have fixed this and it now links to . (the talk page of whatever portal page it's on). JLJ001 (talk) 17:25, 29 May 2018 (UTC)
 * Ideally whoever clicked on it can then discuss proposed changes on the talk page, but additionally if required, details on the maintenance schedule and layout of the portal could be put on the talk page as well. JLJ001 (talk) 17:27, 29 May 2018 (UTC)
 * Yes, I see that now, makes sense. Thanks for your swift action. Cactus.man   &#9997;  17:32, 29 May 2018 (UTC)
 * On further thought, I have actually changed this to  so it will automatically link to the main talk page if used on first level subpages. However, this only goes one level down for second or third level supages. For Example: Portal:Opera/Selected audio/20 will link to Portal talk:Opera/Selected audio. There is nothing I can do about this, if talk page consolidation beyond that is needed, redirects could be used. JLJ001 (talk) 17:38, 29 May 2018 (UTC)
 * Just use instead - Evad37 &#91;talk] 17:43, 29 May 2018 (UTC)
 * I should have checked the manual, is so much better. Thanks. JLJ001 (talk) 17:47, 29 May 2018 (UTC)

New maintenance categories

 * New maintenance categories for the flags: Category:Manually maintained portal pages & Category:Non-standard portal pages. JLJ001 (talk) 18:17, 29 May 2018 (UTC)
 * Tagged and taxonomized. — AfroThundr (t•c) 19:26, 29 May 2018 (UTC)
 * Also a question: Would you need a visible template for AWB/JWB tracking or could you use a category instead? I'm wondering if we can just categorize each portal from the project banner on the talk page and just pull a category listing for auto-editing runs. Also, would it be better to merge those two templates into a single one with multiple perameters? Just thinking we could focus on one instead of maintaining a bunch of smaller ones. — AfroThundr (t•c) 19:41, 29 May 2018 (UTC)
 * JWB is a very basic interface with few/no options (it can't check categories or talk pages), and I have yet to see what AWB has (I think it's better), but I feel that a visible warning is the best way to avoid accidental manual and less organized disruption to portals in good faith (the problem at the opera portal was manual editing). Regarding merging them, I don't see the point to be honest, it looks like the Non-standard flag will barely be used, if at all, since any portals that aren't standard probably have a maintainer. And since standard unmaintained portals look like they will tagged as part of the wikiproject banner, that's another template and a new set of categories again. Personally I think there is more future in the talk page template, with these little flags more of a warning notice than anything with advanced usage. It would be good if we could use the talk page banner to arrange the portals by edit yes/no, but also maybe by type, topic, etc. I am not sure exactly what we can do, but it would be good to have categories like you suggest for getting lists to work on. JLJ001 (talk) 19:56, 29 May 2018 (UTC)
 * Ok so if I get you, the main uses for those flags are:
 * Unmaintained portals (free game)
 * Unique portals (probably maintained, don't touch)
 * Any other scenarios I'm missing here? What about the case of unique yet unmaintained? Perhaps another use case for merging those templates and using parameters to record both states, you could have the icon change color if:
 * (free game for auto-editing)
 * (edit with care)
 * (don't touch)
 * (probably don't touch)
 * At least as far as auto-editing is concerned. Thoughts? — AfroThundr (t•c) 20:25, 29 May 2018 (UTC)
 * As for the category tagging via talk page banner, that is certainly possible. See this edit to the Portal banner where added the historical flag for me.
 * Using this method, we could add a flag for subpage retention, and whatever else we might need for portal tagging. — AfroThundr (t•c) 20:26, 29 May 2018 (UTC)


 * The trouble is that I am seeing any tag on the actual portal as a black and white "don't touch" tag, much like in use or under construction to be used only if someone is doing the work themselves. The moment it goes beyond that we need a more visible statement/list detailing the situation, probably best suited for the talk page (like every other such template). If we have multiple parameter tags on the portal pages then updating them could be hard (example, updating a single parameter on Portal:Opera would take 300 edits). Whereas if we have one tag on the talk page then it's easy to find, read and update. Also I think we should scrap the non-standard (orange) flag and stick with the green one. (PS. I think you are about right on the nuance there, lets start with those parameters). JLJ001 (talk) 20:40, 29 May 2018 (UTC)

Portal templates affecting reflist templates
I don't know why, but there is some bug were the portal template will affect the reflist template and stop the reflist from splitting into columns. One example is Newcastle United F.C., can someone good with templates have a look thanks. Govvy (talk) 17:15, 31 May 2018 (UTC)
 * On my screen it splits into three columns. Number   5  7  17:17, 31 May 2018 (UTC)
 * I tried it out on the other computer, I think it's bugged to smaller screen sizes, not sure why. Govvy (talk) 17:42, 31 May 2018 (UTC)
 * Thoughts?  Kees08  (Talk)   17:45, 31 May 2018 (UTC)
 * To help us track this down, please provide the name of the template(s) causing the problem.  &mdash; The Transhumanist   19:59, 31 May 2018 (UTC)
 * Most likely the fact the reflist was using the, rather than just </reflist}} , which autocompletes the collumns now. Screensize would change a lot of things about this though.  Lee Vilenski  (talk • contribs) 10:57, 1 June 2018 (UTC)

Can you nest substitution?
Can you subst: a template which in turn has subst: in it? How? &mdash; The Transhumanist  08:45, 5 June 2018 (UTC)
 * Briefly got some internet. If the parent template has a span tag with nothing inside except a parameter, then sure. So on the page you want to edit, you just fill that parameter with the child templates. See my User:Cesdeva/sandbox.


 * In in more complex situation, you'd still nest in a parameter, but you'd have to custom write a wrapper around your nested template, to make it compatible with the parent. Cesde v a  (talk) 09:15, 5 June 2018 (UTC)
 * (edit conflict) Is there a "template shim" that fully evaluates the templates its placed around into wikitext, before passing it to the template its placed inside? For instance:
 * In the example the shim would evaluate all of its inner templates, then pass the resulting wikitext to the outer template for processing. And maybe  could be used to pass certain values from the inner templates as well (regex maybe?), if that's possible.
 * If that doesn't exist, I wonder how difficult it would be to make one. Would it require a custom lua module? Is it even possible to do two "eval" passes on templates? &mdash; AfroThundr (u &middot; t &middot; c) 11:38, 5 June 2018 (UTC)
 * If that doesn't exist, I wonder how difficult it would be to make one. Would it require a custom lua module? Is it even possible to do two "eval" passes on templates? &mdash; AfroThundr (u &middot; t &middot; c) 11:38, 5 June 2018 (UTC)


 * Yes. To prevent the subst: being processed on the template itself, put it within <includeonly ></includeonly> tags. The only downside is that standard transclusion no longer works correctly (but that limitation can probably be overcome if necessary). See, User:Evad37/X1, User:Evad37/X2 for examples. - Evad37 &#91;talk] 11:28, 5 June 2018 (UTC)
 * See also Help:Substitution - Evad37 &#91;talk] 11:31, 5 June 2018 (UTC)
 * WP:SAFESUBST may (or may not) help here. Certes (talk) 11:46, 5 June 2018 (UTC)

Rethinking portal flag templates
Two of our maintenance flag templates, maintained portal flag and non-standard portal flag, were posted to WP:TFD. Concerns were raised about the validity of maintenance flag templates on Portal pages, specifically the visual flag indicator. These concerns were raised before, and I think we should iron these out before doing much more with these flags.

Previously discussed in (which started in ), was the need for a visual indicator to users during AWB maintenance runs that signified to the editor that a page met certain criteria that required special care when editing, such as being actively maintained, or using significantly unique markup and design. Currently the use of these flags is a bit inconsistent: They were intended to be placed on the root portal page, not necessarily every subpage in the tree (see Portal:Opera).

It should be noted that these flags add the portals in question to tracking categories. I'll also note that these types of statuses can also be recorded with the portal flag talk template (still a work in progress), or added as additional parameters to WikiProject Portals, the same way the  flag is done. Ideally we'd only need one template to record all of these statuses, in whichever namespace they should reside.

We currently track three different statuses for portals, with another planned:
 * 1) Maintained status, via maintained portal flag or portal flag talk
 * 2) Non-standard status, via non-standard portal flag or portal flag talk
 * 3) Historical status, via WikiProject Portals
 * 4) Subpage retention status (planned), via portal flag talk

Portal flags: Questions needing answers
These are the questions I want to start with:
 * 1) Do we need an indicator for these statuses, visual or otherwise, on the portal page itself, or will the talk page suffice?
 * 2) If an indicator is needed on the portal page, should it be visual, and where?
 * 3) If an indicator is only needed on the talk page, should it be merged into the project banner?
 * 4) What effect will this have on our ability to do batch runs while still respecting the flags?
 * 5) Are there any other portal statuses that we should consider tracking?

Please post your thoughts and comments in the discussion section below.

Portal flags: Proposed end state
Barring technical restrictions, the ideal end state would look like this:
 * These flags would be provided by portal flag for the portal page, and portal flag talk on the talk page.
 * The indicator on the portal page would not be visible at the top of the page, if it needs to be visible at all.
 * The talk page template would be merged into the project banner, if possible, to minimize our presence.
 * These templates would only tag the root page, making subpage tagging unnecessary.

Portal flags: End state update
This is now the current state of affairs:
 * These flags are provided by portal maintenance status for the portal page, and WikiProject Portals on the talk page.
 * The indicator on the portal page will not be visible by default, and will be hidden behind a custom CSS rule.
 * The talk page template has been merged into the project banner to minimize our presence.
 * These templates will only tag the root page, making subpage tagging unnecessary.
 * These flags will populate hidden tracking categories, to facilitate targeted maintenance.

Portal flags: Survey and discussion
Pinging the usual players, input from everyone is welcome and appreciated. &mdash; AfroThundr (u &middot; t &middot; c) 13:43, 6 June 2018 (UTC)

I've added an idea of where I think we should end up. I believe we should consolidate the flags into a single template, or one per namespace if a template is required for both. I think this would provide the best balance between allowing for portal maintenance flags while keeping our footprint in portal space small. That said, there may be things I haven't considered yet, hence the survey. I may need to revise this as the questions get answered. &mdash; AfroThundr (u &middot; t &middot; c) 14:15, 6 June 2018 (UTC)
 * The talk page template (probably the project banner) should get the status from the template on the portal page (via Lua) to prevent them getting out of sync. Then adding the flag template to the portal page could both put the portal itself into a hidden tracking category, and cause an appropriate message to display on the talk page. Perhaps the flag template could also have some output that is hidden with CSS by default, but could be shown by users doing portal maintenance by adding a line to their personal skin/common css - Evad37 &#91;talk] 15:58, 6 June 2018 (UTC)
 * I think that could be a good idea, but some editors who may want to change the portal may not see the flag, because they have not found the particular setting. To try to mitigate this it may be worth also adding the maintenance flags to talk pages as well, but not hide them when they are on talk pages (as proposed above). Wpgbrown (talk) 20:10, 6 June 2018 (UTC)
 * I made a start on the auto-detecting module: Module:Portal flag talk auto. More to come later, including integration with the talkpage project banner. - Evad37 &#91;talk] 17:42, 7 June 2018 (UTC)
 * to project banner, which effectively makes Portal flag talk redundant - Evad37 &#91;talk] 02:18, 8 June 2018 (UTC)
 * Sweet, at that point, we could flag it as obsolete. Now I think we should consolidate the portal flag templates into a single portal flag that accepts multiple parameters. This shouldn't be difficult, since I'm getting better at editing templates. I can just merge them and add any additional flags we need to track, probably with a switch to toggle visibility too. I wanna iron out our plan for these before I jump too far into this though. Once we have consensus on the desired end state and behavior for these flags, I'll go ahead and implement.
 * Also a nit: Do you think the module might be better named "Portal flag auto"? I'm just thinking the module's functions aren't limited to the talk page. Also, there wouldn't be two of them for different namespaces, since it'd make the most sense to add any new functionality to the existing one. Or maybe I'm just being picky. &mdash; AfroThundr (u &middot; t &middot; c) 03:50, 8 June 2018 (UTC)
 * I'm not particularly fussed either way over the module name, but if it is to be changed, we should wait until the new combined template is created, and give the module a similar name. On that point, maybe the combined template should be named portal maintenance status rather than "flag" – per the TFD, the "flag" name isn't necessarily obvious enough, and the flag image probably shouldn't be shown to readers. With regards to parameters, I think they should be named parameters that are present if applicable (i.e. yes or any other value to turn on the "is maintained" note). This should make it easier for the module (which looks at the raw unexpanded wikitext of the portal page) to determine which notes apply. - Evad37 &#91;talk] 04:29, 8 June 2018 (UTC)
 * Back to the rename: Module:Portal maintenance status sounds like a good name. Curious, do modules redirect the same way templates do? It's only called from the two templates, but just wondering. If there are no objections, I'll move it. &mdash; AfroThundr (u &middot; t &middot; c) 05:07, 9 June 2018 (UTC)
 * Sounds good. Modules do not redirect by default; there is some code that can make them act like redirects, but I don't think that's necessary in this case, as the only direct uses of it are the project banner and the module documentation. - Evad37 &#91;talk] 09:59, 9 June 2018 (UTC)
 * ✅ and all relevant pages updated. &mdash; AfroThundr (u &middot; t &middot; c) 13:12, 9 June 2018 (UTC)

Portal flags: Integration with Template:WikiProject Portals
First off, thanks for building that module. I have a couple questions and comments. Just a few thoughts I had, I'll probably have more questions later. Thanks again. &mdash; AfroThundr (u &middot; t &middot; c) 04:09, 8 June 2018 (UTC)
 * Should the secondary information on this template (historical, flags, future stuff) be folded under a [more] button? I seem to recall there is a threshold you can set for note collapsing. I guess for now we're only recording a couple things, so it doesn't really matter.
 * The formatting for the flag information. Do we need that block to be highlighted? The flags are primarily for our batch maintenance editors, who will already know to look for them. Anyone else coming across these will (most likely) be doing manual edits anyway. Perhaps linking to a (to be constructed) page detailing all of the flags and their meaning would be a good idea?
 * Another flag to be tracked: subpage retention. This one is for portals who have had their subpages triaged and pruned (not necessarily purged) to the minimum necessary, and should not be culled further. Single-page portals not applicable, of course. Can the module check if subpages exist, and if the flag isn't set, add the portal to another tracking category for triage?
 * The note seems relatively important, and so I thought having them visible would be a good idea – the block highlighting prevents them from getting lost in a sea of talkpage boxes which are present on pages like Portal talk:Opera, since we really don't want them being overlooked. Though perhaps we could go without the bright yellow border. Having an overview page is a good idea, it should perhaps be at the proposed combined flag template's documentation. Checking if there are any subpages probably isn't possible, since the contents of special pages like Special:PrefixIndex isn't available to Lua modules. - Evad37 &#91;talk] 05:40, 8 June 2018 (UTC)
 * If there isn't a programmatic way of retrieving subpages, then I suppose that one will have to be a manual parameter, like  is. It shouldn't be a problem since the portals will have to be manually triaged anyway. The editor can just set the flag manually, once they're done. Speaking of which, how much work would it be to make the template also detect historical on the corresponding main page, and automatically set   for those too? And another thing: the other flags should have a parameter that can be set manually if portal flag can't be used for some reason. Local values would override detected ones, or absent ones (although, maybe the template should display an error if it has conflicting values). &mdash; AfroThundr (u &middot; t &middot; c) 14:49, 8 June 2018 (UTC)
 * It should be easy enough to detect historical, actually – just need to generalise the existing module and provide a different entry point. This would just be pages in Wikipedia: space, right? As for manually setting the flags... doesn't that sort of defeat the purpose of detecting them automatically on the portal page? - Evad37 &#91;talk] 01:09, 9 June 2018 (UTC)
 * The point of exposing parameters to override the auto detection is for when there is not template on the main portal page, and it cannot be added for whatever reason. You would then be able to specify it directly in the banner parameters. This obviously opens up an avenue for conflicting values from autodetected vs manual values, so manual should take precedence or give an error. &mdash; AfroThundr (u &middot; t &middot; c) 01:37, 9 June 2018 (UTC)
 * I can't think of when it wouldn't be able to be added to the main portal page though. Even if fully protected, an edit request can be made (and note left here for our friendly admins). - Evad37 &#91;talk] 02:39, 9 June 2018 (UTC)
 * Not edit-protected so much as potential deletion or clobbering by other editors. WikiProject banners are less likely to be damaged since they reside in a talk page's header, where there is less editing traffic. I'll admit it is an unlikely scenario, but it doesn't hurt to have them. Plus this would make things like demos easier for the documentation. If you think manual overrides are unnecessary, then I'll leave it be until I actually encounter it in the wild. &mdash; AfroThundr (u &middot; t &middot; c) 03:41, 9 June 2018 (UTC)
 * just curious if you've had time to implement the code to detect historical yet. With that in place, we wouldn't need to expose it as a parameter, since it would be controlled by the template on the main page. Unless you think the utility of a talk page local override necessitates its retention. I'm indifferent on that at this point. &mdash; AfroThundr (u &middot; t &middot; c) 03:27, 11 June 2018 (UTC)
 * ✅ now. I've removed the parameter; we can always add it back if for some reason we need it again. - Evad37 &#91;talk] 04:14, 11 June 2018 (UTC)

Portal flags: Module and template code consolidation

 * Another question: right now the module is duplicating the work of the template in generating the messages for the project banner. This means when the maintenance template code gets updated, the module must be updated as well to maintain parity, which could mean them falling out of sync. I don't trust my Lua knowledge enough to add the recent changes (for now). Would it make sense for the module to detect the template on the main page, then embed it into the project banner (with necessary logic added to the template to detect being embedded) with all the same arguments as-is? Or would it be better to consolidate all the logic in the module, with both templates pulling the text content from the module? Just thinking of how we can deduplicate and centralize changes between the set. &mdash; AfroThundr (u &middot; t &middot; c) 03:42, 11 June 2018 (UTC)
 * Adding an embed parameter to the template might make more sense, so as not to use up Lua time on portal pages – some of the other portal automation modules can take up a fair chunk of the allotted Lua processing time. - Evad37 &#91;talk] 07:14, 11 June 2018 (UTC)

Portal flags: Removal of stale maintained status
Issue raised in the TFD:

No point making a bot request till other issues (TFD, merging) get resolved. But does six months sound about right for the timeframe? Can we do without a talk page message? - Evad37 &#91;talk] 00:52, 9 June 2018 (UTC)
 * I'd maybe even shorten it to 3 months. If a portal doesn't have an edit by then, it falls out of maintained status, or maybe multiple phases? Fresh: sub 30 days, stale: 30 to 60 days, outdated: over 60 days, with each in a tracking category. Perhaps add an optional timespan override parameter to the template to allow for tailoring for portals that don't need regular tweaking. &mdash; AfroThundr (u &middot; t &middot; c) 01:34, 9 June 2018 (UTC)
 * I also don't think posting on the talk page would be necessary (or desired, if there is a large volume of them) as long as the "flags are outdated" message emitted by the template (and the project banner) link to an adequate help text, probably in the template documentation. And to revise my time estimates eariler: 90 days should be the cutoff for fresh portals, after which they fall into a stale category, then at 180 days they are marked as outdated/attention needed. What do you think? &mdash; AfroThundr (u &middot; t &middot; c) 03:20, 11 June 2018 (UTC)
 * Doing it based on the number of months is easier than the number of days, since only the month+year is actually recorded in date. In terms of the "fresh" status, the main reason I suggested a longer timeframe was to avoid annoying portal maintainers too often – a couple, or a few, edits a year seems reasonable, to show a sustained interest. And I don't think the "stale" period needs to be as long as 90 days – around four weeks should be enough, since its really just a grace period between the flags being valid and invalid. I think removal should require an actual edit (by bot, awb, or manually), rather than just template logic, so that it actually shows up on watchlists and page histories. We don't really extra "stale" or "outdated" categories, since the portals will already be in dated maintenance subcategories. - Evad37 &#91;talk] 07:01, 11 June 2018 (UTC)
 * Ideally this should only apply to portals that need maintenance. If we can produce automatically updating portals then this should not apply to them. &middot; &middot; &middot; Peter (Southwood) (talk): 09:00, 18 June 2018 (UTC)

Portal flags: New template
I've started working on Portal maintenance status, as a proposed merged template. Instead of a top-icon flag, it uses a hidden-by-default message box, which those working on portal maintenance can display with custom css. Did you want to add something for subpages to the template? - Evad37 &#91;talk] 02:46, 9 June 2018 (UTC)
 * Good stuff, I like it. And yes I did want to add an argument for subpage triaging:  This flag would be set when a portal has been pruned of unnecessary subpages ("unnecessary" being subjective) and any portals tagged with this template without that flag set would be added to, and it would also populate , as appropriate. The intent, of course, is not to wage war on subpages so much as reduce their number to a manageable level, as has been discussed elsewhere on this page. Single page portals should have this set automatically, if possible. Or maybe we need a separate   flag, which could also be useful, and would populate another tracking category, that overrides the subpages flag. Just thinking out loud here. If you can think of other metadata tracking flags that would be useful in supporting project maintenance tasks, feel free to add to this. &mdash; AfroThundr (u &middot; t &middot; c) 04:34, 9 June 2018 (UTC)
 * Thanks for adding  to the template. Now we just need to update the module to provide parity in the WikiProject banner. Also, can we make the template expose the date it was last updated, kind of like refimprove and friends? I also made portal flag into a redirect to portal maintenance status. &mdash; AfroThundr (u &middot; t &middot; c) 13:18, 9 June 2018 (UTC)

I think the new template and module are now ready to be used, and I've updated my TFD !votes accordingly, but because of the bureaucracy of the TFDs we shouldn't be making widespread replacements. - Evad37 &#91;talk] 00:48, 11 June 2018 (UTC)
 * Are we not allowed to begin the replacement of our own accord until the TfD is closed? That's a bit annoying, but there's not really a rush to move on this yet, I guess. &mdash; AfroThundr (u &middot; t &middot; c) 03:45, 11 June 2018 (UTC)
 * It's bad form to make edits that bypass discussion in order to achieve a fait acompli. Plus it is specifically mentioned at WP:TFD: Templates are rarely orphaned—that is, removed from pages that transclude them—before the discussion is closed. - Evad37 &#91;talk] 06:39, 11 June 2018 (UTC)

Errors with some portals after replacing /box-footer
As I was organizing portals for the Society and Social sciences section of Portal:Contents, I stumbled on a couple of portals that are throwing errors: Portal:Monarchy and Portal:Military of Pakistan. It seems that, after you replaced the /box-footer subpage with Box-footer, a few portals still need to have the subpage. The error is caused by Random portal component and Random portal component with nominate because the error appears only in the boxes where those templates are used. I have figured out that the Lua module for those templates tries to find the /box-footer subpage to make the template, but that doesn't explain why portals like Portal:History do not throw errors with the same template and module when you have deleted the /box-footer subpage there as well. Greatedits1 (I hope so &#124; If not, let me know) 01:55, 7 June 2018 (UTC)
 * Also happening on Portal:Special Operations and all of the "Prehistory of ..." portals. Greatedits1 (I hope so &#124; If not, let me know) 02:20, 7 June 2018 (UTC)
 * Okay, I think I fixed it, with this edit to Module:Random portal component. Hopefully that doesn't cause other errors. :)  &mdash; The Transhumanist   02:53, 7 June 2018 (UTC)
 * Yep, those pages are fixed and it doesn't cause errors on Portal:History or Portal:Narnia. If you are thinking of replacing /box-header subpages at some point, it looks like you would have to do the same sort of thing again. Anyway, thanks! Greatedits1 (I hope so &#124; If not, let me know) 04:03, 7 June 2018 (UTC)

Picture slideshow and Media Viewer
I noticed that pics in a portal's slideshow do not show up in Media Viewer. Do you have any idea why? Just curious.

Also, clicking on a picture in the slideshow goes to the file page, rather than the Media Viewer. It's a mystery to me. Could you clue me in? :)  &mdash; The Transhumanist   09:21, 17 June 2018 (UTC)

Template:Transclude lead excerpt
Portals that the Transclude lead excerpt template isn't catching the pictures in...
 * I've updated the image detection code, can you check if there's any besides Germany still missing an image? - Evad37 &#91;talk] 09:42, 13 July 2018 (UTC)
 * Happy to. All done (with those listed below). Very very nice. Note that Heavy metal wasn't missing an image - the image shows up at the end of the section, hanging off the bottom of the text, creating a bunch of white space to the left of it.  &mdash; The Transhumanist   10:14, 13 July 2018 (UTC)

Portal:Geneva
In Portal:Geneva, the template isn't picking up the pics from the infobox in the lead of Geneva.

I'll keep posting 'em as I come across 'em. ;)  &mdash; The Transhumanist   06:12, 12 July 2018 (UTC)

✅

Portal:Geography of Canada
Transclude lead excerpt isn't picking up the map image from the infobox in Geography of Canada. &mdash; The Transhumanist  06:43, 12 July 2018 (UTC)

✅

Portal:Georgia (U.S. state)
This one isn't picking up the flag, seal, and location map from the infobox. &mdash; The Transhumanist  06:48, 12 July 2018 (UTC)

✅

Portal:Ghana
This one picks up the flag, but not the seal or locator map. &mdash; The Transhumanist  06:53, 12 July 2018 (UTC)

✅

Portal:Gibraltar
Same here. (Shows flag, but nothing else). &mdash; The Transhumanist  06:55, 12 July 2018 (UTC)

✅

Portal:Gilbert and Sullivan
Their portraits don't show up. &mdash; The Transhumanist  06:57, 12 July 2018 (UTC)

✅

Portal:Gilgit-Baltistan
Most of the pictures don't show up. &mdash; The Transhumanist  07:00, 12 July 2018 (UTC)

✅

Portal:Goa
No pictures show up. &mdash; The Transhumanist  07:03, 12 July 2018 (UTC)

✅

Portal:Germany
Flag, seal, and location map not show up. &mdash; The Transhumanist  06:50, 12 July 2018 (UTC)
 * The file description page for the flag includes the phrase "non-free", which causes the script to skip it – see Module talk:Excerpt - Evad37 &#91;talk] 08:49, 18 July 2018 (UTC)

Portal:Heavy metal
The picture shows up at the end of the intro, rather than starting at the top. &mdash; The Transhumanist  07:20, 12 July 2018 (UTC)
 * This is the same issue as - Evad37 &#91;talk] 02:43, 16 July 2018 (UTC)
 * Which has now been fixed. Looks much better. Thanks to . Cheers, &middot; &middot; &middot; Peter (Southwood) (talk): 18:10, 16 July 2018 (UTC)

Portal:Bohol
Here's the excerpt:



"Is a ____ of the". Words have disappeared from the definition. &mdash; The Transhumanist  19:30, 16 July 2018 (UTC)
 * Bohol's wikitext (omitting irrelevant complications) reads .  PH wikidata gets wikidata for the current page.  In the article, the current page is Bohol which has wikidata.  In the portal, the current page is Portal:Bohol which quite correctly doesn't have wikidata.  All the potential fixes that I can think of rely on MediaWiki features that don't exist.  Certes (talk) 22:29, 16 July 2018 (UTC)
 * The article probably shouldn't even be using Wikidata in prose in the first place. WP:Wikidata says it is "not appropriate to use Wikidata in article text on English Wikipedia". - Evad37 &#91;talk] 01:37, 17 July 2018 (UTC)
 * ✅ Removed it from the root aritlcle's lead.   &mdash; The Transhumanist   04:55, 18 July 2018 (UTC)

Portal:The X-Files
The image in the infobox doesn't show up. &mdash; The Transhumanist  06:55, 18 July 2018 (UTC)
 * That's because File:Thexfiles.jpg is a non-free image - Evad37 &#91;talk] 08:44, 18 July 2018 (UTC)

Portal:Togo
The coat of arms from the infobox doesn't show up, even though the other 2 images do. &mdash; The Transhumanist  07:08, 18 July 2018 (UTC)

Template:Transclude list item excerpt
This is a cool template.

As an experiment, I created or rebooted the following portals using the corresponding outlines as a base. (Reboots are marked with an asterisk).


 * Portal:Athens
 * Portal:Dresden
 * Portal:Dubai *
 * Portal:Florence
 * Portal:Kyoto
 * Portal:Milan *
 * Portal:Munich *
 * Portal:Palermo
 * Portal:Prague *
 * Portal:Saint Petersburg
 * Portal:Stockholm
 * Portal:Turin
 * Portal:Vienna *

I ran into a few issues...

Issue #1: section links are misrecognized as the root article
When a list item is a section link, the template shows the lead of the page rather than the section. This is awkward when the section desired is on the root article, thereby duplicating the lead that is at the top of the portal.

For example, in the Environment section of the Outline of Dresden is the link Climate of Dresden. When that is displayed in the "Selected environment article" of Portal:Dresden, it comes up as Dresden rather than the Climate section of Dresden. Which is awkward, because that is the same lead that is at the top of the portal. The same thing happens in the Sports section.

Issue #2: Including subsections is awesome, but is not always desired
One thing I really like is that the template gets all the links from the subsections as well. This works in most cases, but there are some in which I'd only want the root part of the section.

For example, Outlines have an Economy and infrastructure section. One of the subsectons is transportation, which usually dominates the section. For portals where I would like both and Economy section and a Transportation section, the Economy section would cover the same articles as the Transportation section. If I had just an Economy section, most of the articles that showed up would be about transportation.

Cool shoes
My assessment of the template is that it is awesome. When there are standard list sections to access, like with outlines, you can pop out a portal based on them from between 15 to 25 minutes per portal. I'm sure we can get this time down even lower...

The most time consuming part of building the portals above was compiling the image list in the pictures section. I essentially copied and converted the file links from the corresponding outlines, retaining their captions.

This has given me an idea for another template, Transclude random thumbnail from page, which would extract file thumbs instead of list items. It could be used to fetch a picture for a "Selected picture" section without the need for a compiled list of file arguments. (It wouldn't be a slide show). It could also have a section parameter like the one Transclude list item excerpt has. A transclusion template like this could save a portal builder/maintainer lots of time. &mdash; The Transhumanist  14:58, 13 July 2018 (UTC)


 * I've added sectiononly=yes to address issue #2. Certes (talk) 10:49, 15 July 2018 (UTC)

Template: Box portal skeleton
I'm thinking the template should be converted to use our Box-header color variant, so that going forward, we don't make more instances of box-header that we have to clean up later. Plus, it would make every new portal from now on have an auto-generated color scheme, instead of the same one. Thoughts? — AfroThundr (u · t · c) 18:26, 18 July 2018 (UTC)
 * AfroThundr, great idea. Would you like to do the honors? ;)  &mdash; The Transhumanist   22:52, 19 July 2018 (UTC)
 * ✅. I tested it with a quick example here and didn't see any obvious problems. On another note, the transclude selected recent additions was set to 120, which I've noticed resulted in Lua timeouts on several occasions (the sandbox being one). I've reduced it to a year, unless we can figure out how to prevent that (or the portal maintainer can tweak it manually anyway). — AfroThundr (u · t · c) 23:40, 19 July 2018 (UTC)

= Discussions about categories =

Category trees
Can category trees be induced to display in columns? &middot; &middot; &middot; Peter (Southwood) (talk): 07:24, 8 June 2018 (UTC)
 * Div col works: example. Certes (talk) 09:07, 8 June 2018 (UTC)

= Discussions about specific portal technical issues =

Portal:Biographies talk page issue
According to this edit made to the Portal talk:Biography page, you enabled a recognized content listing on the main talk page. Was that intentional? At the moment has added 1.5 megabytes of text listing all of those pages. I've reverted the bot and the config. The WikiProject Biography page just redirects to, so I guess they aren't using that bot. I was wondering why that page refused to load in AWB, and now I know it doesn't like pages over 1500k. &mdash; AfroThundr (u &middot; t &middot; c) 17:12, 2 June 2018 (UTC)
 * I did that to hundreds of portal talk pages, as a prelude to adding two possible sections to portal pages: 1) Quality content 2) DYK blurbs. Both handled by JL-bot. Rather than go straight to portal page, it was better to display the links in a test area where we can take a look at them first. In preparation for eventual related AWB runs on the portals, I intend to look at these, to see if I notice any patterns, anomalies, volume, etc.  &mdash; The Transhumanist   07:28, 3 June 2018 (UTC)

Portal:Toys missing selected pictures
I have an issue - the toys portal has two selected pictures missing, How can we fix that ? Kpgjhpjm ( talk ) 03:20, 5 June 2018 (UTC)
 * Short answer: They were deleted.
 * Explanation: From looking at the relevant subpages, image 1 had the following edit, and image 2 had the following edit. They in turn bring us to these two deletion requests here and here. It would seem that those images are still under copyright, and commons policy required their deletion, despite their still being in use. You will most likely have to find an alternative to replace them. There are plenty you could pull from Category:Toys. &mdash; AfroThundr (u &middot; t &middot; c) 04:11, 5 June 2018 (UTC)

Portal:Ferrari
I am having a bit of trouble adding a name to the Formula 1 drivers list. Can anybody help ? Kpgjhpjm ( talk ) 11:57, 5 June 2018 (UTC)
 * The list isn't stored directly in Portal:Ferrari. The list which appears in the "Categories" box (after you click the arrow by "Ferrari people") is Category:Ferrari Formula One drivers.  To add a driver to that list, you need to edit the driver's article and add the line   near the bottom.  The list in the "Selected Topics" box is transcluded from Portal:Ferrari/Topics.  It can be changed by editing that subpage.  Hope that helps, Certes (talk) 12:55, 5 June 2018 (UTC)

Can you go to the portal and fix it. Actually you only have to add a dot between the bracket, but I do not have such a symbol. Kpgjhpjm ( talk ) 15:02, 5 June 2018 (UTC)
 * I just copied and pasted one of the other dots. Certes (talk) 15:06, 5 June 2018 (UTC)

Help with WP:ANATOMY portal (Portal:Anatomy)
Hi all, thanks for your great work. Have tried to implement some of your changes onto the anatomy portal, however having some difficulty working with some sections and would value some help if possible:
 * 1) If someone could help with the column display that would be really appreciated (so that there are no spaces between sections)
 * 2) I can't get images to insert into the random article sampler... this works for the random biography but not for articles. Would appreciate if someone knowledgeable could help fix this :)

On our way to a one page portal! --Tom (LT) (talk) 01:09, 8 June 2018 (UTC)
 * ADDIT: I think I've fixed part 2, but if someone could have a look and simplify or remove unnecessary "divs" and formatting that would really help make the page more editable. --Tom (LT) (talk) 01:12, 8 June 2018 (UTC)
 * Thanks, I consider this done. --Tom (LT) (talk) 23:09, 9 June 2018 (UTC)

Portal:Poland/box-footer undelete
(Copied from User talk:Pbsouthwood, as it may have general relevance)

Hi Pbsouthwood, could you please undelete Portal:Poland/box-footer? It's still needed. Thanks — Kpalion(talk) 15:42, 9 June 2018 (UTC)
 * , ✅. Note that it is trivially simple to substitute the generic Box-footer as it is exactly the same thing disguised with another name. Cheers, &middot; &middot; &middot; Peter (Southwood) (talk): 17:00, 9 June 2018 (UTC)
 * Thanks! Replacing the template is not that trivial to me, as I don't even know where exactly it is used. I only know that its deletion messed up the layout of Portal:Poland/Selected picture. Can you tell me where I should make the replacement? — Kpalion(talk) 23:51, 9 June 2018 (UTC)
 * , That may be less trivial than I thought, as I cannot find it in use anywhere. There is no visible use in Portal:Poland/Selected picture. It should be easy to fix once we find it. I will be unavailable for editing most of today, so will copy this discussion to the WikiProject talk page in the hope that someone else can work out what is going on. Cheers, &middot; &middot; &middot; Peter (Southwood) (talk): 04:49, 10 June 2018 (UTC)

Can anyone track down where the template is being called from? &middot; &middot; &middot; Peter (Southwood) (talk): 04:57, 10 June 2018 (UTC)
 * I've turned Portal:Poland/box-footer into a redirect to the actual box-footer since all that page did was call the real one. I'm not seeing any layout issues at the moment, but it might be because that page was re-created (and redirected to the main template). Still don't see what's calling the subpage version though, anyone else got any ideas? &mdash; AfroThundr (u &middot; t &middot; c) 13:21, 10 June 2018 (UTC)
 * ✅ Found the problem. First the Template:Numbered subpages is called, then this template calls the Module:Numbered_subpages, which has a line of code:  This then in turn calls Template:Subpage, which calls the /box-footer page (for the respective portal).
 * I have changed the code on Template:Subpage to link to Box footer instead of the /box-footer page. I have marked the redirect for deletion as it no longer is used. Wpgbrown talk &#124; contribs 13:35, 10 June 2018 (UTC)
 * Devious bit of code there! I thought it might be something like that, but I would never have recognised the line responsible, or been able to fix it, so thanks for that bit of work., Looks like it was not so trivial after all. Sorry about that, it usually is trivial. I will delete the redirect, and if you have any further problems let us know. Cheers, &middot; &middot; &middot; Peter (Southwood) (talk): 15:15, 10 June 2018 (UTC)
 * I don't see any problems now. Thank you, guys! — Kpalion(talk) 18:38, 10 June 2018 (UTC)
 * Yeah, I had a look at the module, but I didn't even notice that. I gotta step my Lua game up. Thanks y'all. &mdash; AfroThundr (u &middot; t &middot; c) 23:25, 10 June 2018 (UTC)

Some off-portal side effects
See Village_pump_(technical)

The deletion of Portal:Cornwall/box-footer affected the front page layout of WikiProject Cornwall as it was transcluding some portal boxes. I think this was another of those calls from within a transcluded template which called a module which called a subpage. This may happen elsewhere too, please keep a lookout for similar usage when listing for deletion.

Does anyone know how to check if this will happen? Cheers, &middot; &middot; &middot; Peter (Southwood) (talk): 15:26, 13 June 2018 (UTC)


 * What links here shows transclusions as well as direct links. This has to be said: marking things for speedy deletion without using Special:WhatLinksHere to check whether they're still in active use is a tad irresponsible. (To be fair, the deleting admin should check as well, but usually WP:G6 requests are trustworthy and we're all busy people). I know we're excited about the new tools we have that enable us to tidy up the mass of portal subpages but I think we need to calm things down a bit. <b style="color:#98F">W</b><b style="color:#97E">a</b><b style="color:#86D">g</b><b style="color:#75C">ge</b><b style="color:#83C">r</b><b  style="color:#728">s</b><small  style="color:#080">TALK  09:45, 14 June 2018 (UTC)


 * Replacing the /box-footer line with  should fix the problem. Some clean up is to be expected on mass deletions of this sort. Just report broken pages here, and we'll gladly and promptly fix them.   &mdash; The Transhumanist   21:29, 15 June 2018 (UTC)

Portal:Agriculture and agronomy
A sidebar navigation box is mysteriously showing up in the intro section. &mdash; The Transhumanist  21:21, 15 June 2018 (UTC)
 * Portal:Agriculture and agronomy transcludes Agriculture which transcludes Agriculture which #invokes Module:Sidebar. Transclude lead excerpt isn't clever enough to spot that, and it's hard to see how it could be improved to do that type of analysis reliably and efficiently.  One possibility is to edit the Agriculture article to enclose the Agriculture template in a noinclude tag. Certes (talk) 21:59, 15 June 2018 (UTC)
 * I went with the latter option. Looks good now. &mdash; AfroThundr (u &middot; t &middot; c) 22:15, 15 June 2018 (UTC)
 * That's a good tip. I didn't know that. Thank you. Maybe we should include that on a trouble-shooting page.  &mdash; The Transhumanist   22:18, 15 June 2018 (UTC)

Making any kind of change to the article to make it work properly in the portal is an indication of bad code design. &#123;&#123;3x&#124;p&#125;&#125;ery (talk) 18:28, 28 June 2018 (UTC)
 * I'm sure we'd all be grateful if someone could improve Module:Excerpt to detect and handle such cases. A problem is that there is no rigorous definition of "the lead" for use in implementing a bulletproof parser.  Certes (talk) 18:38, 28 June 2018 (UTC)
 * Would it work to modify the module to remove all lines that consist entirely of templates and nothing else. &#123;&#123;3x&#124;p&#125;&#125;ery (talk) 18:40, 28 June 2018 (UTC)
 * Not really, since the module currently needs to parse some kinds of templates. For instance, it looks inside infoboxes to extract the image to use for the displayed article excerpt. — AfroThundr (u · t · c) 20:59, 28 June 2018 (UTC)
 * That could work. We already do that for lines before the lead.  I wasn't expecting a line consisting only of a template between the lead and the first section heading (or in the middle of the lead) but it would probably be safe to remove such a line.  Infoboxes are already handled specially: they are removed but are searched for images on their way out. Certes (talk) 21:22, 28 June 2018 (UTC)
 * One snag: how do we tell the difference between unusually formatted but valid wikitext with a template we want to keep:
 * and unwanted templates:
 * ? Should we just assume that the first case is unlikely, and accept that we will occasionally lose a bit of text? — Certes (talk) 21:43, 28 June 2018 (UTC)
 * That may be for the best. Even the navigation popups give up eventually with some templates (formulas and such) in the article text. — AfroThundr (u · t · c) 02:09, 29 June 2018 (UTC)
 * Thanks. I'd rather not change the Lua code today as I'm about to go on holiday and don't want to risk leaving a mess, but if it's not been done when I return then I'll have a go. Certes (talk) 10:58, 29 June 2018 (UTC)
 * ? Should we just assume that the first case is unlikely, and accept that we will occasionally lose a bit of text? — Certes (talk) 21:43, 28 June 2018 (UTC)
 * That may be for the best. Even the navigation popups give up eventually with some templates (formulas and such) in the article text. — AfroThundr (u · t · c) 02:09, 29 June 2018 (UTC)
 * Thanks. I'd rather not change the Lua code today as I'm about to go on holiday and don't want to risk leaving a mess, but if it's not been done when I return then I'll have a go. Certes (talk) 10:58, 29 June 2018 (UTC)
 * ? Should we just assume that the first case is unlikely, and accept that we will occasionally lose a bit of text? — Certes (talk) 21:43, 28 June 2018 (UTC)
 * That may be for the best. Even the navigation popups give up eventually with some templates (formulas and such) in the article text. — AfroThundr (u · t · c) 02:09, 29 June 2018 (UTC)
 * Thanks. I'd rather not change the Lua code today as I'm about to go on holiday and don't want to risk leaving a mess, but if it's not been done when I return then I'll have a go. Certes (talk) 10:58, 29 June 2018 (UTC)

Portal:Cenozoic
Someone please close Wikipedia:Miscellany for deletion/Portal:Cenozoic. The nominator has withdrawn his nomination. Thank you. &mdash; The Transhumanist  11:04, 17 June 2018 (UTC)
 * ✅ --Ancheta Wis   (talk  &#124; contribs) 12:06, 17 June 2018 (UTC)

Portal:Tamil civilization
Someone please close Wikipedia:Miscellany for deletion/Portal:Tamil civilization (2nd nomination). The nominator has withdrawn his nomination. Thank you. &mdash; The Transhumanist  02:03, 18 June 2018 (UTC)
 * ✅ &middot; &middot; &middot; Peter (Southwood) (talk): 18:10, 18 June 2018 (UTC)

Portal:Mesoamerica
In the Associated Wikimedia section, is it possible to link Wikisource to a category, rather than a search? Wikisource has a Category:Mesoamerica that is much more useful than the results returned by a search on the word "Mesoamerica". Thanks, Simon Burchell (talk) 08:52, 18 June 2018 (UTC)
 * It is possible, but would require customising the section. Alternatively the template could be customised, allowing a choice between search and category for each project. I don't know whether this would be worth the effort, but suspect that it might be. Does anyone else have an opinion? A lot depends on whether the portal topic title is a valid category in the other projects, which may be the case only sometimes and for some portals. The search is generally more likely to work, but may not work as well in some cases. Maybe even two options per project, one to the category and the other to a search.
 * To fix it yourself, as a once off, it should be simple enough to substitute the template, then edit the Wikisource item to link to the category instead of the search. &middot; &middot; &middot; Peter (Southwood) (talk): 18:24, 18 June 2018 (UTC)
 * On Wikisource, the category doesn't even show up in the first page of search results, which instead show pages from books which mention Mesoamerica (often only in passing). Looking at the long term, the option to default to search, but allow a category=yes parameter would be very useful. At the moment Commons does go straight to category, so it seems a bit arbitrary. Simon Burchell (talk) 09:19, 19 June 2018 (UTC)

Birds Portal
Hi Transhumanist: I've been watching with interest as the Birds Portal undergoes its metamorphosis. You "portal folks" are doing a nice job! One question though; why have you cut the lead article (from "Bird") down from the full four paragraphs to two? I see that your automatic template allows for all four paragraphs to be shown... MeegsC (talk) 09:20, 21 June 2018 (UTC)
 * It was formatting bias on my part. I've now expanded it to 4 paragraphs, and have replaced the selected picture section with a picture slideshow. The initial slide selection includes all the bird-related featured pictures, but this can be expanded as desired.  &mdash; The Transhumanist   10:22, 21 June 2018 (UTC)
 * Looks great! Thanks. MeegsC (talk) 13:07, 21 June 2018 (UTC)
 * One comment — if I press the advance button (the right arrow) for the slideshow, there's a massive amount of "flickering" between pictures. The section below the slideshow appears briefly and this is replaced by the picture, over and over and over. Is there any way to keep that from happening? Have a dedicated "box size" or something? MeegsC (talk) 21:04, 21 June 2018 (UTC)
 * I don't know. I've copied this thread to here. Maybe someone on the team can figure it out.  &mdash; The Transhumanist   23:49, 21 June 2018 (UTC)
 * Making the box size static is as simple as wrapping the random slideshow template in  tags, where XXX is the size in px. I'm not sure how to prevent the flickering, but setting a static box size is probably not a great idea. The images pulled by the random slideshow aren't all the same size. Unless you set the static size to that of the largest picture, you could end up with truncated images, and even with that you'd have too much whitespace in the box for smaller images. Allowing the box to dynamically resize presents the best results once the page is fully loaded. Now if we could perhaps solve the loading issue with the gallery before the slideshow is ready, the flickering and unstable load behavior would go away. &mdash; AfroThundr (u &middot; t &middot; c) 00:20, 22 June 2018 (UTC)
 * The flickering has been reported as a bug in T196723; there's not much we can do about it on-wiki. - Evad37 &#91;talk] 02:59, 22 June 2018 (UTC)

= Discussions about other technical issues =

Issue #009 of newsletter turns off TOC
Somehow the latest issue of the newsletter is turning off the TOC on whatever page it is posted on. &mdash; The Transhumanist  11:34, 16 June 2018 (UTC)
 * It transcludes Box-header, which contains the _ _NOTOC__ magic word. Certes (talk) 11:57, 16 June 2018 (UTC)
 * Use the parameter SPAN=yes to force the title to be a span (not a heading) and also use the parameter TOC=no to stop it forcing no toc. Wpgbrown talk &#124; contribs 12:02, 16 June 2018 (UTC)
 * Fixed the TOC problem: it now uses the same box-header as was used in the previous newsletter. Thanks for the tips. I didn't know those.  &mdash; The Transhumanist   12:15, 16 June 2018 (UTC)
 * Added SPAN=yes. Works great. Problems solved. Will use TOC=no next time. Thank you.  &mdash; The Transhumanist   12:29, 16 June 2018 (UTC)
 * The Box-header for the newsletter is now by default set to use span and to not use the toc. Wpgbrown talk &#124; contribs 12:37, 16 June 2018 (UTC)
 * , now I don't have to remember to set it manually. Thank you.  &mdash; The Transhumanist   21:33, 16 June 2018 (UTC)
 * Guys, do we really need another subpage for the box-header in the newsletter archive? I'm sure the irony hasn't been lost here... &mdash; AfroThundr (u &middot; t &middot; c) 12:40, 18 June 2018 (UTC)

Question about Template:Random portal component
So Random portal component, which depends on Module:Random portal component, is currently setup to pull the  subpage for the header and box-footer for the footer on portal pages. Although the documentation states that it also uses the  subpage, I haven't found any evidence it actually does this, so the docs may be outdated. My question is, how difficult would it be to add a parameter to the module to pass a template name in place of the subpage? As an example: the 'Did You Know?' section of Portal:Amphibians, until I made the subpage a redirect to Box-header/13, pulled a portal-specific box header that no longer matched with the rest of the page. If the above parameter was added, something like would make that section match with the rest of the portal, and obsolete another subpage. Would one of you template wizards be interested in adding this capability? &mdash; AfroThundr (u &middot; t &middot; c) 07:33, 17 June 2018 (UTC)
 * ✅ - Evad37 &#91;talk] 06:51, 18 June 2018 (UTC)
 * Thanks for that. I've made the necessary update to the portal now. there are currently a hair over a thousand portals using Random portal component. How would we go about triaging these for ones that already use a box-header variant so we can update the random component box header to match? &mdash; AfroThundr (u &middot; t &middot; c) 12:16, 18 June 2018 (UTC)
 * I was thinking of foregoing that step by waiting until after we replaced the Random portal component (RPC) instances with section conversions. For example, replacing RPC selected picture sections with standard /box-header sections using Random slideshow. Then, the /box-headers could be replaced at our leisure, one color at a time; converting all the portals that used the same color, via AWB, to a Box-header subpage equivalent. The key task is to get rid of (that is, replace) those RPCs...
 * Converting RPCs can be done 2 ways: 1) simply replace them with new sections built from scratch, or 2) replace them with new sections populated with the data from the subpages that the RPCs called. The latter would take a script to do, and is overkill for extracting article names from the subpages with just excerpts, but may be worthwhile for harvesting pictures with juicy picture descriptions which we could use as captions. Which brings us back to option 1 for excerpts. At this time, it is not scalable. A thousand is too many to do by hand, and so we should wait until we have an automated solution, probably something similar to JL-Bot that would (instead of inserting bullet lists) insert lists of page names into template calls (with each entry preceded by a pipe instead of a bullet).
 * I agree with Evad's previous assessment that automating the collection of quality pictures is not feasible. There are some that are quality rated (featured pictures) and sorted by subject, but those will only cover the corresponding titled portals. For the rest, it looks like we'll have to rely on human editors to gather the pics. Keep on the lookout for curated collections of pictures.  &mdash; The Transhumanist   13:38, 18 June 2018 (UTC)


 * Removing all the box-footer subpages caused a problem with Random portal component, and so its module had to be updated to use Box-footer directly. See this edit. That's why the documentation is out of date. :)  &mdash; The Transhumanist   13:38, 18 June 2018 (UTC)

How would you get a list of all orphan subpages in portal space?
If that is not feasible, a list of all orphan pages in portal space would suffice.

I look forward to your reply. &mdash; The Transhumanist  12:45, 17 June 2018 (UTC)


 * An offline method: we could get a list of all pages in portal space from a recent db dump. Then with some python magic, pull all top-level pages into one list, and all the subpages into another list (simple operation, since one has a / in the page title and the other doesn't). Then you'd compare each of the 140k entries in the subpage list to see if it has a prefix match against an entry in the top-level list. If it does, drop it, if it doesn't, add it to an orphan list. If I had some time, I could throw that together later. Or maybe there is a fancy wiki tool available to do this, and the python method is unnecessary. On-wiki, I'm not sure how to do that; maybe with WP:PetScan or something similar? I imagine any of those tools would choke on a 150k entry page query. &mdash; AfroThundr (u &middot; t &middot; c) 12:27, 18 June 2018 (UTC)
 * Here is a current list of orphan portal pages. They all happen to be subpages.  There may be others which are effectively orphaned because they are part of a small group of pages which link only to each other.  Note that some pages which happen to have no incoming links today may still be useful.  For example, Portal:Foo/Subpage123 may be unlinked but Portal:Foo may transclude Portal:Foo/SubpageN, where N is a random number which happens not to equal 123 today.  Certes (talk) 13:01, 18 June 2018 (UTC)
 * That's neat. SQL would've been my first choice, but I didn't know you could run those against the wiki. Another tool for my toolbox. &mdash; AfroThundr (u &middot; t &middot; c) 14:43, 18 June 2018 (UTC)
 * Those pages may be orphans, but at least some of them are transcluded into somewhere in the associated portal. &middot; &middot; &middot; Peter (Southwood) (talk): 18:43, 18 June 2018 (UTC)
 * Good point. 21 of 137 pages were transcluded.  I've now excluded them from the list. Certes (talk) 21:37, 18 June 2018 (UTC)

Transclude Category excerpt
Is there any way to make a template that can perform a function analogous to and, but selecting an article randomly from within a category? That way a category such as Category:FA-Class_MCB_articles could be cycled through. T.Shafee(Evo &#38; Evo)talk 08:54, 28 June 2018 (UTC)
 * Yes and no. Following discussions at WP:VPT, we believe that there is no way for a template or module to access the current members of a category (rather than just displaying them on the reader's screen).  However, User:JL-Bot/Project content can create a list of FA-class articles in Wikiproject MCB, which is suitable for use by .  The bot tends to run once per weekend. Certes (talk) 10:08, 28 June 2018 (UTC)
 * Ah, champion, thank you! T.Shafee(Evo &#38; Evo)talk 11:08, 28 June 2018 (UTC)

Random quotation
Random quotation does not work correctly. It randomises both quotation and author, so gets them mixed up, and uses double chevron style quote marks expressly deprecated by MoS. I could not work out how to fix it yet. It also applies a style that should be optional not default. I don't know if this is a thing we should try to fix or just create a better alternative. It is getting a bit late here, so do not intend to do anything more about it tonight. &middot; &middot; &middot; Peter (Southwood) (talk): 19:20, 30 June 2018 (UTC)
 * Fixed the random number problem, using yes to force the random number to be the same. Wpgbrown talk &#124; contribs 21:29, 30 June 2018 (UTC)