I thought of a neat feature today while browsing the Village pump,
pages in all talk namespaces have a neat + link besides the Edit link
so you can add a new section to it, so i thought it would be nice for
things like the Village pump to be able to have that link added with a
keyword to every page that had that keyword in the wikitext. I named
that keyword ADDSEC for "add section" and it's invoked with
__ADDSEC__.
I found out what i needed to do to get this, thanks to the help of
Gabriel Wicke. I modified the language/Language.php,
includes/MagicWord.php file and found that some changes had to be made
to includes/Parser.php and of course includes/SkinPHPTal.php.
I didn't implement it fully, due to a couple of reasons, but most of
all that my development box is wasted right now so i couldn't execute
the code, so i quite while i was ahead.
What needs to be done is:
1. Make Parser.php detect the presence of the MagicWord::get ( ADDSEC
) and set a variable
2. change the now "if ( $istalk ) {" in SkinPHPTal.php to "if (
$istalk || $thatvariable ) {
I'm sorry that i had to resort to such lame measures as not finishing
a simple feature, but having my box trashed and not fully
understanding how variables are passed around in mediawiki i'm just
sending this, perhaps if someone finishes it i'll have a better idea
of how to accomplish such things in the future.