News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Drag and Drop Board Management

Started by dougiefresh, March 01, 2016, 03:48:19 AM

Previous topic - Next topic

dougiefresh

Link to Mod



DRAG AND DROP BOARD MANAGEMENT v1.9
By Dougiefresh -> Link to Mod



Introduction
This mod adds the ability to drag and drop individual boards to new positions either within the category it resides, or within a new category. 

This mod is based on the Manage Boards UI of the ElkArte fork of SMF (which is licensed under a 3-clause BSD License), which has this functionality built in.

Related Discussion/Development Threads
o Discussion: Drag and drop board management
o Development: Need help with new Drag and Drop Board Management mod....

Compatibility Notes
This mod was tested on SMF 2.0.11 and SMF 2.1 RC2, but should work on SMF 2.0 and up.  SMF 2.1 RC1 and before, as well as SMF 1.x is not and will not be supported.

Changelog
The changelog can be viewed at XPtsp.com.

Special Thanks Goes Out To:
o Antes

License
Copyright (c) 2016 - 2019, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Sesquipedalian

I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

dougiefresh

Uploaded v1.2 - March 7th, 2016
o Added support for SMF 2.1 Beta 2.  No functionality change for SMF 2.0.x branch.

dougiefresh

Uploaded v1.3 - March 23rd, 2016
o Moved BoardOrder function from Sources/XML.php into Subs-DragDropBoards.php.
o SMF 2.1: Converted all XML.php operations into proper hooks.

GL700Wing

Quote from: dougiefresh on March 23, 2016, 04:03:55 PM
Uploaded v1.3 - March 23rd, 2016
o Moved BoardOrder function from Sources/XML.php into Subs-DragDropBoards.php.
It seems the BoardOrder function was renamed to DragDrop_XML when it was moved into ./Sources/Subs-DragDropBoards.php because I get the following error messages in the log when I use this mod: Call to undefined function BoardOrder() in ./Sources/Xml.php on line 44

Two possible solutions:
1.  Either rename all DragDrop_XML references in Subs-DragDropBoards.php to BoardOrder; or
2.  Change the second edit to ./Sources/Xml.php as follows:
'jumpto' => array(

'boardorder' => array(
'function' => 'DragDrop_XML',
),

Life doesn't have to be perfect to be wonderful ...

dougiefresh

Uploaded v1.4 - April 19th, 2017
o Fixed undefined function error found by GL700Wing.




@GL700Wing:  Thank you for reporting and solving this bug!  It's been included in this version!

dougiefresh

Uploaded v1.5 - July 7th, 2017
o Added support for SMF 2.1 Beta 3.
o Removed support for SMF 2.1 Beta 2.
o SMF 2.1: Fixed bug where source code was copied and deleted during uninstall.
o SMF 2.1: Fixed undefined function error in Sources/Xml.php.
o Fixed language XML operations for both SMF 2.0.x and 2.1 compatibility.

dougiefresh

Uploaded v1.6 - October 12th, 2018
o No functionality change.
o Updated documentation to point to new website.

-Rock Lee-

In passing I leave the translation, I did not see this mod before :P I leave the translations to Latin Spanish as usual!


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v1.7 - October 15th, 2018
o Added Spanish Latin translation, courtsey of Rock Lee.

ORIONzitos

Total of translations: 10

dougiefresh

Uploaded v1.8 - October 17th, 2018
o Added Brazilian Portuguese translation, courtsey of ORIONzitos.

Bigguy

Could this be done on a per user basis, so they can re-arrange the forum the way they want. ??

dougiefresh

 Hmmm....  Probably, although I personally wonder how much impact such a mod would have on forum performance.

Bigguy

Yeah I figured performance would take a hit. It was just a question I thought I would ask. :)

dougiefresh

Quote from: Bigguy on October 17, 2018, 05:59:47 PM
Yeah I figured performance would take a hit. It was just a question I thought I would ask. :)
Well, it might not be a bad hit, and who knows, it might be negligible....  Users wouldn't be able to change if a board is a child of another board, as that adds too much complexity to a drag-and-drop system for users.  However, the process of building an "admin-styled" board rearrangement UI, plus drag-and-drop management, for users is not a simple task....

I'm not sure if the benefits outweigh the effort to mod the forum like that.   Let me think on it some....  I can see the utility in such a mod, though....

Bigguy

It was just an idea I got when staring at this thread for a second or two. seems the logical direction for this mod though, lol.

Arantor

I'm curious, how is it "the logical direction"? I could see it being logical as part of a much larger refit of the entire system to focus on an individual user's wants over the community's (which implicitly comes at the price of making your community less of a community, a la Facebook)

On a practical note, if you did do it for all users individually, you'd also need to update the loading of boards for breadcrumbs which would be a small but annoying change.

Drag and drop for hierarchies and child boards isn't particularly icky for users, at least not the users who arranged albums inside albums in LevGal.

Bigguy

Well you have the functionality of it that only the admin gets to use. Why not try and extend that to the users. It seems to me that if this mod was going to be extended that this would be one of the only ways to do it. Like I said it was just a thought. No real harm done here.

dougiefresh

Uploaded v1.9 - May 22nd, 2019
o Added support for SMF 2.1 RC2.
o Removed support for SMF 2.1 Beta 3.
o Fixed language XML files to properly skip non-existant files.




@Bigguy:  I've given this idea very little thought over the last few months.....

Advertisement: