I got a pretty stable, complete rewrite of the folder hack.
I'll attach it as a diff. Downside: Only backend, don't know
when I'll find the time to write a front end. But got a
picture of the front end in my head.
Might do a picture of it :-)
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
here's the sql-sheme. note the missing "primary key" and the
absence of default values. both should be fixed...
mod_phpwsbb_forums gets a "folder_id" attribute,
mod_phpwsbb_folders is completely new. the "visible" flag is
new for the folder hack #2, the rest of the sheme is known
from folder hack #1 already.
here comes the mockup for the folder setup. on top, you'll
see bread crumbs, like seen in Health. "Control Panel" leads
the user back to the "Administration tab" of the Control
Panel, "Forum Administrator" to the main Admin screen from
phpwsbb.
add folder adds another folder to phpwsbb, it will be
appended to the last folder listed. add forum is a shortcut
to the "new forum" dialog, pressing save there should lead
back to the folder setup dialog. it would of course be
helpful to see a breadcrumb there like
Control Panel > Forum Administrator > Folder Setup > Add Forum
so the user won't get confused.
the up/down arrows change the sort order of the folders, so
the user could move the folder up or down. it's basically an
update statement excecuted via mouseclick.
rename / kill / hide enables the user to rename, remove or
hide the folder. hide would set "visible" to 0 in the
phpwsbb_mod_folders table, kill would remove the folder
alltogether from the phpwsbb_mod_folders table. thinking
about it, the folder name should be a link, leading to a
"details" dialogue. with a bread crumb like
Control Panel > Forum Administrator > Folder Setup > Change
Lounge
there, the user could enter the folder description. also, it
would include a checkbox for "visible" and a way to rename
the title of the folder. the other links should still stay
in place as shortcuts.
Back to the Folder Setup Dialog.
"unfolder" probably is grammatically wrong. I wanted to
emphasize that the corresponding forum isn't REMOVED, but it
simply would lose its folder-association.
the drop down list next to the add button would contain all
the "unfoldered" forums, so one could easy associate a forum
with a folder. if there is no unfoldered forum, there
wouldn't be any dropdown list or add button either.
the "-- unfoldered --" heading is special, as it contains
all the forums which are not associated to any forum.
"folder" here is the oposite of "unfolder". the drop down
list here contains the list of folders, one could associate
folders and forums here.
add folder and add forum again are shortcuts, they are
repeated here for better usability. cancel would cancel all
editing (if feasible) and go back to the Forum Admin,
whereas save would save the changes and go back to the Forum
Admin as well.
thinking about it, all forum names could be links as well.
they'd link to a "Forum Details" dialog, like the "Folder
Details" dialog mentioned previously.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=711566
Moving this to feature requests. Will get this added to the
next release. Thanks
Logged In: YES
user_id=1035762
I got a pretty stable, complete rewrite of the folder hack.
I'll attach it as a diff. Downside: Only backend, don't know
when I'll find the time to write a front end. But got a
picture of the front end in my head.
Might do a picture of it :-)
Thanks!
folder hack #2 -- complete rewrite
Logged In: YES
user_id=1035762
here's the sql-sheme. note the missing "primary key" and the
absence of default values. both should be fixed...
mod_phpwsbb_forums gets a "folder_id" attribute,
mod_phpwsbb_folders is completely new. the "visible" flag is
new for the folder hack #2, the rest of the sheme is known
from folder hack #1 already.
mysql> describe mod_phpwsbb_folders;
+-------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| id | int(11) | YES | | NULL | |
| sortorder | int(11) | YES | | NULL | |
| name | varchar(50) | YES | | NULL | |
| description | varchar(255) | YES | | NULL | |
| visible | int(11) | YES | | NULL | |
+-------------+--------------+------+-----+---------+-------+
5 rows in set (0.01 sec)
mysql> describe mod_phpwsbb_forums;
+----------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default
| Extra |
+----------------------+-------------+------+-----+---------+-------+
| id | int(11) | | PRI | 0
| |
| folder_id | int(11) | YES | | NULL
| |
| owner | varchar(20) | YES | |
| |
| editor | varchar(20) | YES | |
| |
| ip | text | YES | | NULL
| |
| label | text | | |
| |
| groups | text | YES | | NULL
| |
| created | int(11) | | | 0
| |
| updated | int(11) | | | 0
| |
| hidden | smallint(6) | | | 1
| |
| approved | smallint(6) | | | 0
| |
| description | text | YES | | NULL
| |
| threads | int(11) | | | 0
| |
| sortorder | int(11) | | | 0
| |
| lastpost | int(11) | | | 0
| |
| posts | int(11) | | | 0
| |
| lastpost_topic_label | text | | |
| |
| lastpost_topic_id | int(11) | | | 0
| |
| lastpost_post_id | int(11) | | | 0
| |
| moderators | varchar(40) | | |
| |
+----------------------+-------------+------+-----+---------+-------+
20 rows in set (0.00 sec)
mysql>
Logged In: YES
user_id=1035762
here comes the mockup for the folder setup. on top, you'll
see bread crumbs, like seen in Health. "Control Panel" leads
the user back to the "Administration tab" of the Control
Panel, "Forum Administrator" to the main Admin screen from
phpwsbb.
add folder adds another folder to phpwsbb, it will be
appended to the last folder listed. add forum is a shortcut
to the "new forum" dialog, pressing save there should lead
back to the folder setup dialog. it would of course be
helpful to see a breadcrumb there like
Control Panel > Forum Administrator > Folder Setup > Add Forum
so the user won't get confused.
the up/down arrows change the sort order of the folders, so
the user could move the folder up or down. it's basically an
update statement excecuted via mouseclick.
rename / kill / hide enables the user to rename, remove or
hide the folder. hide would set "visible" to 0 in the
phpwsbb_mod_folders table, kill would remove the folder
alltogether from the phpwsbb_mod_folders table. thinking
about it, the folder name should be a link, leading to a
"details" dialogue. with a bread crumb like
Control Panel > Forum Administrator > Folder Setup > Change
Lounge
there, the user could enter the folder description. also, it
would include a checkbox for "visible" and a way to rename
the title of the folder. the other links should still stay
in place as shortcuts.
Back to the Folder Setup Dialog.
"unfolder" probably is grammatically wrong. I wanted to
emphasize that the corresponding forum isn't REMOVED, but it
simply would lose its folder-association.
the drop down list next to the add button would contain all
the "unfoldered" forums, so one could easy associate a forum
with a folder. if there is no unfoldered forum, there
wouldn't be any dropdown list or add button either.
the "-- unfoldered --" heading is special, as it contains
all the forums which are not associated to any forum.
"folder" here is the oposite of "unfolder". the drop down
list here contains the list of folders, one could associate
folders and forums here.
add folder and add forum again are shortcuts, they are
repeated here for better usability. cancel would cancel all
editing (if feasible) and go back to the Forum Admin,
whereas save would save the changes and go back to the Forum
Admin as well.
thinking about it, all forum names could be links as well.
they'd link to a "Forum Details" dialog, like the "Folder
Details" dialog mentioned previously.
folder setup mockup