MediaWiki talk:Proofreadpage header template

Latest comment: 20 days ago by Uzume in topic Illustrator

Year paramater

edit

Is the reason this doesn't populate the year field in the header because we don't do that for subpages? Could we just pass a parameter from <pages /> that would trigger this behaviour? Prosody (talk) 15:52, 26 August 2011 (UTC)Reply

Not sure by any measure but it appears the year parameter is not a stand-alone entry as author or title are but a sub-part of the notes parameter and called via an if... statement. I suppose if it was a stand-alone, your logic about it coming up on sub-pages as well as the main makes sense and that is probably why it doesn't mirror the current "basic" header template's usage using the stand-alone parameter(s). -- George Orwell III (talk) 18:38, 26 August 2011 (UTC)Reply
Makes sense. I'm not sure if I'm reading the documentation right, but would it be technically possible to add something like | year = {{#if:{{{yearinheader|}}}||{{{year|}}}}} and have <pages yearinheader=1 ... /> automatically work? Prosody (talk) 15:44, 27 August 2011 (UTC)Reply
Try it. The documentation seems more like an after-thought than deliberate so I see no other way to move forward here short of trial & error. Of course you can try touching base with ThomasV first but I don't recall seeing him around much lately if at all. The changes proposed do not, to me, seem to be the kind that would affect the existing usage or application.... if doesn't work we can always revert it without all that drama. -- George Orwell III (talk) 16:52, 27 August 2011 (UTC)Reply
Can't. All MediaWiki pages require the admin bit to edit. Prosody (talk) 20:48, 27 August 2011 (UTC)Reply
Sorry for the long delay - had to go fight off rising flood waters here - Didn't mean to leave you hanging like that.

After thinking about this some and playing with the existing code, I first have to wonder if this will achieve the output I think you're looking for or not.

This header seems to be intended to replace the common {{header}} template altogether and is enabled by adding <pages ... header=1 ... />. In other words, its an either ~ or thing, otherwise you'll wind up with 2 green headers on top of each other. BTW, the year comes up in the notes field when this header is used and is pulling that "info" from the related Index: page (if it exists there). Not sure why but upon a closer look the Section = parameter is married to the current parameter rather than section like the stand-alone header template is crafted to as well. Maybe there is something more to (re)using the standard header parameters and their assigned defaults? ....not a clue here.
So again, I'm not sure you intend on strictly using this method for header generation in the mainspace or not? -- George Orwell III (talk) 08:10, 2 September 2011 (UTC)Reply
Kinda. I've been experimenting with it in the last work I made a mainspace page for (A Leaf in the Storm; A Dog of Flanders and Other Stories) and generally think that centralizing metadata on the index page will end up paying dividends in the future. We're obviously still missing a lot of parts for that (most crucially, the data about how the work ends up organized in the mainspace).
Gotcha. I went ahead and made the year paramater match its sister as a standalone like it is in the familar header template. The previous if... statemennt is now yeardate just in case it will be needed for some yet to be revealed reason down the road. As suspected, the year now also appears on the subpages as well. I'd rather leave that alone rather than introduce yet another not-so-certain nor documented parameter like your yearinheader mentioned earlier. If that's not cool - I'm sure there is a way to make year basepage-specific using an ifeq:... type statement though I'm drawing a blank on exactly what that should be at the moment. -- George Orwell III (talk) 00:34, 3 September 2011 (UTC)Reply
Looks fine. Thank you. Prosody (talk) 19:45, 3 September 2011 (UTC)Reply
Anytime. In case it matters in the future, I tried...
{{#ifeq:{{BASEPAGENAME}}|{{PAGENAME}}|{{!}} year = {{{year|}}}|}}
...to get year not come up on sub-pages and that stopped it alright but the year parameter and value comes up as straight text and thinks it is part of the next parameter on base-pages unfortunately. I'm sure its something small to tweak but it escapes me at the moment. -- George Orwell III (talk) 22:27, 3 September 2011 (UTC)Reply
The current/section thing is odd, maybe there's a reason it is that way, but looking at the history it seems more likely it was an arbitrary decision (note that this wasn't initially a wrapper for {{header}}) and should probably be changed. Prosody (talk) 23:15, 2 September 2011 (UTC)Reply
Not so sure about that - from my limited poking around, the issue here compared to the French, German and other similar WS sites is that they use an all DIV based header template where as we still use a html TABLE based one. My guess is the resulting application here was a work-around more so than what was really intended or desired. -- George Orwell III (talk) 00:34, 3 September 2011 (UTC)Reply

  Comment The year parameter is now bleeding through automatically on all subpages. Can we please work out how that occurred, and rescind that change. The year parameter should typically only show up in the root page, and not show in subpages unless asked to do so from the header tag syntax, not on every transclusion. — billinghurst sDrewth 14:03, 3 May 2021 (UTC)Reply

  Comment @Xover: @Billinghurst: I don't know why some of you don't like the year on subpages but it's quite invaluable for collections and anthologies, can we please restore it (it can be suppressed for certain works by removing the year field in the Index page), otherwise I'll have to go and replace all of my past uses of this template with manual headers that include the year —Beleg Tâl (talk) 14:24, 3 June 2024 (UTC)Reply

@Beleg Tâl: Link to a page demonstrating the problem, with a description of the behaviour you expected and what is happening instead. Xover (talk) 17:11, 3 June 2024 (UTC)Reply
@Xover: Sure.
  • Index:A book of nursery songs and rhymes (1895).pdf is the transcluded Index page. As you can see, it has a Year value of 1895.
  • A Book of Nursery Songs and Rhymes/Introduction is a page that uses the proofreadpage header template and transcludes the above Index. It ought to pull the Year value from the Index page and place it in the year field of the header, resulting in the the text "(1895)" being displayed after the work title. As you can see, this is not the case.
  • The reason this is not the case, is because of this change that you yourself made to this very template, which explicitly prevents the year from being displayed on subpages.
  • Per your change description, this change was made "per request on talk", i.e. because of the discussion that we are posting in right now.
As I said, displaying the year is quite invaluable for collections and anthologies. There are other ways to remove the year from the header (such as by removing it from the Index page), but your change has made it impossible to display the year at all unless we use manual headers. Because of this, I am requesting that we revert the change you made. —Beleg Tâl (talk) 17:46, 3 June 2024 (UTC)Reply
@Beleg Tâl: This edit prevents the year from getting automatically added to subpages, because it would in any case be identical to the year on the top-level page. For a novel or similar it would be redundant, and for a collection that year would (arguably) be incorrect. You should, however, be able to specify the correct year manually by adding |year= to the pages tag.
That being said, I made the change, as the edit summary says, based on the request above. I have no particularly strong opinion on this issue (at least not without thinking a whole lot more about it). If we can agree on a well-defined specification of how this should behave it can probably be implemented without too much trouble (except it might have to wait until we move this to Lua). Xover (talk) 18:43, 3 June 2024 (UTC)Reply
You cannot specify the correct year manually by adding year= to the pages tag, because your code forces it to ignore any value provided to the year parameter. I agree that the year would be redundant for a novel (though I disagree that it should be omitted—after all, the title and author are also redundant). However, for collections, the works are just as often accessed directly or via a redirect or versions page, rather than from the root page, and the year of publication is just as important as the title of the collection in which it is published. (Also note, it's well established that the year parameter must refer to the year of publication, so pulling from the Index page actually prevents it from being incorrect.)
In terms of a "well-defined specification"—I honestly don't mind how it is done, so long as the year can be specified or omitted at will, rather than forcibly removed by the template because of the personal preferences of some editors. —Beleg Tâl (talk) 19:03, 3 June 2024 (UTC)Reply
@Beleg Tâl: If you're trying to say that there's a bug in the change I made you're taking a pretty circuitous route to get there. But to be absolutely clear: if specifying |year= in the pages tag is not working then that is a bug, and not the intended effect of the change. I'll have a look at that as soon as I have the time. Xover (talk) 20:30, 3 June 2024 (UTC)Reply
@Beleg Tâl: As a stop-gap I've added the possibility to provide |section-year= to the pages tag on subpages (example).
This is just a stop-gap to work around the immediate problem, because an actual solution needs 1) more digging into the technical stuff (PRP somewhat limits what we can do here), 2) more thinking about how the functionality should be exposed to users (parameter names, what are the defaults, which parameter means what and is displayed where, etc.), and 3) community consensus about how this should work (on what pages should a year show up automatically, should it be for the work title or the section title, etc.).
But the stop-gap is the best I can do right now. Sorry. Xover (talk) 12:31, 4 June 2024 (UTC)Reply
Thanks :D I appreciate it! —Beleg Tâl (talk) 13:28, 4 June 2024 (UTC)Reply
I have found another cheeky workaround - placing the year in the title field on the Index page :p (see Index:The Real Mother Goose.djvu) —Beleg Tâl (talk) 14:19, 6 June 2024 (UTC)Reply
@Xover could we do the workaround initially suggested by @Prosody above?—"something like | year = {{#if:{{{yearinheader|}}}||{{{year|}}}}} and have <pages yearinheader=1 ... />". That way the year would still be hidden by default as requested by @Billinghurst, but it would now be possible to optionally allow it to pull from the Index page if desired. —Beleg Tâl (talk) 16:27, 23 July 2024 (UTC)Reply
@Beleg Tâl: Technically? Yes, that would work (it needs other magic than what you show here, but it is possible to do). Something we should do? No. Both because it is kludgey implementation-wise, and because have this kind of custom flag parameters is not sustainable for all the datums of relevance.
But I am increasingly leaning towards having a community discussion to settle which bibliographic datums should be repeated on subpages rather than fiddling with code here. Without a good idea of what the behaviour should be, all implementation in code is going to be a hack whatever we do. Xover (talk) 10:22, 24 July 2024 (UTC)Reply
@Beleg Tâl: Hmm. Looking at the examples you give above here and thinking a bit…
Is there—in your opinion—any situation where you would want to not have the year from the Index: page displayed on a subpage? If the year from the Index: is displayed on subpages by default, I mean. And, as a second issue, do you see any (concrete, not hypothetical) use cases for specifying a different year in a subpage than the one pulled from the Index: page? Xover (talk) 10:50, 24 July 2024 (UTC)Reply
In my opinion, if the year is specified on the Index page AND automatic headers are being used THEN the header should use the year value from the Index page, UNLESS manually overridden.
I think that if there was a community discussion, the result would be "no consensus and therefore no change", resulting in it remaining impossible to automatically pull the year from the Index page into the subpage header even for works where that would be desirable. And so I would rather see it done in a way where the header can pull the data if desired, and can not pull the data if not desired. And it's a lot easier (technically) to override data that is pulled, then to override the lack of pullage of data, if you see what I mean.
To answer your question specifically: there is no situation where I (myself) would not want to have the year displayed on a subpage, but Billinghurst's request above shows that there are situations where some other editors (not me) would want to not have the year displayed.
As for the second issue: a concrete example would be a periodical, where the Index page contains scans of multiple issues which are published on different dates (the last periodical I was working on would have a single volume span twelve issues from November of one year to October of the following year). So any automatically populated value should be able to be overridden. —Beleg Tâl (talk) 14:48, 24 July 2024 (UTC)Reply

Author

edit

There is a bug with author link: Chronicles of the Crusades, The Princess of Cleves, The Peat Moor. Marc (talk) 17:59, 20 February 2012 (UTC)Reply

Translator field

edit

Doesn't seem like the translator field in the header is getting populated, either from the Index metadata or direct arguments, though looking at it I can't guess why. Example here: The Alchemy of Happiness (Field). Prosody (talk) 05:46, 27 July 2013 (UTC)Reply

The problem seems to be with the original header template. The author and override_author portions of the template code are not mirrored exactly by the translator, editor, contributor, etc. portions and I'm guessing that is somehow why author works but translator et al. does not (when being pulled from the pages tag command line that is).
I think you'd better post the problem in Scriptorium - I have no idea nor the incentive on how to fix something like that. Its a pointless, redundant feature if there was one, imho, that promotes a fork in our practices while encouraging laziness. -- George Orwell III (talk) 06:46, 27 July 2013 (UTC)Reply
I forgot all about the "other" MediaWiki file... THIS simple change seems to have resolved the translator field "issue". -- George Orwell III (talk) 07:42, 27 July 2013 (UTC)Reply

Notes parameter in pages tag not populating?

edit

In Cornhuskers I'm not having any luck with the notes parameter appending text to the notes field of the header. Prosody (talk) 02:30, 17 September 2013 (UTC)Reply

Doesn't happen when that extended use of <pages> is used to generate the page header (which I why I don't use it). You would need to convert it to standard header, retransclude and add your notes. — billinghurst sDrewth 11:43, 18 September 2013 (UTC)Reply
Same as previous issue directly above - just needed to be added to the "other" list (making more of a mess, of course).
Again: Death to ThomasV wherever he may be. -- George Orwell III (talk) 23:13, 18 September 2013 (UTC)Reply

