<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Luc Stepniewski&#039;s Blog &#187; mediawiki</title>
	<atom:link href="http://www.gradstein.info/category/software/mediawiki/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gradstein.info</link>
	<description></description>
	<lastBuildDate>Thu, 29 Dec 2011 22:59:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://www.gradstein.info/?pushpress=hub'/>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Python snippet to get Mediawiki/Wikipedia Recent Changes externally</title>
		<link>http://www.gradstein.info/python/python-snippet-to-get-mediawikiwikipedia-recent-changes-externally/</link>
		<comments>http://www.gradstein.info/python/python-snippet-to-get-mediawikiwikipedia-recent-changes-externally/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 23:37:35 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[rc]]></category>
		<category><![CDATA[recent changes]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wikipedia]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=94</guid>
		<description><![CDATA[Mediawiki allows one to send Recent Changes (RC) to a UDP port. The ip address is defined by the variable wgRC2UDPAddress, and the port by the variable wgRC2UDPPort. It&#8217;s a really good idea that it&#8217;s a UDP transfer, since there is no need for any ACK, so Mediawiki doesn&#8217;t block if there is nothing listening [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mediawiki.org/" class="liexternal">Mediawiki</a> allows one to <a href="http://wikitech.wikimedia.org/view/IRCD" class="liexternal">send Recent Changes</a> (RC) to a UDP port.<br />
The ip address is defined by the variable wgRC2UDPAddress, and the port by the variable wgRC2UDPPort. It&#8217;s a really good idea that it&#8217;s a UDP transfer, since there is no need for any ACK, so Mediawiki doesn&#8217;t block if there is nothing listening on that port.</p>
<p>These parameters must be set in the LocalSettings.php file, like this, for example.</p>
<p><code>$wgRC2UDPAddress = '127.0.0.1';<br />
$wgRC2UDPPort = 9390;<br />
</code></p>
<p>I wrote a really simple python program (more a proof of concept) that receives the data, cleans it, and then prints it to stdout :</p>
<p><code>#!/usr/bin/env python<br />
# -*- coding: utf-8 -*-<br />
#<br />
# vim:syntax=python:sw=4:ts=4:expandtab<br />
import SocketServer<br />
import re</p>
<p>HOST,PORT = '', 9390</p>
<p>class MyUDPHandler(SocketServer.BaseRequestHandler):<br />
   def handle(self):<br />
       print re.sub(r'\x03\d{0,2}', '', self.request[0])</p>
<p>if __name__ == '__main__':<br />
   server = SocketServer.UDPServer((HOST, PORT), MyUDPHandler)<br />
   server.serve_forever()</code></p>
<p>I plan to make it into a complete project that will send the data/notifications using Jabber(XMPP).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/python/python-snippet-to-get-mediawikiwikipedia-recent-changes-externally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to skip the useless &#8220;you are now logged in&#8221; page in Mediawiki</title>
		<link>http://www.gradstein.info/software/how-to-skip-the-useless-you-are-now-logged-in-page-in-mediawiki/</link>
		<comments>http://www.gradstein.info/software/how-to-skip-the-useless-you-are-now-logged-in-page-in-mediawiki/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 23:47:38 +0000</pubDate>
		<dc:creator>Lior Gradstein</dc:creator>
				<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://www.gradstein.info/?p=57</guid>
		<description><![CDATA[You installed Mediawiki some time ago, and now something bothers you: aren&#8217;t you tired of having an intermediate page named &#8220;Login successful&#8221; saying &#8220;You are now logged in to&#8221; before being allowed to go to the page you wanted to go? I am. I found there&#8217;s a hook that is called just when a user [...]]]></description>
			<content:encoded><![CDATA[<p>You installed Mediawiki some time ago, and now something bothers you: aren&#8217;t you tired of having an intermediate page named &#8220;Login successful&#8221; saying &#8220;You are now logged in to&#8221; before being allowed to go to the page you wanted to go? I am.<br />
I found there&#8217;s a hook that is called just when a user successfully logs on (<a href="http://www.mediawiki.org/wiki/Manual:Hooks/UserLoginComplete" class="liexternal">UserLoginComplete</a>), and even an extension named <a href="http://www.mediawiki.org/wiki/Extension:RedirectOnLogin" class="liexternal">RedirectOnLogin</a> that does the redirection for you, BUT to a fixed one. It seems the hook doesn&#8217;t give you the page you previously were before the login request.</p>
<p>So to correct this, I just found a dirty hack. That means you&#8217;ll have to patch the source, meaning also that you&#8217;ll loose some flexibility when upgrading Mediawiki :-(<br />
Anyway, if you still want to do this, here is the magic stuff:</p>
<p>Edit the file mediawiki/includes/specials/SpecialUserlogin.php and look for the function successfulLogin().<br />
At the end of it, just add (it&#8217;s just one line):<br />
<code>header('Location: ./index.php?title=' . $this->mReturnTo);</code></p>
<p>That&#8217;s it. You&#8217;ll get redirected to the previously accessed page automatically! Really cool.</p>
<p><em>This has been successfully used on a Mediawiki 1.13.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gradstein.info/software/how-to-skip-the-useless-you-are-now-logged-in-page-in-mediawiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using memcached

Served from: www.stepniewski.fr @ 2012-02-06 08:03:22 -->
