Page MenuHomePhabricator

Default text for new articles
Closed, ResolvedPublic

Description

Author: barley

Description:
I need a default text for new articles that go in the edit box,
but I could figure it out from the documentation and the php source.
I find a solution that works for me, and should be interesting for other
users, too - but I'm actually not sure what I'm doing and if it
does affect security or functionality.

In Article.php I changed line 183 in function getContent()

return '';  # was "newarticletext", now moved above the box)

into

return wfMsg( 'fs_default' );  # was "newarticletext", now moved above the box)

Now, I can write my defaut text in an article "MediaWiki:fs_default". which will
show up in the textarea wbtextbox1 of the editing tool, whenever I run into a
non existing article.

Is that a good idea?

It would be even nicer if one could define a default text for every article level

Regards,
Frank


Version: unspecified
Severity: normal
URL: http://meta.wikimedia.org/wiki/Help:Inputbox#par_default

Details

Reference
bz2937

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:43 PM
bzimport set Reference to bz2937.
bzimport added a subscriber: Unknown Object (MLST).

zigger wrote:

See also these similar requests with patches/extensions:

  • bug 1045 : default text from a template (file)
  • bug 2286 : default text from a template using a form-generating extension

barley wrote:

The inputbox extension would indeed do the trick
http://meta.wikimedia.org/wiki/Inputbox_extension

But where can one find it? I didnt find any download for the correspondent php
file to go in the extension folder of my 1.5 beta 3 installation.

I tried http://meta.wikimedia.org/wiki/Category:Mediawiki_Extensions and Google
seriously.

And why is this no core feature? I understand that people fear interference of
default texts with the philosophy of open Wikipedias. But you can always delete
the text in the edit box.
And default text helps the users to get used to the Wiki mark up syntax,
especially when dealing with highly structured types of information that use
advanced mark up features.

Frank

barley wrote:

Ok - I found it, and it works.
http://cvs.sourceforge.net/viewcvs.py/wikipedia/extensions/inputbox/

I will see if I can place more obvious a hint where to find those extensions

Regards,
Frank

zigger wrote:

*** This bug has been marked as a duplicate of 2286 ***