test in monobook if a message page exists

classic Classic list List threaded Threaded
1 message Options
Fxp
Reply | Threaded
Open this post in threaded view
|

test in monobook if a message page exists

Fxp
Hi,

I created a message page for some articles:
My_Page --> MediaWiki:Head:My_Page

I inserted the message in MonoBook.php

<?php if($this->data['nscanonical'] == 0)
$this->msgHtml('Head:'.$this->data['titleprefixeddbkey']); ?>

But instead of being silent when there is no message page for an
article, this code returns the name of the message page: the html is broken.

How to test if the message page
$this->msgHtml('Head:'.$this->data['titleprefixeddbkey'])
exists so that nothing is displayed whatsoever when it doesn't exist?

I tested a simple:
if( ($this->data['nscanonical'] == 0) &&
($this->msgHtml('Head:'.$this->data['titleprefixeddbkey']))
but it didn't change anything, which is not a surprise.

Thank you for any hint.

Fran├žois

# MediaWiki: 1.8.2
# PHP: 5.2.0 (cgi)
# MySQL: 4.0.27

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l