News:

Wondering if this will always be free?  See why free is better.

Main Menu

Modification Update Version Checker

Started by vbgamer45, May 29, 2022, 09:21:43 PM

Previous topic - Next topic

vbgamer45

Link to the mod

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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

@rjen

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");
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Steve

DO NOT pm me for support unless asked to!

@rjen

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...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

vbgamer45

Update!

1.0.1
!Fixed bug with installed packages when upgrading SMF versions and not removing old mods thanks to @@rjen
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

@rjen

Interesting; this new version does not show up in the version checker?
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

vbgamer45

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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

@rjen

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...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

vbgamer45

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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

@rjen

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...

You cannot view this attachment.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

vbgamer45

Update:
1.0.2
+Added dutch translation thanks to  @rjen
!Extra spacing added in SMF 2.1.x version thanks to  @rjen
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

@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?

You cannot view this attachment.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

vbgamer45

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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Steve

I installed the new version and the button still sits on top of the header.
DO NOT pm me for support unless asked to!

vbgamer45

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
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

@rjen

Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Steve

#17
I'm using 2.1.2 ... even worse, when trying to go to Package Manager all I get is a white page.
DO NOT pm me for support unless asked to!


vbgamer45

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?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: