Firefox PHP

Module: Check Modules for Upgrades

Posted by Joe Curia 
Hi Azumandias,

your new version is not working well for me. You version 5.2.1.03 reported in my forum to modules still two updates, your new version doesn't.

Perhaps it's because I changed version in info.txt for these two modules. Each time I patch a module I add "-LZT" an the end of the version. Is it possible that you make a number comparison and my text suffix makes problems?

In your old version the module itself reported "Incompatible Module" for your module. Is this check is now working (since new version doesn't show "Incompatible Module" any longer)?

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Quote
Oliver Riesen
your new version is not working well for me. You version 5.2.1.03 reported in my forum to modules still two updates, your new version doesn't.

Perhaps it's because I changed version in info.txt for these two modules. Each time I patch a module I add "-LZT" an the end of the version. Is it possible that you make a number comparison and my text suffix makes problems?

My module is not number specific simply because I wanted to give developers the freedom to set any version they wanted, be it 1.1.1 or A.A.A or 1.1-alpha, etc. My module, perhaps somewhat simplisticly, only looks at differences. If the info.txt on your server says version 1.1-LZT and the one on the Phorum website says 1.1, my module will flag. This makes the basic assumption that the version on the Phorum site is always the newer version. Thus for fellow developers this can be a bit misleading. My module page often show modules I am working on as out of sync (ie. while I was working on v5.2.1.01 of my Admin Security Module, it showed there was a newer v5.2.1.00 version available, which of course is the older version. I hope this answers your first question. If you see a better way of doing this, I am always open to suggestions.

Quote
Oliver Riesen
In your old version the module itself reported "Incompatible Module" for your module. Is this check is now working (since new version doesn't show "Incompatible Module" any longer)?

No, my module is still strangely incompatible with itself :) I've been waiting a few days, trying new things, to get this site to recognize my mod and add it to the list. I guess I should just ask the Phorum devs what specifically has to be in a mods zip file for it to be recognized (for example this mod no longer uses a settings.php file, so is it not recognized because of that?) Anyways, in v5.2.1.04 I removed the "Incompatible Module" flag as I thought it would clutter up the module list page. Your thoughts on this are also welcome.

Did that clear everything up?


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
Hi Azumandias,

Quote
Azumandias
My module, perhaps somewhat simplisticly, only looks at differences. If the info.txt on your server says version 1.1-LZT and the one on the Phorum website says 1.1, my module will flag.

but it doesn't flag...

Please try with the Go To Topic Module. Change version in info.txt for debugging.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Oliver,

I downloaded the Go To Topic mod and changed the info.txt to read "version: 1.1.1-LZT". My module list showed that the "upgrade" to version 1.1.1 was available online.

Are you seeing any errors in the error logging mod or on your server? Are you seeing any javascript errors when the page loads?


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
Hi Azumandias,

Quote
Azumandias
My module list showed that the "upgrade" to version 1.1.1 was available online.

When I went to my administration this morning to look for errors in the event log, your module worked like espected... No idea why, I didn't change anything...

Affects javascript caching in Phorum also admin modules?

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Module: Check Modules for Upgrades v5.2.1.05 - Option to show on index
September 27, 2008 11:20PM
I have completed v5.2.1.05 with these changes:

- Added the ability to set the mod to display a list of modules with newer versions on the index page for forum admin only.

- Discovered the joys of ob_get_contents() and recoded the mod to display on the modules page without javascript.


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
April 12, 2009 04:37PM
Hi Joe,

I try to keep my pages "valid", so I'm using the HTML validator plugin for Firefox which uses "HTML Tidy" and "SGML Parser" from W3C.

Your module causes some error messages:

Error: required attribute "type" not specified
Error: an attribute value must be a literal unless it contains only name characters
Error: character "#" not allowed in attribute specification list
Error: document type does not allow element "div" here
Error: an attribute value must be a literal unless it contains only name characters
Error: character "#" not allowed in attribute specification list
Error: document type does not allow element "div" here

I changed check_module_upgrades.php:

      if (!empty($upgraded_mods)) {
        $insert_str = "<div style=\"background-color: #FFEEEE; font-weight: bold; border: solid 2px #DD0000; padding: 5px; margin: 0 0 10px 0; text-align: center; \">The following mods have a newer version available:<br />$upgraded_mods<\/div>";
      }
      $PHORUM["phorum_mod_check_module_upgrades"][$PHORUM["user"]["user_id"]]["timestamp"] = time();
      $PHORUM["phorum_mod_check_module_upgrades"][$PHORUM["user"]["user_id"]]["upgraded_mods"] = $insert_str;
      phorum_db_update_settings(array("phorum_mod_check_module_upgrades"=>$PHORUM["phorum_mod_check_module_upgrades"]));
    }
  }

  //show notification if upgrades are available
  if (!empty($insert_str)) {
    print "<script type=\"text/javascript\">
      //<![CDATA[
      function cmu_insert_div() {
      divs = document.getElementsByTagName('div');
      var phorum_div;
      for (i in divs) {
        if (divs.id == 'phorum') phorum_div = divs;
        }
      if (phorum_div) {
        phorum_div.innerHTML = \"$insert_str\" + phorum_div.innerHTML;
        } else {
        document.body.innerHTML = \"$insert_str\" + document.body.innerHTML;
        }
      }
      window.onload = cmu_insert_div;
      //]]>
      </script>";

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Check Modules for Upgrades
May 31, 2010 05:09AM
Hi Joe,

Your module shows an available update for Online Users offering an older version as update because in that thread there are multiple versions of that module. Please have a look at [www.phorum.org]

Thanks.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Check Modules for Upgrades
May 31, 2010 05:25AM
The module thread has been updated, so the issue should be solved now. I think it's best to always look only at the start message, because that is the module version as released by the original module author.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Check Modules for Upgrades
September 23, 2010 03:38PM
All modules are up-to-date and latest in our phorum installation. But still this module shows the message at the top of the admin area "One or more modules below has a newer version available"! And a bit above that I can also view the message "Your Phorum installation is up to date"! :)
Seems to be a minor bug. It is not causing any problem to me, just reporting it for the record since I noticed it.
Sorry, only registered users may post in this forum.

Click here to login