Difference between revisions of "Issue:Show protected feature"

From FollowTheScore
Jump to: navigation, search
(Protection Indicator)
m (template)
 
(3 intermediate revisions by the same user not shown)
Line 58: Line 58:
  
 
--[[User:C4duser|C4duser]] 22:13, 2 September 2008 (UTC)
 
--[[User:C4duser|C4duser]] 22:13, 2 September 2008 (UTC)
 +
== template ==
 +
 +
I have a template included on all pages. It part of a signature. If this template is not used, it doesn't show up in the navigation. (dpl)
 +
you can do the categorisation with this template.
 +
<pre>
 +
<nowiki>
 +
{{#if: {{PROTECTIONLEVEL:edit}} | [[Image:Lock-icon.png]] This page is protected by the {{#switch: {{PROTECTIONLEVEL:edit}}| author = auteur | sysop = system manager|? }}
 +
</nowiki>
 +
</pre>
 +
 +
I think you can use this protectionlevel variable directly in dpl as well. MW 1.15+
 +
--[[User:Eaglehead|Eaglehead]] 15:03, 23 October 2011 (CEST)

Latest revision as of 14:03, 23 October 2011

Description: New feature request: selection parameter "show protected"
Extension / Version: DPL   /   latest
Type / Status: Change Request   /   open

Problem

Although recent versions of MediaWiki seem to have a special page that shows protected pages, there is no similar feature in DPL. We have a need to be able to easily create and monitor lists of protected pages that meet certain criteria based on category, title, namespace, etc. This would be easy to do if DPL had a "show protected" parameter (set to true, false) that would make it possible to show protected pages based on category, namespace, templates used, and title.

I realize that it would be possible to place protected pages in a "protected" category, but this has two problems:

  1. editors might forget to include this category markup;
  2. the category markup could be included by mistake.

If it were possible to show pages based on actual protected status, this would be a big help for wikis that use protected and unprotected templates extensively.

Our wiki will be open to the public at the end of this year, but we make extensive use of DPL (as well as SMW). One use that is particularly helpful is to have DPL on MediaWiki pages so that when a reader places a word in the search box, when that page doesn't exist, a list of all pages with that word in the title appears. We also use DPL to create custom "special pages", special lists in popup boxes, and much more.

If it would at all be possible to have a "show protected" parameter, it would be most appreciated.

--C4duser 14:43, 1 September 2008 (UTC)

Reply

Is there a "protection" indicator in the MW-page table? Maybe it is hidden in the page_restrictions column .. If you can find documentation about this it shouold be possible within the next four weeks or so ... Gero 19:06, 2 September 2008 (UTC)

Protection Indicator

As far as I can make out, the "protection indicator" in the page table is in the field "page_restrictions" which is defined as a BLOB. I couldn't find any documentation as to what exactly goes in this field, but looking at my own wiki, it seems that the field is either empty (if not protected) or that it has something (?) in it, if it is protected.

Googling the internet, I found this discussion: http://www.nabble.com/Bulk-Protecting-Pages-td4800344.html

that suggests:

"Briefly; the blob field might look something like this:"

edit=sysop:move=sysop 

This seems to make sense; The type of permission (edit or move) could be set equal to the class of users that are given that permission (in this case, sysop).

It seems that this field is only posted when the page is protected. Since a wiki might have various groups with permission to protect pages, it would seem that the way to list edit-protected pages would be to search on the word "edit".

I don't know if this would work for wikis in languages other than English.

From the documentation (http://www.mediawiki.org/wiki/Page_table), it says that the scheme described above was changed beginning with MW 1.10 and substituted by a page restrictions table, which is documented here: http://www.mediawiki.org/wiki/Page_restrictions_table. Here, the necessary data (e.g., "edit") seems to be stored in the pr_type field.

If it is possible to detect edit-protected pages by searching for the string "edit" in the page_restriction field of the page table (before MW 1.10) or the pr_type field of the page restrictions table (MW 1.10 or after), this might be a way to list protected pages.

I don't know whether this is correct or not. It's a guess, but I couldn't find anything more specific. What I think would be most useful would be to search for "edit", rather than "move".

Thanks.

--C4duser 22:13, 2 September 2008 (UTC)

template

I have a template included on all pages. It part of a signature. If this template is not used, it doesn't show up in the navigation. (dpl) you can do the categorisation with this template.


{{#if: {{PROTECTIONLEVEL:edit}} | [[Image:Lock-icon.png]] This page is protected by the {{#switch: {{PROTECTIONLEVEL:edit}}| author = auteur | sysop = system manager|? }}

I think you can use this protectionlevel variable directly in dpl as well. MW 1.15+ --Eaglehead 15:03, 23 October 2011 (CEST)