1 (edited by Tobi 2005-11-06 21:52)

Topic: Drag and Drop Forum Sorting (Preview)

This was a lot more work than I thought it would be.
It is still far from being perfect and i think I will need some input from you folks to improve it.

To  get an impression I set up a dummy board that you might abuse (but not too heavily, please wink )
http://www.tobi.gr/testboard/
User:Test, Password: Test
Go to the admin and click on "forums dragndrop" in the Plugins section.
Should work with IE6 and of course Firefox

If you create test forums/categories please be so kind & go to the respective "regular" admin to delee it afterwards. Thanks.

This thing will immediately update the database when moving a forum/category. No warning, no dummy submit button, plain ajax in the background.

Issues/Bugs:
- The selection of the text fields of the forums/categories is really ugly.
This is because I have to steal the onmousedown handler from the drag script. I'd appreciate a solution for that smile
- If a forum is moved above all categories there is an alert because it is illegal.
However, the forum does not "snap back" afterwards because I was too stupid to find out how this could be done.
Again, if anybody has a clue...
- Deletion is not possible. Would be easy to do but I was wondering if this is not too dangerous in this pointy-clicky environment. What do you think?

General:
- There is extra stylesheet for the divs and form fields. it is in the plugins/mod_forum_dragndrop folder.
Although this breaks with the general rules I prefer to have all mod/plugin  files concentrated somewhere. Am I wrong?

For those who'd liek to help (and my, I would love some help) the source fles and readm are here:
mod_forums_dragndrop

Whoever is interested in this matter, please join in.

The German PunBB Site:
PunBB-forum.de

Re: Drag and Drop Forum Sorting (Preview)

That is awesome good work. as for deletion make an alert box for confirmation?

edit: ok i've had a bit more of a think about this, how about the form name is not editable, but there is a edit button, you click the edit botton and the box for the forum expands and gives you all the options you normally get for the forum, it has a save button which closes this box and a delete button to delete the forum

3 (edited by Tobi 2005-11-06 19:25)

Re: Drag and Drop Forum Sorting (Preview)

Connorhd wrote:

That is awesome good work.

Are you well?
tongue

Connorhd wrote:

how about the form name is not editable, but there is a edit button, you click the edit botton and the box for the forum expands and gives you all the options you normally get for the forum, it has a save button which closes this box and a delete button to delete the forum

Sounds like a very good plan! Solves several problems at once....
All the time I was looking for a way to have people enter the description text as well.
Since these are <li> tags with divs inside it may be a bit difficult to implement but it's worth a try.
Not today though....
smile

The German PunBB Site:
PunBB-forum.de

Re: Drag and Drop Forum Sorting (Preview)

I mean awesome but very messy tongue No really it looks great and feels nice to use.

Re: Drag and Drop Forum Sorting (Preview)

The username/password you entered above doesn't work.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

6 (edited by flx 2005-11-06 20:47)

Re: Drag and Drop Forum Sorting (Preview)

Test/Test works

cant see ajax though

7

Re: Drag and Drop Forum Sorting (Preview)

Javascript error when attempting going DragNdrop plugin

8 (edited by Tobi 2005-11-06 21:47)

Re: Drag and Drop Forum Sorting (Preview)

Rickard wrote:

The username/password you entered above doesn't work.

Test/Test. Sorry. Been a long day...

rod wrote:

What error? What does ist say?

And - which Browser?
Ans - what exactly are you trying to do when yo get the error?

flx wrote:

cant see ajax though

The goood thing about ajax is that you do not see it tongue

The German PunBB Site:
PunBB-forum.de

Re: Drag and Drop Forum Sorting (Preview)

Very nicely done. The only thing I can think of that I don't like about it is the usability aspect. There really isn't anything that makes you think you can drag&drop things. Maybe it's the renaming textboxes that disrupt it.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

10

Re: Drag and Drop Forum Sorting (Preview)

http://www.tobi.gr/testboard/admin_load … gndrop.php

I'm under XP and IE 6

error at the bottom left (you know the WARNING smile)

11

Re: Drag and Drop Forum Sorting (Preview)

So .. it works under FF ...

so the question si simple : WHY going under ADMIn ? it would be more practice to do it directly on the index ? smile

12

Re: Drag and Drop Forum Sorting (Preview)

Rickard wrote:

Very nicely done. The only thing I can think of that I don't like about it is the usability aspect. There really isn't anything that makes you think you can drag&drop things. Maybe it's the renaming textboxes that disrupt it.

