[Mediawiki-l] Re: Forcing template

David Gerisch DEGerisch at co.tulare.ca.us
Fri Mar 11 17:54:44 UTC 2005


Hello,

I'm new to MediaWiki (and PHP), and need a little help.  First off - a
big thank you to Brion and everybody that works on MediaWiki.  It is a
tremendously easy to use and useful system.

I have a similar request to Aviram, and could use a pointer or two.  I
want to be able to populate a page with different template texts.  I am
thinking that a nice, small, start would be to add some buttons to the
edit page screen.  Just like the buttons add text to a page for bold
text, an embedded image, or media file link, I would like to add a
button that plops in some template text.

I'm using MediaWiki 1.4rc1.  I see in EditPage.php a function called
getEditToolbar(), that then has an array of toolbar buttons.

Question 1: would this be the best/correct place to add my template
text?

I copied one array(...) section and added it near the end, substituting
in my personalization as appropriate.  It does plop in the template text
- so far, so good. :-)  I just don't know if there is somewhere else I
should be making these modifications, than in EditPage.php

So now, I can add three or four buttons to correspond with the three or
four standard templates my different pages will use.

The next challenge is to take this to the next level....

Question 2: Is it possible to get those edit buttons to prompt the user
for data?  It would be nice - but I would need some guidance where to
learn how to do this.

Thank you for your time, and any help you can give me.

David Gerisch, Systems Development Specialist
A.C.S. / Tulare County Information Technology
degerisch at co.tulare.ca.us

>>> mediawiki-l-request at Wikimedia.org Friday, March 11, 2005 5:17 AM
>>>

Date: Thu, 10 Mar 2005 10:01:16 -0800
From: Jan Steinman <Jan at Bytesmiths.com>
Subject: Re: [Mediawiki-l] Forcing template
To: MediaWiki announcements and site admin list
	<mediawiki-l at Wikimedia.org>
Message-ID: <d2445e084148467c21f4f85d3eaa6363 at Bytesmiths.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed

On 10 Mar 2005, at 00:54, Aviram Jenik wrote:

> I would like to force (or at least make it the default behavior) for

> new pages
> to appear in a certain layout. Basically, the idea is that instead of

> filling
> out an empty page... they would only have to 'fill in the blanks'.

I think I know what Brion will say about this... :-)

If you imagine a continuum between rigid structure on the right, and 
totally free-form on the left, then Wikis in general fall very much to

the left.

It isn't that you absolutely could not do such a thing, but it does run

counter to the Wiki Way, which is anarchic and non-authoritarian.

An easier path than having fill-in fields would be to have some 
pre-installed text. I'm just guessing, but you might be able to do that

in Article.php in the constructor. That way, your users would not have

to face "blank page shock" and you could "suggest" a typical article 
layout. A tidy implementation that they might consider rolling in might

include an instantiation hook that could would cause a call to an 
extension for providing new page text.

> Is something like this possible?

Just because something is possible, doesn't mean it's a good idea!

:::: Terrorism is the best political weapon, for nothing drives people

harder than a fear of sudden death. -- Adolf Hitler
:::: Jan Steinman <http://www.Bytesmiths.com>


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: David Gerisch.vcf
Url: http://lists.wikimedia.org/pipermail/mediawiki-l/attachments/20050311/3a3dbeca/attachment.diff 


More information about the MediaWiki-l mailing list