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!

UserPageEditProtection
Hi, Lisa

I found the UserPageEditProtection extension does not work on 1.11, Can you update this extension for 1.11? thanks a lot!

Done --Hoggwild5 20:09, 6 December 2007 (UTC)

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)

Article Creation Question
Hey there-

I am an instructor of Animation ,and was wondering a few things about your extension "CreateArticle". I wanted to know how difficult it would be to alter this extension to do the following:

Lets say that my user types in: CharacterDesign, the extension would:

1. Automatically detect the user and use that as the "prefix" parameter.. (ie - User:Sstudent)

2. Secondly, it would need to create the page using the name they type in as the subpage parameter (User:Sstudent/CharacterDesign)

Ultimately, I have restricted the creation of pages for the students to their user and usertalk including subpages. This allows me to keep it all managed easier. I would eventually like to register all of the Courses we are teaching into an index that the student could select from. This would then create the article as a subpage of their User page. To fine tune it, I would have the WIKI automatically list any immediate subpages of the page they are attempting to create their article, so that they could easily keep track of where things are going. I know that this is a tall order, but I thought I would get your input, so that I can let our IT guys know how much work it would be.

Thanks

Scott

--sheriffcicada 18:34, 7 February 2008 (UTC)

Hi Scott:

I think that's definitely doable. It would require modifications to the extension to make it work, but they shouldn't be too difficult.

I'm gonna give you some technical information that may help your IT people get there quicker...

Just off the top of my head:

The user information for the current user gets stored in the global container $wgUser, which is of the class type User (the details on the class are in the script includes\User.php). You could get the current username from $wgUser->mName.

All User pages are stored in the "User:" namespace. So, the CreateArticle script could be modified to get the username of the current user, like so:

The CreateArticle input box that users see on the screen is where they would enter the CourseName of the page they're wanting to create; for example: CharacterDesign.

The CreateArticle script can then be written to take the user input and append it to $ArticlePagePrefix, and use the result to create the new article in the User: namespace as a subpage of their username.

That would be where I would start.

Let me know if there's anything else you need.

--Hoggwild5 20:35, 7 February 2008 (UTC)

Thanks
Hey Lisa-

Thanks so much for your response. I will look into your suggestions. I am definitely not a php guy, but have done some coding in other languages. I imagine you have not tested this new block of code, and functions as a piece pseudo code, right? I will attempt to plug it into the source that I downloaded. Let me know if we could pay you to help develop this extension. I understand if you are too busy, but it could make a huge difference in what we are attempting to put together here. What line would I place this new code into?

One last thing. I have experience with coding languages, but not php. Do you know of a good place to get started to learn how to write extensions. I am aware of how to loop, create variables, flow and syntax, as well as how to declare procedures in MEL. A language very similar to C++, created for Autodesk's Maya, a 3d animation software. I would just need the basics, and it would allow me to not have to bother the rest of the community who have been so generous already.

Thanks

Scott --sheriffcicada 16:29, 9 February 2008 (UTC)
 * Hi Scott
 * Bear with me -- I'm on the road for the next 10 days, but I'll be checking messages online at least once a day, so if I'm not responding right away it's probably because I'm tied up on something and haven't had internet access.

I'm not a programmer by trade, but have some programming education background years ago, and experience with other languages as well; I'm self taught on PHP.

Some of the books that I've found to be the most helpful are the O'Reilly books. In particular:


 * Web Database Applications with PHP and MySQL
 * PHP Cookbook
 * MySQL In A Nutshell
 * PHP In A Nutshell

The last two I use on a regular basis b/c they're great reference books, and they pack easily in my computer bag for travel (not thousands of pages thick, so they're really handy). I would probably start with the first one I listed to familiarize yourself with PHP and MySQL and how they work together.

The second one I use when I'm trying to figure out how to approach a particular process -- it's chocked full of examples on how to do things in PHP. Very useful.

Hope this helps! --Hoggwild5 23:51, 9 February 2008 (UTC)

Sorry to bother you...
Hey Lisa-

I promise not to make a habit of bothering you. I think that I am close. I have learned quite a bit about how these extensions are built. I am running into a problem though. I created a new variable:

'''getCreateBoxOption($createbox->currentUser,$input,'currentUser'); '''

and called that in the $createForm variable/ function:

'''mName}" /> '''

Then I passed that to the title:

$currentUser = $wgRequest->getVal('currentUser');

if(($currentUser) && (strpos($title, $currentUser)!==0)) { $title = $currentUser. "/" . $title; }

I know that I am missing something, but not sure what. I could send you the whole code, but I figure if you can explain to me how to get php to print, I can probably avoid solve the problem myself, and avoid having to bother helpful people like you. I will wait to hear back. I promise, no more spamming!

Thanks a ton,

Scott --sheriffcicada 18:03, 9 February 2008 (UTC)
 * Scott

I did play with this a little, and did get something working but I didn't save the code. Also, this was the first extension I wrote for MediaWiki and it needs to be cleaned up a little.

I think I understand what you're trying to achieve, and I'm happy to help you with this. Let me get back with you a little later on this one.



--Hoggwild5 23:54, 9 February 2008 (UTC)

