Jump to content

Wikipedia talk:WikiProject Portals/Design/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1Archive 2Archive 3Archive 5

Discussions about possible cool new features

How many articles does Wikipedia have on this subject?

How could we automatically generate the number of how many articles there are for the subject of a portal? So it can report: Wikipedia has "9,999 articles on geology", for example.    — The Transhumanist   21:14, 27 May 2018 (UTC)

  • This may or may not be possible using {{PAGESINCATEGORY:categoryname}}. eg. "96 articles on geology". But I can't be sure how this deals with subcategories and it is marked as being an expensive call. JLJ001 (talk) 18:42, 28 May 2018 (UTC)

Can we make portals talk with the user?

How far away are we from being able to do this? Are there resources that could be added to Wikipedia to facilitate this? If so, what are they?    — The Transhumanist   03:11, 28 May 2018 (UTC)

There was an IRC-style chat bot called I-God (or something), knocking about on the internet around 2005. You'd type something in and it would respond to you.

It probably used something like:

str = "Are you actually God?" /*Input */
if string.find(str, "God") then 
print "I am God, sacrifice your virgins" 
else 
print "I don't understand" 
end

Cesdeva (talk) 18:20, 28 May 2018 (UTC)

  • ahem. Yes well thankfully chatbots have progressed some since I-God. Using an IRC bot is a good idea, according to Wikipedia:IRC there is some kind of IRC setup associated with Wikipedia, but as far as I can tell it requires navigating off-site. We would need to embed it somehow. JLJ001 (talk) 18:29, 28 May 2018 (UTC)
If we hosted our own IRC we'd probably need moderators, or a very good way of filtering obsene and, most importantly, copyrighted content. Then there is dealing with lurkers who try privilege escalation. I think the Wikipedia associated IRCs are just various # on freenode, so maybe (as you said) we could embed one of those? Cesdeva (talk) 18:49, 28 May 2018 (UTC)
On reflection I think we would need substantially good reasons to get the devs to embed an external site into the software because of all the security issues, and notably the fact that nothing at presented is embedded at all. However the idea is still good, maybe we could have a bot written in Javascript and enabled via a page specific .js file, a bit like user js? I know pages can be made sort of interactive via things like jquery (ajax?), and this might be more compatible with the site. JLJ001 (talk) 18:56, 28 May 2018 (UTC)

Transclude Did you know items from the WP:DYKA archives

Resolved

In a similar way to {{transclude selected current events}}. Maybe with some randomisation. - Evad37 [talk] 03:32, 28 May 2018 (UTC)

@Evad37: What about User:JL-Bot, in its JL-Bot 5 function, through use of the User:JL-Bot/Project content template, with the dyk-blurb= # parameter?    — The Transhumanist   05:05, 28 May 2018 (UTC)
That might work as an alternative, but it could get to be quite a lot of wikitext that gets added, e.g. Wikipedia:WikiProject Women in Red/DYK. Which isn't too bad for a subpage, from which a few entries are randomly transcluded to the portal, but I don't think its practical to have that much wikitext on a single-page portal. - Evad37 [talk] 15:23, 29 May 2018 (UTC)
The dyk-blurb = # parameter limits the number of entries to "#".    — The Transhumanist   06:19, 31 May 2018 (UTC)
But I'd much rather see your idea implemented. ;)    — The Transhumanist   06:22, 31 May 2018 (UTC)

 Done as {{Transclude selected recent additions}} - Evad37 [talk] 11:40, 3 June 2018 (UTC)

Bot which scans for missing tags

A simple bot/script. You direct it at a category and it returns a list of pages not using a specified template. So if I input {{Portal|Suffolk}} as the template to search for, and Category:Suffolk as the category to search, the bot would search the category recursively and give me a list of pages which don't have the tag. JLJ001 (talk) 16:56, 28 May 2018 (UTC)

Automatic balancing of columns

Often, there is a lot of white space in one column because there is so much more in the opposite column. It would be nice if portals auto-adjusted for this. Any ideas on how?    — The Transhumanist   17:03, 28 May 2018 (UTC)

  • I believe it can be done with media queries once TemplateStyles are enabled. It may also be possible to add a character count limit to the module which supplies the text by transclusion. JLJ001 (talk) 17:08, 28 May 2018 (UTC)
    • @JLJ001: Media queries? TemplateStyles? These sound interesting. I wonder what they are. Please elaborate. Got links?    — The Transhumanist   06:22, 29 May 2018 (UTC)
      • CSS media queries are a way for a page to gather info about the user agent, such as vendor, viewport data, device type, and other data that it can then use to dynamically resize and reorganize the page and its elements, or even display different content. See the W3schools article and MDN page for more details on how they work.
      • As for Extension:TemplateStyles, they will allow CSS to be integrated with templates. This in turn opens up a whole new realm of possibilities for page design, especially when it comes to the mobile experience. TemplateStyles will allow us to use those media queries to make the rendered pages a lot more responsive and flexible. That is, when it finally gets deployed, see phab:T133410 for that. — AfroThundr (tc) 07:25, 29 May 2018 (UTC)

