![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | Archive 4 | Archive 5 |
![]() | Please dream up new features, and post threads for them below... |
Maybe we should try to do away with the purge links altogether. Slideshow galleries allow content to be changed just by clicking on arrows, and it is possible to get it to work with prose too:
When WP:TemplateStyles get enabled, we should be able to hide the blank filler images entirely, as well as the middle button that toggles the standard gallery view. - Evad37 [ talk 13:59, 12 June 2018 (UTC)
{{Box-header|title=Selected animal|EDIT=yes|noedit=yes}}
{{Random_slideshow
| File:Blank.png | <div style{{=}}text-align:left;>{{#invoke:String|replace|{{Transclude lead excerpt|Cat}}|%c|<br>||false}}</div>
| File:Blank.png | <div style{{=}}text-align:left;>{{#invoke:String|replace|{{Transclude lead excerpt|Dog|files=1}}|%c|<br>||false}}</div>
| File:Blank.png | <div style{{=}}text-align:left;>{{#invoke:String|replace|{{Transclude lead excerpt|Mouse}}|%c|<br>||false}}</div>
| File:Blank.png | <div style{{=}}text-align:left;>{{#invoke:String|replace|{{Transclude lead excerpt|Horse}}|%c|<br>||false}}</div>
}}
{{Box-footer}}
@ Certes, The Transhumanist, and Pbsouthwood:: {{ Transclude excerpts as random slideshow}} is now ready to be used - Evad37 [ talk 04:10, 20 July 2018 (UTC)
@ Evad37 and Certes: It doesn't work anymore. Oddly, though, it still works when in the page preview. — The Transhumanist 22:37, 4 July 2018 (UTC)
Evad, this template is brilliant!
Here is a test using the same article titles as above.
Very nice. Much easier to work with.
By the way, what does this display in mobile devices?
Good job, keep up the great work. Now I'm off, to test it in a portal... — The Transhumanist 05:36, 20 July 2018 (UTC)
Now available as slideshows! See {{ Transclude linked excerpts as random slideshow}} and {{ Transclude list item excerpts as random slideshow}}. Pinging @ The Transhumanist and Pbsouthwood. - Evad37 [ talk 03:22, 24 July 2018 (UTC)
|limit=
parameter and set it to 15 on all the slideshows. There was also a weird problem with the gallery for the politics section being broken, but preventing non-mainspace pages from appearing and setting |paragraphs=
to 1
instead of 1-2
fixed that. -
Evad37 [
talk
05:49, 25 July 2018 (UTC)
@ Evad37 and Certes: The templates so far transclude excerpts from article leads.
Could we have one that transcludes excerpts from a specified section of one or more articles, by section title? (Section number would be fine for a single page, but probably wouldn't work right if multiple pages were included).
For example, the Portal:Prehistory of Oceania doesn't have a corresponding article from which to pull a lead excerpt. The material about it is in the Prehistory section of History of Oceania.
Thoughts? — The Transhumanist 10:10, 9 July 2018 (UTC)
{{
Transclude linked excerpt|Foo}}
displays not the lead of Bar but the start of its section called Baz.
Certes (
talk)
00:12, 17 July 2018 (UTC)A link that leads to a random portal would be nice.
It could be placed at the end of the Template:Portals browsebar that is displayed at the top of most portals.
What would it take to create such a link? — The Transhumanist 11:25, 25 July 2018 (UTC)
The only country portal that shows up, for example, is Portal:Canada. It looks like a rather small subset of the whole collection. — The Transhumanist 01:13, 2 August 2018 (UTC)
A portal section that displays a link to the WP:REFDESK that is relevant to that portal.
There are 8 reference desks. How could this be made to automatically display the appropriate link out of those 8?
Thoughts? — The Transhumanist 11:44, 25 July 2018 (UTC)
Portal that adjusts layout depending upon what content is available.
For example, displays a news section only if there are news items to be displayed.
Another example, displays a "Did you know" section, only if there are DYK entries to be displayed.
Thoughts? — The Transhumanist 11:49, 25 July 2018 (UTC)
@ Pbsouthwood, AfroThundr3007730, Evad37, Certes, Dreamy Jazz, and Waggers: Okay, found it. One way to do this is covered at mw:ifexist.
For example, to make a "Get involved" section only appear if the corresponding WikiProject exists, you could use code similar to this:
{{#ifexist: Wikipedia:WikiProject {{PAGENAME}}
| {{Box-header colour | Get involved}}
For editor resources and to collaborate with other editors on improving Wikipedia's Lithuania-related articles, see [[Wikipedia:WikiProject {{PAGENAME}}|WikiProject {{PAGENAME}}]].
{{Box-footer}}
|
}}
It has been placed in Portal:Lithuania, where it works.
I'm not sure what other features could be handled with this, or if there are better or similar methods.
Thoughts? — The Transhumanist 07:13, 27 July 2018 (UTC)
The tops of boxes at the top of the 2 columns line up. The bottoms don't, which leaves awkward white space between boxes. The box bottoms should line up too.
Then, white space would appear inside a box rather than outside it. This is more aesthetically pleasing, and is how the Main page is designed.
Portals with side-by-side box arrangement, like Portal:Lithuania, would look a lot better.
What is the best way to accomplish this? — The Transhumanist 12:00, 25 July 2018 (UTC)
We've started putting panoramas at the top of intro sections. For example, see the panorama at the top of Portal:Lithuania.
The problem is, they shrink when you zoom out.
Could they be fit to the width of the frame, and stay that way, even after each zoom change? — The Transhumanist 07:53, 26 July 2018 (UTC)
This looks good! It has been put to use at the following portals.
Our WikiGnomes are going to have fun with this! — The Transhumanist 23:10, 29 July 2018 (UTC)
![]() | General portal design discussions go here. |
I've been experimenting with the creation of new portals, to see how much editor effort is taken up by the new automated and semi-automated components.
The following portals took me about an hour to create each, though I had to return to fiddle with the Did you know section of Portal:Reference works for another half-hour or more, as the search terms I initially chose were matching off-topic topics. The template, {{ Transclude selected recent additions}}, is quite powerful, and even has a do-no-match feature to help target searches more precisely. Here are the new portals I mentioned:
The previous typical creation time on portals like this used to be 6 to 10 hours, and so the tools are a great improvement, reducing creation time about an order of a magnitude. We should keep on with development of tools and components, and perhaps we can reduce creation time down to single digit minutes. — The Transhumanist 21:54, 11 June 2018 (UTC)
template that pulls all the pictures off a specific page (or page section)already exists: {{ Transclude files as random slideshow}} - Evad37 [ talk 05:03, 18 July 2018 (UTC)
[[File:...]]
, and not those using the older [[Image:...]]
syntax. That's likely a bug in
Module:Excerpt that needs fixing. -
Evad37 [
talk
04:35, 19 July 2018 (UTC)I thought that the picture slide show would be the biggest time consumer in portal construction. But, I discovered in building city portals that sourcepages for pics are easy to specify in a generation template. — The Transhumanist 09:32, 2 August 2018 (UTC)
@
Evad37: I was trying to convert this portal to {{
Box-header colour}}, but, when I added the color from the {{/box-header}}
subpage, it didn't match.
The page uses the colors of their flag, like this:
The X in the flag is color code #BF0A30.
But, when you indicate the exact same color code in {{ Box-header colour}}, it turns out like this:
Whoever designed the portal, wanted to match the colors of the state flag.
Can we do that with {{ Box-header colour}}? — The Transhumanist 07:46, 29 July 2018 (UTC)
|mode=dark
:IMO, the benefits of such a tag would be immense. For example, we could use it to automatically generate categories of articles related to each portal. This is especially beneficial to portals which do not have a corresponding WikiProject, extricating ourselves from a reliance on said projects. For example, the Portal:1980s has no corresponding WP:WikiProject 1980s.
The tag template would say something like,
This article is related to the following Portals:
To call this new template for say Fred K. Mahaffey we add {{ Portal tag|Biography|1980s|United States|United States Army|War}} just below the other WikiProject templates already on its talk page. Each parameter in this new template would automatically include the article in a category like Category:FA-Class articles related to 1980s Portal. The rest I believe easy to imagine.
I can imagine dozens of automated features for which specific portal-related categories would be a great boon.--- Coffeeand crumbs 09:06, 13 July 2018 (UTC)
One example of a use is an adapted form of User:JL-Bot/Project content that generates lists of Quality content on the portals talk page. This list can then be used in our random selected article/biography/picture templates to maintain the portal.--- Coffeeand crumbs 09:12, 13 July 2018 (UTC)
Pinging @ Evad37, AfroThundr3007730, The Transhumanist, Certes, and Lee Vilenski:
Where are these coming from? I see an inadequate one at
Portal:English (needs to say "the English language", for clarity), but there is no {{
Short description}}
at that page, so it's being injected from some other transclusion or something. While I can go dig it out, I want to ask whether this standardized, or being standardized, or just being done randomly on a per-portal basis?
PS: If you don't know what I"m talking about, see
WP:Short description, especially
Template:Short_description#Testing for the CSS to make all the short descriptions visible to you (I recommend this – many of them need work, in the mainspace, too).
—
SMcCandlish
☏
¢ 😼
03:58, 1 July 2018 (UTC)
{{
Portal description}}
, and upgraded it with a |topic=
parameter to resolve this issue. Also fixed the documentation to stop mis-recommending that people add a separate {{
Short description}}
to override {{Portal description}}
's default behavior; it won't work and will instead create two conflicting short descriptions. —
SMcCandlish
☏
¢ 😼
04:20, 1 July 2018 (UTC)
I have recently tried to tidy up Portal:India to a automated state. I have run into some questions.
Finally, Could some one advice me on thing that can still be improved in the portal — F R + 07:32, 23 July 2018 (UTC)
Evad37 - I created Template: Portal image banner as a rough implementation of my idea — F R + 08:45, 25 July 2018 (UTC)
@ Evad37, Certes, and The Transhumanist: Much like all of the templates that depend on Module:Excerpt have had their talk pages redirected to Module talk:Excerpt, I think we should do that for all templates that depend on a module, to keep the discussion centralized. Or perhaps all of the "lower traffic" templates should have their talk pages redirect here? As for me, I watchlist all of them whenever I see a new one, but it might make any issues posted more visible if we consolidated most of them (excluding the excerpt ones probably). What do you guys think? — AfroThundr ( u · t · c) 02:21, 26 July 2018 (UTC)
When the page Wiltshire is specified as a source for files, the slideshow gets clogged up with icon images from its Places of interest section.
It would be useful if we could specify sections that the template is to exclude from the slideshow. — The Transhumanist 22:50, 29 July 2018 (UTC)
Tip: Many files aren't pictures, and so the title "Selected picure" is a slight misnomer when a non-picture is displayed. The word "image" is more general, and covers them all. — The Transhumanist 23:55, 1 August 2018 (UTC)
Dear JJMC89 and Portals Project techies,
There was a huge debate over possible deletion of the entire portal system, including the portal namespace itself. One of the main objections to portals raised during that debate was the prevalence of portals that were extremely out-of-date and unmaintained, a condition that was noticeable, in large part, from their out-of-date news entries.
One of the outcomes of the debate was a rebooted Portals WikiProject, with a new team of editors dedicated to revamping and automating the entire portal system.
Accordingly, the portal system is undergoing a complete overhaul.
Each portal section type is being redesigned for automation, one-by-one, including the news section.
The problems we've been having with news sections on portals include:
I'm interested in a type of news section that automatically appears in portals only when there is news to be reported. That is, when there is news within the past 30-days (recent news), there's a news section on the portal reporting it. When there is no recent news, there is no news section. How can this be done?
We are converting portals to a one-page design, with zero sub-pages. Therefore, I'm looking for ways that news support can be controlled externally from outside portal pages, based entirely on portal titles. Automatically. How can this be done?
Thus, portals would be automatically matched with their corresponding news categories on Wikinews, with zero human intervention. How can this be done?
That is, we need the set up of news support, and ongoing updating of news, on every portal (except those that have dedicated maintainers), to be fully automated. How can this be done?
There are currently 1500 portals, with 8500 or more additional portals likely to be created over the next year or two. News support for existing and new portals should initiate automatically. How can this be done?
Are there any other free and open news sources besides Wikinews that can be supported on Wikipedia portals? If so, what are they?
I look forward to your replies. — The Transhumanist 23:44, 1 August 2018 (UTC) P.S.: Please {{ ping}} me in your reply. Thank you. -TT
|header=
parameter (i.e. a box-header template) plus the news items plus whatever's in a |footer=
parameter (or just {{
box-footer}}); and when no news items are found, it leaves out the section entirely. -
Evad37 [
talk
03:52, 2 August 2018 (UTC)
@ Evad37: Can you do the same for DYK as you did for news above? That is, make it display if it has output, and not display if it has no output? — The Transhumanist 10:53, 2 August 2018 (UTC)
|header=
and |footer=
will now also work for {{
Transclude selected recent additions}} -
Evad37 [
talk
02:58, 3 August 2018 (UTC)I believe that I've now fixed all links to disambiguation pages on the source text at
WP:Recent additions/2018/July etc., unless you request pages from before 2010. If you see any such links coming out, please post a link and ping me, as I may have missed a page or misunderstood where the source text comes from. There are still a few anachronisms in there (this year's parliamentary poll
etc.) and some redlinks to deleted pages, but it might be disruptive to remove them as the pages also constitute a historical record.
Certes (
talk)
13:03, 3 August 2018 (UTC)
@ Armanaziz and Pbsouthwood: I have edited Portal:Bangladesh to select DYKs automatically using a new template, {{ Transclude DYK}}. Certes ( talk) 16:30, 25 July 2018 (UTC)
Many older DYKs now link to disambiguation pages because the target articles have moved. A few editors are kindly fixing the portals, but JL-Bot undoes this work by restoring the original text each weekend. I'm working through the dab links in the source pages, so this problem should go away soon. Certes ( talk) 16:14, 28 July 2018 (UTC)
Did you know… that Spam Inc has an office in Ruritania?) and factoids that have been overtaken by events; particularly where something happened "this year" meaning 2011 etc. I'm not sure how best to weed these out without damaging the archives. Certes ( talk) 12:32, 2 August 2018 (UTC)
Okay, here's the next item on my portal maintenance wish list. I would like a way to list a random selection of article titles from the various maintenance categories populated by WikiProject:Trains.
On Portal:Trains, the "Things you can do" section lists various tasks that readers can jump into. Many of the tasks have associated maintenance tracking categories. For example, the assessment task is related to the unassessed articles category, and the infobox needed task is related to the infobox needed category. Other tasks are also closely related to tracking categories like this. What I would like is a script that would randomly select and list a specified number of article titles (usually I pick five article titles) to populate the task in this portal section. The closest tools that I can find right now are Special:RandomInCategory and {{ Random page in category}}, but both of those will jump to the article and not return just the article title.
Thanks! Slambo (Speak) 17:23, 15 July 2018 (UTC)
As a side note, many of the WikiProject:Trains maintenance tracking categories will list the talk pages because that's where the project banner is placed. So the script I want will remove the Talk: namespace identifier and link to the article. Slambo (Speak) 17:26, 15 July 2018 (UTC)
@ Waggers, AfroThundr3007730, Godsy, Rockmagnetist, and Dreamy Jazz:
The text is centered in Portal:American football, and I can't figure out why.
Looks awkward. Can someone fix this? — The Transhumanist 06:21, 10 August 2018 (UTC)
|text-align=center
. I'm guessing it's normally used for the intro and not every section. — AfroThundr (
u ·
t ·
c)
11:55, 10 August 2018 (UTC)The random portal link doesn't appear to be random.
If you click on it, and then click on that link on the new page that displays, and keep doing that, the same set of portals appear over and over.
Does anyone have any idea of why this is happening? — The Transhumanist 03:06, 10 August 2018 (UTC)
Click number | Portal | Duplicate |
---|---|---|
0 | Portal:Algae | |
1 | Portal:Herbalism | |
2 | Portal:Philately | |
3 | Portal:Wolfgang Amadeus Mozart | |
4 | Portal:Australia | |
5 | Portal:Scottish islands | |
6 | Portal:Taipei | |
7 | Portal:Carry On | |
8 | Portal:Monaco | |
9 | Portal:Webcomics | |
10 | Portal:New York roads | |
11 | Portal:History of science | |
12 | Portal:Scottish islands | yes |
13 | Portal:Dresden | |
14 | Portal:Military of Pakistan | |
15 | Portal:Limited recognition | |
16 | Portal:Prague | |
17 | Portal:Singapore | |
18 | Portal:China | |
19 | Portal:Limited recognition | yes |
20 | Portal:Lithuania | |
21 | Portal:Stockholm | |
22 | Portal:Railways in Pakistan | |
23 | Portal:Singapore | yes |
24 | Portal:Australia | yes |
25 | Portal:Saudi Arabia |
@ Evad37: Those are the same ones I keep getting (plus about double again that number). What I'm saying is, that around 75 portals (including the ones you posted above) are the ones that keep showing up. Click 200 times, and you'll see what I mean. There's a subset of a few dozen portals that is displayed, beyond which it does not seem to go. How do we pop this bubble? — The Transhumanist 07:58, 10 August 2018 (UTC)
@ Evad37: This appears to be most, if not all, of the bubble:
With these same ones coming up over and over. — The Transhumanist 08:45, 10 August 2018 (UTC)
pairs
. The order within the table isn't guaranteed and can vary between Lua interpreters but may tend to match the order given when invoking the template. You could mix things around using code similar to that near the end of
Module:Transclude DYK (search for random entries).
Certes (
talk)
15:28, 10 August 2018 (UTC)
The core version gives much more biased results than this extension. mw:Category:Extensions used on Wikimedia suggests that Wikimedia doesn't use the extension. So I assume we're using the core version which gives biased results. I doubt that we can do much about this. Certes ( talk) 20:48, 10 August 2018 (UTC)
I've been using {{ Transclude list item excerpt}} and {{ Transclude list item excerpts as random slideshow}} to pull items out of templates, like Template:Counties of Denmark, like this:
This got me wondering about templates like {{ Daytona 500}}:
Could a tempate/lua script be written to convert templates into portal guts (after the intro, alongside the image slideshow, and before the support sections (WikiProjects, Topics, Wikimedia, etc.), with a section created for the portal corresponding to each section of the template?
Thus, for Portal:Daytona 500, it would generate sections called "Selected track article", "Selected Statistics article", "Selected lore article", "Selected notable race", "Selected related event", "Selected related area" and "Selected Daytona race report".
The implications for portal creation would be stratospheric!
I look forward to your replies. Sincerley, — The Transhumanist 21:21, 12 August 2018 (UTC)
Taking things to their logical conclusion, how feasible is it to have a portal link on the sidebar menu, or in one of the tab menus at the top of every page, that generates a portal for the current article's subject when you click on it?
So, if you are reading the article on chimpanzees, and you click on "Portal", a "Special:" page called "Special:Portal:Chimpanzees" is generated and displayed right then on chimpanzees.
I look forward to your replies. Sincerely, — The Transhumanist 21:15, 12 August 2018 (UTC)
There are lots of tools that let editors do various things to pages on Wikipedia, like AWB, WikEd, and TWINKLE. There's now another one, called PortalTool.js, intended to work on portals, that currently does nothing.
What it will be able to do, will be in part up to you. What do you want this tool to be able to do to portals for you? Use your imagination: you click a menu item, and what happens? I look forward to your replies. — The Transhumanist 12:37, 10 July 2018 (UTC)
@ Pbsouthwood, Evad37, Coffeeandcrumbs, AfroThundr3007730, Bermicourt, Dreamy Jazz, Nick Moyes, Auric, Waggers, and Godsy:
Thank you for the input. Let me summarize what we have dreamed up so far, and add some ideas and details that you have inspired by your input. Each of the below are menu items, to be displayed on the sidebar menu, when the user is viewing a portal:
Create Portal
– menu item for creating a new portal, defaulting to the subject of the current page. If you are reading the article "Saturn" and click "Create Portal", it will ask if you want the new portal to be on Saturn. If you answer "no", it will prompt you for the desired title. Not sure what it would ask next.Upgrade portal
– for the current page (if it is a Portal), presents a list of section names beside a number, and "All". You enter the number of the section you wish to upgrade, or "All". If there are more than one upgrade available for a section type, it prompts you further.Add section
– provides a selection of section types, by number. Specify the number to choose which type you want. If the heading is variable for that section type, it prompts for the heading title, and then prompts you for location in the portal to place it.Move section
– provides list of sections, by number. User enters the number desired. Then script prompts for new location, in the form of a section number, and Right of, Left of, Before, After. Saves having to go into the editor and cut-and-paste-move the section.Rearrange sections
– more elaborate move command, that allows you to rearrange the sections by number. If none is provided, rearranges to the standard presentation placement (whatever that is). Not sure what the interface would be.Analyze
– not sure what this would do. Perhaps, provides a list of missing sections to choose from.Concerning the fetching of categories, I was thinking that would be best to handle with user scripts first, until we actually know how, and then a bot could be adapted from that part of the program. Otherwise, I'd be oblivious on how to program a bot. Interactively develop it somewhere first, and then go to bot. Unless there's something I'm missing from the whole bot process?
Well, that's all for now. I hope this stirs your thinking further. Please feel free to share any new ideas you have or provide more details on how the above features should work. This is brainstorming. Anything goes. And just for the fun of it, I've invited some more people to the party. — The Transhumanist 02:14, 13 August 2018 (UTC)
Discussion:
@ Pbsouthwood, Evad37, Coffeeandcrumbs, AfroThundr3007730, Bermicourt, Dreamy Jazz, Nick Moyes, Auric, Waggers, and Godsy:
@ Slambo, SMcCandlish, FR30799386, Mercurywoodrose, Dicklyon, Dthomsen8, Espilio, Greatedits1, Nigos, and Wumbolo:
Here are some more possible features for the PortalTool. See the initial description for the script and discussion of features in the previous section above. (Typescript represents menu items):
Change color
– not sure how this would handle portals that use different colors on its various sections. In such cases, it should probably present a warning before proceeding. See:
Portal:Microsoft.Add to selection
– presents a numbered list of the "Selected" sections and prompts for a number. After the user enters a number, the script prompts for the item to be added to that section. This would require use of a template that could accept both sourcepage names and excerpt article names. Is such a template possible?I look forward to your comments and further ideas. — The Transhumanist 18:21, 13 August 2018 (UTC)
Concerning using the draft space for portals, it screws up the use of the {{PAGENAME}}
magic word. The pagename for Draft:Portal:Whatever is Portal:Whatever, which makes many of the templates not work. The only fix I can think of off the top of my head is to have a "Portal draft:" namespace. —
The Transhumanist
19:30, 13 August 2018 (UTC)
In retrospect, it will probably be best to focus on portal editing features for now, rather than on one for portal creation. The community's concerns in the RfC focused on the inadequacy of existing portals. So fixing those up should remain our priority. Portal creation at the push of a button would be extremely distracting. Portal creation can still be done by using the various templates designed for that. This way, we don't need to worry about push button creation of a flurry of unfinished portals. Once the templates have been developed to automatically create completed portals of high quality, then adding creation to PortalTool makes sense. The tool would simply insert one of those, and perhaps ask for parameters. — The Transhumanist 19:37, 13 August 2018 (UTC)
Detail discussion of new possible features:
You are invited to join the discussion at
Template talk:Box-header#Switch to Module:Box-header?.
Evad37 [
talk
07:22, 13 August 2018 (UTC)
Hi, I read through the main project page, and I couldn't tell which tasks require knowledge of Javascript. Could someone elaborate? Thanks! -- audiodude ( talk) 21:46, 22 August 2018 (UTC)
I've been constructing an automated page-lite portal at Portal:Scottish islands, but have increasingly found that, though initially very convenient to create, it's actually harder to maintain than the old hundred-subpages format, because one can't view all the selections at once to troubleshoot, as one can at, say, Portal:Cheshire/Selected article/Archive.
Is there a way of taking the content at a subpage such as Portal:Scottish islands/Island and using this as the portal's randomised rotation, without needing to create more than a single subpage level? This would be much more intuitive to old-fashioned portal maintainers, such as myself, and would, I believe, allow one to choose the image & image size, and to customise the number of paragraphs excerpted, without compromising the automated status or needing to fuss with creating hundreds of subpages. It would be particularly great if it could be applied to DYKs, as Portal:Cheshire/Did you know/Archive is a nightmare to update if you want to shuffle DYKs from selection to selection. Espresso Addict ( talk) 17:38, 13 July 2018 (UTC)
For regional portals (cities, counties, countries, etc.), I've been trying to build portals by pulling items out of lists (with {{ Transclude list item excerpt}}, but a great many if not most of the lists in support of regions seem to be tables. For example, List of counties in Colorado, List of cities in China, List of provincial parks of Vancouver Island, and so on.
Can we get a transclusion template for pulling the main items out of templates? This would really help with creating regional portals. Here is a more detailed description, adapted from the template previously mentioned:
The template accepts one page name as an unnamed parameter. Wikilinked items in the first column of the indicated table are collected from that page, or a section of it. One such item is selected randomly, and its destination is transcluded. (If the selected page is invalid, the template will choose again.) Include a namespace where necessary.
Is this doable with Lua?
I look forward to your replies. Sincerely, — The Transhumanist 20:15, 12 August 2018 (UTC)
For {{ Transclude list item excerpt}} and {{ Transclude list item excerpts as random slideshow}}, it would be very useful if they could recognize sections in a template. Such as in {{ Mars}}. — The Transhumanist 21:15, 12 August 2018 (UTC)
From the portal:
— The Transhumanist 01:22, 24 August 2018 (UTC)
@ Pbsouthwood, Evad37, and The Transhumanist: I have implemented a rough version of dynamic image sizing at Template:Portal dynamic image. I created some testcases at User:FR30799386/sandbox to show how it behaves. Please let me know if there are any other features that can be added — F R + 05:29, 8 August 2018 (UTC)
@ John of Reading, The Transhumanist, Evad37, Certes, AfroThundr3007730, and Cesdeva:
Template:Number of portals is used to define how many portals currently exist on a couple of pages, including in
Portal:Contents/Portals. However, it has to be updated by hand from database dumps, which John of Reading has been doing. The latest list is at
User:John of Reading/List of portals. Could we replace it with something else? Since we have
Category:All portals, {{PAGESINCATEGORY:All portals}}
looks promising. It currently produces 543, which is quite a bit more than the template. However, it is also an expensive function call. If we want to replace it, we should probably replace
Template:FPO number with {{PAGESINCATEGORY:Featured portals}}
as well.
Greatedits1 (
I hope so |
If not, let me know)
23:05, 16 August 2018 (UTC)
{{PAGESINCATEGORY:All portals}}
. Good idea. I don't think one expensive call will be a problem, as the template isn't widely used. I hope that the comma which PAGESINCATEGORY inserts after the thousands digit won't trip up any automation which uses it.
Certes (
talk)
23:25, 16 August 2018 (UTC)
{{formatnum:{{PAGESINCAT:All portals}}|R}}
-
Evad37 [
talk
03:37, 17 August 2018 (UTC)
{{PAGESINCAT:All portals}}
directly? (it's only three letters longer). -
Evad37 [
talk
03:37, 17 August 2018 (UTC)
@ The Transhumanist, Cesdeva, and Evad37: Just a heads up guys, both the RfC to enable TemplateStyles on enwiki and the RfC to adopt the TemplateStyles guidelines were closed with consensus to implement. We may be able to make use of them soon, as soon as HTML Tidy gets replaced. — AfroThundr ( u · t · c) 15:31, 18 June 2018 (UTC)
@ The Transhumanist, Cesdeva, and Evad37: As of today, TemplateStyles are now enabled on enwiki. What's first on our agenda for these? — AfroThundr ( u · t · c) 12:10, 19 July 2018 (UTC)
<h2>
styling across skins (particularly margin/padding)The fix is automatic, through the TemplateStyles css files at Template:Random slideshow/style.css (image slideshows) and Template:Transclude excerpts as random slideshow/style.css (text excerpt slideshows).Is the fix mentioned above automatic or does something else need to be done to the template to stop all the selected items showing as a gallery?
The higher resolutions images for {{ random slideshow}} and {{ transclude files as random slideshow}} are loaded via javascript, but the captions, small thumbnail images, and all the content for the text excerpt slideshows are loaded with the page. It's not great, but it makes the feature usable. As far as I know, there's no way of sending different content to mobile and desktop devices – apart for some reason for the gallery slideshow, which is missing on mobile website but present on the desktop website (along with the regular gallery, which is present on both but hidden by default on desktop). - Evad37 [ talk 17:24, 27 July 2018 (UTC)do these slideshow templates work by loading all of the content from all of the pictures/articles and then hiding all but the selected one?
@
The Transhumanist and
Pbsouthwood: Remember
Wikipedia talk:WikiProject Portals/Design/Archive 2 § Mobile view support ? Well, its now possible with a new template {{
if mobile}}. Its really easy to use – {{
if mobile|text for mobile website|text for desktop website}}
– and will allow us to call a slideshow gallery a slideshow when it is a slideshow (i.e. on desktop website) but not when it isn't (i.e. on mobile website) -
Evad37 [
talk
12:37, 30 August 2018 (UTC)
Initial list
|
---|
|
Some more slideshows that didn't work
|
---|
|
From an initial look, it seems that several, if not all, of the above issues is from the module getting confused by multiple images being specified on the same line (rather than with a linebreak between them), and maybe by images within tables. - Evad37 [ talk 15:07, 29 July 2018 (UTC)
I installed many slideshows, and most worked fine, but the following list of them are not working right:
I hope the above links help. — The Transhumanist 09:14, 12 August 2018 (UTC)
- Evad37 [ talk 10:43, 14 August 2018 (UTC)
@ Evad37 and Certes: The new portals are sprinkled with this problem...
Notice the captions:
Lua error in Module:Random_slideshow at line 200: No images found.
For every image that happens to be inside a table, we get the pixel size as the caption. This problem shows up sporadically in the new portals. Sincerely, — The Transhumanist 01:48, 31 August 2018 (UTC)
[[File:filename.ext|sizepx]]
, instead of [[File:filename.ext|sizepx|description]]
(or [[File:filename.ext|sizepx|description|alt=alt text]]
. Until the issue is fixed in the article, the module (
Module:Excerpt) should probably just present the image without a caption – but detecting when this situation has occurred may be a bit tricky. -
Evad37 [
talk
02:50, 31 August 2018 (UTC)@ Evad37 and Certes: The image slideshow is not picking up the images from X-Men. Do the slideshow templates pick up on .png images? — The Transhumanist 01:52, 31 August 2018 (UTC)
I have recently been updating Portal:Scotland with Panorama header images (several versions as The Transhumanist will testify). Cuirrently they rotate randomly, dependant upon a user refresh / purge or page reload.
My question is this: Is it possible to get {{ Portal image banner}} to behave in the same way as {{ Random slideshow}} ? i.e allow the user to select a new banner image by clicking on a left / right navigation arrow without having to purge / refresh the page?
This is possible at present for panorama headers using {{ Random slideshow}} at the head of the Portal, but it results in a truncated width banner image, with an ugly space above containing the user selection arrows. As things stand with {{ Portal image banner}}, the images do rotate randomly, but it's dependant on a purge or page reload. It would be nice to allow user control, similar to {{ Random slideshow}} / Selected Pictures. The banner image would remain full width, at the top header position with the user selectable navigation arrows showing at either side of the banner. Ideallly they would appear on top of the image at either side upon image hover. Alternatively, the navigation arrows could be static on either side of the banner image whilst keeping the image width as wide as possible and at the top header position.
Is this possible? I know it's a lot to ask, but I'm sure the technical folks here would love the challenge. (After all, Evad37 got CSS Flex to work seamlessly within the MediaWiki framework -(IMHO absolutely the BIGGEST thing since siced bread and BEYOND) - surely anything is possible?
I live in hope, Cheers Cactus.man ✍ 19:33, 30 August 2018 (UTC)
|mode=slideshow
to the desired transclusion of the template. The template, however is configured not to work on mobile for the time being as I still have not figured out what to do
The purple and light-grey colour scheme of navboxes doesn't really fit it with how other content in portals are styled. But it is possible to make navboxes plain by specifying style parameters, like at Portal:U.S._roads#Numbered_highways_in_the_United_States. So the idea is to have a Lua module that takes in a navbox, or maybe just the template name, and outputs a plain version for the portal (without having to edit the navbox itself). - Evad37 [ talk 09:18, 15 June 2018 (UTC)
subst:
the topic-specific navbox to get the original {{
navbox}} call, where the style parameters can be specified? Or could it wrap the navbox in a div with a style tag using !important
to override the various navbox-*
classes? Since we can't put in style blocks, I'm not sure if we could target the classes directly. It sounds like we'd have to use the first approach. The module would parse the wikitext to pull out the navbox template, then parse the template's source, add or change the relevant style parameters, then return the resulting template code in place of the original. Sounds like this is feasible, but I'm not certain of the limitations of Lua in MediaWiki sites. — AfroThundr (
u ·
t ·
c)
14:52, 16 June 2018 (UTC)
<noinclude>...</noinclude>
tags and their contents, and then just add extra style parameters before the last set of closing braces; finally preprocessing the resulting wikitext and return that as the output. I've already done something sort of similar at
Module:Portal maintenance status, so it should be possible. The second approach wouldn't be possible yet, but probably would be when
WP:TemplateStyles is enabled. -
Evad37 [
talk
15:52, 16 June 2018 (UTC)
{{Plain navboxes|content=
(navboxes go here) }}
, which would use TemplateStyles to override the styles for the navboxes within. -
Evad37 [
talk
02:08, 22 July 2018 (UTC)
@
The Transhumanist: Done, see
Template:Plain navboxes/testcases for some examples -
Evad37 [
talk
02:51, 30 August 2018 (UTC)
Can TemplateStyles be used to strip out the boxes altogether? — The Transhumanist 18:04, 24 August 2018 (UTC)
Can TemplateStyles be used to reformat the navbox entries as bullet lists? — The Transhumanist 18:04, 24 August 2018 (UTC)
Can TemplateStyles be used to reformat sidebar (vertical) templates to navfooter (horizontal) templates layout? In generating portals using a creation template, with {{Template:subjectname}}
specified in the creation template to transclude navigation templates into the portal's topic section, sometimes those turn out to be vertical sidebars or series boxes rather than horizontal navigation footer boxes. It would be nice if those were automatically reformatted into the navigation footer style. Can Templatestyles do that? —
The Transhumanist
18:04, 24 August 2018 (UTC)
It would be very convenient to populate Selected sections' slideshows with entries from the sections within a navbox within a portal's topics section.
The most convenient way these days for populating a portal's topics section is by transcluding navigation templates (which in turn typically use the navbox template inside them).
If we are reformatting navboxes via CSS, and WP:TemplateStyles is used to insert h3 headings into navbox content, will the Lua-powered templates, such as {{ Transclude list item excerpts as random slideshow}} (which allows sections to be specified), recognize the headings as sections? — The Transhumanist 18:04, 24 August 2018 (UTC)
<br>
etc. in the wikitext. I've never used TemplateStyles.
Certes (
talk)
19:21, 24 August 2018 (UTC)On a majority of all portals, navbox templates are used as sourcepages for populating their "Selected general articles" section.
However, navbox templates have much more potential. Most of those templates are arranged in sections, which provides a useful opportunity. Each navbox section ("group") could support a section on the portal, if a Lua script could be written or modified to access them.
This would allow improved context browsing. A "Selected biographies section" is an example of providing specific context.
Is this feasible? — The Transhumanist 04:28, 15 September 2018 (UTC)
How hard would this be? What would it take? — The Transhumanist 04:28, 15 September 2018 (UTC)
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | Archive 4 | Archive 5 |
![]() | Please dream up new features, and post threads for them below... |
Maybe we should try to do away with the purge links altogether. Slideshow galleries allow content to be changed just by clicking on arrows, and it is possible to get it to work with prose too:
When WP:TemplateStyles get enabled, we should be able to hide the blank filler images entirely, as well as the middle button that toggles the standard gallery view. - Evad37 [ talk 13:59, 12 June 2018 (UTC)
{{Box-header|title=Selected animal|EDIT=yes|noedit=yes}}
{{Random_slideshow
| File:Blank.png | <div style{{=}}text-align:left;>{{#invoke:String|replace|{{Transclude lead excerpt|Cat}}|%c|<br>||false}}</div>
| File:Blank.png | <div style{{=}}text-align:left;>{{#invoke:String|replace|{{Transclude lead excerpt|Dog|files=1}}|%c|<br>||false}}</div>
| File:Blank.png | <div style{{=}}text-align:left;>{{#invoke:String|replace|{{Transclude lead excerpt|Mouse}}|%c|<br>||false}}</div>
| File:Blank.png | <div style{{=}}text-align:left;>{{#invoke:String|replace|{{Transclude lead excerpt|Horse}}|%c|<br>||false}}</div>
}}
{{Box-footer}}
@ Certes, The Transhumanist, and Pbsouthwood:: {{ Transclude excerpts as random slideshow}} is now ready to be used - Evad37 [ talk 04:10, 20 July 2018 (UTC)
@ Evad37 and Certes: It doesn't work anymore. Oddly, though, it still works when in the page preview. — The Transhumanist 22:37, 4 July 2018 (UTC)
Evad, this template is brilliant!
Here is a test using the same article titles as above.
Very nice. Much easier to work with.
By the way, what does this display in mobile devices?
Good job, keep up the great work. Now I'm off, to test it in a portal... — The Transhumanist 05:36, 20 July 2018 (UTC)
Now available as slideshows! See {{ Transclude linked excerpts as random slideshow}} and {{ Transclude list item excerpts as random slideshow}}. Pinging @ The Transhumanist and Pbsouthwood. - Evad37 [ talk 03:22, 24 July 2018 (UTC)
|limit=
parameter and set it to 15 on all the slideshows. There was also a weird problem with the gallery for the politics section being broken, but preventing non-mainspace pages from appearing and setting |paragraphs=
to 1
instead of 1-2
fixed that. -
Evad37 [
talk
05:49, 25 July 2018 (UTC)
@ Evad37 and Certes: The templates so far transclude excerpts from article leads.
Could we have one that transcludes excerpts from a specified section of one or more articles, by section title? (Section number would be fine for a single page, but probably wouldn't work right if multiple pages were included).
For example, the Portal:Prehistory of Oceania doesn't have a corresponding article from which to pull a lead excerpt. The material about it is in the Prehistory section of History of Oceania.
Thoughts? — The Transhumanist 10:10, 9 July 2018 (UTC)
{{
Transclude linked excerpt|Foo}}
displays not the lead of Bar but the start of its section called Baz.
Certes (
talk)
00:12, 17 July 2018 (UTC)A link that leads to a random portal would be nice.
It could be placed at the end of the Template:Portals browsebar that is displayed at the top of most portals.
What would it take to create such a link? — The Transhumanist 11:25, 25 July 2018 (UTC)
The only country portal that shows up, for example, is Portal:Canada. It looks like a rather small subset of the whole collection. — The Transhumanist 01:13, 2 August 2018 (UTC)
A portal section that displays a link to the WP:REFDESK that is relevant to that portal.
There are 8 reference desks. How could this be made to automatically display the appropriate link out of those 8?
Thoughts? — The Transhumanist 11:44, 25 July 2018 (UTC)
Portal that adjusts layout depending upon what content is available.
For example, displays a news section only if there are news items to be displayed.
Another example, displays a "Did you know" section, only if there are DYK entries to be displayed.
Thoughts? — The Transhumanist 11:49, 25 July 2018 (UTC)
@ Pbsouthwood, AfroThundr3007730, Evad37, Certes, Dreamy Jazz, and Waggers: Okay, found it. One way to do this is covered at mw:ifexist.
For example, to make a "Get involved" section only appear if the corresponding WikiProject exists, you could use code similar to this:
{{#ifexist: Wikipedia:WikiProject {{PAGENAME}}
| {{Box-header colour | Get involved}}
For editor resources and to collaborate with other editors on improving Wikipedia's Lithuania-related articles, see [[Wikipedia:WikiProject {{PAGENAME}}|WikiProject {{PAGENAME}}]].
{{Box-footer}}
|
}}
It has been placed in Portal:Lithuania, where it works.
I'm not sure what other features could be handled with this, or if there are better or similar methods.
Thoughts? — The Transhumanist 07:13, 27 July 2018 (UTC)
The tops of boxes at the top of the 2 columns line up. The bottoms don't, which leaves awkward white space between boxes. The box bottoms should line up too.
Then, white space would appear inside a box rather than outside it. This is more aesthetically pleasing, and is how the Main page is designed.
Portals with side-by-side box arrangement, like Portal:Lithuania, would look a lot better.
What is the best way to accomplish this? — The Transhumanist 12:00, 25 July 2018 (UTC)
We've started putting panoramas at the top of intro sections. For example, see the panorama at the top of Portal:Lithuania.
The problem is, they shrink when you zoom out.
Could they be fit to the width of the frame, and stay that way, even after each zoom change? — The Transhumanist 07:53, 26 July 2018 (UTC)
This looks good! It has been put to use at the following portals.
Our WikiGnomes are going to have fun with this! — The Transhumanist 23:10, 29 July 2018 (UTC)
![]() | General portal design discussions go here. |
I've been experimenting with the creation of new portals, to see how much editor effort is taken up by the new automated and semi-automated components.
The following portals took me about an hour to create each, though I had to return to fiddle with the Did you know section of Portal:Reference works for another half-hour or more, as the search terms I initially chose were matching off-topic topics. The template, {{ Transclude selected recent additions}}, is quite powerful, and even has a do-no-match feature to help target searches more precisely. Here are the new portals I mentioned:
The previous typical creation time on portals like this used to be 6 to 10 hours, and so the tools are a great improvement, reducing creation time about an order of a magnitude. We should keep on with development of tools and components, and perhaps we can reduce creation time down to single digit minutes. — The Transhumanist 21:54, 11 June 2018 (UTC)
template that pulls all the pictures off a specific page (or page section)already exists: {{ Transclude files as random slideshow}} - Evad37 [ talk 05:03, 18 July 2018 (UTC)
[[File:...]]
, and not those using the older [[Image:...]]
syntax. That's likely a bug in
Module:Excerpt that needs fixing. -
Evad37 [
talk
04:35, 19 July 2018 (UTC)I thought that the picture slide show would be the biggest time consumer in portal construction. But, I discovered in building city portals that sourcepages for pics are easy to specify in a generation template. — The Transhumanist 09:32, 2 August 2018 (UTC)
@
Evad37: I was trying to convert this portal to {{
Box-header colour}}, but, when I added the color from the {{/box-header}}
subpage, it didn't match.
The page uses the colors of their flag, like this:
The X in the flag is color code #BF0A30.
But, when you indicate the exact same color code in {{ Box-header colour}}, it turns out like this:
Whoever designed the portal, wanted to match the colors of the state flag.
Can we do that with {{ Box-header colour}}? — The Transhumanist 07:46, 29 July 2018 (UTC)
|mode=dark
:IMO, the benefits of such a tag would be immense. For example, we could use it to automatically generate categories of articles related to each portal. This is especially beneficial to portals which do not have a corresponding WikiProject, extricating ourselves from a reliance on said projects. For example, the Portal:1980s has no corresponding WP:WikiProject 1980s.
The tag template would say something like,
This article is related to the following Portals:
To call this new template for say Fred K. Mahaffey we add {{ Portal tag|Biography|1980s|United States|United States Army|War}} just below the other WikiProject templates already on its talk page. Each parameter in this new template would automatically include the article in a category like Category:FA-Class articles related to 1980s Portal. The rest I believe easy to imagine.
I can imagine dozens of automated features for which specific portal-related categories would be a great boon.--- Coffeeand crumbs 09:06, 13 July 2018 (UTC)
One example of a use is an adapted form of User:JL-Bot/Project content that generates lists of Quality content on the portals talk page. This list can then be used in our random selected article/biography/picture templates to maintain the portal.--- Coffeeand crumbs 09:12, 13 July 2018 (UTC)
Pinging @ Evad37, AfroThundr3007730, The Transhumanist, Certes, and Lee Vilenski:
Where are these coming from? I see an inadequate one at
Portal:English (needs to say "the English language", for clarity), but there is no {{
Short description}}
at that page, so it's being injected from some other transclusion or something. While I can go dig it out, I want to ask whether this standardized, or being standardized, or just being done randomly on a per-portal basis?
PS: If you don't know what I"m talking about, see
WP:Short description, especially
Template:Short_description#Testing for the CSS to make all the short descriptions visible to you (I recommend this – many of them need work, in the mainspace, too).
—
SMcCandlish
☏
¢ 😼
03:58, 1 July 2018 (UTC)
{{
Portal description}}
, and upgraded it with a |topic=
parameter to resolve this issue. Also fixed the documentation to stop mis-recommending that people add a separate {{
Short description}}
to override {{Portal description}}
's default behavior; it won't work and will instead create two conflicting short descriptions. —
SMcCandlish
☏
¢ 😼
04:20, 1 July 2018 (UTC)
I have recently tried to tidy up Portal:India to a automated state. I have run into some questions.
Finally, Could some one advice me on thing that can still be improved in the portal — F R + 07:32, 23 July 2018 (UTC)
Evad37 - I created Template: Portal image banner as a rough implementation of my idea — F R + 08:45, 25 July 2018 (UTC)
@ Evad37, Certes, and The Transhumanist: Much like all of the templates that depend on Module:Excerpt have had their talk pages redirected to Module talk:Excerpt, I think we should do that for all templates that depend on a module, to keep the discussion centralized. Or perhaps all of the "lower traffic" templates should have their talk pages redirect here? As for me, I watchlist all of them whenever I see a new one, but it might make any issues posted more visible if we consolidated most of them (excluding the excerpt ones probably). What do you guys think? — AfroThundr ( u · t · c) 02:21, 26 July 2018 (UTC)
When the page Wiltshire is specified as a source for files, the slideshow gets clogged up with icon images from its Places of interest section.
It would be useful if we could specify sections that the template is to exclude from the slideshow. — The Transhumanist 22:50, 29 July 2018 (UTC)
Tip: Many files aren't pictures, and so the title "Selected picure" is a slight misnomer when a non-picture is displayed. The word "image" is more general, and covers them all. — The Transhumanist 23:55, 1 August 2018 (UTC)
Dear JJMC89 and Portals Project techies,
There was a huge debate over possible deletion of the entire portal system, including the portal namespace itself. One of the main objections to portals raised during that debate was the prevalence of portals that were extremely out-of-date and unmaintained, a condition that was noticeable, in large part, from their out-of-date news entries.
One of the outcomes of the debate was a rebooted Portals WikiProject, with a new team of editors dedicated to revamping and automating the entire portal system.
Accordingly, the portal system is undergoing a complete overhaul.
Each portal section type is being redesigned for automation, one-by-one, including the news section.
The problems we've been having with news sections on portals include:
I'm interested in a type of news section that automatically appears in portals only when there is news to be reported. That is, when there is news within the past 30-days (recent news), there's a news section on the portal reporting it. When there is no recent news, there is no news section. How can this be done?
We are converting portals to a one-page design, with zero sub-pages. Therefore, I'm looking for ways that news support can be controlled externally from outside portal pages, based entirely on portal titles. Automatically. How can this be done?
Thus, portals would be automatically matched with their corresponding news categories on Wikinews, with zero human intervention. How can this be done?
That is, we need the set up of news support, and ongoing updating of news, on every portal (except those that have dedicated maintainers), to be fully automated. How can this be done?
There are currently 1500 portals, with 8500 or more additional portals likely to be created over the next year or two. News support for existing and new portals should initiate automatically. How can this be done?
Are there any other free and open news sources besides Wikinews that can be supported on Wikipedia portals? If so, what are they?
I look forward to your replies. — The Transhumanist 23:44, 1 August 2018 (UTC) P.S.: Please {{ ping}} me in your reply. Thank you. -TT
|header=
parameter (i.e. a box-header template) plus the news items plus whatever's in a |footer=
parameter (or just {{
box-footer}}); and when no news items are found, it leaves out the section entirely. -
Evad37 [
talk
03:52, 2 August 2018 (UTC)
@ Evad37: Can you do the same for DYK as you did for news above? That is, make it display if it has output, and not display if it has no output? — The Transhumanist 10:53, 2 August 2018 (UTC)
|header=
and |footer=
will now also work for {{
Transclude selected recent additions}} -
Evad37 [
talk
02:58, 3 August 2018 (UTC)I believe that I've now fixed all links to disambiguation pages on the source text at
WP:Recent additions/2018/July etc., unless you request pages from before 2010. If you see any such links coming out, please post a link and ping me, as I may have missed a page or misunderstood where the source text comes from. There are still a few anachronisms in there (this year's parliamentary poll
etc.) and some redlinks to deleted pages, but it might be disruptive to remove them as the pages also constitute a historical record.
Certes (
talk)
13:03, 3 August 2018 (UTC)
@ Armanaziz and Pbsouthwood: I have edited Portal:Bangladesh to select DYKs automatically using a new template, {{ Transclude DYK}}. Certes ( talk) 16:30, 25 July 2018 (UTC)
Many older DYKs now link to disambiguation pages because the target articles have moved. A few editors are kindly fixing the portals, but JL-Bot undoes this work by restoring the original text each weekend. I'm working through the dab links in the source pages, so this problem should go away soon. Certes ( talk) 16:14, 28 July 2018 (UTC)
Did you know… that Spam Inc has an office in Ruritania?) and factoids that have been overtaken by events; particularly where something happened "this year" meaning 2011 etc. I'm not sure how best to weed these out without damaging the archives. Certes ( talk) 12:32, 2 August 2018 (UTC)
Okay, here's the next item on my portal maintenance wish list. I would like a way to list a random selection of article titles from the various maintenance categories populated by WikiProject:Trains.
On Portal:Trains, the "Things you can do" section lists various tasks that readers can jump into. Many of the tasks have associated maintenance tracking categories. For example, the assessment task is related to the unassessed articles category, and the infobox needed task is related to the infobox needed category. Other tasks are also closely related to tracking categories like this. What I would like is a script that would randomly select and list a specified number of article titles (usually I pick five article titles) to populate the task in this portal section. The closest tools that I can find right now are Special:RandomInCategory and {{ Random page in category}}, but both of those will jump to the article and not return just the article title.
Thanks! Slambo (Speak) 17:23, 15 July 2018 (UTC)
As a side note, many of the WikiProject:Trains maintenance tracking categories will list the talk pages because that's where the project banner is placed. So the script I want will remove the Talk: namespace identifier and link to the article. Slambo (Speak) 17:26, 15 July 2018 (UTC)
@ Waggers, AfroThundr3007730, Godsy, Rockmagnetist, and Dreamy Jazz:
The text is centered in Portal:American football, and I can't figure out why.
Looks awkward. Can someone fix this? — The Transhumanist 06:21, 10 August 2018 (UTC)
|text-align=center
. I'm guessing it's normally used for the intro and not every section. — AfroThundr (
u ·
t ·
c)
11:55, 10 August 2018 (UTC)The random portal link doesn't appear to be random.
If you click on it, and then click on that link on the new page that displays, and keep doing that, the same set of portals appear over and over.
Does anyone have any idea of why this is happening? — The Transhumanist 03:06, 10 August 2018 (UTC)
Click number | Portal | Duplicate |
---|---|---|
0 | Portal:Algae | |
1 | Portal:Herbalism | |
2 | Portal:Philately | |
3 | Portal:Wolfgang Amadeus Mozart | |
4 | Portal:Australia | |
5 | Portal:Scottish islands | |
6 | Portal:Taipei | |
7 | Portal:Carry On | |
8 | Portal:Monaco | |
9 | Portal:Webcomics | |
10 | Portal:New York roads | |
11 | Portal:History of science | |
12 | Portal:Scottish islands | yes |
13 | Portal:Dresden | |
14 | Portal:Military of Pakistan | |
15 | Portal:Limited recognition | |
16 | Portal:Prague | |
17 | Portal:Singapore | |
18 | Portal:China | |
19 | Portal:Limited recognition | yes |
20 | Portal:Lithuania | |
21 | Portal:Stockholm | |
22 | Portal:Railways in Pakistan | |
23 | Portal:Singapore | yes |
24 | Portal:Australia | yes |
25 | Portal:Saudi Arabia |
@ Evad37: Those are the same ones I keep getting (plus about double again that number). What I'm saying is, that around 75 portals (including the ones you posted above) are the ones that keep showing up. Click 200 times, and you'll see what I mean. There's a subset of a few dozen portals that is displayed, beyond which it does not seem to go. How do we pop this bubble? — The Transhumanist 07:58, 10 August 2018 (UTC)
@ Evad37: This appears to be most, if not all, of the bubble:
With these same ones coming up over and over. — The Transhumanist 08:45, 10 August 2018 (UTC)
pairs
. The order within the table isn't guaranteed and can vary between Lua interpreters but may tend to match the order given when invoking the template. You could mix things around using code similar to that near the end of
Module:Transclude DYK (search for random entries).
Certes (
talk)
15:28, 10 August 2018 (UTC)
The core version gives much more biased results than this extension. mw:Category:Extensions used on Wikimedia suggests that Wikimedia doesn't use the extension. So I assume we're using the core version which gives biased results. I doubt that we can do much about this. Certes ( talk) 20:48, 10 August 2018 (UTC)
I've been using {{ Transclude list item excerpt}} and {{ Transclude list item excerpts as random slideshow}} to pull items out of templates, like Template:Counties of Denmark, like this:
This got me wondering about templates like {{ Daytona 500}}:
Could a tempate/lua script be written to convert templates into portal guts (after the intro, alongside the image slideshow, and before the support sections (WikiProjects, Topics, Wikimedia, etc.), with a section created for the portal corresponding to each section of the template?
Thus, for Portal:Daytona 500, it would generate sections called "Selected track article", "Selected Statistics article", "Selected lore article", "Selected notable race", "Selected related event", "Selected related area" and "Selected Daytona race report".
The implications for portal creation would be stratospheric!
I look forward to your replies. Sincerley, — The Transhumanist 21:21, 12 August 2018 (UTC)
Taking things to their logical conclusion, how feasible is it to have a portal link on the sidebar menu, or in one of the tab menus at the top of every page, that generates a portal for the current article's subject when you click on it?
So, if you are reading the article on chimpanzees, and you click on "Portal", a "Special:" page called "Special:Portal:Chimpanzees" is generated and displayed right then on chimpanzees.
I look forward to your replies. Sincerely, — The Transhumanist 21:15, 12 August 2018 (UTC)
There are lots of tools that let editors do various things to pages on Wikipedia, like AWB, WikEd, and TWINKLE. There's now another one, called PortalTool.js, intended to work on portals, that currently does nothing.
What it will be able to do, will be in part up to you. What do you want this tool to be able to do to portals for you? Use your imagination: you click a menu item, and what happens? I look forward to your replies. — The Transhumanist 12:37, 10 July 2018 (UTC)
@ Pbsouthwood, Evad37, Coffeeandcrumbs, AfroThundr3007730, Bermicourt, Dreamy Jazz, Nick Moyes, Auric, Waggers, and Godsy:
Thank you for the input. Let me summarize what we have dreamed up so far, and add some ideas and details that you have inspired by your input. Each of the below are menu items, to be displayed on the sidebar menu, when the user is viewing a portal:
Create Portal
– menu item for creating a new portal, defaulting to the subject of the current page. If you are reading the article "Saturn" and click "Create Portal", it will ask if you want the new portal to be on Saturn. If you answer "no", it will prompt you for the desired title. Not sure what it would ask next.Upgrade portal
– for the current page (if it is a Portal), presents a list of section names beside a number, and "All". You enter the number of the section you wish to upgrade, or "All". If there are more than one upgrade available for a section type, it prompts you further.Add section
– provides a selection of section types, by number. Specify the number to choose which type you want. If the heading is variable for that section type, it prompts for the heading title, and then prompts you for location in the portal to place it.Move section
– provides list of sections, by number. User enters the number desired. Then script prompts for new location, in the form of a section number, and Right of, Left of, Before, After. Saves having to go into the editor and cut-and-paste-move the section.Rearrange sections
– more elaborate move command, that allows you to rearrange the sections by number. If none is provided, rearranges to the standard presentation placement (whatever that is). Not sure what the interface would be.Analyze
– not sure what this would do. Perhaps, provides a list of missing sections to choose from.Concerning the fetching of categories, I was thinking that would be best to handle with user scripts first, until we actually know how, and then a bot could be adapted from that part of the program. Otherwise, I'd be oblivious on how to program a bot. Interactively develop it somewhere first, and then go to bot. Unless there's something I'm missing from the whole bot process?
Well, that's all for now. I hope this stirs your thinking further. Please feel free to share any new ideas you have or provide more details on how the above features should work. This is brainstorming. Anything goes. And just for the fun of it, I've invited some more people to the party. — The Transhumanist 02:14, 13 August 2018 (UTC)
Discussion:
@ Pbsouthwood, Evad37, Coffeeandcrumbs, AfroThundr3007730, Bermicourt, Dreamy Jazz, Nick Moyes, Auric, Waggers, and Godsy:
@ Slambo, SMcCandlish, FR30799386, Mercurywoodrose, Dicklyon, Dthomsen8, Espilio, Greatedits1, Nigos, and Wumbolo:
Here are some more possible features for the PortalTool. See the initial description for the script and discussion of features in the previous section above. (Typescript represents menu items):
Change color
– not sure how this would handle portals that use different colors on its various sections. In such cases, it should probably present a warning before proceeding. See:
Portal:Microsoft.Add to selection
– presents a numbered list of the "Selected" sections and prompts for a number. After the user enters a number, the script prompts for the item to be added to that section. This would require use of a template that could accept both sourcepage names and excerpt article names. Is such a template possible?I look forward to your comments and further ideas. — The Transhumanist 18:21, 13 August 2018 (UTC)
Concerning using the draft space for portals, it screws up the use of the {{PAGENAME}}
magic word. The pagename for Draft:Portal:Whatever is Portal:Whatever, which makes many of the templates not work. The only fix I can think of off the top of my head is to have a "Portal draft:" namespace. —
The Transhumanist
19:30, 13 August 2018 (UTC)
In retrospect, it will probably be best to focus on portal editing features for now, rather than on one for portal creation. The community's concerns in the RfC focused on the inadequacy of existing portals. So fixing those up should remain our priority. Portal creation at the push of a button would be extremely distracting. Portal creation can still be done by using the various templates designed for that. This way, we don't need to worry about push button creation of a flurry of unfinished portals. Once the templates have been developed to automatically create completed portals of high quality, then adding creation to PortalTool makes sense. The tool would simply insert one of those, and perhaps ask for parameters. — The Transhumanist 19:37, 13 August 2018 (UTC)
Detail discussion of new possible features:
You are invited to join the discussion at
Template talk:Box-header#Switch to Module:Box-header?.
Evad37 [
talk
07:22, 13 August 2018 (UTC)
Hi, I read through the main project page, and I couldn't tell which tasks require knowledge of Javascript. Could someone elaborate? Thanks! -- audiodude ( talk) 21:46, 22 August 2018 (UTC)
I've been constructing an automated page-lite portal at Portal:Scottish islands, but have increasingly found that, though initially very convenient to create, it's actually harder to maintain than the old hundred-subpages format, because one can't view all the selections at once to troubleshoot, as one can at, say, Portal:Cheshire/Selected article/Archive.
Is there a way of taking the content at a subpage such as Portal:Scottish islands/Island and using this as the portal's randomised rotation, without needing to create more than a single subpage level? This would be much more intuitive to old-fashioned portal maintainers, such as myself, and would, I believe, allow one to choose the image & image size, and to customise the number of paragraphs excerpted, without compromising the automated status or needing to fuss with creating hundreds of subpages. It would be particularly great if it could be applied to DYKs, as Portal:Cheshire/Did you know/Archive is a nightmare to update if you want to shuffle DYKs from selection to selection. Espresso Addict ( talk) 17:38, 13 July 2018 (UTC)
For regional portals (cities, counties, countries, etc.), I've been trying to build portals by pulling items out of lists (with {{ Transclude list item excerpt}}, but a great many if not most of the lists in support of regions seem to be tables. For example, List of counties in Colorado, List of cities in China, List of provincial parks of Vancouver Island, and so on.
Can we get a transclusion template for pulling the main items out of templates? This would really help with creating regional portals. Here is a more detailed description, adapted from the template previously mentioned:
The template accepts one page name as an unnamed parameter. Wikilinked items in the first column of the indicated table are collected from that page, or a section of it. One such item is selected randomly, and its destination is transcluded. (If the selected page is invalid, the template will choose again.) Include a namespace where necessary.
Is this doable with Lua?
I look forward to your replies. Sincerely, — The Transhumanist 20:15, 12 August 2018 (UTC)
For {{ Transclude list item excerpt}} and {{ Transclude list item excerpts as random slideshow}}, it would be very useful if they could recognize sections in a template. Such as in {{ Mars}}. — The Transhumanist 21:15, 12 August 2018 (UTC)
From the portal:
— The Transhumanist 01:22, 24 August 2018 (UTC)
@ Pbsouthwood, Evad37, and The Transhumanist: I have implemented a rough version of dynamic image sizing at Template:Portal dynamic image. I created some testcases at User:FR30799386/sandbox to show how it behaves. Please let me know if there are any other features that can be added — F R + 05:29, 8 August 2018 (UTC)
@ John of Reading, The Transhumanist, Evad37, Certes, AfroThundr3007730, and Cesdeva:
Template:Number of portals is used to define how many portals currently exist on a couple of pages, including in
Portal:Contents/Portals. However, it has to be updated by hand from database dumps, which John of Reading has been doing. The latest list is at
User:John of Reading/List of portals. Could we replace it with something else? Since we have
Category:All portals, {{PAGESINCATEGORY:All portals}}
looks promising. It currently produces 543, which is quite a bit more than the template. However, it is also an expensive function call. If we want to replace it, we should probably replace
Template:FPO number with {{PAGESINCATEGORY:Featured portals}}
as well.
Greatedits1 (
I hope so |
If not, let me know)
23:05, 16 August 2018 (UTC)
{{PAGESINCATEGORY:All portals}}
. Good idea. I don't think one expensive call will be a problem, as the template isn't widely used. I hope that the comma which PAGESINCATEGORY inserts after the thousands digit won't trip up any automation which uses it.
Certes (
talk)
23:25, 16 August 2018 (UTC)
{{formatnum:{{PAGESINCAT:All portals}}|R}}
-
Evad37 [
talk
03:37, 17 August 2018 (UTC)
{{PAGESINCAT:All portals}}
directly? (it's only three letters longer). -
Evad37 [
talk
03:37, 17 August 2018 (UTC)
@ The Transhumanist, Cesdeva, and Evad37: Just a heads up guys, both the RfC to enable TemplateStyles on enwiki and the RfC to adopt the TemplateStyles guidelines were closed with consensus to implement. We may be able to make use of them soon, as soon as HTML Tidy gets replaced. — AfroThundr ( u · t · c) 15:31, 18 June 2018 (UTC)
@ The Transhumanist, Cesdeva, and Evad37: As of today, TemplateStyles are now enabled on enwiki. What's first on our agenda for these? — AfroThundr ( u · t · c) 12:10, 19 July 2018 (UTC)
<h2>
styling across skins (particularly margin/padding)The fix is automatic, through the TemplateStyles css files at Template:Random slideshow/style.css (image slideshows) and Template:Transclude excerpts as random slideshow/style.css (text excerpt slideshows).Is the fix mentioned above automatic or does something else need to be done to the template to stop all the selected items showing as a gallery?
The higher resolutions images for {{ random slideshow}} and {{ transclude files as random slideshow}} are loaded via javascript, but the captions, small thumbnail images, and all the content for the text excerpt slideshows are loaded with the page. It's not great, but it makes the feature usable. As far as I know, there's no way of sending different content to mobile and desktop devices – apart for some reason for the gallery slideshow, which is missing on mobile website but present on the desktop website (along with the regular gallery, which is present on both but hidden by default on desktop). - Evad37 [ talk 17:24, 27 July 2018 (UTC)do these slideshow templates work by loading all of the content from all of the pictures/articles and then hiding all but the selected one?
@
The Transhumanist and
Pbsouthwood: Remember
Wikipedia talk:WikiProject Portals/Design/Archive 2 § Mobile view support ? Well, its now possible with a new template {{
if mobile}}. Its really easy to use – {{
if mobile|text for mobile website|text for desktop website}}
– and will allow us to call a slideshow gallery a slideshow when it is a slideshow (i.e. on desktop website) but not when it isn't (i.e. on mobile website) -
Evad37 [
talk
12:37, 30 August 2018 (UTC)
Initial list
|
---|
|
Some more slideshows that didn't work
|
---|
|
From an initial look, it seems that several, if not all, of the above issues is from the module getting confused by multiple images being specified on the same line (rather than with a linebreak between them), and maybe by images within tables. - Evad37 [ talk 15:07, 29 July 2018 (UTC)
I installed many slideshows, and most worked fine, but the following list of them are not working right:
I hope the above links help. — The Transhumanist 09:14, 12 August 2018 (UTC)
- Evad37 [ talk 10:43, 14 August 2018 (UTC)
@ Evad37 and Certes: The new portals are sprinkled with this problem...
Notice the captions:
Lua error in Module:Random_slideshow at line 200: No images found.
For every image that happens to be inside a table, we get the pixel size as the caption. This problem shows up sporadically in the new portals. Sincerely, — The Transhumanist 01:48, 31 August 2018 (UTC)
[[File:filename.ext|sizepx]]
, instead of [[File:filename.ext|sizepx|description]]
(or [[File:filename.ext|sizepx|description|alt=alt text]]
. Until the issue is fixed in the article, the module (
Module:Excerpt) should probably just present the image without a caption – but detecting when this situation has occurred may be a bit tricky. -
Evad37 [
talk
02:50, 31 August 2018 (UTC)@ Evad37 and Certes: The image slideshow is not picking up the images from X-Men. Do the slideshow templates pick up on .png images? — The Transhumanist 01:52, 31 August 2018 (UTC)
I have recently been updating Portal:Scotland with Panorama header images (several versions as The Transhumanist will testify). Cuirrently they rotate randomly, dependant upon a user refresh / purge or page reload.
My question is this: Is it possible to get {{ Portal image banner}} to behave in the same way as {{ Random slideshow}} ? i.e allow the user to select a new banner image by clicking on a left / right navigation arrow without having to purge / refresh the page?
This is possible at present for panorama headers using {{ Random slideshow}} at the head of the Portal, but it results in a truncated width banner image, with an ugly space above containing the user selection arrows. As things stand with {{ Portal image banner}}, the images do rotate randomly, but it's dependant on a purge or page reload. It would be nice to allow user control, similar to {{ Random slideshow}} / Selected Pictures. The banner image would remain full width, at the top header position with the user selectable navigation arrows showing at either side of the banner. Ideallly they would appear on top of the image at either side upon image hover. Alternatively, the navigation arrows could be static on either side of the banner image whilst keeping the image width as wide as possible and at the top header position.
Is this possible? I know it's a lot to ask, but I'm sure the technical folks here would love the challenge. (After all, Evad37 got CSS Flex to work seamlessly within the MediaWiki framework -(IMHO absolutely the BIGGEST thing since siced bread and BEYOND) - surely anything is possible?
I live in hope, Cheers Cactus.man ✍ 19:33, 30 August 2018 (UTC)
|mode=slideshow
to the desired transclusion of the template. The template, however is configured not to work on mobile for the time being as I still have not figured out what to do
The purple and light-grey colour scheme of navboxes doesn't really fit it with how other content in portals are styled. But it is possible to make navboxes plain by specifying style parameters, like at Portal:U.S._roads#Numbered_highways_in_the_United_States. So the idea is to have a Lua module that takes in a navbox, or maybe just the template name, and outputs a plain version for the portal (without having to edit the navbox itself). - Evad37 [ talk 09:18, 15 June 2018 (UTC)
subst:
the topic-specific navbox to get the original {{
navbox}} call, where the style parameters can be specified? Or could it wrap the navbox in a div with a style tag using !important
to override the various navbox-*
classes? Since we can't put in style blocks, I'm not sure if we could target the classes directly. It sounds like we'd have to use the first approach. The module would parse the wikitext to pull out the navbox template, then parse the template's source, add or change the relevant style parameters, then return the resulting template code in place of the original. Sounds like this is feasible, but I'm not certain of the limitations of Lua in MediaWiki sites. — AfroThundr (
u ·
t ·
c)
14:52, 16 June 2018 (UTC)
<noinclude>...</noinclude>
tags and their contents, and then just add extra style parameters before the last set of closing braces; finally preprocessing the resulting wikitext and return that as the output. I've already done something sort of similar at
Module:Portal maintenance status, so it should be possible. The second approach wouldn't be possible yet, but probably would be when
WP:TemplateStyles is enabled. -
Evad37 [
talk
15:52, 16 June 2018 (UTC)
{{Plain navboxes|content=
(navboxes go here) }}
, which would use TemplateStyles to override the styles for the navboxes within. -
Evad37 [
talk
02:08, 22 July 2018 (UTC)
@
The Transhumanist: Done, see
Template:Plain navboxes/testcases for some examples -
Evad37 [
talk
02:51, 30 August 2018 (UTC)
Can TemplateStyles be used to strip out the boxes altogether? — The Transhumanist 18:04, 24 August 2018 (UTC)
Can TemplateStyles be used to reformat the navbox entries as bullet lists? — The Transhumanist 18:04, 24 August 2018 (UTC)
Can TemplateStyles be used to reformat sidebar (vertical) templates to navfooter (horizontal) templates layout? In generating portals using a creation template, with {{Template:subjectname}}
specified in the creation template to transclude navigation templates into the portal's topic section, sometimes those turn out to be vertical sidebars or series boxes rather than horizontal navigation footer boxes. It would be nice if those were automatically reformatted into the navigation footer style. Can Templatestyles do that? —
The Transhumanist
18:04, 24 August 2018 (UTC)
It would be very convenient to populate Selected sections' slideshows with entries from the sections within a navbox within a portal's topics section.
The most convenient way these days for populating a portal's topics section is by transcluding navigation templates (which in turn typically use the navbox template inside them).
If we are reformatting navboxes via CSS, and WP:TemplateStyles is used to insert h3 headings into navbox content, will the Lua-powered templates, such as {{ Transclude list item excerpts as random slideshow}} (which allows sections to be specified), recognize the headings as sections? — The Transhumanist 18:04, 24 August 2018 (UTC)
<br>
etc. in the wikitext. I've never used TemplateStyles.
Certes (
talk)
19:21, 24 August 2018 (UTC)On a majority of all portals, navbox templates are used as sourcepages for populating their "Selected general articles" section.
However, navbox templates have much more potential. Most of those templates are arranged in sections, which provides a useful opportunity. Each navbox section ("group") could support a section on the portal, if a Lua script could be written or modified to access them.
This would allow improved context browsing. A "Selected biographies section" is an example of providing specific context.
Is this feasible? — The Transhumanist 04:28, 15 September 2018 (UTC)
How hard would this be? What would it take? — The Transhumanist 04:28, 15 September 2018 (UTC)