It says on top of the page that you can drag and drop... but I know what you mean. t's more that people are not used (yet) to drag & drop in the browser.
I'll think of adding handles to the items so they *look* draggable smile

Rod wrote:

so the question si simple : WHY going under ADMIn ? it would be more practice to do it directly on the index

You cannot change the order without being an admin. At least it wouldn't be persistent.

The German PunBB Site:
PunBB-forum.de

13

Re: Drag and Drop Forum Sorting (Preview)

It works nicely in Firefox, with some usabiltiy issues as Rickard pointed out.  Note, it doesn't work in Opera 8.

14

Re: Drag and Drop Forum Sorting (Preview)

I think its intention was to make things alot easier to change and manipulate. And, it gets the job done nicely.

-gezz

Re: Drag and Drop Forum Sorting (Preview)

very nice!

16

Re: Drag and Drop Forum Sorting (Preview)

It's awesome, I didn't look at the code, but how can you query the database without even refreshing the page? That's crazy!

Re: Drag and Drop Forum Sorting (Preview)

Thats the whole point of AJAX wink everytime you move something it calls a php page with what you did

18 (edited by Tobi 2005-11-07 10:25)

Re: Drag and Drop Forum Sorting (Preview)

OK, fixed a bug that prevented the page to load properly in IE and Opera.
Now it's OK.
Please understand that I only have a limited number of browsers at hand, so it works on
IE6, FF and Opera 8.5, al others you will have to test smile

Next tasks

1. Make the forum/cat names ineditable and introduce an "Edit"-Button that will open a floating edit area for the forum/mod
2. Add a delete option there
3. Think about ways to make it more obvious that the whole thing is draggable.

Forgot something?

The German PunBB Site:
PunBB-forum.de

19

Re: Drag and Drop Forum Sorting (Preview)

Ajax is very powerful smile

About your 3 points Tobi > it would be perfect, simply ... double click on the forum area (index.php) > text becomes text areas and you can change the name + descr' of the forum.

It would be great to put this option (the last I have written) on the whole forum (the function EDIT disappeared smile)

20 (edited by Smartys 2005-11-07 11:52)

Re: Drag and Drop Forum Sorting (Preview)

Tobi wrote:

OK, fixed a bug that prevented the page to load properly in IE and Opera.
Now it's OK.
Please understand that I only have a limited number of browsers at hand, so it works on
IE6, FF and Opera 8.5, al others you will have to test smile

Next tasks

1. Make the forum/cat names ineditable and introduce an "Edit"-Button that will open a floating edit area for the forum/mod
2. Add a delete option there
3. Think about ways to make it more obvious that the whole thing is draggable.

Forgot something?

Do what Google does (with personalized homepages): just tell the user that it is draggable tongue

21

Re: Drag and Drop Forum Sorting (Preview)

Rod wrote:

About your 3 points Tobi > it would be perfect, simply ... double click on the forum area (index.php) > text becomes text areas and you can change the name + descr' of the forum.

This is way too much programming.
This function you only want to have if the user who clicks there is an admin, right?
So, you have to have the full functionality available any time but only access it for certain users.
This is 1st a huge overhead in JavaScript and html that is sent to the users which for 99% cannot use it and
2nd it will take me days again to just make the changes I mentioned. What you are thinking of is nice in theory but - in my opinion - impossible/not good to do.
But, hey - go ahead & prove me wrong wink

The German PunBB Site:
PunBB-forum.de

Re: Drag and Drop Forum Sorting (Preview)

I think editing the index is overkill tongue,

As for making it obvious it is to move, how about making the cursor the move cursor when you hover them?

Re: Drag and Drop Forum Sorting (Preview)

Rod wrote:

About your 3 points Tobi > it would be perfect, simply ... double click on the forum area (index.php) > text becomes text areas and you can change the name + descr' of the forum.

It would be great to put this option (the last I have written) on the whole forum (the function EDIT disappeared smile)

Honestly, how often do you rename or reorder your forums?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

24

Re: Drag and Drop Forum Sorting (Preview)

Liked! Awsome!

Yours, Benny.

25

Re: Drag and Drop Forum Sorting (Preview)

Connorhd wrote:

As for making it obvious it is to move, how about making the cursor the move cursor when you hover them?

Now, that's one great idea.
I'll do that, currently I am heavily struggeling with the editing...

The German PunBB Site:
PunBB-forum.de