Portal sandboxes

@The Transhumanist: and others

Should we have some sandboxes attached to this WikiProject?

I'm losing track of the content in my sandboxes and it's not great having all this portal development marked as userspace edits. Cesdeva (talk) 18:34, 28 May 2018 (UTC)

Sandboxes are fine in the project namespace. I'm not sure what the ramifications are having them in the portal namespace. Thoughts?    — The Transhumanist   18:46, 28 May 2018 (UTC)
I'd guess it would mean adding another type of page for bots and quarry searches to avoid. Plus it would add to the 150,000+ total. I'm happy to just have a few in project space that we can use to share ideas and test things, Cesdeva (talk) 18:55, 28 May 2018 (UTC)
Shall we create Wikipedia:WikiProject Portals/sandbox, list it for some kind of 12 hour blanking bot, and see how we get on? Cesdeva (talk) 19:01, 28 May 2018 (UTC)
Seems fine, I assume we will end up with more. However on the subject of userpages I feel User:Wpgbrown/Portal Pages to Delete has a place as an official function. JLJ001 (talk) 19:27, 28 May 2018 (UTC)
I think we should treat Portal namespace as like the mainspace and ideally keep it free of anything not immediately usable. But project sandboxs seem fine. JLJ001 (talk) 19:00, 28 May 2018 (UTC)

Discussions about overall portal design


Another option for portal layout

I'd like to call your attention to Portal:Nanotechnology, which I designed with a distinct visual style. The portal uses Template:Voyage box, so named because it's loosely inspired by Wikivoyage's Main Page layout. Please feel free to use the template to lay out your own portals if you choose. Antony–22 (talkcontribs) 10:06, 19 May 2018 (UTC)

UX and good portals

So I am still trying to find a portal design that looks good, so I thought perhaps if people could put forward portals they are particularly pleased with. I for one have made Portal:Suffolk with interesting features. And as mentioned above Portal:Opera is a good portal, and Portal:Nanotechnology is an interesting alternative. The best portals may be put forward in a new draft guideline as portals to emulate when working on other portals. JLJ001 (talk) 08:21, 23 May 2018 (UTC)

Take into account how they look on mobile. · · · Peter (Southwood) (talk): 10:02, 23 May 2018 (UTC)
And in different skins like Timeless and Monobook - Evad37 [talk] 10:09, 23 May 2018 (UTC)
In my opinion all portals look crap on mobile, but until we get templatestyles this is hard to fix. JLJ001 (talk) 11:31, 23 May 2018 (UTC)
Lol, yes, I do 100%. I had a similar idea in my head but I hadn't figured out how to get the rascal buttons to sit neatly like that. Is Template:PortalButton fundamentally flawed or could it be tweaked to do this? Cheers, Cesdeva (talk) 12:34, 23 May 2018 (UTC)
No idea, but I went for making Template:Portal button 2 especially for the purpose. JLJ001 (talk) 13:41, 23 May 2018 (UTC)
I think it's the display:inline-block; css value that makes them sit neatly when PortalButton won't. JLJ001 (talk) 13:48, 23 May 2018 (UTC)
I just gave it another go and i can achieve very similar with the documented template, I just floated all the objects. It's normally best practice to use existing and documented universal templates where possible. Albeit PortalButton is still in alpha and I've just noticed something I need to troubleshoot. Kind regards, Cesdeva (talk) 13:59, 23 May 2018 (UTC)
Seems a good idea, but there are a few tweaks that ought to be made to it. For some reason it doesn't behave itself in very narrow sizes. JLJ001 (talk) 14:11, 23 May 2018 (UTC)
Ya it does misbehave. There's that issue and for some reason the default font-weight has stopped working. I should probably also use em units where appropriate, like you did. Cesdeva (talk) 14:23, 23 May 2018 (UTC)
Ok I have identified the problem, you are expressing the width in percentages. If you express the width in pixels then it works just like what I did, where the width is also in pixels. (using em seems to work fine). JLJ001 (talk) 14:39, 23 May 2018 (UTC)
Ya I know. I just happened to opt for the nearest % instead of looking up what units you used. Sorry i didn't explain earlier. Cesdeva (talk) 15:24, 23 May 2018 (UTC)
@Cesdeva: I started the RfC on getting this approved, but when the PortalButton template is worked out we should use that instead of the template I have in there at the moment. JLJ001 (talk) 16:12, 23 May 2018 (UTC)
Cheers, it may be a little while longer. When I floated those divs in my sandbox originally, they all floated in a perfect grid. Now when I look back at the revisions, they are wonky. I didn't subst: the template, so I think I'll need to troublshoot what went wrong with that latest fix I made. Cesdeva (talk) 18:07, 23 May 2018 (UTC)
Yes, I like that very much. Can we revive the title Portal:Portal? Certes (talk) 19:53, 23 May 2018 (UTC)
That's odd, i swear I saw blue links for that recently. I'll support any motion to restore such a ridiculous yet entirely appropriate name Cesdeva (talk) 20:10, 23 May 2018 (UTC)
It was only deleted 3 days ago. However the title is effectively fully protected because it's a double-namespace prefix. We need an admin to move the page. JLJ001 (talk) 01:09, 24 May 2018 (UTC)

To what extent does the MOS apply to portals?

Obviously, portals have a style different from what articles use. Yet many style principles should still apply. Minimally, it seems that since Portal titles often appear in articles, they should respect MOS:CAPS and MOS:DASH and such. Yet there has been a bit of pushback trying to get there, and I was advised to "Go to WT:Portals do an RfC to confirm that MOS applies to Portal titles." Is this really worth an RFC? I'll start one if someone seriously suggests that the MOS does not apply to portal titles in spite of what recent RM discussions seem to show. Dicklyon (talk) 04:46, 24 May 2018 (UTC)

I don't know how this boosterism crept into portal titles (or should I write "into Portal Titles"?). There's nothing special about portals that would justify caps. Besides, we deserve to see the real caps in a title, where they occur after first position, rather than losing them in a succession of caps. Tony (talk) 05:56, 24 May 2018 (UTC)
  • WP:MOS applies to all reader-facing content, and always has. This is by design and intent. That includes categories, templates that emit content readers will see, etc. Portals aren't some magical exception. We even generally apply MoS to editor-facing material like essays and policy pages, just for consistency, even if MoS's "official" scope doesn't really cover them. (The only exception that comes to mind is that some wikiprojects are using title case names, while many do not. We should probably normalize that to sentence case like the rest of the site. (MoS itself has a title -case name, but this was chosen because it's kind of a "work" unto itself, a style book. And that's not actually important; we could sentence-case the MoS pages, too. As long as we're inconsistently applying title case to a few things, this is going to continue to suggest to people that they should pick title case for Anything They Personally Feel Is Important.)  — SMcCandlish ¢ 😼  15:02, 24 May 2018 (UTC)

Well, I didn't really mean to have the debate yet, just to get comments on whether it's worth an RFC. Dicklyon (talk) 21:01, 24 May 2018 (UTC)

  • I suggest an RfC because it is a big change after so many years. Give people a formal opportunity to object. It’s not because I expect good reasons to object. I support the mainspace MOS applying to Portals. —SmokeyJoe (talk) 21:38, 24 May 2018 (UTC)
    Not sure what you mean by a big change. Only a small handful of portals would be affected, since the vast majority already respect MOS:CAPS and such. I guess you're looking more broadly, like the comment below. Dicklyon (talk) 02:31, 25 May 2018 (UTC)
    A big change: 15 years of being ignored, but that changes in 2018. --SmokeyJoe (talk) 04:24, 25 May 2018 (UTC)
  • While most of the MOS is/should be applicable to portals, there will need to be some exceptions, e.g. MOS:LAYOUT, certain aspects of MOS:TEXT (such as restrictions on where bold/italics can be used, which would preclude the "read more"-type links), MOS:SELFREF (e.g. links to wikiprojects, to-do lists), MOS:CONSISTENCY (given that portals include content from different articles). Perhaps these would qualify as common sense/IAR exceptions, but it might be useful to have a MOS:PORTALS to make explicit what does and doesn't apply. - Evad37 [talk] 02:10, 25 May 2018 (UTC)
    Yes, agreed, lots of things are styled differently in portals. That's why I said Minimally, it seems that since Portal titles often appear in articles, they should respect MOS:CAPS and MOS:DASH and such. So maybe an RFC on what other style guidelines and differences we should have for Portals is a good idea. Dicklyon (talk) 02:31, 25 May 2018 (UTC)
  • Add info to Wikipedia:Portal guidelines and link the MoS. Start with how general Mos guidelines apply to portals because they are content related and geared towards the public. Should mention accessibility issues like, font size, color contrast, collapsible sections, image size (as in not forced size). .... and of course also mentioned core content policies.... lIke info should be verifiable and neutrally presented reflecting the highlighted article.--Moxy (talk) 03:04, 25 May 2018 (UTC).

Good ideas. But do we have a question to put to an RFC, or should we just work on on it along the lines that Moxy suggests? Dicklyon (talk) 04:18, 25 May 2018 (UTC)

  • I suggest you craft a statement, one that clearly and simply states what MOS items apply to portals. Initiate the RfC, and let people !vote "support". RfCs do not require the question to be contentious. Someone did object somewhere previously? --SmokeyJoe (talk) 04:27, 25 May 2018 (UTC)
    The specific question was actually about portal titles, which appear in articles, and that has been pretty well established by several unopposed move discussions and some barely-opposed move discussions. Hardly worth an RFC. But to go as far as making a list would be a lot of work and would almost surely give everyone something to object to; such an RFC was had in 2014 and closed as no consensus. So I'm still unclear on what to ask. Dicklyon (talk) 05:05, 25 May 2018 (UTC)

I started a draft at Wikipedia:Manual of Style/Portals; feedback and improvements are welcome - Evad37 [talk] 09:36, 25 May 2018 (UTC)

I'll add a link for MOS/Portals in the revised draft for portal guidelines. Cesdeva (talk) 14:22, 25 May 2018 (UTC)

It may be an idea to mention WikiProject specific style. For example MOS:IS, which in this case should ideally apply to Indian portals. Cesdeva (talk) 14:37, 25 May 2018 (UTC)

I added a see also link to Category:WikiProject style advice - Evad37 [talk] 16:21, 27 May 2018 (UTC)
Cheers. I didn't even know about that category. Cesdeva (talk) 16:59, 27 May 2018 (UTC)

Discussions on mobile compatibility

Mobile compatibility progress

I'm working on a different way (than 2-Columns) to make portals scale down. Knowing my luck this approach has probably been scrapped before, but I'm giving it my best shot.

Two column

I was confused how the two-column layout actually managed to function, until I noticed some lines of markup in the Mediawiki common.css. I'm posting the css here in case it wasn't just me who was wondering.

Discussions about one-page portal designs

Moving towards the one-page portal

Independently of Broter, I have reconstructed Portal:Underwater diving as a nearly one-page portal. It also only calls subpages /Boxheader, /Boxfooter and /Opentask. The effects are very similar to Broter's work

I would like to make new templates for Boxheader and Boxfooter which take the background and foreground colours as parameters, so they can be used for all portals. It would also be good to standardise on a set of colour schemes that are properly accessible to international standards, which could reduce to only one parameter.

The Opentask page should come from the relevant WikiProject, to avoid duplication. This would reduce the portal to a single page.

I use a slightly different system to randomise selected items, which I think is easier to use and allows more tweaking, but takes a bit more space. Comments and suggestions welcome Cheers, · · · Peter (Southwood) (talk): 07:57, 16 May 2018 (UTC)

I am also experimenting with a randomised banner header based on the system used on Wikivoyage and my user page. It provides a little extra related information, but mostly looks pretty. If anyone else decides to try this, the standard for banners on Wikitravel is maximum resolution, exactly 1:7 aspect ratio. I recommend sticking to that as it allows cross project use where applicable. I want to get the page name to display over the banner, and a ToC could be added for the boxed sections, displayed as on Wikivoyage. The coding should all be available at Wikivoyage, but the main template has some dependencies I don't follow. My coding is a bit of a kludge, but works well enough for demo purposes. · · · Peter (Southwood) (talk): 08:08, 16 May 2018 (UTC)

I have now bypassed the /Box-header and /Box-footer subpages. The only subpage left is /Opentask, which will be moved to a subpage of the WikiProject. · · · Peter (Southwood) (talk): 12:56, 16 May 2018 (UTC)

Opentask now superseded by a "To do" subpage of the project, which admittedly needs some formatting work. Now a one-page portal · · · Peter (Southwood) (talk): 08:41, 17 May 2018 (UTC)

Also the portal Portal:Atmospheric sciences is an example of a one-page portal. Wpgbrown (talk) 11:16, 31 May 2018 (UTC)

Dead simple portal

I have been experimenting with a simple way of creating a single page portal from scratch. And in doing so I have developed Template:Dead simple portal. This template allows anyone with good wikitext coding skills to create a single-page portal by subst-ing the template. I have tested it, and while not perfected yet, I made Portal:Sark and Portal:Norfolk with it. JLJ001 (talk) 00:12, 22 May 2018 (UTC)

Multi-page portals

Some portals are built with a multipage interface, such as being menu-driven or nav-bar-driven, like Portal:Association football.

Could these be made single-page, while retaining their "multi-page" interface/look/feel?    — The Transhumanist   20:08, 31 May 2018 (UTC)

Follow this and scroll down to 2018 answer. I think perhaps if we incorporated this css with the tab template, then we might be able to achieve that. Will need TemplateStyles to be enabled first.
The alternate answer is Ajax. But that's beyond me. Cesdeva (talk) 21:50, 31 May 2018 (UTC)

Discussions about automation and specific portal sections

Discussions about automation and specific portal sections

Discussions about selected article sections

Semi-automating the importing of article titles

@Certes, Evad37, Slambo, Waggers, Pbsouthwood, Galobtter, Redrose64, Johnuniq, GreenC, JLJ001, and AfroThundr3007730: It was established in Wikipedia talk:WikiProject Portals/Archive 4#Listing category members in a module or template that importing names from a category from within a lua module is not possible at this time. So, how can we do this by user script? We need a tool that an editor can use so he/she doesn't have to copy/paste the article names by hand into the template on the portal base page. JWB fetches titles from a category, so it should be fairly straight-forward (however, JWB's source is still Greek to me and I can't fathom how it does it). We need a script that fetches the titles from a category prompted from the user, with a default of the subject of the portal, and then inserts a {{Transclude random excerpt}} template on the portal base page with those titles included as parameters in the template. I very much look forward to your replies. Sincerely,    — The Transhumanist   02:58, 28 May 2018 (UTC)

