User talk:Aerik/Intersections code

From Meta, a Wikimedia project coordination wiki

Installang the 'intersections' special page[edit]

Which php file should this code be placed in? -- Harry Wood 14:55, 10 November 2005 (UTC)[reply]

How we installed it:[edit]

  1. We copied the code into a file called SpecialIntersections.php in the includes directory.
  2. We then added the following code to LocalSettings.php:
    require_once ( 'SpecialPage.php' ) ;
    SpecialPage::addPage( new SpecialPage( 'Intersections' ));
  3. We created a page called MediaWiki:Intersections to give a display title to the special page. We used "Category Intersections" as our display title.

The page "Category Intersections" now appears on our list of special pages.

Note, however, that the first time you visit this page, it probably won't show anything useful, unless you have a category called "Universe", as the code makes that the default. You might want to change that.

-- Marty & Tony, 18:03, 7 December 2005 (UTC)

Whoops[edit]

What a lame-o I am - I didn't notice the additions to the talk page here. Yes, you add this according to the usual directions (can't find the link) to create a special page. And yes, you'd want to replace "Universe" with whatver your top level category is... The structure kind of requires some kind of top level category, as the alternative is a list of all categories.

I still think this is a powerful and useful interface, but haven't devoted much time to improving the code. I was surprised to see the discussion on Wikipedia over this concept. I'd be happy to refactor the code for mediawiki 1.5, too... --Aerik 04:07, 29 March 2006 (UTC)[reply]