Recent Topics

1 Jul 01, 2006 02:10    

Would be nice if this was added to b2evolution, so the users don't need to keep checking the plugin's website whenever.

So heres my idea;
Have a check for updates button in the plugins tab in the backoffice.

Now to support this for a plugin they would just add;
var $update_url = 'http://mysite.ext/my_plugin/

In the /my_plugin/ folder their would be;
update.php
the rest of the plugin files.

So when checking for update, a requst is sent to;
$update_url.'update.php?get=version_number'
Where update.php will load up the plugins file, extract the version number and echo it.

Then if the version on the update server is newer, b2evo requests a file listing from;
$update_url.'update.php?get=file_listing'
Now this will scan the plugins directory on the update server and retrieve a list of files that should be copied.
Now before it returns the file listing, it will grab a list of files that should not be replaced (e.g. /my_plugin/settings.txt'), etc.
Now back on the users side, all plugin files will be deleted except for the files to be ignored, then the new files are placed in the plugins directory.

Yeh, that's all. And plugin_version_compare or whatever will then be used to make necessary updates, but this can be done sperately.

Now a problem with the file listing, is that it would not be able to retrieve the source from the php files.
So what should happen on the users side after the file listing has been obtained is it retrieves each file by downloading the file;
$update_url.'update.php?get='.$current_file_to_get

Yeh, so thoughts on the feature and the above method?

I can help with the development of this feature.


Form is loading...