Mailing List Archive

Disabling EditSection
Hi,
I just asked this on IRC, but I got no real solution yet:
I want to disable the display of the EditSection links on mediawiki
pages which are shown to normal (= not authenticated) readers. The
sectional links should only be visible if a user is signed in.

I can not find such a variable setting in DefaultSettings.php (something
like "wgEditSection = false"), from where it could be put into the
LocalSettings.php. The recommendation from IRC was to hack the
Parser.php code, but: Then I would disable it for any and all users,
which goes far beyond my intension.

Any idea?

Thanks, Thommie

--
--------------------------------------------------------------------
THOMAS M. ROTHER * n e t z w i s s e n . d e * D-73728 Esslingen
F.R. Germany, European Union * mailto:t.rother@netzwissen.de
http://www.netzwissen.de * GPG Key from http://wwwkeys.de.pgp.net
Fingerprint B208 E204 4249 4635 19B9 B691 3E73 C8B9 1229 DE4C
---------------------------------------------------------------------
Re: Disabling EditSection [ In reply to ]
Hi,
I havent't received a reply for this yet. Is it correct if I assume that
there is NO way yet to disable EditSection generally?

Thanks,
Thommie

--
--------------------------------------------------------------------
THOMAS M. ROTHER * n e t z w i s s e n . d e * D-73728 Esslingen
F.R. Germany, European Union * mailto:t.rother@netzwissen.de
http://www.netzwissen.de * GPG Key from http://wwwkeys.de.pgp.net
Fingerprint B208 E204 4249 4635 19B9 B691 3E73 C8B9 1229 DE4C
---------------------------------------------------------------------
Re: Disabling EditSection [ In reply to ]
The recommendation was good. Parser.php can be changed to distinguish
between anonymous users and logged-in users for editsection.

As a sample hack in v1.3.7, Parser.php function initialiseFromUser can
be changed from
$this->mEditSection = $user->getOption( 'editsection' );
to
if ($user->getID()) {
$this->mEditSection = $user->getOption( 'editsection' );
} else {
$this->mEditSection = 0;
}

You might want to add a check for a configurable $wgDisableAnonEditSection.

-- Zigger

On Tue, 02 Nov 2004 14:40:01 +0100, Thomas Rother
<t.rother@netzwissen.de> wrote:
> Hi,
> I just asked this on IRC, but I got no real solution yet:
> I want to disable the display of the EditSection links on mediawiki
> pages which are shown to normal (= not authenticated) readers. The
> sectional links should only be visible if a user is signed in.
>
> I can not find such a variable setting in DefaultSettings.php (something
> like "wgEditSection = false"), from where it could be put into the
> LocalSettings.php. The recommendation from IRC was to hack the
> Parser.php code, but: Then I would disable it for any and all users,
> which goes far beyond my intension.
>
> Any idea?
>
> Thanks, Thommie
>
> --
Re: Disabling EditSection [ In reply to ]
Zigger wrote:
> The recommendation was good. Parser.php can be changed to distinguish
> between anonymous users and logged-in users for editsection.

[...]

Thanks for the advice, that helped ;-)

Bye, Thommie
--
--------------------------------------------------------------------
THOMAS M. ROTHER * n e t z w i s s e n . d e * D-73728 Esslingen
F.R. Germany, European Union * mailto:t.rother@netzwissen.de
http://www.netzwissen.de * GPG Key from http://wwwkeys.de.pgp.net
Fingerprint B208 E204 4249 4635 19B9 B691 3E73 C8B9 1229 DE4C
---------------------------------------------------------------------
Re: Disabling EditSection [ In reply to ]
I've since found an easier place to modify default settings for users
in languages/LanguageEn.php in the array $wgDefaultUserOptionsEn.

-- Zigger