Page 1 of 1

Revised Update Check Plugin - UpdateCheck 1.4 MOD

Posted: Sat Mar 04, 2023 6:53 am
by jadefusion
UpdateCheck 1.4a MOD

Plugin Name: hi_updatecheck 1.4a MOD
Date: 08 Mar 2023

The update check plugin for CMSimple_XH, hi-updatecheck, has needed revising for some time.

Starting from the original hi_updatecheck plugin as the source code, all now unnecessary 'tag' instructions giving (x)html-output for images, line breaks and other HTML elements have been removed, giving basic HTML 5 compliance. Icon images are replaced by SVG files and the display of software updates and messages has been greatly simplified.

Remove any existing installation of UpdateCheck before you install a new version.

For more information, downloads and documentation (English only) see...

http://www.cmsimple-cms.com/?Extending-CMSimple/Plugins

Re: Revised Update Check Plugin - UpdateCheck 1.4 MOD

Posted: Mon Mar 06, 2023 1:30 pm
by lck
👍🏻
Has only the display changed or has something been changed in the code here as well? So improvement of the update check or something like that.

Problem: If hi_updateckeck is also installed, you get a 500 Error at login. (Tested with PHP 8.2)

Re: Revised Update Check Plugin - UpdateCheck 1.4 MOD

Posted: Tue Mar 07, 2023 7:31 am
by jadefusion
lck wrote:
Mon Mar 06, 2023 1:30 pm
👍🏻
Has only the display changed or has something been changed in the code here as well? So improvement of the update check or something like that.

Problem: If hi_updateckeck is also installed, you get a 500 Error at login. (Tested with PHP 8.2)
Thanks for the feedback.

The original plugin code has been changed only as far as it effects the visual output and HTML 5 compliance.

As for the problem. I should have given more explicit instructions about that, I guess I assumed that people would just remove the old plugin before they installed the new one... Sorry about that. I have updated the documentation to address the issue.

Re: Revised Update Check Plugin - UpdateCheck 1.4 MOD

Posted: Tue Mar 07, 2023 12:14 pm
by lck
jadefusion wrote:
Tue Mar 07, 2023 7:31 am
The original plugin code has been changed only as far as it effects the visual output and HTML 5 compliance.
Ok.
jadefusion wrote:
Tue Mar 07, 2023 7:31 am
..., I guess I assumed that people would just remove the old plugin before they installed the new one... Sorry about that. I have updated the documentation to address the issue.
Since your modified plugin has a different name, "updatecheck", it may well be that someone installs this first, goes to the website and then gets the 500 error on login. The help file is usually not read before, only after logging in.

But I just see, the hint is also present on the download page of the plugin. Very good, maybe highlight it a little better?

Maybe one or the other plugin developer will get in touch and have a tip on how to avoid this possible collision of the two plugins.
As I see it, changes would have to be made in admin.php, updatecheck.php and in stylesheet.css all selectors would have to be prefixed.

Re: Revised Update Check Plugin - UpdateCheck 1.4 MOD

Posted: Tue Mar 07, 2023 2:26 pm
by olape
There are obviously functions that should now be declared twice. For example

Code: Select all

function upd_addMenuEntry()
Of course this goes wrong.
The visual update may be a good idea, but renaming everything in the plugin and the functions without any functional changes is probably not. This could have been left all.

admin.php 104

Code: Select all

return '<h1>CMSimple XH - Update Check</h1>' . "\n"
CMSimple_XH is written with _ and not with spaces on purpose.

Re: Revised Update Check Plugin - UpdateCheck 1.4 MOD

Posted: Thu Mar 09, 2023 8:42 am
by jadefusion
olape wrote:
Tue Mar 07, 2023 2:26 pm
There are obviously functions that should now be declared twice. For example

Code: Select all

function upd_addMenuEntry()
Of course this goes wrong.
The visual update may be a good idea, but renaming everything in the plugin and the functions without any functional changes is probably not. This could have been left all.
It was fairly easy to get two versions of UpdateCheck working together (and the fix is included in the latest release).

With two versions of UpdateCheck working side by side, say each version sends it's notification that updates are available, then two sets of updates available messages get displayed by the CMS.

To avoid any unnecessary complications with dual installations the latest release reverts back to its original name.

Re: Revised Update Check Plugin - UpdateCheck 1.4 MOD

Posted: Fri Mar 10, 2023 12:01 pm
by lck
jadefusion wrote:
Thu Mar 09, 2023 8:42 am
To avoid any unnecessary complications with dual installations the latest release reverts back to its original name.
👍🏻