Last modified: 2008-04-05 01:40:05 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__.
Created attachment 3025 [details]
Created attachment 3026 [details]
fixed some things that didn't look so good.
Created attachment 3027 [details]
fixed logic specified by simentical and fixed a bug I found.
I think this is generally not a good idea.
In what circumstances would this complication be useful?
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.
Sometimes it makes no sense to have an edit link in a level 5 section for example.
Er, why not?
(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.
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
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>.
[[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)
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.