Add more advanced reorder forums in ACP

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Get Involved
Juanla
Registered User
Posts: 54
Joined: Mon Aug 24, 2009 8:03 pm

Add more advanced reorder forums in ACP

Post by Juanla »

Hello everyone,

I've recently added a new category that includes over 50 forums, and I'm now in the process of trying to reorder some of them. However, I've found the current reordering feature to be quite basic—it only allows moving forums one position up or down at a time. I believe a more user-friendly method for sorting forums could greatly enhance usability. Perhaps introducing a drag-and-drop functionality or a numeric field for direct edits could be beneficial.

To expedite the process on my end, I've implemented a small modification in my forum. However, my expertise in modifying phpBB templates is still quite limited. I'll share this modification with all of you, hoping it might inspire someone to complete the necessary template changes.

Any assistance or guidance on this would be greatly appreciated!

If anybody want my temporal trick. You have to change this.

includes/acp/acpforums.php

Search:

Code: Select all

$this->parent_id	= $request->variable('parent_id', 0);
Add after:

Code: Select all

$this->move_steps	= $request->variable('move_steps', 0);
Search:

Code: Select all

$move_forum_name = $this->move_forum_by($row, $action, 1);
Replace By:

Code: Select all

$move_forum_name = $this->move_forum_by($row, $action, $this->move_steps);

Search:

Code: Select all

'U_MOVE_UP'			=> $url . '&action=move_up',
'U_MOVE_DOWN'		=> $url . '&action=move_down',
Replace by:

Code: Select all

'U_MOVE_UP'			=> $url . '&action=move_up&move_steps=1',
'U_MOVE_DOWN'		=> $url . '&action=move_down&move_steps=1',

Now, yo have to copy the link url on the down or up icons:
Image

You will have something like this:

Code: Select all

http://localhost:8000/adm/index.php?i=acp_forums&sid=83a113e14b157afb3fe7a759d96f9e4e&icat=7&mode=manage&parent_id=1&f=46&action=move_down&move_steps=1
You can play with this variables (action can be move_up or move_down and move_steps the number of positions to move, always positive number):
&action=move_down&move_steps=1
Sorry my bad english :)

Return to “Extension Requests”