Last modified: 2008-04-05 01:40:05 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 T10515, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8515 - Add keyword __NOEDITTHISSECTION__ to disable edit link on a single section and it's sub-sections instead of the whole page
Add keyword __NOEDITTHISSECTION__ to disable edit link on a single section an...
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.9.x
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: need-parsertest, patch, patch-need-review
Depends on:
Blocks: 2795
  Show dependency treegraph
 
Reported: 2007-01-07 01:41 UTC by Carl Fürstenberg
Modified: 2008-04-05 01:40 UTC (History)
3 users (show)

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


Attachments
the patch (3.58 KB, patch)
2007-01-07 01:41 UTC, Carl Fürstenberg
Details
updated patch (3.57 KB, patch)
2007-01-07 02:00 UTC, Carl Fürstenberg
Details
updated patch (3.98 KB, patch)
2007-01-07 02:29 UTC, Carl Fürstenberg
Details

Description Carl Fürstenberg 2007-01-07 01:41:16 UTC
Frequently on a pages, there is a use of disabling the edit section link on one
or more section to point out that the main purpose of the page is not to edit
that particular section. the available keyword __NOEDITSECTION__ will disable
all edit links on the page and might be too much for the actual purpouse.
Following patch will implement two new keywords, first is __NOEDITTHISSECTION__
which will disable the edit section of current section and all child sections,
seccond is a keyword __FORCEEDITTHISSECTION__ to enable an edit section in a
section that is below an __NOEDITTHISSECTION__.
Comment 1 Carl Fürstenberg 2007-01-07 01:41:32 UTC
Created attachment 3025 [details]
the patch
Comment 2 Carl Fürstenberg 2007-01-07 02:00:16 UTC
Created attachment 3026 [details]
updated patch

fixed some things that didn't look so good.
Comment 3 Carl Fürstenberg 2007-01-07 02:29:58 UTC
Created attachment 3027 [details]
updated patch

fixed logic specified by simentical and fixed a bug I found.
Comment 4 Brion Vibber 2007-01-07 10:26:35 UTC
I think this is generally not a good idea.

In what circumstances would this complication be useful?
Comment 5 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-01-07 19:01:37 UTC
1) Templates that you don't want people visiting including pages to get edit
links for, where you don't want to remove all edit sections from the including
page.  Restricting __NOEDITSECTION__ to affect only the sections created by the
page it's on and not sections created by pages that include the page it's on
would work, but then I guess you couldn't have a template specify that the
entire page it's included into should be uneditable?  Like that template on
Wikipedia that says "don't edit this, these docs are kept on Meta" and
__NOEDITSECTION__s the page.

2) ???
Comment 6 Carl Fürstenberg 2007-01-07 19:07:26 UTC
Sometimes it makes no sense to have an edit link in a level 5 section for example.
Comment 7 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-01-07 19:41:32 UTC
Er, why not?
Comment 8 Carl Fürstenberg 2007-03-06 23:11:11 UTC
(In reply to comment #7)
> Er, why not?

When the distinction of a couple of headings and a list isn't big. edit links
may just clutter up the page.
Comment 9 Rob Church 2007-03-06 23:19:27 UTC
I still consider this a largely pointless, cosmetic change, as it doesn't
prevent the user from altering the URL and editing the section, or just editing
the whole page. It has the potential to increase the inconvenience to the user,
and in general, editors shouldn't be overriding user preferences on a per-page
basis.
Comment 10 Hégésippe 2007-06-14 17:52:16 UTC
For very specific uses, for example as on French Wikinews in order to disable editing the "Notes" section, it is possible:

– to replace the wiki code for the section title

– with a HTML tag including a specific class which disallows editing (by removing display of <span class="edisection">[link]</span>.

See:

[[n:fr:Modèle:Notes]] >>> <h2 class="notes" style="cursor:help" title="Notes modifiables depuis les appels de note dans le texte">Notes</h2>

[[n:fr:MediaWiki:Common.css#Apparence du titre de section « Notes »]]

and an example of use in [[n:fr:Paris Hilton, figure de la « jet set », condamnée à 45 jours de prison#Notes]]

but it is a very specific use (because this kind of section has not to be edited, the wikicode <ref> etc. for the content of the notes being written in another part of the document)
Comment 11 Waldir 2008-04-05 01:40:05 UTC
I suppose that with the new parser preprocessor this is not an issue anymore.

[[meta:Migration to the new preprocessor]] reads:

"XML headers no longer make an edit link

Headers created with <h1><h2><h3>... etc no longer create an editable section. They also do not create a section divide when editing sections. They do however add a level to the TOC as well as an anchor for linking. This allows you to add uneditable sections to a template, and still have editable sections on the page, which isn't possible with __NOEDITSECTION__."

I am given the choice to change the resolution of this bug, but I am not sure I should do it. Anyway, I'm going to be bold and mark it as WORKSFORME. If it is wrong for me (a non-dev) to do it, would someone please undo it. And also, remove that option for regular users, if possible.

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


Navigation
Links