Greetings,
I'd like to customize the pre-defined content of a file page. Specifically, one of my users has asked if it could have an "Example" section that can be used to list a number of cut&paste-ready lines, i.e.
[[Media:MyFile.ext|MyDescription]]
I thought perhaps this was part of one of the system messages within the MediaWiki namespace but I'm struggling to find which one.
Alternatively I could try and use the Boilerplate extension perhaps?
Thoughts?
Kind regards, Manu
On Sat, Aug 6, 2016 at 9:42 AM, Emanuele D'Arrigo manu3d@gmail.com wrote:
Greetings,
I'd like to customize the pre-defined content of a file page. Specifically, one of my users has asked if it could have an "Example" section that can be used to list a number of cut&paste-ready lines, i.e.
[[Media:MyFile.ext|MyDescription]]
I thought perhaps this was part of one of the system messages within the MediaWiki namespace but I'm struggling to find which one.
Alternatively I could try and use the Boilerplate extension perhaps?
Thoughts?
Kind regards, Manu
(I'm not sure, but...) The pre-filled content[1] seems to come from wpUploadDescription (found via examining page-source) which is mentioned at https://www.mediawiki.org/wiki/Manual:Parameters_to_Special:Upload Does that help?
[1] e.g. https://commons.wikimedia.org/w/index.php?title=Special:Upload&uploadfor...
Thank you Nick for your reply.
wpUploadDescription is not something I can override in LocalSettings.php... can I?
From what I understand that's a parameter I could pass in Special:Upload
through the URL. And it doesn't affect the file page resulting from the upload, it only affects Special:Upload itself, right?
I'm surprised there is no easy way to customize this via one of the bazillion Mediawiki:messages.
Thank you again though.
Kind regards,
Manu
On 8 August 2016 at 21:12, Nick Wilson (Quiddity) nwilson@wikimedia.org wrote:
On Sat, Aug 6, 2016 at 9:42 AM, Emanuele D'Arrigo manu3d@gmail.com wrote:
Greetings,
I'd like to customize the pre-defined content of a file page.
Specifically,
one of my users has asked if it could have an "Example" section that can
be
used to list a number of cut&paste-ready lines, i.e.
[[Media:MyFile.ext|MyDescription]]
I thought perhaps this was part of one of the system messages within the MediaWiki namespace but I'm struggling to find which one.
Alternatively I could try and use the Boilerplate extension perhaps?
Thoughts?
Kind regards, Manu
(I'm not sure, but...) The pre-filled content[1] seems to come from wpUploadDescription (found via examining page-source) which is mentioned at https://www.mediawiki.org/wiki/Manual:Parameters_to_ Special:Upload Does that help?
[1] e.g. https://commons.wikimedia.org/w/index.php?title=Special: Upload&uploadformstyle=basic
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
There are certain messages you can use, such as [[MediaWiki:filehist-help]], [[mediawiki:metadata-help]], but they aren't really in ideal position.
On commons, there is some user js that is sort of for this purpose: https://commons.wikimedia.org/wiki/MediaWiki:Gadget-Stockphoto.js (and associated .css) which adds a "Use this file on a wiki" button with examples. Similarlly I think the MediaViewer extension also has a button for examples.
If you're up for making your own extension, Check out the 'ImagePageAfterImageLinks' hook.
e.g. Something along the lines of $wgHooks['ImagePageAfterImageLinks'][] = function ( $page, &$html ) { $html .= wfMessage( 'image-page-extra-stuff' )->inContentLanguage()->parse(); }; Untested, but in theory, placing that in LocalSettings.php would add a new message named [[MediaWiki:image-page-extra-stuff]] to every file page.
-- bawolff
On Sat, Aug 6, 2016 at 4:42 PM, Emanuele D'Arrigo manu3d@gmail.com wrote:
Greetings,
I'd like to customize the pre-defined content of a file page. Specifically, one of my users has asked if it could have an "Example" section that can be used to list a number of cut&paste-ready lines, i.e.
[[Media:MyFile.ext|MyDescription]]
I thought perhaps this was part of one of the system messages within the MediaWiki namespace but I'm struggling to find which one.
Alternatively I could try and use the Boilerplate extension perhaps?
Thoughts?
Kind regards, Manu _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Addendum to my last message.
I might have misinterpreted your message. I assumed you wanted to modify the contents of the file page, without adding stuff to the actual file description. If you want to change the default for the form on Special:Upload, try editing [[[mediawiki:upload-default-description]]. Special:Upload also responds to the ?wpUploadDescription=foo url paratmer.
-- bawolff
On Sat, Aug 6, 2016 at 4:42 PM, Emanuele D'Arrigo manu3d@gmail.com wrote:
Greetings,
I'd like to customize the pre-defined content of a file page. Specifically, one of my users has asked if it could have an "Example" section that can be used to list a number of cut&paste-ready lines, i.e.
[[Media:MyFile.ext|MyDescription]]
I thought perhaps this was part of one of the system messages within the MediaWiki namespace but I'm struggling to find which one.
Alternatively I could try and use the Boilerplate extension perhaps?
Thoughts?
Kind regards, Manu _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org