I want to share with you an extension I've been working on some time ago and finally had the time to make into a working state.
The extension is called ItemList Order and this might get you an idea what I'm coming at.
Flarum extensions are based on a nice concept called ItemLists. Core exposes those lists, and extensions can easily add components to them, but also change the order of items or remove them completely.
My extension takes this one step further by adding a graphical interface that allows the admin to change the order of existing components, as well as hide them.
Using the extension is very easy. The current system is dictated by many technical limitations but I think it's looking pretty good.
The first step is enabling "Edit mode" via the extension settings in the admin panel.
Then you will see many buttons appear on the frontend part of Flarum. These buttons are added at the very end of various ItemList areas. Clicking them will bring up the ItemList Editor:
The areas that you can already edit include multiple dropdowns, some side menus, the post composer, the user preferences and the signup/login modals (though you need to know how to show those last ones manually).
It's not limited to moving Core components. If any extension adds content to those areas, you can move them with this extension. This includes for example the Masquerade link in the screenshot above, the emoji picker button, the Byobu recipient selector, etc.
The "Default" section will contain all unmanaged elements. Their order is dictated by the extension that inserted them. That's where items you don't currently see will appear as well (for example, the login link of the header).
Elements moved up or down will be forcefully moved by the extension in the exact order you choose.
Elements moved to hidden will be removed from the view.
Some current limitations:
Make sure this extension is always the last one enabled, otherwise the frontend might break fixed in beta2
- Some ItemLists have the editor disabled for now because of various reasons you can find in the TODOs here
- No ItemList in the admin panel are enabled but they will be in a future version
- You can only reorder items you can see.
For example you can't reorder login/register links because they are only visible when you're logged out, but you obviously can't have the editor active while logged out the login links are now made visible even when logged in in beta2
The editor currently stays active even if you logout or change user, but you can't save the settings if you aren't logged in as admin. I will correctly hide the editor in a future release editor now hidden in beta2. It will still show up if logout and re-login with a non-admin user
- All texts in the front-end are currently hard-coded in English, I'll move them to translations once I'm sure which buttons will stay
I have published a first beta version of the extension to Packagist, and would love to get feedback from you !
This is still highly experimental so I strongly recommend not installing it on any production forum for the moment. This is also why I'm posting under the Dev tag. I'll do a proper announcement when it will be ready for regular users.
composer require migratetoflarum/itemlist-order:@beta