D_C <d3ntaku(a)gmail.com> wrote:
* mediaWiki api :: inject ?
Is there a way of creating a link <from> a page automagically? So the
newly created pages are not Orphaned?
eg something like a mediawiki api, where before jumping to this edit
page my script could inject a new entry into a "whats new" or "date
order" catch all grab-bag page?
There isn't such an API, but note that there is a [[Special:Newpages]]
page which does much the same thing as you're saying you'd want to do.
* fill out the form
if the "action=edit" is looking for some post fields, i could pre-fill
out some stuff on the form, like categories or the URL i surfed in
from... is this documented anywhere?
Pretty much everything just goes in the page content. Category
membership is just a matter of adding "[[Category:Name of the
category]]" somewhere in the text (so you could pre-add it to the
textarea if you want). And there's nowhere special to record where you
surfed from, AFAIK, so again, just stuff it in the textarea. In order
to do which, you might need to use "action=preview", I'm not sure -
certainly that would be expecting a postdata field for the article
You might also want to look into http://pywikipediabot.sf.net
Python-based framework for making bots to do complex stuff. Probably
beyond the scope of what you need, but might help you work out what
can be done how.
* editing templates
I would like to also put this into the template of my wiki layout, but
on opening up "MonoBook.php" it doesnt seem as obvious as i thought.
googling didnt turn up any obvious answers, so would appreciate any
links for template customization...
Skin hacking is not all that easy right now. One thing that's now
pretty painless is adding a [static] link to the "navigation" box - as
of 1.4, you can edit an array of arrays in LocalSettings.php -
searching for "currentevents" in DefaultSettings.php should turn it
up. Other than that, I think trial-and-error is the best approach I
Rowan Collins BSc