Hey, Mediawiki folks....
So I have what I think is a very simple problem that I can't quite figure
out. If anybody could help me, that'd be great.
I'd like to add a little bit of JavaScript to my wiki pages. Let's assume
I'm an idiot and want to include a pop-up alert every time somebody visits a
page.
I see that one way of doing this is to just edit my MonoBook.php file so
that I can add an "onLoad" function to my <body> tag. Something like this...
<body <?php if($this->data['body_ondblclick']) { ?>ondblclick="<?php
$this->text('body_ondblclick') ?>"<?php } ?>
<?php if($this->data['body_onload' ]) { ?>onload="<?php
$this->text('body_onload') ?>"<?php } ?>
class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir')
?> <?php $this->text('pageclass') ?>"
onLoad = "alert('Hello world!');"
>
But this clearly doesn't seem like the right thing to do.
If I'm reading the code above it correctly, it looks like we've got a script
that's looking for any values associated with the "body_onload" key in an
associative array called "data". So it seems like the right thing to do is
to somehow add my awesome alert code into this array, but I can't figure out
how or where to do that, or if there's something else I should be doing
instead.
Can anybody help me out here?
--T
P.S. Yes, I know I should really be copying over the MonoSkin into a
separate skin so that everything doesn't get overwritten when I upgrade the
wiki. Just ignore that for now.
Every non-special page has a footer "This page has been accessed XY
times" at the bottom.
Is there an easy way to show/sort the most popular pages out of the
whole wiki?
Or perhaps there is no generic interface to this, and writing a custom
script is the only way to do it? Maybe there is one already?
--
Tomasz Chmielewski
http://wpkg.org
Greetings all --
Hopefully this is simple hack. I've setup a mediawiki instance but need
to change the link 'article' to 'property'. The wiki is going to be a
public property wiki for anyone to search for property information. So
changing the word article to property only makes usability sense.
Thanks in advance,
Corey
--
Corey Leong
Remeta Association
Founder & President
office: +1 407-412-9362
skype: remetaassociation
web: http://remeta.org
email: cleong(a)remeta.org
2nd Life: Neo Prinz
twitter: http://twitter.com/remeta
Hi, all
I am a new user of mediawiki, my wiki is a private wiki, only
authentic user is allowed. My question is how to set the homepage
directly to login window.
Thanks.
Would the parser changes in 1.12.0 have the following effect?
The Simple Forms extension
http://www.mediawiki.org/wiki/Extension:Simple_Forms used to render
wikitext within a form, e.g.:
{{#form:
[[Hello there]]!
....
}}
but now instead of rendering a "Hello there" link, it displays the
literal text [[Hello there]]. Likewise, if the results of a form
submission contain wikitext or custom tags, they are being displayed
literally instead of parsed.
Is this something to take up with the extension author (i.e., he missed
something), or is this going to be an inherent problem due to the parser
changes?
Thanks,
DanB
According to
http://www.mediawiki.org/wiki/Manual:%24wgArticleRobotPolicies, one can
set robot policies for individual pages with $wgArticleRobotPolicies.
However, it doesn't work for me, i.e., when I add:
$wgArticleRobotPolicies = array( 'Special:Categories' => 'index,follow' );
I still get noindex,nofollow on that page.
It is the same for other, non-special pages - setting anything with
$wgArticleRobotPolicies for any page doesn't seem to have any effect.
Am I missing anything? I use 1.12.0.
--
Tomasz Chmielewski
http://wpkg.org