Editing
Template talk:Pp
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Upload protection == [[File:Padlock-purple.svg|right]] Is there any banner to indicate that a file has upload protection, e.g. {{para|action|upload}}? — Martin <small>([[User:MSGJ|MSGJ]] Β· [[User talk:MSGJ|talk]])</small> 09:50, 15 January 2016 (UTC) :Not at the moment, at least as far as banners that use [[Module:Protection banner]]. In theory it shouldn't be too hard to add support for <code>action=upload</code> to the module, but it would require a few coding changes. For example, at the moment, the <code>Protection.supportedActions</code> table in the module only contains "edit", "move", and "autoreview". I'm pretty sure all of the padlock templates around on Wikipedia use the module, although there might be other non-padlock templates that check for upload protection. β '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|βͺ talk βͺ]]</sup> 10:25, 15 January 2016 (UTC) ::I'm not aware of any templates for upload protection either. I've just checked and PROTECTIONLEVEL does recognise ''upload'' as an action, so it should be possible to detect automatically. — Martin <small>([[User:MSGJ|MSGJ]] Β· [[User talk:MSGJ|talk]])</small> 10:51, 15 January 2016 (UTC) :::Yes, it's available in Scribunto's [[mw:Extension:Scribunto/Lua reference manual#Title objects|title.protectionLevels]] as well, so that part wouldn't be a problem. Do you know if there are any other requests for this, by the way? It strikes me that we should probably find out whether people want it before working out how to implement it. β '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|βͺ talk βͺ]]</sup> 12:25, 15 January 2016 (UTC) ::::I am not aware of any other requests for this functionality. I just came across an image with the wrong template, and I couldn't find any suitable to replace it with. It might be interesting to find out how many images are upload-protected but not edit-protected, to see if the distinction is likely to be useful or not. — Martin <small>([[User:MSGJ|MSGJ]] Β· [[User talk:MSGJ|talk]])</small> 13:29, 15 January 2016 (UTC) ::::I've just had a look and the purple padlock only seems to be generated by one template: {{tl|protected generic image name}}, and this template has no automatic detection code. — Martin <small>([[User:MSGJ|MSGJ]] Β· [[User talk:MSGJ|talk]])</small> 13:34, 15 January 2016 (UTC) ::::{{ping|Mr. Stradivarius}} How about this purple padlock option? I've just upload-protected [[:File:Suffolk University.jpg]] and I would like to indicate this somehow on the file page. Cheers — Martin <small>([[User:MSGJ|MSGJ]] Β· [[User talk:MSGJ|talk]])</small> 20:00, 2 March 2016 (UTC) :::::{{ping|MSGJ}} Any preferences for a template name? I'm thinking [[Template:Pp-upload]] would probably be a sensible choice. Also, should the template be small by default, or should it be a banner unless you add {{para|small|yes}}? β '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|βͺ talk βͺ]]</sup> 01:44, 3 March 2016 (UTC) :::::Ok, I've gone ahead and added the code to the module sandbox. You can test it by previewing {{tl|pp-upload}} on upload-protected files. Feel free to tweak the banner wording - you can find the bolded text at [https://en.wikipedia.org/w/index.php?title=Module:Protection_banner/config/sandbox&action=edit#mw-ce-l417 line 417 of the config sandbox], and the body at [https://en.wikipedia.org/w/index.php?title=Module:Protection_banner/config/sandbox&action=edit#mw-ce-l520 line 520]. Also, I chose to call the category [[:Category:Wikipedia upload-protected files]], but we can use a different name if you would prefer. And it's not small by default, but that can be changed as well. β '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|βͺ talk βͺ]]</sup> 06:33, 3 March 2016 (UTC) ::::::Thank you. I have tested it on [[:File:Suffolk University.jpg]] and it seems to be working well. I suggest keeping it large by default. — Martin <small>([[User:MSGJ|MSGJ]] Β· [[User talk:MSGJ|talk]])</small> 09:14, 3 March 2016 (UTC) :::::::I've now added upload support to the main module, and switched over {{tl|pp-upload}} to use it. β '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|βͺ talk βͺ]]</sup> 13:23, 3 March 2016 (UTC) ::::::::Great, thank you. Can [[Template:Pp-generic-image]] be incorporated at all? — Martin <small>([[User:MSGJ|MSGJ]] Β· [[User talk:MSGJ|talk]])</small> 13:56, 3 March 2016 (UTC) ::::::::[[Template:Keep local high-risk]] is another one. It would be good if these could be incorporated so they automatically detect the type of protection (upload or edit) — Martin <small>([[User:MSGJ|MSGJ]] Β· [[User talk:MSGJ|talk]])</small> 09:44, 4 March 2016 (UTC) ::::::::{{ping|Mr. Stradivarius}} can you clarify whether these other templates can be incorporated into the module so that they can auto-detect protection level? — Martin <small>([[User:MSGJ|MSGJ]] Β· [[User talk:MSGJ|talk]])</small> 09:22, 9 March 2016 (UTC) :::::::::{{ping|MSGJ}} Sorry for the late reply. Yes, they can be incorporated - it is "just" a matter of updating [[Module:Protection banner/config|the config module]]. You need to add entries for the templates in the "wrappers" table, giving them a suitable first positional parameter (the protection reason). Then you need to add an entry for that reason to the "upload" subtable of the "banners" table. Then you need to create the template page with <code><nowiki>{{#invoke:protection banner|main}}</nowiki></code>. That should be all that's necessary. Actually, try it with the [[Module:Protection banner/config/sandbox|config sandbox]] first (so the template code would be <code><nowiki>{{#invoke:protection banner/sandbox|main}}</nowiki></code>). Then you'll be able to see how things work without worrying about messing up the live templates. I'll set up the main module sandbox to point to the config sandbox instead of the main config so that it will work. β '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|βͺ talk βͺ]]</sup> 12:07, 9 March 2016 (UTC)
Summary:
Please note that all contributions to Mirrorplay: Fae are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
MPFae:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit
Add topic
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information