Jump to content

Template talk:POTD row

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Background color for the template

[edit]

Is that possible to set the background color into transparent using CSS to make it suitable in other pages and preserves the color layout of Main Page? thanks. --Shinjiman 15:51, 13 July 2006 (UTC)[reply]

Substitution

[edit]

Is there any particular reason why this template is normally substituted? It might make the uses easier to read and maintain if it was transcluded instead. — Martin (MSGJ · talk) 08:38, 7 September 2009 (UTC)[reply]

As stated on WP:POTD/G#Protected version there are two versions: a protected version is the one that is actually be transcluded onto the Main Page, and a non-protected version for non-admins to make updates to the POTD caption. If this template is NOT substituted, all the meta-templates used to generate the POTD template (including the ones that generate the "Recently featured" links) will automatically be cascade-protected, and non-admins would not be able to create/edit new POTDs as stated on WP:POTD/G. Zzyzx11 (talk) 10:55, 7 September 2009 (UTC)[reply]

Substitution fix

[edit]

When this template is substituted, it emits a lot of unneeded code, especially in the 'Recently featured' line, which seems to include entire pages, but only shows the title. Is there a way to only pull the actualy title during substitution? In the end, I want to attempt to make a version that does not require tables. -- [[User:Edokter]] {{talk}} 12:04, 13 June 2015 (UTC)[reply]

@Frietjes:. I see you're more comfortable here. I would really like to prevent the entire blurbs being substituted into the protected version's 'Recently featured' line; basically trying to incorporate {{POTD texttitle}} int {{POTD row}}. Is that possible? -- [[User:Edokter]] {{talk}} 08:41, 14 September 2015 (UTC)[reply]
Edokter, we have a couple options. (1) would be to not expand the {{POTD/YYYY-MM-DD|texttitle}} inside the links (2) more fully expand these templates. the first option is simple, we just remove the safesubst: from those. the second option is implemented in Template:POTD row/sandbox, which uses a simple module hack that I just wrote. Frietjes (talk) 13:21, 14 September 2015 (UTC)[reply]
The second options seems to work (but adds aa sapce in the link). I like simple :) so let's try the first option. -- [[User:Edokter]] {{talk}} 13:31, 14 September 2015 (UTC)[reply]
Edokter, fixed the extra space problem in the second solution, and implemented the first solution. Frietjes (talk) 14:03, 14 September 2015 (UTC)[reply]
@Frietjes: That works, but the protected version now gets *[[Template:POTD/2015-09-16|{{POTD/2015-09-16|texttitle}}]], whereas option 2 does get *[[Template:POTD/2015-09-16|Omni Shoreham Hotel]]. Is it possible to make option 1 behave like option 2? -- [[User:Edokter]] {{talk}} 16:39, 14 September 2015 (UTC)[reply]
Edokter, if you want the output from option 2, we should use option 2. if you want the output from option 1, we should use option 1. in other words, if you want option 2, just copy over the version in the sandbox. it's the only way (that I know) to get two levels of substitution without adding 'safesubst:' to all of the individual {{POTD/YYYY-MM-DD}} templates. Frietjes (talk) 16:42, 14 September 2015 (UTC)[reply]
I see. It will have to be option 2 then. Probably the whole setup should be turned into a module. At least I can try to eliminate the tables. Thank you! -- [[User:Edokter]] {{talk}} 16:46, 14 September 2015 (UTC)[reply]
  • Nice of y'all to, y'know, mention this to the people who actually use this template. The edits made appear to have broken image mapping abilities. For now I've reverted back to the original design, which (though admittedly a lot more complicated than it needed to be) actually works as intended. — Chris Woodrich (talk) 23:45, 5 December 2015 (UTC)[reply]
    • What exactly didn't work? Could you not work around the issue instead of reverting back to a state that produces a shitload of wikiparser code? Now I have to clean up up the protected version manually before it reaches the main page! -- [[User:Edokter]] {{talk}} 09:51, 6 December 2015 (UTC)[reply]
    • Now that the protected POTD is sorted, let's talk about what went wrong. I don't know what you tried to do, but it may be simple to just created the protected version with a dummy image, and then replace that with the image map. What you did try is remove random code from the template that was not at fault. Please provide a test case so I can investigate, and fix it. -- [[User:Edokter]] {{talk}} 10:26, 6 December 2015 (UTC)[reply]
      • You've got a test case: the protected POTD. How, exactly, does one add the image map there, with the edited version of POTD row that you wrote? At least it worked without a hitch for the old version. I tried three or four versions of mapping (with a dummy image stand-in before that) and none of them worked. — Chris Woodrich (talk) 00:16, 10 December 2015 (UTC)[reply]
        • Both POTD default and POTD row are not ready to take imagemaps (yet). Create the default and the protected version first, then paste the image map code into the protected version. -- [[User:Edokter]] {{talk}} 10:11, 26 June 2016 (UTC)[reply]

