Last modified: 2014-11-17 09:21:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T6375, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4375 - Enable ProtectSection on Wikisource websites
Enable ProtectSection on Wikisource websites
Status: RESOLVED WONTFIX
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Lowest enhancement with 12 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://thecircle.dyndns.org/wiki/inde...
: shell
: 4376 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-24 00:12 UTC by ThomasV
Modified: 2014-11-17 09:21 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
extension file (1.98 KB, text/plain)
2005-12-29 18:03 UTC, ThomasV
Details
extension file (1.89 KB, text/plain)
2006-01-10 13:20 UTC, ThomasV
Details
extension file, corrected after feedback by avar & hashar (2.37 KB, text/plain)
2006-01-10 19:47 UTC, ThomasV
Details
bugfix + "protected" div (1.31 KB, patch)
2006-03-05 09:39 UTC, ThomasV
Details
minor change to previous... (1.20 KB, patch)
2006-03-05 14:55 UTC, ThomasV
Details
Proposed alternative version of ProtectSection (3.70 KB, text/php)
2007-01-29 19:02 UTC, Jim Hu
Details
Bug fix to previous submission. Now handles section edits better. (3.93 KB, text/plain)
2007-02-15 17:02 UTC, Jim Hu
Details

Description ThomasV 2005-12-24 00:12:51 UTC
Some wikimedia projects (Wikisource) would largely benefit from a method to
partially protect the text of an article.

A new syntax would delimit protected sections, e.g. <protect>protected
text</protect>, or maybe <div class="protected">. Protected text may be edited
only by sysops. Other parts of the text may be edited by anybody. 

No modification of the edit window is required in order to implement this. If a
user who is not allowed tries to edit a protected section, he will simply
receive an error message when he submits his text, (or something similar to what
one gets in case of edit conflict). 

Needless to say, unpriviledged users should not be allowed to add new <protect>
tags to articles.
Comment 1 Rob Church 2005-12-24 00:15:33 UTC
*** Bug 4376 has been marked as a duplicate of this bug. ***
Comment 2 Edward Z. Yang 2005-12-25 00:35:33 UTC
You may want to consider, instead, protecting sections, which MediaWiki is far
more aware of and can simply strip out of edit box before other users get to it.

I guess transclusion is too clunky for the task.
Comment 3 ThomasV 2005-12-29 15:21:49 UTC
ok, made a crude implementation of it.
Here is an example: http://thecircle.dyndns.org/wiki/index.php/Apple

I will attach my code once I have figured out how to make it an extension.

Comment 4 ThomasV 2005-12-29 18:03:23 UTC
Created attachment 1247 [details]
extension file

ok, created an extension.
Comment 5 ThomasV 2006-01-10 13:20:29 UTC
Created attachment 1281 [details]
extension file

don't call error_reporting()
don't use private field mOutputType
Comment 6 ThomasV 2006-01-10 19:47:08 UTC
Created attachment 1283 [details]
extension file, corrected after feedback by avar & hashar

implements a new permission
messages can be localized
Comment 7 Antoine "hashar" Musso (WMF) 2006-01-10 20:01:07 UTC
Commited as 'ProtectSection' directory in module 'extensions'.
Comment 8 ThomasV 2006-01-15 18:05:27 UTC
could this extension be enabled on Wikisource? I tested it on my own wiki, and
it was also successfully installed on ihate.org.uk. 
Comment 9 ThomasV 2006-01-20 10:03:07 UTC
following Angela's suggestion, I organised a vote : 
http://wikisource.org/wiki/Wikisource:Vote_on_enabling_the_ProtectSection_extension

Given the tremendous support in favor of this extension, I hereby request its
activation. 
Comment 10 mysekurity 2006-01-22 07:30:21 UTC
Any thoughts about implementing [[Wikipedia:Semi-protection
Policy|Semi-protection]]? This would be useful for things that don't change too
much and get constantly vandalized, like Record Sales or facts that keep getting
incorrectly modified (like Howard Zinn's birthdate).
Comment 11 WmGlesener 2006-03-03 21:23:50 UTC
(In reply to comment #7)
> Commited as 'ProtectSection' directory in module 'extensions'.

Is there a particular way to install this to an existing wiki?  I copied the 
Protect.php script to extensions and pointed the LocalSettings.php to that file. 
When I try to use the <protect></protect> tags, they work when the section is 
edited, but not if the entire article or higher heading is edited. Is there more 
to using this extension than what I did?
Comment 12 ThomasV 2006-03-05 09:39:48 UTC
Created attachment 1436 [details]
bugfix + "protected" div

there was a bug in the regexp, this patche fixes it.

it also surrounds protected text with "<div class=protected> </div>", so that a
user can set his/her preferences to make protected sections visible.
Comment 13 ThomasV 2006-03-05 14:55:57 UTC
Created attachment 1437 [details]
minor change to previous...
Comment 14 Jennifer Zagurski 2006-03-24 09:48:17 UTC
(In reply to Comment number 10)

This is not about vandalism.  Wikisource has a policy of protecting throughly
proof-read sources for integrity issues.  This bug would allow a section to
remain open for editing which could contain a short introduction or other notes.
 For more details read the Scriptorium at the mulitilingual Wikisource as well
as the English policy pages on text integrity.
Comment 15 Rotem Liss 2006-09-23 16:54:58 UTC
Applied the fix to r16619. Please open another bug to ask the ProtectSection
extension to be enabled on Wikisource sites.
Comment 16 Rotem Liss 2006-09-23 16:58:43 UTC
OK - this bug is referenced from some places, therefore I'm reopening it a
request to enable the extension.
Comment 17 Tim Starling 2006-09-24 05:54:10 UTC
The extension doesn't work with section editing.
Comment 18 ThomasV 2006-10-29 16:22:16 UTC
What do you mean by that ? It is not supposed to work that way...
Comment 19 Jim Hu 2007-01-29 19:02:10 UTC
Created attachment 3158 [details]
Proposed alternative version of ProtectSection

I modified ProtectSection to remove Section Edit links for unauthorized users
within the protected block of text.  This involved moving wfStripProtectTags to
run under ParserAfterTidy.
Comment 20 Steve Sanbeg 2007-01-29 21:40:05 UTC
(In reply to comment #19)
> Created an attachment (id=3158) [edit]
> Proposed alternative version of ProtectSection
> 
> I modified ProtectSection to remove Section Edit links for unauthorized users
> within the protected block of text.  This involved moving wfStripProtectTags to
> run under ParserAfterTidy.

That probably won't work well with caching; the presence/absence of links would
reflect the user the request that parsed the version in cache, not the user that
is viewing the cached version.
Comment 21 Jim Hu 2007-02-15 17:02:33 UTC
Created attachment 3226 [details]
Bug fix to previous submission. Now handles section edits better.

The previous version blocked editing of an unprotected section followed by a
protected section.  This version should work better for section-level edits.
Comment 22 Jim Hu 2007-02-15 17:09:51 UTC
(In reply to comment #20)
> (In reply to comment #19)
> > Created an attachment (id=3158) [edit] [edit]
> > Proposed alternative version of ProtectSection
> > 
> > I modified ProtectSection to remove Section Edit links for unauthorized users
> > within the protected block of text.  This involved moving wfStripProtectTags to
> > run under ParserAfterTidy.
> 
> That probably won't work well with caching; the presence/absence of links would
> reflect the user the request that parsed the version in cache, not the user that
> is viewing the cached version.

I don't have caching set up on my wiki, so I can't test this.  

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links