Template talk:Pp-template
![]() | Template:Pp-template is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
![]() | Templates | |||
|
View Source
[edit]{{editprotected}} I would like to know if you can put the code of the template onto the page, because I need to get the template onto my wiki on my website. --Redbear81 17:15, 24 July 2007 (UTC)
- You can view the source of the template. Click the "edit" or "view source" tab. — Carl (CBM · talk) 17:57, 24 July 2007 (UTC)
Request for edit : W3C standard
[edit]{{editprotected}}
Please use <td valign="middle"> instead of <td valign="center" > to be valid XHTML 1.0 Transitional.
- Aither (Talk to me) 20:58, 10 April 2007 (UTC)
- done. CMummert · talk 00:06, 11 April 2007 (UTC)
Server load
[edit]{{editprotected}}
Could we add to this template a notice, to admins, to be aware that when editing templates that are widely transcluded,
- All pages that use it will not be updated instantly
- A fair amount of server load could result from editing templates that are very widely used, so while we shouldn't worry about performance, there is no reason to not exercise caution. Preferably discuss changes on the talk page first.
This probably needs to be summarized a bit more pithily. GracenotesT § 00:25, 12 June 2007 (UTC)
- Seems OK to me. Not a lot of admins edit templates, though, so individual counseling is probably adequate. — Carl (CBM ·&nin education). I've been going through Category:Wikipedia protected edit requests and find some awareness of this problem, like ais523's comment here. What's more, I'm not sure this is appropriate since many of these templates are substituted rather than transcluded. Look at this list for example.--Chaser - T 19:47, 12 June 2007 (UTC)
- Here's a proposal. — Carl (CBM · talk) 14:55, 12 June 2007 (UTC)
- I agree with Carl and Chaser. The primary purpose of this template is to indicate that the template has been locked to prevent vandalism. If an admin needs to be educated regarding not editing a high-use template needlessly, then let's do that instead. Cheers. --MZMcBride 00:48, 13 June 2007 (UTC)
- I'm going to disable the editprotected request. Gracenotes, how about adding something to the administrator's how-to guide WP:AHTG? — Carl (CBM · talk) 01:25, 13 June 2007 (UTC)
== They're not protected from e {{editprotected}}
It should say "protected from editing by non-administrators." A.Z. 04:13, 30 August 2007 (UTC)
- Not done. The template does imply that administrators can edit the article. No need to make it longer than it al20:15, 2 September 2007 (UTC)
FiveTwo words longer is too much? I am a person reading the template and I feel there is a need to make it clear and explicit that the page is not protected from editing, but that only a specific group of editors are unable to edit it, and it doesn't bother me if it becomesfivetwo words longer. A.Z. 20:20, 2 September 2007 (UTC)
- None of the other protection tags make this specification. I don't see a need to specify that admins can edit protected pages, as there doesn't seem to be any confusion about this fact. ---R]] 20:28, 2 September 2007 (UTC)
- I feel the form "protected from editing by non-administrators" is better than "protected from editing", and then some time after that the template tells you "by the way, despite the fact that this page is protected from editing, you can ask an administrator to edit it." This is confusing. Administrators would not be able to edit a page that is "protected from editing," but they would be able to edit a page that is "protected from editing by non-administrators." A.Z. 20:44, 2 September 2007 (UTC)
- First "protected from editing by non-administrators" is not precisely correct. I believe that bureaucrats, stewards, and the like, would all be able to edit a protected page. And, no, I am not suggesting you expand the list of types of editors to whom the protection does not apply. In other discussions you have started, A.Z., about similar abilities that admins (and other "titled" editors) have, the point has been made that it would be an unusual circumstance where an admin, on his/her own, or at the request of a single non-admin, would make a change to a protected page. If enough non-admins make the request, of course, there would be concensus for the change and then an admin might either override the protection or, indeed, remove it. The articles Administrators and Wikipedia:Protection policy are both readily available to any editor who is not sure about who can do what to what, and any admin will answer a question about how she/he is prepared to use the tools. Bielle 22:47, 2 September 2007 (UTC)
- First, I believe that bureaucrats et cetera awell, that only have extra titles/tools.
- You said that "it would be an unusual circumstance where an admin, on his/her own, or at the request of a single non-admin, would make a change to a protected page." So, to you, a page being protected doesn't mean at all that only administrators can edit it: it means that no-one, including administrators, can edit it unless there's a consensus for the change. If and only if there is consensus, then an administrator can "override the protection," that applies to him/her, the administrator, as well. In this case, the current phrase "protected from editing" would be a correct way to explain the situation.
- If the above is true, then the page Wikipedia:Protection_policy should say something about it, but it doesn't. I don't know if your theory is true, but I believe that many users disagree that it is. I remember when the reference desk guidelines talk page was semi-protected, everyone continued editing it normally, though that was a talk page, and perhaps the rule is different to non-talk pages. A.Z. 23:19, 2 September 2007 (UTC)
- Semi-protection is not the same as protection. As I understand, semi-protection only stops new editors from editing, and then only for a few days. (The talk page is often left open so that matters can be resolved in an effort that will result in the lifting of the protected status.) What admins can do, and what, in practice, they do do, are often quite different. An admin can (i.e. has the tools to) edit a protected page on his/her own behalf or at the request of another; however, in practice, admins don't do such things lightly or very often. (It's often an ethical matter: just because you have the right to do something doesn't mean it is the right thing to do.) That's my experience, and that, I believe is what has been said a number of times about this issue. That there are wayward admins from time to time, or unusual circunstances, is true, but that it happens often, I would doubt. Bielle 00:38, 3 September 2007 (UTC)
- Shouldn't the page Wikipedia:Protection_policy say that? A.Z. 00:52, 3 September 2007 (UTC)
- Having looked at Wikipedia:User access levels, it would appear that I was wrong about bureaucrats et. al. being able to protect pages. That surprises me, but I will assume that the chart shown there is correct. It does show who can do what, down to the smallest detail. however. I was also wrong about who is limited in semi-protection; the barrier extends to all non-registered users, too. Teach me to write before I check. To answer your immediately preceding question, no, I don't think Wikipedia:Protection_policy needs to say more than it does. Such an addition smacks of Instruction creep when the process follows quite logically from the requirement for concensus for change in disputed areas. Bielle 03:02, 3 September 2007 (UTC)
Interwiki
[edit]Please add: no:Mal:Pp-template --Lipothymia 18:54, 7 September 2007 (UTC)
- Moved to no:Mal:Pp-mal. Please add. Nsaa 10:49, 8 September 2007 (UTC)
Please explain use of imagemap here
[edit]I am happy for someone to tell me how obvious it is. However I cannot see a reason at this point for the <imagemap></imagemap> pair of tags. Always happy to learn something new. Fiddle Faddle 17:34, 31 October 2007 (UTC)
- Long gone. Rich Farmbrough, 16:10, 9 September 2009 (UTC).
Documentation
[edit]{{editprotected}}
Please use {{documentation}} 16@r (talk) 16:11, 14 February 2008 (UTC)
Done - Nihiltres{t.l} 16:46, 14 February 2008 (UTC)
Adding only templates to Category:Protected templates
[edit]Would anyone object to the following code being added after "categories="
{{#switch:{{NAMESPACE}} |{{ns:10}}={{{categories|[[Category:Protected templates|{{PAGENAME}}]]}}} |#default=}}
So that non-templates (specifically userspace test pages) are not added to Category:Protected templates. ~ User:Ameliorate! (with the !) (talk) 10:25, 25 November 2008 (UTC)
- This template is used both on high-risk templates, and on high-risk images. Usually images used in high-risk templates or in system messages. And such images also need to be categorised as protected.
- Of course, we should probably make a separate category for the protected images, perhaps named Category:Wikipedia protected images, and the template should then categorise the images there.
- And yes, the documentation needs updating since it should tell that this template can be used on images too.
- --David Göthberg (talk) 12:09, 25 November 2008 (UTC)
- There is such a category now, and pp-protected uses it.. Rich Farmbrough, 18:50, 9 September 2009 (UTC).
Merge and automate
[edit]I haven't been involved in these templates for a long time, and probably won't have the time to help out here. But I have an idea/wish/request:
I see that MediaWiki now has a new feature that makes it possible to detect what protection level a page has from template code. And I see that {{pp-semi-protected}} was merged into {{pp-protected}} and that {{pp-protected}} now uses the new feature to automatically behave the right way.
So, I assume that {{pp-semi-template}} now can be merged into {{pp-template}}. I would like that if that is done the template is coded in such a way that it can be used on non-protected templates too, that is that it displays nothing on such pages. Since then we can add it to the {{documentation}} template, which is used in the noinclude area of many template pages. That would mean that most/many template pages would automatically get the right padlock etc. when an admin changes the protection level of a template page, without the admin having to think of adding or removing {{pp-semi-template}} and {{pp-template}}. (They often forget to do that...)
--David Göthberg (talk) 14:55, 5 March 2009 (UTC)
- I agree, and at the same time the target templates should use PP. I will look into it. Rich Farmbrough, 15:56, 9 September 2009 (UTC).
- Looks like botht can be replaced wit pp-protected? Rich Farmbrough, 17:36, 9 September 2009 (UTC).
- AH this one defaults to the padlock only. Rich Farmbrough, 17:38, 9 September 2009 (UTC).
- I see that {{pp-semi-template}} has been merged into {{pp-template}}. But this template still complains when it is used on an unprotected template. Anyway, I have now instead added logic to {{documentation}} so it automatically adds this template, but only to protected templates. This means we no longer need to manually add this template to protected templates, since all protected templates should use {{documentation}}. See also Template talk:Documentation#Protection template.
- --David Göthberg (talk) 07:19, 3 January 2010 (UTC)
- This looks like a good solution, but I have two points to make:
- This template can also be used for images used in high-risk templates, so the template itself should not be completely deprecated even if all templates are made to use {{documentation}}.
- Has there been any effort to remove {{pp-template}} from pages which have both {{documentation}} and {{pp-template}}? When it's implemented, it might be a good idea to try to highlight any templates which have both, and fix those instances.
- {{Nihiltres|talk|edits}} 21:45, 3 January 2010 (UTC)
- This looks like a good solution, but I have two points to make:
- No worries, {{pp-template}} is not deprecated. See the text I just added to Wikipedia:Protection policy#Templates: diff.
- By the way, that this template is also used for protected images is constantly causing confusion. We really should have a {{pp-file}} for that.
- And yes, we should clean up cases that use both {{pp-template}} and {{documentation}}. I can automatically detect and list those cases. But I think it will be better to check all templates listed in Category:Wikipedia protected templates, since then we can at the same time add {{documentation}} if it is lacking. (Protected templates should use {{documentation}} so non-admins and IP-users can edit the unprotected /doc, categories and interwikis.)
- I have not started doing that clean-up yet, since I want to wait some days to see if anyone has any objections to this auto-adding before we go around editing all those templates. And I will need help with it, since it is 2,537 pages...
- --David Göthberg (talk) 06:30, 5 January 2010 (UTC)
- Is there any particular reason that this template complains when it is placed on an unprotected page? Why can't it just stay invisible, then if the template is ever reprotected it will automatically activate again. — Martin (MSGJ · talk) 22:18, 18 January 2010 (UTC)
- So that wrong transclusions can be tracked, so that normal protection categories don't contain wrong answers, and so that Whatlinkshere remains useful. {{Nihiltres|talk|edits}} 22:57, 18 January 2010 (UTC)
- Is there any particular reason that this template complains when it is placed on an unprotected page? Why can't it just stay invisible, then if the template is ever reprotected it will automatically activate again. — Martin (MSGJ · talk) 22:18, 18 January 2010 (UTC)
- Nihiltres: Well, {{pp-template}} should of course only categorize a template as protected if it actually is protected. And we can make it categorize in a (perhaps hidden) tracking category when used on non-protected templates. And "What links here" is not really necessary when we have those two categories. So I think we should make it so {{pp-template}} can be left even when unprotecting a page.
- --David Göthberg (talk) 09:45, 19 January 2010 (UTC)
- I thought the behaviour was that if a protection template is incorrectly placed the only output should be the error category, correct? That category, Category:Wikipedia pages with incorrect protection templates, is a hidden category as far as I'm aware. If templates are still outputting their normal categories for incorrectly tagged pages that should be fixed (and I'll take a proper look at it once I'm home), but otherwise I see no difference in your suggested behaviour from the current behaviour. I do think that it's preferable to remove templates from pages to which they do not apply, but that's a preference that can be ignored, if we don't mind the tracking category getting a bit big at times. Having the WhatLinksHere data is just a bonus, but I don't think that it should be treated entirely as redundant to the category-based tracking. {{Nihiltres|talk|edits}} 17:26, 19 January 2010 (UTC)
- Nihiltres: I checked again. When {{pp-template}} is on a non-protected template page it adds Category:Wikipedia protected templates, which both you and I seem to agree is wrong.
- It also adds Category:Wikipedia pages with incorrect protection templates which as you say is hidden, I didn't notice that. But many of us see the hidden categories. I think that category name is wrong for this template, since I think it should not be "incorrect" to leave this template when unprotecting a template. So we need a less strong name for that tracking category. (But that category is also used for the other protection templates, when they are used on non-protected articles etc, and those templates should perhaps continue using that category name.)
- This template is also used for protected images. And it has the same problem there, when used on a non-protected image page it still categorizes into Category:Protected images which is wrong. (It also adds Category:Wikipedia pages with incorrect protection templates, but for image pages I don't have a point of view if we should use that category name or a softer one, since I don't know if we should allow this template to be left on unprotected image pages.)
- --David Göthberg (talk) 01:17, 20 February 2010 (UTC)
For pages that are not protected
[edit]{{editprotected}}
Template:Pp-template/doc said, "This template does not show on pages that are not protected, instead it reports an error." However I can find some sandbox templates such as Template:Chembox image2/sandbox and Template:Film/Core/sandbox which are not protected but a red padlock is shown at the top right corner and no error is reported. Please fix it. --Quest for Truth (talk) 18:03, 22 April 2010 (UTC)
- I believe this is a feature not a bug. It is not desirable that putting {{pp-template}} on a /sandbox template would produce an error, because usually sandboxes are synchronised with their live templates and it is a pain to have to keep adding and removing this. I'm not sure if there is a way to suppress the padlock without reporting an error. — Martin (MSGJ · talk) 19:22, 22 April 2010 (UTC)
- It is reasonable to keep {{pp-template}} in a /sandbox template and not to report error, but the padlock shouldn't appear as it is misleading. Perhaps the {{pp-meta}} which is used by pp-template should also be modified? --Quest for Truth (talk) 16:49, 24 April 2010 (UTC)
- I do not think it is misleading and removing the template from the sandboxes is not a good idea as usually, they are cut and past copies that are then modified and tested with new code before being copied back. Removing it from the sandboxes will inevitably lead to instances of it being blanked out when the sandbox version is copied into the live template. Quite frankly anyone who is confused by the appearance of a padlock on the screen when the sandbox is not locked should not be editing sandbox code. -- PBS (talk) 21:34, 1 October 2010 (UTC)
Needed for sub-templates?
[edit]For helper templates (or sub-templates) that are transcluded from a main template (or one of the other sub-templates), is this template notice required, especially if the helper template requires it to be invoked from the main or another related sub-template? That is, the sub-template is not something that would be normally placed directly into an article. RedWolf (talk) 00:51, 29 June 2010 (UTC)
Edit request
[edit]{{editprotected}}
Go to Wikipedia:Village pump (proposals)#WP:Accessability ~~EBE123~~ talkContribs 22:51, 25 March 2011 (UTC)
Not done Come back when you have consensus... —GFOLEY FOUR— 05:29, 26 March 2011 (UTC)
Edit request on 25 August 2013
[edit]![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change:
|small={{{small|yes}}} |demospace={{{demospace|}}}
To:
|small={{{small|yes}}} |right={{{right|}}} |demospace={{{demospace|}}}
This allows use of the new pp-meta parameter. Jackmcbarn (talk) 19:37, 25 August 2013 (UTC)
Done --Redrose64 (talk) 21:22, 25 August 2013 (UTC)
Update for template protection
[edit]@Equazcion and PinkAmpersand: Now that {{pp-meta}} has been updated, could you guys review the sandbox code here and make any changes that are needed (I haven't yet updated it to match your changes to pp-meta). - Evad37 (talk) 04:28, 19 October 2013 (UTC)
- Was already on it. :) To avoid edit conflicts, do the rest of y'all mind if I take the first stab? — PinkAmpers&(Je vous invite à me parler) 04:31, 19 October 2013 (UTC)
- Scratch that. Got distracted, too sleepy now. I'll be along with nitpicks later, I'm sure. — PinkAmpers&(Je vous invite à me parler) 05:19, 19 October 2013 (UTC)
- This should probably be done as well, as the predominate template protection will be template-protect now instead of indef (in practice it seems the default only comes into play when protection is present but of an unrecognized type, and in that scenario I think template-protect is the way to go from now on).
- I'm not really keen on Evad's current sandbox version (even though it works and I appreciate his efforts, plus it gave me a head start in making my version which merely tweaked or built on his). It appends a couple of "X" characters before parameters where he'd like to use pp-meta's defaults; essentially it seems to pass unrecognized parameters to pp-meta when template-protection is present, which makes pp-meta use its defaults. This is actually a rather clever way to do it, but it's also a bit hacky and could cause trouble down the line, if someone decided to add error messages for unrecognized parameters for instance, or other unforeseeable circumstances. It also seems to mess up testing via the demolevel parameter (Template:Pp-template/testcases) barring some more code to handle that.
- We could get pp-template to use pp-meta's default messages in more legitimate ways, but it would require making the code a bit more complex, and I don't think it's really necessary. Pp-template is already built for templates and already defaults to the high-risk messages. I made a second sandbox (Template:Pp-template/sandbox2) that you can see in effect here: Template:Pp-template/testcases2. I kept pp-template's logic and messages more or less intact -- the only real changes were to add the passing of the template type as Evad did, switching the default as I described above, and to add the word "permanently" as we did at pp-meta (the word comes out within the "protected" link rather than outside it as at pp-meta; changing that would again complicate the code more, and I think it looks fine this way anyway).
- So that's my story, let me know your thoughts. PS. I initially made changes to /sandbox but reverted them, so now that should be purely Evad's code for comparison -- My version is at /sandbox2. equazcion → 13:12, 19 Oct 2013 (UTC)
- Also what are our thoughts on module protection? Should we create a separate Template:pp-module or use pp-template? equazcion → 13:32, 19 Oct 2013 (UTC)
- Your code is probably better for the long term. I made a slight adjustment[1] so that "semi-protected" and "move-protected" would show up in the box instead of "semi-permanently protected" and "move-permanently protected". As for modules, I think this template should handle them – it is easy enough to detect namespace and switch text between "Template" and "Module" – and maybe just make Template:pp-module a redirect to here. - Evad37 (talk) 07:21, 21 October 2013 (UTC)
- Just curious, what are those empty nowiki tags for? equazcion → 13:42, 22 Oct 2013 (UTC)
- To preserve the space:
{{#switch:{{{1}}}|s=semi-|p=permanently }}protected
⇒|1=s
→ semi-protected /|1=p
→ permanentlyprotected{{#switch:{{{1}}}|s=semi-|p=permanently}} protected
⇒|1=s
→ semi- protected /|1=p
→ permanently protected{{#switch:{{{1}}}|s=semi-|p=permanently<nowiki> </nowiki>}}protected
⇒|1=s
→ semi-protected /|1=p
→ permanently protected- There are other ways of doing it:
{{#switch:{{{1}}}|s=semi-|p=permanently }}protected
⇒|1=s
→ semi-protected /|1=p
→ permanently protected{{#switch:{{{1}}}|s=semi-|p=permanently }}protected
⇒|1=s
→ semi-protected /|1=p
→ permanently protected- and of course
{{#switch:{{{1}}}|s=semi-protected|p=permanently protected}}
⇒|1=s
→ semi-protected /|1=p
→ permanently protected - - Evad37 (talk) 14:02, 22 October 2013 (UTC)
- Just curious, what are those empty nowiki tags for? equazcion → 13:42, 22 Oct 2013 (UTC)
- Your code is probably better for the long term. I made a slight adjustment[1] so that "semi-protected" and "move-protected" would show up in the box instead of "semi-permanently protected" and "move-permanently protected". As for modules, I think this template should handle them – it is easy enough to detect namespace and switch text between "Template" and "Module" – and maybe just make Template:pp-module a redirect to here. - Evad37 (talk) 07:21, 21 October 2013 (UTC)
- I created Template:Documentation/sandbox2 to test these changes as they'd actually affect the calls from the documentation template. You can basically pick any template-protected template (eg. from here) and use preview with {{documentation/sandbox2}} in place of {{documentation}} to see the effects.
- As far as module testing goes, we're presented with kind of a unique problem. Documentation and protection templates are placed onto module pages via "magic" from on-high. I don't fully understand it but via IRC I found out that it's either done directly via extension code or via MediaWiki:Scribunto-doc-page-show, or some combination. Even if it's purely the MediaWiki: page, and even if we could duplicate that to call pp-template/sandbox2, there would be no way I'm aware of to actually see it in use on a module page.
- Pinging Mr. Stradivarius, Technical 13, Anomie, Matma Rex for suggestions on the module testing issue, as it's frankly beyond me. equazcion → 20:45, 22 Oct 2013 (UTC)
- Sorry, I am not a Lua guy. Matma Rex talk 21:18, 22 October 2013 (UTC)
- You're right, as far as I'm aware - there's no way to test the code on a module page on enwiki before we deploy it. You could test the same setup on a test wiki instead. I seem to remember that this is possible with Labs? — Mr. Stradivarius ♪ talk ♪ 21:44, 22 October 2013 (UTC)
- We could just implement it and tweak as needed. There aren't all that many modules, let alone protected ones, and this wouldn't actually affect module use -- only the display when someone navigates to a module page. What do you think? equazcion → 21:49, 22 Oct 2013 (UTC)
- Thinking about it, I think the module-space testing is a bit of over-caution. I'm gonna wait a couple hours and if no one has posted an objection I'm going to implement Template:Pp-template/sandbox2. equazcion → 22:16, 22 Oct 2013 (UTC)
And, done
[edit]I made the edit. It seems to be okay except for the topicon rollover text -- it currently produces "...indefinitely permanently..." equazcion → 00:22, 23 Oct 2013 (UTC)
- Found the issue and made the correction at Template:Pp-template/sandbox2. Not sure if I should be making a quick successive correction though so I'll wait a bit to deploy that. equazcion → 00:29, 23 Oct 2013 (UTC)
- The queue seemed to be done so I made the correction. Let me know if anyone sees issues. equazcion → 00:53, 23 Oct 2013 (UTC)
Proposal to convert this template to Lua
[edit]There is currently a proposal to convert this and other protection templates to Lua at Module talk:Protection banner#Proposal to convert all protection templates to use this module. Please join this discussion over there if you are interested. — Mr. Stradivarius ♪ talk ♪ 23:48, 22 July 2014 (UTC)