Illustrator

edit

There seem to be an issue with with {{{illustrator|}}}. You will notice the current code does something different with {{{author|}}}, {{{translator|}}} and {{{editor|}}} vs. {{{contributor|}}} (though I am not aware of such a field in currently available Index pages so this might be a moot point) and {{{illustrator|}}}. Can we get this changed to do the same thing? Namely change:

 | contributor    = {{{contributor|}}}
 | illustrator = {{{illustrator|}}}

to:

 | contributor    = | override_contributor = {{{contributor|}}}
 | illustrator    = | override_illustrator = {{{illustrator|}}}

I am interested in fixing things like the header on Shakespeare's Plays/Romeo and Juliet which uses <pages ... header=1 .../>. Thank you, —Uzume (talk) 20:17, 2 August 2024 (UTC)Reply

I'm trying to figure out a good approach for this and a few other related issues (e.g. the ability to override parameters in pages tags). I am uncertain whether |illustrator= from the Index: should even be passed to {{header}} at all on subpages (and automatic headers are almost exclusively useful on subpages). Xover (talk) 07:56, 3 August 2024 (UTC)Reply
@Xover: Well, regardless, |illustrator= added in 14278531 is not handled properly (whether it goes away in certain situations is a different question). I am not sure we should determine subpages when using <pages header=1 /> (or {{header}} in general even), e.g., a root page might be used for multi-volume set (or pub-series, etc.) and subpages for each volume but each volume is a separate publication each with its own Index: page and backing media/file; quite possibly with different attribution credits, publication dates., etc. However, when |current= aka |section= is specified it can be inferred that we are creating a header for a section (of a publication), i.e., in most cases a "subpage". Frankly, from my point of view <pages header=1 /> is most often used for sections of publications (on subpages) but I would avoid using subpage detection (as was introduced with 12766383) to determine this. In my opinion, it is better to do something like:
 | year           = {{#if:{{{current|{{{section|}}}}}}|{{{year|}}}|{{{section-year|}}}}}
than
 | year           = {{#ifeq:{{PAGENAME}}|{{SUBPAGENAME}}|{{{year|}}}|{{{section-year|}}}}}
Of course having different header displays whether a |section= is specified or not, probably should be done in {{#invoke:header|function}} rather than having such logic here since it applies regardless of whether the header is introduced with <pages header=1 /> or not. —Uzume (talk) 13:23, 4 August 2024 (UTC)Reply