Talk:Wiki.pl

From Organic Design wiki
Revision as of 02:00, 15 May 2006 by Rob (talk | contribs) (regexp for mediawiki 1.6.5)
Todo
  • Sync direction
  • Wikilogin only if not logged in
Modifications to work with MediaWiki 1.6.5

I've installed the latest MediaWiki on a site at the Uni and was using some of your automated wikiLogon, wikiEdit code. I discovered that they have changed the login form slightly and the regexp provided in this article did not work. So here is the modified line of code that I have tested and it works. I'm not sure how best to integrate this. I have a feeling the regexp could be generalised to deal with both cases. I was tripped up by the foward matching style of the source HTML where the value comes before the key, but making the last bit greedy fixed it, providing the Token is the last thing in the form we want to grab.

/^<input type='hidden' value="(.*?)" name="wpSection".+?value="(\d*?)" name="wpEdittime".+<input type='hidden' value="(.*?)" name="wpEditToken"/sm ) {

--Rob 14:00, 15 May 2006 (NZST)