[Mediawiki-l] Making it easier to add

Muzaffer Ozakca mozakca at indiana.edu
Wed Jan 26 15:59:16 UTC 2005


Let me explain shortly what I did to make it easier (for some of our users)
to create documents in our wiki:

. I modified SpecialUpload.php to make it get the title of the page from the
user. I put this code into a new special page.
. I added this special page using the mechanisms explained in other
documents to the list special pages
. After getting the page title submitted by our special page, I created the
URL on the fly doing:

    // this is copied from some other part of mediawiki
    $filtered = preg_replace ( "/[^".Title::legalChars()."]/", '-',
$this->mComponentTitle );
    $url = '/wiki/index.php?action=edit&title=' . $filtered;
    $wgOut->redirect( $url );

. This brings the page with the given title if it already exists or opens a
new empty edit box
. I added the link to the special page to the navigation box

This is basically similar to modifying the URL by hand as suggested before.

Hope this helps. But there are discussions among our users that this creates
dangling pages not linked to from anywhere and therefore against the spirit
of wikis. Although, there is nothing stopping anybody to use the "right" way
of creating new pages, you should keep this issue in mind.


> -----Original Message-----
> From: mediawiki-l-bounces at Wikimedia.org [mailto:mediawiki-l-
> bounces at Wikimedia.org] On Behalf Of John Spikowski
> Sent: Tuesday, January 25, 2005 7:25 PM
> To: MediaWiki announcements and site admin list
> Subject: RE: [Mediawiki-l] Making it easier to add
> 
> I can see the url method as a quick way under program control to generate
> the title pages one would need to move an existing project. Is there a way
> to add content under program control to pages other then a remote ODBC
> interface into mySQL?
> 
> John
> 
> -----Original Message-----
> From: D_C [mailto:d3ntaku at gmail.com]
> Sent: Monday, January 24, 2005 11:54 PM
> To: MediaWiki announcements and site admin list
> Subject: Re: [Mediawiki-l] Making it easier to add
> 
> 
> > I found that the easiest way to create a new page is type in the name of
> the
> > new page after the topic= in the url. Don't forget to use the "_"
> charater
> > as for any spaces in the page title.
> >
> > Do I win the prize for the least number of steps? ;-)
> 
> I think you do.. maybe I should replace the search box with a simple
> GET form that just does that...
> 
> and maybe (checkbox) adds a link off the bottom of the current page so
> the page is not orphaned (don't know how i would do this...)
> 
> However, this URL doesn't launch an edit box, it goes to a:
> (There is currently no text in this page)
> html page and the user still has to click the "edit page" link.
> 
> Is there a clever way with templates or wiki special links to do some
> of the above?
> 
> /dc
> 
> 
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
> 





More information about the MediaWiki-l mailing list