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

Tuning the Manager

Our plan: We want to give the getList() function a where-clause, that will be used for generating the object list. The Manager hides within core/Manager.php by the way.

  1. put var $listWhere = NULL; somewhere below var $listName = NULL
  2. change the signature of getList() to function getList($listName, $title=NULL, $makeForm=TRUE, $overRideOp=NULL, $listWhere=NULL) (the $listWhere part is new)
  3. add $this->listWhere = $listWhere right below the assignment for $this->listName
  4. change all calls of getItems to $this->getItems($this->_pagers[$this->listName]->getData(), FALSE, TRUE, $listWhere);
  5. change the signature of getItems to function getItems($ids=NULL, $filterGroups=FALSE, $everything=FALSE, $where=NULL)
  6. after $sql = substr( .... . ")";, enter if($where) $sql .= " AND $where ";

That's it. Now we have to tweak the phpwsbb itself. Also, who would have guessed it, in it's Manager.

Tuning phpwsbb

Purists, please look away. This is the ugly part.

I've hardcoded, yes hardcoded the folder names in my copy of phpwsbb. Hey, it's nearly 4am. And...

Find a nice place somewhere above function_list and put in the following two new functions.

function _list_folder($folder_id, $folder_name) {
  $folder.=$this->getList('forums', $folder_name, FALSE,
  FALSE, "folder_id=$folder_id");


function _list_all_folders() {
  $folders=$this->_list_folder(1, "General");
  $folders.=$this->_list_folder(2, "Lounge");

In _list_all_folders, you'll of course enter all your folders with their corresponding folder_ids. Now, find the line in _list, where the content tag is assigned. Change it to:


That's it, you're done. Folders. Nice, ain't they? Well, they of course could be nicer. In fact, I've changed two templates for mine. Feel free to use them. As usual, a link to would be very nice. And if you got any comments... The "make comment" link is there for you and waiting to be clicked on.

1 | 2
Tuning the Manager

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