JavaScript is outside my area but it would be useful to provide an example, possibly in a sandbox. That is, a sample category name and a manually compiled list of article titles (links not needed), and the resulting excerpt template. What limit should be placed on the number of articles? Will excerpt work with that many? Johnuniq (talk) 03:49, 28 May 2018 (UTC)
Anyone writing a client can use their favourite language. If you choose JavaScript, User:Joeytje50/JWB.js may be a good model, especially function JWB.pl.generate. The API has a categorytree function which returns a list of pages as labyrinthine HTML; perhaps there is an option to use a more helpful format. Alternatively, mw:API:Query has a categorymembers function: example here. This query only returns the first few pages (see here for how to "continue") and probably excludes subcategories. The API sandbox may be useful. Certes (talk) 10:58, 28 May 2018 (UTC)
This might have alternative uses for creating outline and index lists. Consider getting the short description at the same time to use as a link annotation as an option. An outline list section could be a source for randomised lead transclusions. · · · Peter (Southwood) (talk): 11:46, 28 May 2018 (UTC)
The other side of this is that outline lists may be a useful source of page lists grouped in a similar way to categories, but maybe already directly readable by a Lua module. · · · Peter (Southwood) (talk): 14:29, 28 May 2018 (UTC)
@Pbsouthwood, Evad37, and Certes: What? You definitely have my attention. Are lists in outlines directly readable by a Lua module? And can those lists be inserted by Lua as a bunch of parameters in {{Transclude random excerpt}}?    — The Transhumanist   03:33, 30 May 2018 (UTC)
I don't know the capabilities of Lua. I was speculating that it might be possible and don't yet know of a reason why it would not. Evad37 or Certes may know more, or my usual go-to guy for templates and Lua questions RexxS may be kind enough to venture an opinion. Using an outline list as a skeleton for a portal could allow a high level of automation, but it would require a well-constructed outline, which is also a good thing to have. It may also require some constraints on outline list formatting to work well. I dream of a module that would construct a whole portal using an outline list title as input, with a few added parameters to adjust display and other options, though probably not this week.... · · · Peter (Southwood) (talk): 05:09, 30 May 2018 (UTC)

Yes, it should be possible for a lua module to parse the wikitext of an index/outline page, extract the links, and pass them through to random excerpt module. - Evad37 [talk] 06:51, 30 May 2018 (UTC)

This is definitely worth doing, but I can't say I have any solid solutions yet. JLJ001 (talk) 11:59, 28 May 2018 (UTC)
@Johnuniq: For example, here are a couple portals that were saved from MfD by expanding them with a list of articles provided as parameters for instances of {{Transclude random excerpt}}, the first by not that many, and the second by considerably more: Portal:Quidditch & Portal:Juanes.    — The Transhumanist   06:30, 29 May 2018 (UTC)
Perhaps we need {{Transclude linked excerpt|Somepage}} to show an excerpt from a page chosen randomly from those linked from Somepage. Replacing Somepage by Outline of geography (the first search suggestion for "outline of") might get us an excerpt from Outline (list) or Discipline (academia), neither of which are relevant. Heuristics such as excluding the lead and only considering the first wikilink on each line might help but wouldn't work everywhere. I think Somepage needs to be a new list in portal space. An editor can create that page manually using their skill and judgement, which may be as simple as copy-pasting Outline of … with the irrelevant links removed. Alternatively, a bot can maintain the page as a list of articles in one or more related categories. That should give us the flexibility we need for most portals. Does that work? Certes (talk) 10:05, 30 May 2018 (UTC)
+1 I like it. JLJ001 (talk) 10:10, 30 May 2018 (UTC)
I've created {{Transclude linked excerpt}}. It has an optional section= parameter to limit candidate articles to those linked from a specified part of the page. Certes (talk) 11:14, 31 May 2018 (UTC)
This is exactly what I need for a slightly different use case - the parent/child portal model. Now Portal:Berkshire, Portal:Buckinghamshire, Portal:Oxfordshire, Portal:Hampshire, Portal:Isle of Wight, Portal:Surrey, Portal:Kent, Portal:West Sussex and Portal:East Sussex all use their relevant section of Portal:South East England/Selections/Articles for their selected articles, while Portal:South East England itself uses the entire page. (Same for biographies.) The only fly in the ointment is the existence of Portal:Sussex but I'm going to leave that alone for now! WaggersTALK 10:56, 4 June 2018 (UTC)

Proposal

