Firefox PHP

Module: Check Modules for Upgrades

Posted by Joe Curia 
All files from this thread

File Name File Size   Posted by Date  
notification on index.jpg 24.5 KB open | download Joe Curia 09/28/2008 Read message
notification on module page.jpg 85.1 KB open | download Joe Curia 09/28/2008 Read message
check_module_upgrades_v5_2_1_06.zip 5 KB open | download Joe Curia 04/20/2010 Read message
ModUpgrade.PNG 10.7 KB open | download Scott Finegan 10/23/2011 Read message
Module: Check Modules for Upgrades
May 09, 2008 01:36AM
This module will check all Phorum 5.2 modules for upgrades and list their status.

This module installs like any other module. Once enabled you will see update links next to any module on the module page which has a newer version available. You can also set the module to display a list of modules with newer versions on the index page for forum admin only.

Please note: The current list of modules on the Phorum site only updates once daily. If you install the latest version of a module before the listing is updated, you will see the previous version incorrectly listed as an update.

One question for the Phorum devs. A number of the modules that are installed by default do not have a link on the list of 5.2 modules. Am I correct in assuming that any upgrades to these modules will only be available in future upgrades of Phorum? Or do you ever post upgraded versions to the forum? For now, I am simply ignoring the pre-installed modules when checking for upgrades

Finally, I want to say a big thank you to the Phorum devs for creating the automatically updating list of modules. This made it very easy to create my module, one that I tried to implement in 5.1 but couldn't find an easy way of doing so.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald




Edited 9 time(s). Last edit at 04/20/2010 03:56PM by Joe Curia.


Attachments:
open | download - check_module_upgrades_v5_2_1_06.zip (5 KB)
Re: Module: Check Modules for Upgrades
May 09, 2008 08:18AM
Quote

Am I correct in assuming that any upgrades to these modules will only be available in future upgrades of Phorum?
correct :)
at least for official upgrades as maurice broke this rule already with the bbcode release.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting




Edited 1 time(s). Last edit at 05/09/2008 08:19AM by Thomas Seifert.
Re: Module: Check Modules for Upgrades
May 09, 2008 09:05AM
Oh, so now I'm the villain eh?! ;-)

The new BBcode code is in the 5.3 development tree as the default module already. When upgrading to 5.3 in the future, the new BBcode module will be used. I did release a BBcode module package to try in 5.2, but that's mostly for getting bug reports from the brave people that dare to install that new code on their servers. When the module is ready for release, we will put it in 5.2 and the users will automatically get it in their next Phorum upgrade. That is the normal release pattern as you guessed correctly.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Check Modules for Upgrades
May 09, 2008 07:03PM
I have finished v5.2.1.01 with this change:
- Fixed a bug which would cause the module to fail when looking for updates if your servers "allow_url_fopen" setting was off.

The file above contains the latest version.

This update was prompted after I forced my test phorum to run on PHP 5 and found that my web host had turned off the "allow_url_fopen" setting for PHP 5 only. Frustrating, but necessity is the mother of invention and I'm glad I found this problem now rather than later.

Thanks for the confirmation on the pre-installed modules. One other question: Would the phorum devs ever consider building this function into the core admin page? With your new module listing it is pretty easy to automate and I don't think it would have too big of an impact on your servers, especially if set to only check every X hours, not every time it is opened (new item for my todo list regardless). I certainly wouldn't mind having my module deprecated to see this functionality included in the core. I do, however, know what kind of bloated-core dictatorship you have going on, so I wouldn't be to offended if you cried havoc and let loose your hounds of war on me for suggesting this.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: Check Modules for Upgrades
May 09, 2008 08:01PM
No hounds on this one. In fact, I already have been thinking about that kind of functionality too, as part of a large module admin page overhhaul. With the module list in place, it has become a lot easier indeed. I'd rather have a server side list that is more straight forward to parse and would contain more info (e.g. the require_version from info.txt which might render a new version unusable for the active Phorum version), but the basic principle is the same.

I'd like to suggest the use of include/api/http_get.php. This one tries to fetch http pages using several methods, in order to make it work on as many systems as possible. You now use curl, but curl is not a standard PHP feature. Some example usage:
include('./include/api/http_get.php');
$content = phorum_api_http_get($url);
if ($content === NULL) {
    $error = phorum_api_strerror();
    .... do error handling ....
} else {
    .... do data processing ....
}


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Check Modules for Upgrades
May 10, 2008 02:24PM
Hi,

I installed this on my phorum. When I click the "settings" link, I get a blank page.

thanks
Module: Check Modules for Upgrades v5.2.1.02
May 10, 2008 04:10PM
I have finished v5.2.1.02 with this change (which should fix or report on your problem mshell)

- Fixed the same bug with better code suggested by Maurice Makaay. The new code will also catch connection errors and report them.

The file above contains the latest version.

Thanks for the suggestion Maurice, it works like a charm.

Also, glad to hear you are thinking of including this type of thing. Has there been any thought to adding hooks in the admin sections? A hook in the module page would allow this module to do that work.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald




Edited 1 time(s). Last edit at 05/10/2008 04:14PM by Azumandias.
Re: Module: Check Modules for Upgrades v5.2.1.02
May 10, 2008 05:14PM
There are already some hooks in the admin interface. The Virtual Hosting module makes use of those already. But not everything is "hooked" in the admin. I think that this would not require a hook though, since it would be much nicer to support this directly from the core.

Additionally, we have been playing with the idea of an admin rewrite a few times. I think that such rewrite would be a better initiator for starting to add extra hooks to the admin, because the current admin interface has grown without the idea of modules in mind, which might turn into hackish results.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Module: Check Modules for Upgrades v5.2.1.03 - bug fix
May 16, 2008 12:46PM
I have finished v5.2.1.03 of the mod with these changes:
- Fixed a bug which could cause a modules online version to be mis-reported.

- Removed PHP warnings.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
I have completed v5.2.1.04 of the mod with this change:

- Recoded the mod to display upgrade availability directly on the modules page in the admin section. The settings.php file has been removed as it is no longer necessary.

I was sitting on what I like to call the think tank (sorry if that's too much information) when it suddenly dawned on me that I could use the admin_pre hook and my ever growing appreciation for the javascript element controls to get the module upgrade statuses to display on the modules list page itself. Now I think I can let this mod rest.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Sorry, only registered users may post in this forum.

Click here to login