Link to the mod (https://custom.simplemachines.org/index.php?mod=4335)
Modification Update Version Checker
By: vbgamer45
Mod Information:
For SMF 2.1.x, SMF 2.0.x
Adds a system to auto check for updates for modifications that are installed from simplemachines.org mod site. Display latest updates for mods in the admin dashboard, and browse packages page.
Updates can be run manually via the Check for Modifications Update button in the browse packages area or automatically via the scheduled task that runs once a day by default.
Install Information:
Install via the SMF's Package Manager via upload package.
Nice MOD, just a heads up: on my forum I upgraded from 2.0.19 to 2.1 without first removing the Mods.
I assume I am not the only one that did that. Now on the upgraded 2.1 forum it is is still reporting the old 2.0.19 mods as installed, which is abit confusing...
This due to this selection made to determine the installed mods:
$dbresult = $smcFunc['db_query']('', "
select distinct package_id,version
FROM {db_prefix}log_packages
WHERE time_removed = 0");
Needless to say that the mods that were installed on 2.0.19 but are no longer relevant in 2.1 are still being reported and checked...
Suggestion, change the code to this:
$dbresult = $smcFunc['db_query']('', "
select distinct package_id,version,name
FROM {db_prefix}log_packages
WHERE time_removed = 0 AND install_state != 0");
What file is that code in?
Quote from: Steve on May 30, 2022, 04:35:52 PMWhat file is that code in?
Subs-ModVersionCheck.php
Take note: it is in there two times...
Update!
1.0.1
!Fixed bug with installed packages when upgrading SMF versions and not removing old mods thanks to
@@rjen
Interesting; this new version does not show up in the version checker?
Quote from: @rjen on May 31, 2022, 05:54:03 AMInteresting; this new version does not show up in the version checker?
It should now, my automatic job to fetch updates from the mod site was disabled on my end should work now. And note it is not instant I only fetch the data from the SMF site every 12 hours.
Yep, it shows up now.
I did not realize that the API was actually calling YOUR site and not directly accessing the Simplemachines MOD site. Makes sense now...
Yeah, keeps the mod less complex. Plus a lot easier resource wise on smf.org since only system is calling twice a day the data.
I made some small adaptations to the modchecker2.xml file for SMF2.1. to create some space between the tables and to add the Dutch language strings...
I think the button to fetch the updates could be positioned to not overlap the header, but did not get around to fix that...
2022-05-31_155620.jpg
Update:
1.0.2
+Added dutch translation thanks to
@rjen!Extra spacing added in SMF 2.1.x version thanks to
@rjen
I made a small change to make the "Check for Modifications" button separate from the header. See attached xml file.
You might also want to have a look at what happens with the Optimus MOD.
The offical version number of the installed mod is 2.10.5 [12.04.22], the version checker is reporting it as not up to date with a version of 2.10.5.
I think the [12.04.22] bit is being ignored in the comparison?
2022-06-01_215436.jpg
For the Optimius mod not sure what todo https://custom.simplemachines.org/index.php?mod=2659
Mod site reports 2.10.5 the version the mod reports does have 2.10.5 but it also has the extra information. I guess build information.
Update with
@rjen fix for the button
I installed the new version and the button still sits on top of the header.
I am guessing using SMF 2.0.x? I think the fix was for SMF 2.1 will check if it will work for 2.0
My fix was for 2.1 only
I'm using 2.1.2 ... even worse, when trying to go to Package Manager all I get is a white page.
Quote from: Steve on June 03, 2022, 11:19:08 AMI'm using 2.1.2
It is the same thing. It should work for 2.1.2. as well.
Quote from: Steve on June 03, 2022, 11:19:08 AMI'm using 2.1.2 ... even worse, when trying to go to Package Manager all I get is a white page.
Anything in forums error log? Does the package manager load at all? Or is the white page when you check for updates?
I do assume that vbgamer validated the changes before he included them...
Quote from: @rjen on June 03, 2022, 12:02:17 PMI do assume that vbgamer validated the changes before he included them...
Of course. It was a very minor edit though.
I understand that
@rjen, I'm just reporting what's happened after I installed the updated version.
The Package Manager doesn't load at all. I get a white page. I can go to any other part of the ACP but as soon as it click on 'Package Manager' I get the white page.
Anything in the forum's error log?
If not attach your themes/default/Packages.template.php
And sources/Packages.php
Okay, no errors except this one when I went straight to the Package Manager from the main page:
ee2d8d2cd468afac0793fd41d47019c2
https://*****************/index.php?action=admin;area=packages
Backtrace information
Type of error: Critical
Error message Select
Administration login attempt!
Referrer: https://***********/index.php?action=admin;area=packages
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
I'm currently restoring to just before the first thing I did this morning so let me see if that fixes it first.
Still have the problem so the requested files are attached.
Here is the two files reverted to default.
Didn't see anything wrong with the edits.
Which is strange you had an error on that page since that code is almost the same as on the admin dashboard area just minus the check updates button
Replaced the files and still have the problem. Probably not related to this mod then. Doug is going to look into it in a little while.
Thanks vb. Will let you know what he finds out.
Doug has found that my issue does NOT stem from your mod so my apologies for any inconvenience I've caused you.
In fact, I can delete all responses from 14 on to clean this topic up if you wish. Or you can. Whatever works for you.
Not needed all good.
Thanks
@vbgamer45 Core ;D
Notice: Use of undefined constant SMF_VERSION - assumed 'SMF_VERSION' in /home/livecom/public_html/livemods.net/Sources/Subs-ModVersionCheck.php on line 53
Quote from: live627 on June 03, 2022, 06:51:42 PMNotice: Use of undefined constant SMF_VERSION - assumed 'SMF_VERSION' in /home/livecom/public_html/livemods.net/Sources/Subs-ModVersionCheck.php on line 53
SMF 2.0.x? I forget that was 2.1 only.
Might add theme site support as well thinking about it.
1.0.3
!Fixed undefined SMF_VERSION in SMF 2.0.x uses $forum_version instead
Thanks should be better in the latest update.
@SleePy stop breaking this site so that I can download this mod! :-X
same_attachment_twice.png
Fixed
My change for the button was not complete.... before the test was run it would still overlap...
Attached the updated fix...
In addition I am seeing that the scheduled job fails everytime it runs...(SMF 2.1.2)
Errors:
https://test.fjr-club.nl/index.php?scheduled=task;ts=1654519813
Type of error: General
Error messageSelect
The callable scheduled_modvercheck could not be called.
Update
1.1
!Fixed bug with scheduled task
!Updates to style of check updates button thanks to
@rjen
Quote from: vbgamer45 on June 06, 2022, 10:25:22 PMUpdate
1.1
!Fixed bug with scheduled task
!Updates to style of check updates button thanks to @rjen
Yep, all good now. Thanks
Thought: for simplicity's sake, maybe blend this data into the main "Modification packages" table?
Rename the existing "Version" column to "Installed version". Then add a new column "Latest version".
If Installed ver = Latest version, text color of "Installed Version" is GREEN.
If Installed ver < Latest version, text color of "Installed Version" is RED.
When I want to download an update, I get this message:
You cannot download or install new packages because the Packages directory, or one of the files in it, is not writable!
In files permissions, when I want to set Save for Packages it doesn't work.
Yes it is a bug with the package server. I have reported it already.
Great mod vbgamer45 (https://www.simplemachines.org/community/index.php?action=profile;u=24876)!!! I love your mods and your constant work to make them the best. Thank you so much to you and all those who contributed to make this mod how it is now. Looking forward to the package manager permissions issue getting resolved so it all works seemlessly.
Happy Holidays everyone!
I've removed the size bbcodes. Please try to not use them so it is easier for the SMF Team to read these on their phones. ~ Steve
Yeah, it is something that needs to be fixed on the mod site I believe.
@vbgamer45 I see you updated the mod on the mods page. I downloaded and installed, but I still get this:
"You cannot download or install new packages because the Packages directory, or one of the files in it, is not writable!"
My Packages folder is set up like this:
Package Manager > File Permissions > Packages Writable (chmod: 0755)
That's a known issue with the SMF site at this time not something I can fix.
I understand now, thanks for the clarification.
Thank you for the edit to my post above Steve. It seems all my posts here have the same problem and I'm not sure why. It's like the editor for the forum has somehow stored some settings for me that change how I enter text. I clicked off the "Toggle Source View" button on the editor toolbar and that seems to have fixed it.
Happy Holidays,
Mike
You're welcome.
Happy and safe holidays to you and yours.
Hmm good to find this mod. I'm soon to upgrade to SMF 2.1.3 (from 2.0.19) and was under the impression this functionality was part of 2.1 core. Evidently not the case, so good work!
Hi,
Very useful mod, but I have a problem. The mod installs okay and detects mods that need updating, but when I try to update them I get the following error:
"You cannot download or install new packages because the Packages directory, or one of the files in it, is not writeable!"
What should the folder and file permissions be for the Packages folder and files?
@Chyandour Here you have an explanation:
Quote from: vbgamer45 on November 29, 2022, 09:29:41 AMThat's a known issue with the SMF site at this time not something I can fix.
Tagging because I'm getting the same error. It looks like this is still unresolved. I'll patiently wait for an update. Thank you for an awesome MOD! :)
Russian translation
Hi
@vbgamer45 I have a request to you, please put the Polish translation in your modification.
<file name="$languagedir/Modifications.polish.php">
<operation>
<search position="end" />
<add><![CDATA[
// Mod Version Checker
$txt['modvc_checkforupdates'] = 'Sprawdź aktualizacje modyfikacji';
$txt['modvc_modificationsupdates'] = 'Aktualizacje modyfikacji';
$txt['modvc_downloadupdate'] = '[Pobierz aktualizację]';
$txt['modvc_oldversion'] = 'Zainstalowana wersja';
$txt['modvc_latestversion'] = 'Najnowsza wersja';
$txt['modvc_modsitelink'] = 'Link do strony modyfikacji';
$txt['modvc_visitmod'] = '[Przejdź do modyfikacji]';
$txt['modvc_noupdatesfound'] = 'Wszystkie modyfikacje są aktualne! Nie znaleziono aktualizacji modyfikacji!';
$txt['scheduled_task_scheduled_modvercheck'] = 'Sprawdź aktualizacje modyfikacji';
$txt['scheduled_task_desc_scheduled_modvercheck'] = 'Porównuje zainstalowane wersje modyfikacji z najnowszymi wersjami modyfikacji znalezionymi na simplemachines.org';
// END Mod Version Checker
]]></add>
</operation>
</file>
Sure will get it added.
Thank you. This is for SMF 2.0.x and for SMF 2.1 :)
This translation is for SMF 2.0 polish-utf8
Added the Polish and Russian translations to latest build.
Is the "You cannot download or install new packages because the Packages directory, or one of the files in it, is not writable!" error still a known issue?
Still a known issue sadly.
Big thanks to Sleepy fixed the issue with downloading packages!
But first you need to fetch the latest mod updates via the scheduled task. Go to SMF scheduled tasks and quick run now!
This will make sure the current filename with attach= is set.
It's great that can now download modification updates, but unfortunately something is wrong.
I downloaded the Quick Spoiler 1.5.4 update, but I still had the older version 1.5.3 installed, and in the list of installed modifications there was no upgrade button or uninstall button, only file list button. I also downloaded the Simple Audio Video Embedder 7.0.4 update but I see I still have 7.0.3a installed
AFAIK, this mod just CHECKS for updates, it does not install them... and the upgrade button would depend on the mod to be upgraded having upgrade instructions.... so that's on the individual mod authors.
*I know that I never wrote mods with upgrade packages
I click "Download Update" at the top in the admin panel, on the next page I click the "Install Mod" button, on the next page "Install now" and it shows that the Simple Audio Video Embedder 7.0.4 modification has been installed, after entering the list of installed packages again I have older version of Simple Audio Video Embedder 7.0.3a still installed. So, I click on the UPGRADE button and do the same process, install this modification, and I still have the older version. There is something wrong with this modification update function.
Upgrade does not delete the old version that is normal. Upgrading keeps existing package.
Ok, but after downloading the Simple Audio Video Embedder 7.0.4 update and installing it, for a while I see that I have version 7.0.4, but after refreshing the page I still see version 7.0.3.a and I don't have the 7.0.4 mod visible in the package list.
Which page?
I meant the Simple Audio Video Embedder admin panel page
(https://i.imgur.com/tTcB7x4.png)
Thats a bug on my side with the mod.
I understand, let know how you fix it.
The strange thing happens to me.
I installed Light Portal 2.6.1 and Simple Audio Video Embedder 7.0.5
Normally, they should not appear in the mod.
But as you can see in the attached photo, it shows me to upgrade both mods.
I tried uninstalling and reinstalling Mod Version Checker, but nothing changed.
Yeah there is an issue at the moment with the SMF website not allowing me to pull the data have a ticket in about it.
@vbgamer45 Downloading updates via your mod doesn't work again.
What about from the package manager? Download package from the mod site?
I can download the mod from the mod site, but I'm wondering why I can't download the mod update again using Mod Version Checker
What's the error you are getting?
@vbgamer45 This is the error:
You cannot download or install new packages because the Packages directory, or one of the files in it, is not writable!
Looks like it is a bug with the customize site again, was solved for a while.
Hi
@Aleksi "Lex" KilpinenCould you report this error to the person managing the website?
Feel free to open a topic in Site Comments, Issues and Concerns (https://www.simplemachines.org/community/index.php?board=19.0) with any and all details you can share about the actual issue.
Quote from: vbgamer45 on March 02, 2024, 03:10:43 PMThats a bug on my side with the mod.
I downloaded the Simple Audio Video Embedder update using Mod Version Checker and when I go to the Simple Audio Video Embedder settings I see the words "Your Version: 7.0.5 Latest Version: 7.0.5" and that's fine, but when I go to the list of installed packages I still see the version 7.0.3a and the UPDATE button.
You can ignore that/delete the old version.
The current version 7.0.5 should be visible in the package list after updating this mod, but version 7.0.3a is visible. If I remove this mod from the package list, I won't be able to uninstall it if I need to.
Strange you should have two packages in your package manager the original then the new version.
I think you should run a test. Maybe something was wrong with my forum.
Hello
@vbgamer45 I have a question for you. If there is an update available for a mod, after updating that mod, why is the old mod pack still available in the pack list? Why does the new package after updating not remove the old version from the list of installed modifications.
I have a test SMF 2.1.4 forum where I install various modifications and check their functionality before installing these modifications on my official forum. And I had some mod updates and I updated them using "Modification Update Version Checker", but in the modification package list I see previous modification versions (previous modification number) and no UNINSTALL MOD button, I only see two buttons FILE LIST and DELETE. Is this a bug from your mod or from SimpleMachines site?
If I'm reading you right, it's working as designed. I would not want the old pack deleted until I'm sure there are no problems with the upgraded ones. And you wouldn't have an uninstall button on the earlier version because it's not installed.
vb will have to confirm this though.
That is correct Steve.
The system does not delete old packages. If the mod has an upgrade option, it does not uninstall the old version.
I understand, but let me give you an example:
I have the test forum I mentioned. And on this forum I updated the Simple Colorizer 1.3.1 mod to 1.4, but in the package list I only see the Simple Colorizer 1.3.1 version, I don't have version 1.4, and in the 'Installed' table it is N/A.
(https://i.imgur.com/oC3m9Am.png)
What's going on here?
Might be an SMF bug, this mod just gives links to download a package and install/upgrade