Rebuild

[edit]

So I want to rebuild this template (and {{POTD default}}) from scratch using flexbox, but there is no documentation to speak of. Can someone list the common parameters and what they are expected to do, like |wide= and |tall=, and the expected turnover points where it turns form side-to-side to stacked? I want to build a responsive version that will stack when the main page falls below a certain width, but also want to retain some of the current default behaviour. -- [[User:Edokter]] {{talk}} 13:30, 19 May 2016 (UTC)[reply]

|wide= is used to wrap the image in {{wide image}}. |tall= is used to wrap the image in {{tall image}}. Frietjes (talk) 14:32, 19 May 2016 (UTC)[reply]

The sandbox now uses the flexbox model instead of tables, and it seems to be working fine. A level of gracefull fallback is included to cater for (really) old browsers. Next is adding some responsiveness, but that requires @media queries in CSS. I'll play with that later. -- [[User:Edokter]] {{talk}} 13:20, 12 June 2016 (UTC)[reply]

@TheDJ and Izno: I've attempted to use Edokter's code with newer code for bottom stuff: Special:Diff/727060186/959197829. Here's diff with live version: Special:Diff/957579772/959197829. I've also added test cases for tall and wide pictures.
I know nothing about flexbox (I only know bits and pieces of CSS3), so I won't be able to bring the functionality fully up-to-date. —⁠andrybak (talk) 16:15, 27 May 2020 (UTC)[reply]
I've also added "dual" image support to sandbox.
Looking at testcases () the Vector looks OK. In mobile version (Minerva) the pictures become very small. —⁠andrybak (talk) 16:34, 27 May 2020 (UTC)[reply]
Andrybak, i've moved the styling into CSS and made some further improvements. —TheDJ (talkcontribs) 10:44, 29 May 2020 (UTC)[reply]
One thing to consider is how this mixes with in an archive page that also has the 'old' version on it. And templatestyles don't really substitute, which is a departure from before of course. Then again.. you can fix that by keeping the stylesheet versioned when making major changes. I'm not entirely sure what the traditional subst' intended to achieve, so i can't say if or how that matters. —TheDJ (talkcontribs) 10:51, 29 May 2020 (UTC)[reply]
@TheDJ: From what I've seen of the other such pages related to the main page, to preserve the view of the page as it appeared that day. I don't know if that's a use case that we ought to be worried about supporting strongly by doing something such as versioning the stylesheet (and burdening readers with more CSS down the pipe, however small a burden). I'm sure a query to page views would help us understand who's looking at the subst copies from yesteryear, if we want to pursue the topic.... --Izno (talk) 23:50, 4 June 2020 (UTC)[reply]

Template-protected edit request on 19 May 2020

[edit]

Please change the two instances of 0 0.9em 0.9em 0.9em in the HTML padding to 0 0.9em. This will avoid a thin line of undesirable space underneath wide-format POTDs and bring this template in line with {{POTD archive}}. — RAVENPVFF · talk · 14:45, 19 May 2020 (UTC)[reply]

 Done Primefac (talk) 14:55, 19 May 2020 (UTC)[reply]

Template-protected edit request on 9 June 2020

[edit]

Please add text-align:center; after both instances of padding:0 0.9em 0 0;. This will ensure that the POTD image is centralized when the Main Page is displayed with narrow widths (e.g. by viewing the page at a high browser zoom level). — RAVENPVFF · talk · 17:30, 9 June 2020 (UTC)[reply]

 Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. Primefac (talk) 19:48, 10 June 2020 (UTC)[reply]

 You are invited to join the discussion at Wikipedia talk:Picture of the day § Alttext. --Ahecht (TALK
PAGE
) 16:05, 27 July 2022 (UTC)[reply]