Extension:ProtectText

ProtectText adds a tag and some wiki markup to make it possible to protect fragments of text or data from being removed or changed. The reason can be diverse, ranging from a simple statement of a person to a measurement taken by a researcher in a laboratory. The extension makes it possible to protect such fragments of text.

Usage
Protected text from the present text will be compared with the previous, and if it differs then the user must have sufficient rights to be able to save the page. This is either given by a basic user rights level when all previous versions of the page are written by one and only one user, or by an alternate and higher level if there are multiple contributors. Normally the user can write on the page without interference in his or her own user space. This makes it possible to write a research-oriented work, and then lock down portions of the work. If a page contains works by multiple contributors, then it will be necessary to let someone with additional and higher righs do the actual protection.

The basic level allows use of the protection markup when no other are writing on the page, and because of this the initial editing should be done in the users own space, and therefore the basic protection levels should be at least similar to the rights to move a page.

The alternate level is where the user must cooperate with other users to protect a page. This will be similar to ordinary protection and should follow the same user rights.

Fundamental operation is to protect large blocks of text, paragraphs of text and small fragments. Large blocks are protected through &lt;protect&gt;, paragraphs through an initial paragraph sign ( § ), and small text fragments through enclosing the text in a special wiki markup ( {§ and §} ).

Protecting large sections of text can be done by the tag &lt;protect&gt;. This can span several subparts of the text, even parts in different sections and inside paragraphs.
 * Protecting large blocks

&lt;protect&gt;This is a test with explicit block-level protection. Such text can run over several lines or even paragraphs.&lt;/protect&gt;

Most of the time it is better to protect small paragraphs instead for large text blocks. Very often this is small quotes from known sources.
 * Protecting paragraphs

§ This is a protected paragraph. This is not a protected sentence.

Very often it is possible to protect only small distinct parts of the text. This can be something like data from a statistical database.
 * Protecting small parts

Within this sentence there is a {§protected fragment§}.

Policy
It is of great importance that there is a clear policy about what and when to protect. If too much of the page is protected then it will become stale and slowly die compared to other articles. If too little is protected it will open up for vandalism that can be very difficult to rectify. Normally a date should be protected, but a description of what happen on that day should not be protected as rewrites would be clearly visible. Likewise a quote of a person can be, and probably should be, protected. An explanation of what this means, or a discourse should not be protected as this might change over time.

Alternatively, if something is labelled as original research and contains no references it should probably be protected with the author used as a reference. If it is public knowledge and can be verified through an existing reference it should probably not be protected.

Installation
The usual: Copy ProtectText.php and ProtectText.i18n.php to a subfolder ProtectText in the extensions folder, then add the following to LocalSettings.php:

Optionally the rights can be changed to limit protectsolecontributor to the group autoconfirmed.

Flaws
Using nowiki tags is still possible around protected text - so if a template has been embedded into a page for example, it's still easy to stop it from being shown.

Alternatives
* [[Research writing reviews] ]
 * Extension:ProtectSection for a block level protection limited to specific user groups
 * Extension:PageSecurity for page level granularity.