skip to main content

Folders for phpWebSites Bulletin Board
updated by rck, 2004-12-10

While some might say, phpWebSite has too much of everything, I don't agree. One thing is missing for quite some time in its native Bulletin Board: Subforums!

I have hacked phpwsbb a bit and came up with folders - Containers for phpWSBB Forums. Enjoy!

1 | 2


This hack is rather rude. It tweaks a phpWebSite core module called Manager which is responsible for listing phpWS objects. The Manager is written rather monolithic, which is a pitty. I've added the ability to handle SQL wheres in lists also.

As usual, it's more a proof of concept than something that should be used for productive sites. On the other hand: It works and is rather extensible. Well, it's your decision wether you want to use it or not.

Preparing the Database

I didn't include any kind of frontend for the hack. It's all a matter of direct database access, as well as modifying php-code and templates.

I've introduced a new table, it's called mod_phpwsbb_folders. While not directly used in my hack, it comes in handy for further developing it. So start your favourite MySQL frontend and enter:

create table mod_phpwsbb_folders (
  id int not null auto_increment primary key,
  name text not null,
  description text

You can enter your foldernames right away. I've entered the following four without any description:

insert into mod_phpwsbb_folders (name) values
  ("General"), ("Lounge"), ("Beautification"), ("Study");

Associating Folders and Forums

Now that we've defined our folders, we need to put the forums in it. That's easy, as soon as we've created space for the reference.

Again, in MySQL, enter:

alter table mod_phpwsbb_forums
  add folder_id int after id;

While we're at it, we can as well have a look at our existing forums. List them up with

select id, label from mod_phpwsbb_forums;

You'll get something like

1  Software Engineering
2 Dieses & Jenes
3 Security & Privacy

What folder?

We now have a folder_id as well as a id in our mod_phpwsbb_forums table. But: the folder_id is still empty for all records. Let's change that. If I'd want to associate the Software Engineering Forum (having id 1) with the Study Folder (having folder_id 4), I'd enter:

update mod_phpwsbb_forums
  set folder_id=4
  where id=1;

Do this for all your forums.

1 | 2

RSSComments - Make a comment
The comments are owned by the poster. We are not responsible for its content.
RSSAll Articles
2008, 2007, 2006, 2005, 2004

What's Related

Article Manager


Latest Updates

updated by freddiemac1993, 2013-06-14

Re: adventures
created by brittdavis10, 2012-02-23 (1 rply, 3 views)

Re: how to run phpwebsite...
created by alexander, 2011-08-25 (2 rpls, 3607 views)

Re: Forum tags
created by HaroldFaragher, 2011-08-22 (3 rpls, 8488 views)

Zu den KO2100 Foren