Couple of Questions for Sheiffcicada
Hey Scott:

I have a couple of questions:
 * How many courses are you ultimately talking about here?
 * How often does this course list change?
 * What sort of timeframe are we talking about here? When do you need this functionality in place?

I'm thinking that instead of using the CreateArticle extension for your purpose that you might be better served with a custom form that your students will see when they edit their user page. This form will have checkboxes or some sort of selection mechanism where they can select the courses they are taking, and by doing so, links are imbedded in their user page for the course subpages. Then, to create the course subpage, they just click on the red link. The rest of the user page would function just like a normal edit page, but the course selection information would be transparent to the students other than seeing links to subpages whenever they have a course page checked.

I've done several custom forms for wiki sites, and have some fairly complicated forms under development for a genealogy site I'm working on where users can enter family tree information into a form and it gets displayed in a specific format when the page is saved without the user having to actually format the data entered.

I'm also looking at your expressed desire to have a page that is readable/editable by the student and the instructor only. This is a little tricky b/c MediaWiki isn't inherently designed to have pages that aren't readable by everyone, so there has been very little effort put into developing read restrictions for MediaWiki (there has been some effort on edit restictions, but none on read restrictions) and my experience with extensions that have that type of restriction has historically been that they don't work very well. However, the more recent versions of MediaWiki have some restricting capability introduced that may make this more feasible. I'm still checking into that one.

If you have something you'd ultimately like to see, let's take a look at it -- we may not be able to get there, but we won't know that for sure if we don't ask for it. MediaWiki does have its limitations, but there's alot of flexibility here too if you know how to manipulate the code.

So, why don't we pie-in-the-sky this little project and let's evaluate what you would like to see if you could have it for feasibility, ok? (Can you tell I used to work in consulting? :D)

--Hoggwild5 05:11, 10 February 2008 (UTC)

Wow...thanks for the feedback
Hey Lisa-

Yeah, ultimately I was thinking of a form, but I wanted to make the process as simple as possible. I was thinking something similar to the Create Article extension, with a bit more functionality. Maybe a drop down menu with the courses that that user is enrolled in. As far as the course listing, it is pretty set in stone. We are looking at a revamp in 1009-2010 schoolyear, but that is still up in the air. If I can get an idea of what you might charge for your services, I could may negotiate with the administration to help me out. They are very supportive of our department, and technology generally. We are attempting to put something (this wiki) together that is totally unique at our school, and I am thrilled with the capabilities of MediaWiki so far. The permissions issues are a little frustrating, but that is a small price to pay for such a robust solution.

Once our department wiki is up and running, there is a possibility of creating a larger framework for the whole school, especially for faculty functions, ie committees, and meetings, policies and the like. We are a far shot from that, but this project started as my idea, and it is really getting legs under it.

It might be best to communicate via email, you are more than welcome to email me through my user.

Thanks

Scott --sheriffcicada 03:24, 12 February 2008 (UTC)

cannot download Monobook CMS Skin
Gallery of user styles

this link http://www.theridleys.org/MonoCMS.zip asks for a password..


 * Sorry about that...my bad. The password protection should be removed now.  Let me know if you have any more problems. --Hoggwild5 23:39, 26 February 2008 (UTC)

Extension CreateArticle
Hello!

Will you work on on the extension CreateArticle? Because it looks very usefull for our wiki.

--Fightgnome 20:56, 30 November 2008 (UTC)

InternalWhitelist
Hi Lisa, my name's Giovanni.

I'm trouble with InternalWhitelist. I've installed it on MediaWiki 1.15 but i doesn't work. I've got this errore message:

Detected bug in an extension! Hook fnWhitelistedNamespaces failed to return a value; should return true to continue hook processing or false to abort.

Backtrace:


 * 1) 0 /usr/share/mediawiki/includes/User.php(1976): wfRunHooks('UserGetRights', Array)
 * 2) 1 /usr/share/mediawiki/includes/User.php(2125): User->getRights
 * 3) 2 [internal function]: User->isAllowed('read')
 * 4) 3 /usr/share/mediawiki/includes/StubObject.php(58): call_user_func_array(Array, Array)
 * 5) 4 /usr/share/mediawiki/includes/StubObject.php(184): StubObject->_call('isAllowed', Array)
 * 6) 5 [internal function]: StubUser->__call('isAllowed', Array)
 * 7) 6 /usr/share/mediawiki/includes/Title.php(1523): StubUser->isAllowed('read')
 * 8) 7 /usr/share/mediawiki/includes/Wiki.php(151): Title->userCanRead
 * 9) 8 /usr/share/mediawiki/includes/Wiki.php(55): MediaWiki->preliminaryChecks(Object(Title), Object(OutputPage), Object(WebRequest))
 * 10) 9 /usr/share/mediawiki/index.php(116): MediaWiki->initialize(Object(Title), NULL, Object(OutputPage), Object(User), Object(WebRequest))
 * 11) 10 {main}

Any ideas?


 * I just posted an answer on the thread you started on the MWUsers.com forums, here:


 * http://www.mwusers.com/forums/showthread.php?16330-InternalWhitelist-extension-Error
 * --Lisa Ridley (talk) 04:35, 17 February 2011 (UTC)