Working with MediaWiki: Difference between revisions

From stacky wiki
Line 48: Line 48:


Followed instructions [http://www.mediawiki.org/wiki/Manual:GenerateSitemap.php#Example here] and pointed google webmasters to stacky.net/wiki/sitemap/ ... google complains the sitemap is html, so pointed to http://stacky.net/wiki/sitemap/sitemap-index-stacky_net_3-wiki_.xml instead. Still not working.
Followed instructions [http://www.mediawiki.org/wiki/Manual:GenerateSitemap.php#Example here] and pointed google webmasters to stacky.net/wiki/sitemap/ ... google complains the sitemap is html, so pointed to http://stacky.net/wiki/sitemap/sitemap-index-stacky_net_3-wiki_.xml instead. Still not working.
=Templates=
Added ParserFunctions extension to allow flow control in templates.

Revision as of 19:55, 17 October 2011

Edit sidebar by visiting the Mediawiki:Sidebar page.

Other magic pages: MediaWiki:Mainpage MediaWiki:Sitenotice MediaWiki:Common.css

Hide toolbox unless logged in: [1]

Getting MathJax Working

I got MathJax: git clone git://github.com/mathjax/MathJax.git MathJax

I installed the JavaScript extension[2] for MediaWiki.

I added a file mathjax.js (name doesn't matter) to extensions/JavaScript. It's content:

var e = document.createElement('script');
e.type = "text/javascript";
e.src = "http://stacky.net/MathJax/MathJax.js?config=wikiconfig";
document.getElementsByTagName('head')[0].appendChild(e);

(I basically copied the MathJax configuration file used at MO ... got confused because you have to remember to modify the last line)

(Not) Getting Blahtex Working

It'd be much nicer to get MediaWiki to serve MathML and use MathJax to convert only if it has to, but I haven't been able to get Blahtex[3] to compile. I've been trying to follow the instructions here [4]. I'm able to checkout blahtex and to get texvc working, but if I try make or make linux, I get

g++ -O3   -c -o source/main.o source/main.cpp
source/main.cpp: In function ‘void ShowUsage()’:
source/main.cpp:108: error: ‘exit’ was not declared in this scope
make: *** [source/main.o] Error 1

Moving html to wiki

A useful substitution:

<a href="([^"]*)"[^>]*>([^<]*)</a>
[\1 \2]

Handling Spam

Using SpamBlacklist extension.

Also installed the UserMerge extension so that I can delete junk users. In extensions directory,

svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/UserMerge

Sitemap

Followed instructions here and pointed google webmasters to stacky.net/wiki/sitemap/ ... google complains the sitemap is html, so pointed to http://stacky.net/wiki/sitemap/sitemap-index-stacky_net_3-wiki_.xml instead. Still not working.

Templates

Added ParserFunctions extension to allow flow control in templates.