[wp-testers] Keeping Up-to-date [s]
John Ha [c]
khanh at netspace.net.au
Mon Jan 23 01:15:49 GMT 2006
Thanks for pointing that out. Will make the required mod ^^
----- Original Message -----
From: Rob
To: wp-testers at lists.automattic.com
Sent: Monday, 23 January 2006 11:57 AM
Subject: Re: [wp-testers] Keeping Up-to-date
John Ha [c] wrote:
> Hi,
>
> I've implemented a version checking hack for the next release of my
> plugins (kca & kin). Here's how I've done it:
>
> I have a file with just the following code:
>
> echo preg_replace('/^[\s\S]*kin-(\d\.\d\.\d)[\s\S]*$/', '$1',
> @file_get_contents('http://svn.wp-plugins.org/kin/tags/'));
>
> What this code does is read the page
> http://svn.wp-plugins.org/kin/tags/. This page contains the the
> directory to latest version of my plugin Eg. kin-1.0.0. It then does a
> regexp to extract the version number. Finally it echos the results.
>
> The next part just involves using some ajax to get the results
> from that file (this will overcome the security limitation of reading
> a page from another domain using xmlhttp). Ajax is used for background
> loading to reduce wait time for plugin load.
>
> Finally it's just a case of comparing the results (in this case the
> version number from svn repos) with the current user plugin version.
>
> That's my solution to plugin version checking. Not the most graceful
> method, but little code is involved, no need to update any version
> files, no server, quite safe and it works for me.
>
> John Ha
Please don't rely on allow_url_fopen being open, Wordpress includes
Snoopy for a reason :)
--
Rob Miller
http://robm.me.uk/ | http://kantian.co.uk/
_______________________________________________
wp-testers mailing list
wp-testers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-testers
--
------------------------ [ SECURITY NOTICE ]
------------------------
To: wp-testers at lists.automattic.com.
For your security, khanh at netspace.net.au
digitally signed this message on 23 January 2006 at 01:15:48 UTC.
Verify this digital signature at http://www.ciphire.com/verify.
------------------- [ CIPHIRE DIGITAL SIGNATURE ]
-------------------
Q2lwaGlyZSBTaWcuAjh3cC10ZXN0ZXJzQGxpc3RzLmF1dG9tYXR0aWMuY29tAGtoYW5oQ
G5ldHNwYWNlLm5ldC5hdQBlbWFpbCBib2R5AKIFAAB8AHwAAAABAAAARC7UQ6IFAACtAg
ACAAIAAgAg8VGtcvYHOvWkCvgOMX2lA8lp65NgG+XmR5CoW8On08gBABh9ddIwqVYrJzb
+YRTkO3r9j+q978iHOOe1FIMyNojdSm0DAcpPoym3peUHHXHIH3HJAzG0A5D/2w9Q5X59
dkL3U2lnRW5k
--------------------- [ END DIGITAL SIGNATURE ]
---------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/wp-testers/attachments/20060123/f70b5154/attachment.htm
More information about the wp-testers
mailing list