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
----- Original Message -----
From: Podz
Sent: Sunday, 22 January 2006 11:26 PM
Subject: Re: [wp-testers] Keeping Up-to-date

Roy Schestowitz wrote:
> __/ On Sun 22 Jan 2006 11:22:06 GMT, [Sean Hayford O'Leary] wrote : \___
>

<<snip>>

> Sean makes a valid point.

I totally agree, I just don't see how it can be done and certainly not
unless the core has the code added.

P.
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers
[ SECURITY NOTICE ]
To: [EMAIL PROTECTED]
For your security, [EMAIL PROTECTED]
digitally signed this message on 22 January 2006 at 17:44:19 UTC.
Verify this digital signature at http://www.ciphire.com/verify.
[ CIPHIRE DIGITAL SIGNATURE ]
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers

Reply via email to