Here's a suggestion for importing article titles to some minimal-maintenance portals.

  • Give each portal a subpage with a standard name, say Portal:Foo/Titles. Populate it with a request for User:JL-Bot/Project content to add a list of FAs in relevant categories, and perhaps GAs if FAs are in short supply. (Please don't pollute the portal's main talk page with this data. Subpages are cheap, and one used only by the bot and its instructors is less likely to have those instructions fouled up by random comments.)
  • Use {{Transclude linked excerpt|{{FULLPAGENAME}}/Titles}} in the main portal.

That should give us the lead of a random FA from the latest list. Worth a try? Certes (talk) 17:53, 2 June 2018 (UTC)

Sounds like a good idea. Could also be used for selected biographies and articles, do you think? Wpgbrown (talk) 19:15, 2 June 2018 (UTC)
Yes, it should work for biographies too if appropriate categories are selected. Transclude linked excerpt|section= will limit itself to articles in part of the page. If JL-Bot is equally well behaved then the various lists can share one /Titles page. Do you know of a guinea pig portal where we can try this? Certes (talk) 19:55, 2 June 2018 (UTC)

Pulling Selected Articles from Sister Portals

Is it possible to pull random article from selected article pool of a number of other portals? For example, I'd like to pick the selected article for Portal:SAARC from the selected articles of the below portals:

I am sure the same concept can be useful in other portals which follow a hierarchy.

Possible? Arman (Talk) 11:15, 4 June 2018 (UTC)

@Armanaziz: Yes. See Portal:South East England/Selections/Articles - all of the portals listed there (Berkshire, Buckinghamshire, etc) use sections on that page for their selected articles, and Portal:South East England itself selects at random from the whole page. This uses {{transclude linked excerpt}}. WaggersTALK 13:25, 4 June 2018 (UTC)

Discussions about selected picture sections

How can we automate this?

Any ideas of how to automate this without relying on Commons categories, which are often not very reliable? Images already used in topic articles could be used as a stockpile, but often an image is meaningless when displayed in isolation, and the caption from the article is intended for use in the context of the article. Alt text may be useful in those rare cases where it exists, but I doubt there are enough of them to be worth considering as a default method. · · · Peter (Southwood) (talk): 05:21, 26 April 2018 (UTC)

Hello, in the Spanish-language Wikipedia I use a similar method to article selections, where each image is included in separate page (see here). It's not the most practical to create, but it works fine.
Also, the image template of the sports portal reuses the same image templates of the sports subportals (see here). This guarantees that all sports and regions get a chance at appearing at the main portal. --NaBUru38 (talk) 23:24, 28 April 2018 (UTC)

We need a template to display multiple pictures

@Certes, Evad37, Slambo, Waggers, Pbsouthwood, and Galobtter: To automate the selected pictures section of portals, it looks like we will need a template that displays random pictures. Kind of like what {{Transclude random excerpt}} does for excerpts. Does anything like this already exist? If not, what are the issues that need to be overcome? What details do you need to be able to write it? Will it require a lua module? I very much look forward to your replies. Sincerely,    — The Transhumanist   02:05, 28 May 2018 (UTC)

