add external counter to mediawiki 1.5.5

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

add external counter to mediawiki 1.5.5

Ramón Casero Cañas

Hi, I'm trying to add an external counter to all pages in my wiki, which
is powered by MediaWiki 1.5.5., and any help would be appreciated.

In my LocalSettings.php I have

$wgDefaultSkin = 'monobook';

First I've tried editing skins/MonoBook.php, but it doesn't seem to
work. To test whether this is the correct file, I have changed in class
MonoBookTemplate

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

to e.g.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0 Transitional//EN"


This has no effect in the wiki when I reload the pages. However, if I
rename MonoBook.php to MonoBook.php.bak the wiki loses part of the format.

Regards,

--
Ramón Casero Cañas

http://www.robots.ox.ac.uk/~rcasero/wiki
http://www.robots.ox.ac.uk/~rcasero/blog

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

add some text to all pages in wiki

Ramón Casero Cañas
My question about adding counter code didn't get any replies, so either
it's uninteresting or I didn't formulate the right question. In case
it's the latter, I'll try to explain myself better.


I am running a wiki with MediaWiki 1.5.5, using

$wgDefaultSkin = 'monobook';

I would like to add some HTML code to all pages in the Wiki, e.g.

<p>This in all pages.</p>

Does anybody have any suggestions about the right place/way to do it?


Best regards,

Ramón.

--
Ramón Casero Cañas

http://www.robots.ox.ac.uk/~rcasero/wiki
http://www.robots.ox.ac.uk/~rcasero/blog

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: add some text to all pages in wiki

Anders Wegge Keller
Ramón Casero Cañas <[hidden email]> writes:

> My question about adding counter code didn't get any replies, so either
> it's uninteresting or I didn't formulate the right question. In case
> it's the latter, I'll try to explain myself better.
>
>
> I am running a wiki with MediaWiki 1.5.5, using
>
> $wgDefaultSkin = 'monobook';
>
> I would like to add some HTML code to all pages in the Wiki, e.g.
>
> <p>This in all pages.</p>
>
> Does anybody have any suggestions about the right place/way to do it?

 If you feel brave, edit skins/MonoBook.php directly. If not that
brave, make a copy, and modify that.

--
// Wegge
Weblog: http://blog.wegge.dk
Wiki:   http://wiki.wegge.dk
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: add some text to all pages in wiki

Ramón Casero Cañas
Anders Wegge Jakobsen wrote:
>
>  If you feel brave, edit skins/MonoBook.php directly. If not that
> brave, make a copy, and modify that.

I had actually tried that, but it didn't seem to have any effect on the
wiki. OK, the problem was that reloading the page wasn't enough to see
the changes. One must clean the cache of the browser too.

This was all about some code for an external counter service provided by
StatCounter. So I have added the HTML code in skins/MonoBook.php:

<SNIPPET>
        </ul>
      </div>
    </div>
    <?php $this->html('reporttime') ?>
    [ADD COUNTER CODE HERE]
  </body>
</html>
<?php
        wfRestoreWarnings();
</SNIPPET>

and it works.

Thanks,

--
Ramón Casero Cañas

http://www.robots.ox.ac.uk/~rcasero/wiki
http://www.robots.ox.ac.uk/~rcasero/blog

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