Difference between revisions of "Talk:Wiki.pl"

From Organic Design wiki
(remove from todo)
Line 1: Line 1:
__NOTOC__
+
[[category:Nad/Todo]]
The key information we need is regarding the structure of the html content containing the fields we need to match, because we need to construct a regexp for each which works for all the version differences. eg. see the info at the end of this page regarding the edit-form differences --[[User:Nad|Nad]] 22:48, 26 Jun 2006 (NZST)
+
;Todo
=Urls=
+
*RSS and general URL matching notworking proeprly, probably cos all going into 00:00 time... things are showing up in the cache files but not appearing in the changes. --[[User:Nad|Nad]] 11:55, 8 Oct 2006 (NZST)
'''NOTE:''' All urls should use long format and never assume "friendly urls". Long format appears to be generally consistent across all versions.
 
<table class=document-code><tr><td>
 
==wikiLogin==
 
;Query: 
 
*index.php?title=Special:Userlogin&returnto=Main_Page     
 
;Response:
 
*index.php?title=Special:Userlogin&action=submitlogin<font color="red">&type=login</font>&returnto=Main_Page
 
;Comments:  Dont need a ''returnto=[Previous Article]''
 
==wikiPageEdit==
 
;Query:
 
*index.php?title=Main_Page&action=edit
 
;Response:
 
*index.php?title=Main_Page&action=submit
 
==wikiLastEdit==
 
;Query:
 
*index.php?title=Main_Page&action=history&limit=1
 
==wikiRawPage==
 
;Query:
 
*index.php?title=Main_Page&action=raw
 
==wikiGetVersion==
 
;Query;
 
*index.php?title=Special:Version
 
==wikiLogout==
 
*index.php?title=Special:Userlogout&returnto=Main_page
 
</table>
 
  
;Todo
 
*Sync direction
 
*Wikilogin only if not logged in
 
 
----
 
----
 
;Wiki version
 
;Wiki version

Revision as of 11:55, 8 October 2006

Todo
  • RSS and general URL matching notworking proeprly, probably cos all going into 00:00 time... things are showing up in the cache files but not appearing in the changes. --Nad 11:55, 8 Oct 2006 (NZST)

Wiki version

Couldnt see any functions which determine the wiki version that wikid is accessing, this could be useful. --Sven 15:09, 7 Jun 2006 (NZST)

I don't think we should need it, I think that they're all similar enough that the regexp's should be able to be generalised to cover them all. --Nad 12:08, 26 Jun 2006 (NZST)
I will continue documenting url changes between versions partly for my own understanding and to easily create regEx's --Sven 12:54, 26 Jun 2006 (NZST)
Well differences in URL's would require a version check like you say, but they're nothing to do with the regexps, those are matching the html content, not the urls --Nad 13:26, 26 Jun 2006 (NZST)
Bugger, thats true --Sven 13:30, 26 Jun 2006 (NZST)
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 forward 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)