That sounds easy, but then so did excerpts. The devil will be in the detail such as getting the sizing right, copyright issues, and handling the myriad of arcane ways in which a minority of images can be stored in a way that differs subtly from the norm. Certes (talk) 11:01, 28 May 2018 (UTC)
I am using a rudimentary arrangement for random selected picture in Portal:Underwater diving based on {{#invoke:random|item |[[File:filename1|thumb|upright=1.4|center]]<center> caption1 </center> |[[File:filename2|thumb|upright=1.4|center]]<center> caption2 </center> etc... }} which does the job but requires manual input of the file name and caption parameters. · · · Peter (Southwood) (talk): 15:38, 28 May 2018 (UTC)
One of the difficult details is that of image quality (i.e. is properly exposed, is level, is well composed). I am a professional photographer, so my personal quality standards for photography are a little higher than the average reader. There is a huge number of photos relating to rail transport worldwide that are of poor quality and not suitable for use as the selected picture on the portal. An exceptionally small number of rail transport photos are marked as quality photos or better on Commons. Also, I sometimes select an image from the rail transport in art categories to show as the selected image on the portal, so more than just photography needs to be included. Until there is a large enough pool of quality images that are mechanically identifiable, random selection isn't really a viable option. Slambo (Speak) 16:27, 28 May 2018 (UTC)
I imagine there must a bot somewhere that can analyse a histogram to see if there is over-exposure/blow out. That would thin the field a bit. Cesdeva (talk) 16:47, 28 May 2018 (UTC)
Relying on the histogram doesn't help much if it is a naturally high-key image, such as a white train in a snow scene, or a low-key image like dark colored train (like the majority of steam locomotives) at a poorly-lit underground station platform. There are excellent photos that would fail a histogram check. I haven't seen a system that could automate this kind of check, let alone one for composition or level horizons, reliably. Slambo (Speak) 03:00, 29 May 2018 (UTC)
@Slambo: With {{Transclude random excerpt}}, you enter the names of the articles you want to rotate through, and it randomly selects one of those for display. That makes it only semi-automated, I guess, but I'm looking for a similar solution for pictures, where the portal builder adds the names of the images to be displayed. We can work on full automation later.    — The Transhumanist   17:09, 28 May 2018 (UTC)
What happens if the file name it selects is for a file that was deleted? Also, there are so many railroad photos uploaded constantly, many of them meeting my standards for minimum quality, that it seems there would be even more work to get such a random selection going and maintained than it is to just pick one myself each week (which also lets me ensure that photos from railways around the world are more fairly represented). Slambo (Speak) 03:00, 29 May 2018 (UTC)
If {{Transclude random excerpt}} finds a deleted article, it picks another random number and tries again. An image template could do likewise. There are two cases here. Portals where someone is willing to pick a page weekly don't need any overcomplicated template nonsense; they can just use [[File:…]]. Other portals, which we need to edit once then forget, would benefit from a random image generator, with a hard-coded carousel set up manually as a one-off task. A proposed program discussed above could be extended to find good pictures and format their names into a template call. Certes (talk) 09:45, 29 May 2018 (UTC)

I'm after something similar for PortalButton. Multiple templates can form a nice gallery, but can only take manual input of file names. I'd really like to code a default ratio of div width:image width into the template too. Cesdeva (talk) 16:31, 28 May 2018 (UTC):

Discussions about news sections

Alternative to Wikinews

Resolved

Is there any option other than wikinews to fill news sections? Wikinews is useless, they don't supply anything except football updates and articles from a decade ago. JLJ001 (talk) 11:34, 22 May 2018 (UTC)

The daily pages of P:CE are another source of news items, but I don't how you could automate the updating of news sections. - Evad37 [talk] 12:19, 22 May 2018 (UTC)
@Certes: Do you think a module do could selective transclusion of bullet points from the monthly pages (e.g. Portal:Current events/May 2018) or the daily pages (e.g. Portal:Current events/2018 May 21), keeping only those that contain keywords supplied via a template parameter? - Evad37 [talk] 12:29, 22 May 2018 (UTC)
I've been experimenting with Module:Sandbox/Evad37/Current events and it is possible, see User:Evad37/Sandbox 2 for the results. (Note that this isn't ready to be used in real portals; it may break suddenly or require syntax changes as I further develop the module) - Evad37 [talk]
This gave very good results on my pet portal topic, hope you will go public with it soon!: Noyster (talk), 19:40, 22 May 2018 (UTC)
 Done @JLJ001, Noyster, and The Transhumanist: {{Transclude selected current events}} is ready to be tested in some actual portals. Let me know if you need help with the search patterns. - Evad37 [talk] 02:37, 23 May 2018 (UTC)
I am very impressed. I already installed it at Portal:United Kingdom. JLJ001 (talk) 07:43, 23 May 2018 (UTC)
This is the best portal innovation since sliced bread! Compare the news section of Portal:Spain with what we had before: Noyster (talk), 07:46, 23 May 2018 (UTC)
This is a great idea. But I think the results should be organised as groups going all the way up to the top level bullet point. One problem is that the leading bullet point can often vanish. For instance, looking at "United States", "America" for 24 May, the links to Harvey Weinstein sexual abuse allegations and 2018 Atlantic hurricane season don't appear; these are the most important links for those stories. Moreover, no results are found for the leading bullet point. "Malaysia" and "bombing" don't surface the Malaysia Airlines Flight 17 and Mississauga restaurant bombing stories because the keywords don't appear in the 2nd level bullet point text. The latter kayword also exposes another issue; there's a result that says "12 May 2018 – A low turnout is reported, but no bombings at polling stations. (AP via The Spokesman Review)" with no context for that statement (except the link).

I think the results should look like and display this:

"United States" "America"

24 May 2018

24 May 2018

"Malaysia"

24 May 2018

"bombing"

24 May 2018

12 May 2018

Instead of:

"United States" "America"

"Malaysia"

Nothing

"bombing"

 Fixed, though I put the date and "heading" item on the same line to save some space - Evad37 [talk] 10:41, 29 May 2018 (UTC)
I had doubts about this change, but yes it seems fine. (viewed on Portal:United Kingdom). JLJ001 (talk) 11:02, 29 May 2018 (UTC)
I checked out the template with the parameter "hurricane," and the results that were provided were appropriate. I look forward to watching the future development of this module / template. Master of Time (talk) 07:35, 2 June 2018 (UTC)

Discussions about did you know sections

Did you know style

I was surprised at first about the citations policy, but now that I understand that the portals are meant to draw in readership, I am curious whether there is a 'Did you Know'-style to be followed. --Ancheta Wis   (talk | contribs) 03:52, 25 April 2018 (UTC)

I don't know what you are referring to when you say you were surprised. What surprised you?
The style is exactly the same as that used for the Main page. See Wikipedia:Did you know.
We will be attempting to develop an automated way of doing the Did you know section. Then there will probably be a template syntax to follow, to skip copying & pasting.    — The Transhumanist   10:11, 25 April 2018 (UTC)
I played with some of the older tech/styles a while back and made my user page up like a simple "portal" and included a rotating "did you know" section. Check it out.--Paul McDonald (talk) 16:00, 25 April 2018 (UTC)
Hello, Wikipedia:Did you know states that some of the gools are to "showcase new and improved content" and to "acknowledge the work that editors do to expand and improve Wikipedia". I strongly disagree with that. There are better ways to promote new edits. The DYK at portals should focus on presenting interesting facts to readers. --NaBUru38 (talk) 23:29, 28 April 2018 (UTC)

Transclude selected recent additions

@The Transhumanist, Waggers, Kpalion, Pbsouthwood, and Kusma, and others: I've made {{Transclude selected recent additions}}, which takes search patterns as parameters, and finds matching items in the main page DYK archives (WP:Recent additions). This works much like {{Transclude selected current events}}, but it returns a random set of items by default (and therefore can show new selections when the page is purged). It can also show just the latest items, which could be checked on a regular (e.g. monthly) basis to generate new suggestions for a portal's DYKs, like Kusma proposed above. See the documentation for further information and examples. - Evad37 [talk] 08:57, 1 June 2018 (UTC)

Excellent, thank you for your work on both of these, Evad37, I'm looking forward to playing with them. WaggersTALK 20:03, 1 June 2018 (UTC)
Yeah, looks good! I've just implemented {{Transclude selected recent additions}} in Portal: Poland. That's a big change after nine years of doing this manually. Thanks a lot! As for {{Transclude selected current events}}, it's going to be helpful too, but for now I prefer to keep manual control over what news are included in the portal. — Kpalion(talk) 16:09, 4 June 2018 (UTC)

Selected Anniversaries

Selected Anniversaries

Does someone know how I can improve the Selected Anniversaries Section to be without subpages?--Broter (talk) 21:37, 18 May 2018 (UTC)

Does it show a different page depending what day of the year it is? If so then a suggested enhancement might help, but this has not yet implemented and there's no promise that it ever will be! Certes (talk) 22:42, 18 May 2018 (UTC)

It shows a different page every month.--Broter (talk) 05:24, 19 May 2018 (UTC)

@Certes:: I need a template for showing different content every month without a subpage.--Broter (talk) 07:56, 19 May 2018 (UTC)

@Certes:: I am talking about Portal:LDS Church/Anniversaries.--Broter (talk) 12:48, 19 May 2018 (UTC)

@Broter: I have created a new template, {{Transclude selected excerpt}}, which you may find useful. It has a selected= parameter to select a specific article. This should be a number from 1 to the article count, but you can use {{Date and time templates}} or time parser functions, such as {{#time:n}} which retrieves the current month number. For example, you could display the lead of an article about the current month with {{Transclude selected excerpt|selected={{#time:n}}|January|February...|December}}. Hope that helps, Certes (talk) 13:30, 19 May 2018 (UTC)

@Certes:: It would be great if I could write text like this:

BYU Jerusalem Center

in the template.--Broter (talk) 14:48, 19 May 2018 (UTC)

That looks good but I don't think you can do it by transcluding excerpts from existing articles. It sounds like a job for traditional subpages, with a top page to select the one for the current month. If you want it in a single page you could look into #switch, but I don't think Module:Excerpt can help here. Certes (talk) 15:06, 19 May 2018 (UTC)

@Certes:: I improved the Portal:Bible with the new template.--Broter (talk) 16:46, 19 May 2018 (UTC)

That looks good! I've made one enhancement: you can give each article a code and select with that code rather than a number. It may not be useful for monthly roatation such as Portal:Bible but could be handy in some cases. Certes (talk) 17:00, 19 May 2018 (UTC)

Discussions about other technical issues

Short descriptions for portals

Resolved

Any suggestions for a standard style for short descriptions of portals? (As portals are not in article space they technically do not need a short description, but if one exists it might just increase visibility in some searches, depending on the search engine.) · · · Peter (Southwood) (talk): 08:53, 13 May 2018 (UTC)

I am doing this with {{Portal description}}. I have done most the portals (about 925) using JWB). I will run through and tag the rest soon. Any portal where a custom description is wanted can use {{Short description}} instead. In this respect {{Portal description}} works a bit like a placeholder. I have also added it to the templates for portal creation. JLJ001 (talk) 21:19, 27 May 2018 (UTC) update 00:50, 28 May 2018 (UTC)
Nice work, nice and simple. Thanks. · · · Peter (Southwood) (talk): 11:32, 28 May 2018 (UTC)

Selected quotes

Resolved

It would be great to have a template for selected quotes sections in a Portal that eleminates the need for subpages. Is there anyone out there who wants to programm such a template?--Broter (talk) 11:23, 13 May 2018 (UTC)

I found the Template:Random quotation.--Broter (talk) 11:30, 13 May 2018 (UTC)