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.
Ævar Arnfjörð Bjarmason wrote:
diff -ru phase3_2/includes/CVS/Entries mediawiki/phase3/includes/CVS/Entries --- phase3_2/includes/CVS/Entries 2004-07-22 23:48:04.974484648 +0000 +++ mediawiki/phase3/includes/CVS/Entries 2004-07-22 22:53:51.957541168 +0000 @@ -58,11 +58,13 @@ /LinksUpdate.php/1.23/Thu Jul 22 22:53:51 2004// /LoadBalancer.php/1.8/Thu Jul 22 22:53:51 2004// /LogPage.php/1.12/Thu Jul 22 22:53:51 2004// +/MagicWord.php/1.20/Thu Jul 22 22:53:51 2004//
Quick note: it's best if you can make patches with 'cvs diff -u' rather than a recursive diff of two separate checked out source trees. This keeps CVS's bookkeeping files out of the diff and makes things a little easier to manage.
-- brion vibber (brion @ pobox.com)
Thank you, i've gotten quite rusty with CVS of late due to extreme lack of use of it in favor of subversion, i remembered some old skills though and attached is the output of the even better cvs -Q diff -u
On Thu, 22 Jul 2004 17:34:22 -0700, Brion Vibber brion@pobox.com wrote:
Ævar Arnfjörð Bjarmason wrote:
diff -ru phase3_2/includes/CVS/Entries mediawiki/phase3/includes/CVS/Entries --- phase3_2/includes/CVS/Entries 2004-07-22 23:48:04.974484648 +0000 +++ mediawiki/phase3/includes/CVS/Entries 2004-07-22 22:53:51.957541168 +0000 @@ -58,11 +58,13 @@ /LinksUpdate.php/1.23/Thu Jul 22 22:53:51 2004// /LoadBalancer.php/1.8/Thu Jul 22 22:53:51 2004// /LogPage.php/1.12/Thu Jul 22 22:53:51 2004// +/MagicWord.php/1.20/Thu Jul 22 22:53:51 2004//
Quick note: it's best if you can make patches with 'cvs diff -u' rather than a recursive diff of two separate checked out source trees. This keeps CVS's bookkeeping files out of the diff and makes things a little easier to manage.
-- brion vibber (brion @ pobox.com)
Ævar Arnfjörð Bjarmason wrote:
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__.
<snip>
Why not moving that talk page to the talk namespace ?
Aka : [[Talk:Village pump]] instead of [[Village pump]] :o)
Because sometimes thats just not feasable, In tha case of the village pump for example the talk page is where people talk about the actual chat page, it's layout and such. There is a need for this because people already have "Add to this conversation" links all over the place and this would just provide a standard way to let people do this on all pages.
On Sat, 24 Jul 2004 15:06:12 +0200, Ashar Voultoiz thoane@altern.org wrote:
Ævar Arnfjörð Bjarmason wrote:
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__.
<snip>
Why not moving that talk page to the talk namespace ?
Aka : [[Talk:Village pump]] instead of [[Village pump]] :o)
-- Ashar Voultoiz
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Aevar, I like it. I've often thought that many non-article pages need one of those links... ~~sj~~
On Sat, 24 Jul 2004 15:57:57 +0000, Ævar Arnfjörð Bjarmason avarab@gmail.com wrote:
Because sometimes thats just not feasable, In tha case of the village pump for example the talk page is where people talk about the actual chat page, it's layout and such. There is a need for this because people already have "Add to this conversation" links all over the place and this would just provide a standard way to let people do this on all pages.
On Sat, 24 Jul 2004 15:06:12 +0200, Ashar Voultoiz thoane@altern.org wrote:
Ævar Arnfjörð Bjarmason wrote:
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__.
<snip>
Why not moving that talk page to the talk namespace ?
Aka : [[Talk:Village pump]] instead of [[Village pump]] :o)
-- Ashar Voultoiz
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
now all thats needed it someone to pice the rest of the code togather;=)
On Mon, 26 Jul 2004 12:31:29 -0400, Sj 2.718281828@gmail.com wrote:
Aevar, I like it. I've often thought that many non-article pages need one of those links... ~~sj~~
On Sat, 24 Jul 2004 15:57:57 +0000, Ævar Arnfjörð Bjarmason
avarab@gmail.com wrote:
Because sometimes thats just not feasable, In tha case of the village pump for example the talk page is where people talk about the actual chat page, it's layout and such. There is a need for this because people already have "Add to this conversation" links all over the place and this would just provide a standard way to let people do this on all pages.
On Sat, 24 Jul 2004 15:06:12 +0200, Ashar Voultoiz thoane@altern.org wrote:
Ævar Arnfjörð Bjarmason wrote:
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__.
<snip>
Why not moving that talk page to the talk namespace ?
Aka : [[Talk:Village pump]] instead of [[Village pump]] :o)
-- Ashar Voultoiz
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
-- --:-------.-.--------.--.--------.-.--------.--.--------[...] +sj+
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org