Extension talk:UserPageEditProtection/Archive1

From mediawiki.org

09:07, 4 November 2010 (UTC)

I just installed this on 1.16 and it appears to be just what I needed. Great job! Thank you.

Have a Header

Don't work with MediaWiki 1.11 :( --201.52.31.55 11:04, 28 September 2007 (UTC)Reply

I'm currently looking at this for version 1.11. There was a rewrite of code that affects this extension for version 1.11. --Hoggwild5 00:24, 6 December 2007 (UTC) A new extension version has been provided for MediaWiki version 1.11 --Hoggwild5 17:17, 6 December 2007 (UTC)Reply


I edited the code just a little:

  • Using local $user var instead of global $wgUser as per Manual:Hooks/userCan.
  • Returning true so that future functions that hook userCan can do their thing.
  • Only $result needs to be passed by reference especially since you're not changing $title or $user.
  • Not checking all sub-pages for the user's name. The previous way would allow someone to create/edit a sub-page under someone else's userpage using their own username (e.g. User:NormalUser/SpamUser). --Egingell 09:40, 16 October 2007 (UTC)Reply

Please add compatibility with version 1.11 and ability of choosing namespases.

Eric -- thanks for the contributions. I'm currently looking at rewriting the extension to function in version 1.11. There was a major recoding of Title.php, where this extension hooks in version 1.11 and I'm evaluating the coding differences now. --Hoggwild5 00:46, 6 December 2007 (UTC) A new extension version has now been provided for MediaWiki version 1.11 --Hoggwild5 17:17, 6 December 2007 (UTC)Reply

The compatibility for choosing namespaces -- not sure what you mean here. This extension has a very specific purpose, and that is to protect user pages from being edited from anyone but the user or an admin. It is not meant to provide protection for other namespaces, and I will not be extending the restriction capability beyond the User pages. Thanks! -Hoggwild5 00:16, 21 December 2007 (UTC)Reply

1.12?

Can you make it work with 1.12?

It works with version 1.12. --Hoggwild5 23:33, 22 April 2008 (UTC)Reply

Error

On 1.12 I get the following error: Warning: Cannot modify header information - headers already sent by (output started at /home/hys/public_html/phantopedia/extensions/UserPageEditProtection.php:2) in /home/hys/public_html/phantopedia/includes/WebResponse.php on line 10

What does this mean?

I have this extension running on two site with verson 1.12 with no problems whatsoever. If this error message happens only when you have this extension installed, the most likely culprit is that you've got some garbage somewhere in your script file. This is a common problem in PHP if you've you've got a blank line or a space before the beginning <?php tag. While a blank line before the <?php start tag may look innocent, when processed by PHP, it will turn into an echo statement printing out a blank line.
You can find more on this error by googling "Cannot modify header information".
This is not a problem with the extension itself.
--Hoggwild5 12:51, 25 May 2008 (UTC)Reply

1.13.2

Testing and works fine as far as I can tell now. Sidearm 14:44, 24 December 2008 (UTC)Reply

A question on this extension

I am a user not a programmer. I did set up our company wiki as far as the actual pages are concerned. My boss requested that we limit the ability to edit pages. Approximately how long should it take our IT department to install this? We have version 1.13.3 Booster4324

--About 3-5 minutes total Hoggwild5 08:52, 16 February 2009 (UTC)Reply

Compatibility with Extension:SocialProfile

I use SocialProfile extension which hijacks the "User" namespace and moves user pages to "UserWiki" namespace (e.g. "UserWiki:bsmithme"). It should be an easy modification to this extension to offer the same protection to "UserWiki", should it not? If so, how can this be done? Looking at the code I cannot tell exactly where the namespace is specified. --Bsmithme 00:24, 25 March 2009 (UTC)Reply

The test for the User namespace occurs here:
     if (NS_USER !== $title->mNamespace) {
I am not familiar with the particulars of the SocialProfile extension, but if you can find the index number assigned to the UserWiki namespace you should be able to replace the index number constant NS_USER with the index number (or constant if there has been one assigned) for the UserWiki namespace and the protection should be extended.Lhridley 20:10, 25 March 2009 (UTC)Reply
I did this and it worked like a charm. Thanks so much for the suggestion!! --Bsmithme 20:48, 28 March 2009 (UTC)Reply

Mediawiki version 1.14

It works fine with mediawiki version 1.14. --Jostar 15:31, 8 July 2009 (UTC)Reply

Mediawiki version 1.15.1

works fine

thanks - rudy (14 Oct 2009)

MediaWiki version 1.17

It seems to work OK with MediaWiki version 1.17, should the main page be updated to reflect that? I think this is a fairly important extension that would probably get used more if the main page were updated so people know it works, even though the last update was almost 5 years ago. Badon 06:40, 7 September 2011 (UTC)Reply

Could this easily be extended to UserPageReadProtection?

This is great, and it works!

Could this easily be extended to UserPageReadProtection?

Fustbariclation (talk)

$wgOnlyUserEditUserPage should true by default

Stupid to add this extension and then needing to set $wgOnlyUserEditUserPage to true. Just saying. --Subfader (talk) 15:56, 1 October 2014 (UTC)Reply