[Mediawiki-l] Default text for a new category

Luis Mandel luismandel at gmail.com
Mon May 8 17:43:52 UTC 2006


Thanks a lot.
That's exactly what I was looking for.

Luis

On 5/8/06, Rob Church <robchur at gmail.com> wrote:
>
> On 08/05/06, Luis Mandel <luismandel at gmail.com> wrote:
> > Hi!
> > As far as I understood in order to add a page to a category a "tag" of
> the
> > form
> > [[Category:myCategory]] must be added.
> > This will generate a link to that category of the form:
> >
> >              .../index.php/Category:myCategory
> >
> > But if the category doesn't exist the link will be of the form:
> >
> >             .../index.php?title=myCategory&action=edit
> >
> > in order to edit and add some text to "myCategory"
> >
> > I would like to know if it possible to avoid this last behaviour. I
> mean,
> > when a category is required either
> > a default text is generated for that category or directly o link of the
> form
> > .../index.php/Category:myCategory
> > is generated.
>
> The latter is the easier option and involves a quick patch to
> OutputPage.php. Find the addCategoryLinks function, circa line 220 and
> look for the line
>
> $this->mCategoryLinks[] = $sk->makeLinkObj( $title, $text );
>
> Replace this with
>
>
> $this->mCategoryLinks[] = $sk->makeKnownLinkObj( $title, $text );
>
>
>
> Rob Church
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>



More information about the MediaWiki-l mailing list