[Mediawiki-l] return of the "Re: custom" posts
revansx at cox.net
revansx at cox.net
Mon Mar 26 20:44:30 UTC 2007
yup! that did it :-)
[......how embarassing......]
thanks!
- rich (revansx)
---- Robert Leverington <lcarsdata at googlemail.com> wrote:
> PHP variables are case sensitive, change $ID to $id .
> Robert.
>
> On 26/03/07, revansx at cox.net <revansx at cox.net> wrote:
> > Hi, I may not ask this question correctly, but please meet me half-way. I wish to modify the "monobook.php" file at the line which renders the top page title into the "firstHeading" portion of the page. The php syntax is:
> >
> > <?php $this->text('title') ?>
> >
> > and it provides the page title at the top of the wiki entry. I wish to get it to provide the wikidb's pages table's "pageid" number as part of the title. Something like this:
> >
> > "PageID:#7654, My Page Title"
> >
> > where pageid=7654 and
> > pagetitle="My Page Title"
> >
> > Based of a recomendation from an earlier post (thanks Rob!), I tried to add the following php code to the top of the "monobook.php" file:
> >
> > global $wgTitle;
> > $id = $wgTitle->getArticleId();
> >
> > and then modified the firstHeading code as:
> >
> > PageID:#<?php $ID ?>, <?php $this->text('title') ?>
> >
> > but this didn't work and it crashed the page such that it wouldn't even render at all (just a blank white page with no error message).
> >
> > I have 3 questions:
> >
> > Q1 - Why didn't it work?
> >
> > Q2 - What do do i need to do to get it to work.
> >
> > Q3 - where is the "$this" class described so that I can see what page information i have available (I'm asking for a link please).
> >
> > thanks,
> > - rich (revansx)
> >
> > _______________________________________________
> > MediaWiki-l mailing list
> > MediaWiki-l at lists.wikimedia.org
> > http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
More information about the MediaWiki-l
mailing list