Add-on "Check Version" for all hacks

Adam Howard

Well-known member
While it is true we do get notices and even e-mails reminding us to update X resource. I sometimes either download and save for later and completely forget.... Or see the notice, figure I'll get it later, but forget.

Yesterday I was having such trouble and it turned out it was as simple as installing an update.

So what I have tried to do myself and failed poorly (crashed 2 test sites trying).... Is to come up with an add-on which will check XenForo for the update.

Important - Not looking for it to self update. Just check for updates.

phpBB had this built-in
vBulletin had an add-on http://www.vbulletin.org/forum/showthread.php?t=255054
Word Press has this built-in

So I would imagine someone would know how to do this (better than I).
 
This could not be done if addon's developers do not add the website. There are 2 ways to done this:
- Add more field to addon page: Developers have to add URL here to check for version.
- Check directly from XF's Resource: Developers also have to add their resource ID in order to auto-check. Or you could do it manually by adding resource ID for every single addon.
 
This could not be done if addon's developers do not add the website. There are 2 ways to done this:
- Add more field to addon page: Developers have to add URL here to check for version.
- Check directly from XF's Resource: Developers also have to add their resource ID in order to auto-check. Or you could do it manually by adding resource ID for every single addon.
Add-ons already have a space to add a URL

I would assume such a system could plug-in and check the one listed.
 

Attachments

  • Screenshot from 2012-07-24 11:37:38.webp
    Screenshot from 2012-07-24 11:37:38.webp
    51 KB · Views: 29
This is, in theory, quite simple to implement as an add-on. It's perhaps an add-on that perhaps all developers would consider including in their own add-ons to allow people to do a version check.

As per your screenshot, for my first release, I'd fill all of that form in. A version checker add-on would have an extra marker on that page to mark it as "initial release".

On subsequent versions, I would uncheck the "initial release" marker. The URL would then have to be changed to the URL to the release on the Resource Manager.

For example: http://xenforo.com/community/resources/notifications-powered-by-gritter.870/

On the user side of things there would be a button next to each add-on that says "Check for Updates".

Clicking it would load the Resource URL using file_get_contents PHP function.

The PHP script would do a preg_match on the contents and look for this:

HTML:
<h1>Notifications - powered by Gritter <span class="muted">1.3</span></h1>

PHP would know that the number between the span tags which are enclosed in the h1 tags will always be the version number.

The script would come back (probably in an overlay) and say:

Existing Version Number: X
Current Version Number: X

And then provide the URL to go and fetch the update.

I want to make this now but I'm so busy with other things... :p

Heck it. If people want this and people will include it in their add-ons, I'll release it as a framework to be included in other add-ons.
 
That's what i've providen with my addon helper framework http://xenforo.com/community/threads/ragtek-add-ons-helper-framework.15163/#post-206592 but people didn't like it....


here, the xenforo devs would need to implement a new action in the ressource controller and return only the version of the newest release (they have the data already) or much better =>include the build number as a new field and return it on a unique url e.g. http://xenforo.com/community/resources/share-search-url.897/get-version_id


it's happening the same way on vbgo
addon url: http://www.vbulletin-germany.org/modifications.php?do=findrelease&product=ragtek_ajaxusertitle
version url: http://www.vbulletin-germany.org/modifications.php?do=checkversion&product=ragtek_ajaxusertitle
 
Progress... I'm hoping for possible... progress .....

Any chance of you two working together to make this happen?

(Ragtek I think your code would need to be updated a little)
 
Top Bottom