Lack of interest Please alphabetize add-on Options

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

AndyB

Well-known member
When we look at the Options here:

Admin CP -> Home -> Options

It would be nice if the add-ons with same Group ID would be shown in alphabetical order.

pic001.webp

I set all my add-ons to Group ID 4000, that way they fall under the default XenForo Options.
 
Last edited:
Upvote 2
This suggestion has been closed. Votes are no longer accepted.
If you alphabetized the list, they wouldn't fall below. It's ordered by add-on ID past sort order.

I think currently it's ordered by Group ID. What would be nice is a second sorting by add-on name if the Group Id is the same.
 
Its not a big deal, but the addon list quickly gets long and its hard to find what you need. 5 addons like depicted above is nothing. I just use ctrl + F and search for the addon.
 
As the admincp index which does not have such filter, I tend to automatically use ctrl + f5 when looking for an addon in a long list. Its just as fast.
 
I was looking at the following code to see if I could just add the additional ORDER BY information:

PHP:
	public function getOptionGroupList(array $fetchOptions = array())
	{
		if (!isset($fetchOptions['includeDebug']))
		{
			$fetchOptions['includeDebug'] = XenForo_Application::debugMode();
		}

		$joinOptions = $this->prepareOptionGroupFetchOptions($fetchOptions);

		return $this->fetchAllKeyed('
			SELECT option_group.*
				' . $joinOptions['selectFields'] . '
			FROM xf_option_group AS option_group
				' . $joinOptions['joinTables'] . '
			WHERE 1=1
				' . (!$fetchOptions['includeDebug'] ? 'AND option_group.debug_only = 0' : '') . '
			ORDER BY
				option_group.display_order
		', 'group_id');
	}

I'm not able to figure out where to add the additional ORDER BY "addon_id".
 
Okay figured out how to alphabetize the add-ons if they have the same group_id.

PHP:
	public function getOptionGroupList(array $fetchOptions = array())
	{
		if (!isset($fetchOptions['includeDebug']))
		{
			$fetchOptions['includeDebug'] = XenForo_Application::debugMode();
		}

		$joinOptions = $this->prepareOptionGroupFetchOptions($fetchOptions);

		return $this->fetchAllKeyed('
			SELECT option_group.*
				' . $joinOptions['selectFields'] . '
			FROM xf_option_group AS option_group
				' . $joinOptions['joinTables'] . '
			WHERE 1=1
				' . (!$fetchOptions['includeDebug'] ? 'AND option_group.debug_only = 0' : '') . '
			ORDER BY
				option_group.display_order ASC, option_group.addon_id ASC
		', 'group_id');
	}

Notice the line:

option_group.display_order ASC, option_group.addon_id ASC
 
Back
Top Bottom