User talk:Hoggwild5

Please leave comments about any extensions I have submitted to www.mediawiki.org on the extension discussion page. If you have questions about MediaWiki code hacks, please leave them on the code hack discussion page. I don't check my personal talk page very often.

Thanks!

Custom Edit Article w/ Fields
Hi Lisa,

Can you elaborate on your concerns over User_talk:Barrylb/Custom_article_editing_form_with_fields? I noticed that the $wgReadOnly parameter is bypassed but what are the other potential issues? Also, is there an easy way to incorporate them?

Any other thoughts would be appreciated. Blckdmnd99 00:07, 4 June 2007 (UTC)

Sure, I'll be happy to. The hook that this extension uses hooks into the beginning of the edit code in Editpage.php. This coding goes through a number of checks and balances both when you start to edit a page (either by using a custom form or by using the MediaWiki edit screen). This extension is performed in place of the processes in EditPage.php. Since it is a replacement for the edit function in EditPage, and the checks and balances in the code have not been included in Barry's code (checking for edit conflicts with another user is a primary one), there is the possibility that data can be lost, or the appropriate warning messages that you would normally see for edit conflicts would not get delivered to the user. The possibility that this would happen gets larger as a site has more users; if your site has relatively few editors, most likely it will perform fine. I have actually implemented a number of forms based on this code on a couple of sites that I have, but I have restricted my editors to approved users only so I know that the chances of conflicts are minimal.

Hope this helps!

--Hoggwild5 02:14, 4 June 2007 (UTC)

Indeed. Thanks for the scoop. Better than learning the hard way. :) I'm going to take a closer look here but do you think it would be possible to incorporate the Editpage.php checks into the customedit code? Or would this cause additional conflicts? If I can come up with anything I'll give you a shout as well.

Thanks much. Blckdmnd99 03:20, 4 June 2007 (UTC)

Well, you could incorporate the code from EditPage.php, but you will need to make sure you understand PHP's object-oriented programming process (for example, all of the "$this->" instructions will need to be changed to "$editpage->") to make it work properly. It will be quite a bit of work. A better method would probably be to make a new class that extends EditPage -- this way all of the functions outside of edit would not have to be recreated, and would instead be part of the new class.

I have sent a request that EditPage.php be rewritten to make it more modular and thus easier to write extensions for, but it hasn't made it on the priority list yet. --Hoggwild5 18:01, 4 June 2007 (UTC)

CreateArticle suggestions
See Extension talk:CreateArticle for the start of some suggestions (and there are other questions by other people that need answering too). —Eep² 11:39, 20 August 2007 (UTC)