[Mediawiki-l] Some problems with wfMsgWikiNoDBForContent...
Elliott F. Cable
ecable at avxw.com
Mon Jun 5 06:32:17 UTC 2006
So I'm trying to make this work... I don't quite know how to explain
what I'm trying to do, best I can do is give you the code. I'm not a
great programmer, I just hack at things (and kick when the axe gets
dull) till they work, but that approach has failed me here - what am
I doing wrong?
> /* Peer start */
> /**
> * Get a message from the language file, for the content, and parse
> wiki into HTML
> */
> function wfMsgWikiNoDBForContent( $key ) {
> global $wgForceUIMsgAsContentMsg;
> $args = func_get_args();
> array_shift( $args );
> $forcontent = true;
> if( is_array( $wgForceUIMsgAsContentMsg ) &&
> in_array( $key, $wgForceUIMsgAsContentMsg ) )
> $forcontent = false;
> $msg = wfMsgReal( $key, $args, false, $forcontent );
> return $msg;
> // return $wgOut->parse( $msg, true );
> }
> /* Peer end */
The last commented out return is what I actually tried to do, but
when I stick <?php echo( wfMsgWikiNoDBForContent( 'tools' ) ) ?> in
the skin somewhere, everything breaks, and nothing at all appears
below that in the source of the page, making me assume I somehow
crashed PHP or ended mediawiki's entire process or something - what
am I missing? As long as I leave the last line commented out, the
second-to-last makes it function exactly as wfMsgNoDBForContent,
which, more or less, doesn't work for the circumstances but is better
than a blank page below the control bar... any help that I could get?
More information about the MediaWiki-l
mailing list