Sort Plugins in hi_updatecheck

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Sort Plugins in hi_updatecheck

Post by Tata » Thu May 28, 2020 2:55 pm

Es wäre sehr angenehm, die Liste der Plugins in hi_updatecheck alphabetisch sortiert zu haben. Was/wo zugegeben sein sollte?
Das gleiche wäre super auch bei hi_admin und bei ähnlichen Plugins/Addons, die eine Pluginsliste zeigen.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Sort Plugins in hi_updatecheck

Post by cmb » Thu May 28, 2020 10:26 pm

Tata wrote:
Thu May 28, 2020 2:55 pm
Es wäre sehr angenehm, die Liste der Plugins in hi_updatecheck alphabetisch sortiert zu haben. Was/wo zugegeben sein sollte?
Ungetested: füge mal nach dieser Zeile das folgende ein:

Code: Select all

    natcasesort($upd_plugins);
    $upd_plugins = array_values($upd_plugins);
Und vermutlich könnte man hi_updateInstalledScripts() in derselben Datei auch einfach durch XH_plugins() ersetzen.

PS: ah, man müsste noch $plugin_cf['hi_updatecheck']['ignore'] berücksichtigen.
Last edited by cmb on Thu May 28, 2020 10:29 pm, edited 1 time in total.
Reason: added PS
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Sort Plugins in hi_updatecheck

Post by Tata » Thu May 28, 2020 10:39 pm

SUPER!!!
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Sort Plugins in hi_updatecheck

Post by Tata » Thu Jun 04, 2020 7:01 am

EVEN MORE SUPER!!!
It works also in hi_admin plugin. With the only one inserted line in pluginmanager.inc.php.

Code: Select all

    $plugins = hi_adm_InstalledPlugins();
/*** *** ***/
    natcasesort($plugins);
/*** *** ***/    
    $plugins = array_map('strtolower', $plugins);
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply