Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: live627 on December 02, 2018, 03:59:12 AM

Title: Need help updating "Sorted Package Manager Listing" for SMF 2.1
Post by: live627 on December 02, 2018, 03:59:12 AM
I am trying to update Sorted Package Manager Listing (http://custom.simplemachines.org/mods/index.php?mod=875) for SMF 2.1 and have it mostly functional. It sorts based on install/uninstall status, but limits listings to one mod each.

If I remove

Code: [Select]
elseif (isset($sort_id[$packageInfo['state']]))
{
$sort_id[$packageInfo['state']]++;
$packages[$packageInfo['state']][strtolower($packageInfo[$sort])] = md5($package);
$context['available_' . $packageInfo['state']][md5($package)] = $packageInfo;
}

all mods become visibly listed.

I'm having great difficulty understanding the relevant code in Packages.php, let alone figure out what is wrong with my code.

Help please?

[Attachment removed]
Title: Re: Need help updating "Sorted Package Manager Listing" for SMF 2.1
Post by: Arantor on December 02, 2018, 06:04:46 AM
Wouldn’t you just sort by time installed (unless that got removed when I wasn’t looking?)
Title: Re: Need help updating "Sorted Package Manager Listing" for SMF 2.1
Post by: Illori on December 02, 2018, 06:07:36 AM
Wouldn’t you just sort by time installed (unless that got removed when I wasn’t looking?)

it has not been removed.
Title: Re: Need help updating "Sorted Package Manager Listing" for SMF 2.1
Post by: live627 on December 02, 2018, 10:25:59 AM
I want a table for each status, similar to how the avatar packs are separated.
Title: Re: Need help updating "Sorted Package Manager Listing" for SMF 2.1
Post by: live627 on December 02, 2018, 06:08:10 PM
I resolved my issue.