[ALPHA] phpBB Knowledge Base (MMW)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
MarkTheDaemon
Former Team Member
Posts: 2770
Joined: Thu Oct 20, 2005 2:42 am
Location: United Kingdom
Name: Mark Barnes

Post by MarkTheDaemon »

Prince Of phpBB & thecharmed01: Your offers are very much appreciated, i will contact both of you later in the week for more info.



Mark
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Searching the KB

Post by drathbun »

Here's the first design question I will throw out for consideration... how will the KB be searched? I'll present two options, you may have other ideas as well.

First idea, integrate with the existing phpBB search process. This has advantages:
  • People can search the forum + the KB at the same time
  • While it does have its issues, especially on large forums, the phpBB search algorithm can be very effective on small to medium boards
  • We would not have to write our own search code, we would simply have to MOD the existing search
Disadvantages
  • Larger boards already have huge search word match tables, this would increase the problem
  • There's no facility for searching for an exact phrase in the standard search algorithm
I personally like this idea, primarily because of the way I would use the KB. The ability to search the KB and the forum at the same time is very attractive. I would envision having the KB articles (a smaller set, I would expect) displayed first on the search results pages, followed by forum topic matches. So this idea gets my vote, despite the added burden on the search tables. Of course this is open for discussion / your approval. :-)

Second option, use a custom KB search process. In this case, you would have one search interface for the forum, and a second interface for the KB. But by doing that, you avoid the overhead of the normal phpBB search process, and you could potentially provide options like "search by phrase" that are not available. Advantages
  • Independent of phpBB's search, so avoids overhead for the search tables
  • May be less likely to "break" during the upgrade to Olympus
  • Custom search process can provide custom search features like a phrase search
Disadvantages
  • We have to write it :-)
  • Board members have to remember to search more than one place for answers
As I suggested, I am in favor of using the first option. If you agree, then that helps start the design process as we know that we have to integrate the KB articles into the standard search process. If you elect to go that route, here's another idea that you might consider...

Instead of a separate database for KB articles, what about simply using topics and posts? With some creative coding, we could set up a forum called the "Knowledge Base" that doesn't appear on the normal index. But by going that route, we might be able to reuse a lot of existing phpBB code, such as the posting, the search management, the permissions system, the paging...

The KB article would be post #1 in the topic. Any comments on the article would be additional posts on the topic.

There's a lot more to discuss, and I don't know if you have already considered and rejected this idea, but I thought I would toss it out for your thoughts. Even if you don't choose to do this, we still need to make a design decision about how we'll provide a search feature. I believe that even if the KB articles are stored in a different set of tables (meaning don't use the topic / post idea in the prior paragraph) that we can still use the standard search tables.

The current search tables include the post id and word id. What we would need to add would be a "source type" field, so if the source type is 'F' then we know that's a forum post, or if the sourcetype is 'K' we know it's a knowledge base article. Or something like that. We can even leave the source type blank for forum posts, so that the table takes less space, and doesn't require changes to the standard post process. That's probably a better idea.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

That's a good thing to discuss, drathbun.

I personally like the idea of using Topics for articles. It would also make it easier to move and organize articles.

An article system for vBulletin works excaclty like that, that can be found here.

There also is a "MOD DB", that works like that for vBulletin. Look here, it could be an inspiration :)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
Sphenn
Registered User
Posts: 173
Joined: Mon Aug 22, 2005 5:32 pm
Location: Winnipeg, Manitoba, Canada

Post by Sphenn »

Regarding Drathbun's comment about searching, I also think integrating it with phpBB's search is a good idea. How about making the KB another 'forum' on the search page that can be searched exclusively if need be. Hope that was clear. Don't know how to explain it better than that.

Also, Mark, if you need some help, I'd be more than willing :)

Sphenn
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post by drathbun »

I have lots of ideas. :-) I want to make it clear, though, that I consider the final decision to be up to Mark. His name is on the topic, so he's the project manager for this project so to speak. I think the value of using the phpBB search system outweighs the cost... especially since (I would assume) that even on a very busy board the KB is not going to be the largest source of information. So the number of words added to the search word list and search word match tables should be minimal. In fact, many of the words for the KB articles could already be in the search word list table.

I will throw out another idea for consideration. In my mind the KB is - at its core - a collection of articles. Lots of activities revolve around the article entity. Above the articles would be (could be) categories. For example, if you look at the phpBB KB there are categories, and articles are contained within categories. So here are two design ideas to consider around that...

1. Do categories have sub-categories, or are they a single level? If we go with sub-categories I think it will be more globally useful, as categories / subcategories would be well received. However, a single category is much easier to code. I've looked at the sub-forum algorithm (or the original source for the idea) used in Olympus and I think that we would want to consider that if we are going to use subcategories.

If we use subcategories then that essentially eliminates the idea of using the forum / topic / post tables for the KB as there is no feature for that currently that we could use.

2. Can articles exist in more than one category? I have in mind a couple of ways to organize articles, one is by category and another by keyword. The keywords are probably still useful, but I can also see having an article that exists in more than one category. One could argue that if you have articles that exist in more than one category that the categories are too specific, or the article too generic. But it might be worth a consideration.

One of the other ideas is comments on articles. I'll put this simply... are comments on the articles threaded or flat? Flat is the phpBB style, threaded might be an interesting enhancement for the KB. If the choice is threaded, then again that eliminates the idea of using phpbb tables to store them. If flat, then comments can simply be stored in the posts table.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
ToonArmy
Former Team Member
Posts: 4608
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith
Contact:

Post by ToonArmy »

I thought I might add some input here as I am considering using the code you come up with for another project ;)

I personally think that drathbun's idea of using the existing phpBB subsystems (forums, posting, search, auth, etc) is an excellent. I would like to point out some things.

I personally think you should try and utilise as much phpBB code as possible, this makes the mod easier to install whilst not duplicating all the phpBB code inside the mod. You could have the admin declare a category the KB category the forums in that categrory form the basis of the KB's categories. Under a stock phpBB you would then be limited to a single depth of categories, you could choose to support other sub forum modifcations to provide nested categories to those that have the mods installed. An Alternative would be to get creative with forum categories and then have the admin define where they should belong in the hierarchy. To continue, articles would become topics and the first post could be used to store metadata such as post id's of each page, if the article is approved, etc.. Posts would then either be the different pages or comments (imho threaded comments are out of the question with this approach). Articles would be able to exist in multiple categories using shadow topics.

If you need a hand I might have a hand to spare, I do know my stuff when it comes to PHP (trying to word this in an un-pompous way.)
Chris SmithGitHub
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post by drathbun »

@ToonArmy, there is certainly a benefit to considering using the phpBB table structure as much as possible, for all the reasons you mentioned. There is also (IMHO) a major benefit in considering other options... especially if the code can be written using phpBB3's techniques and still be compatible with phpBB2. That would provide an easier upgrade path for those moving to Olympus when it goes golden furry whatever edition. That's one of the reasons I brought up hierarchical categories, as that would be easier to implement in Olympus.

Threaded versus flat commenting... well, that's out if we use phpBB table structures, and I'm not all that excited about threaded comments anyway.

I figure this MOD will take a decent amount of time to develop, and some sort of consideration should be given to making it work with both phpbb2 and 3.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
danb00
Registered User
Posts: 1025
Joined: Sun Dec 15, 2002 9:41 pm
Location: Inside Mod:Extreme PHPBB
Contact:

Post by danb00 »

Here are some ideas.
Make use of the phpBB Search function BUT add to it. So you have an option to search the KB or Forums etc.
Also you could search by KB category. Or the keywords. Or user of posted KB article etc.

Make use of the phpBB forum manager and do it the same way with the KB. Also you would need permissions etc.
phpBBModded.com - Modding phpBB
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post by drathbun »

danb00 wrote: Make use of the phpBB Search function BUT add to it. So you have an option to search the KB or Forums etc.

Of course. :-) The way I see it is there is an adjustment to the search process... today you can search "Forum Topics Message + Title", "Forum Topics Message Only". I would see that divided into two, so you get topics only, KB only, topics + KB, and then body + title, body only, and title only. The title only extension for searching forum topics has already been written and (I believe) released here.
Also you could search by KB category. Or the keywords. Or user of posted KB article etc.

Searching within a category of the KB would be (could be) just like searching within a category of the board. Keywords would be treated differently, more on that in a moment. For users, we already have a "find all posts by this user" it could be extended to "find all KB articles by this user" and "find all KB comments by this user" as well.

Keywords... one of the challenges that you always face with writing a keyword search is that people always pick different keywords. :-) I put in POST you put in POSTS and now we're not going to match. So what I had in mind was for the admin (or KB moderators) to be in charge of entering a list of keywords. The list should remain fairly specific and fairly small. I see keywords as a way to focus or narrow down the scope of the article (meaning they're more specific than categories) or share the scope (meaning one keyword can be used by articles in more than one category). But in either case, the keywords should be entered and managed by a small group, and then keywords can be assigned or related to articles on a many to many basis. Meaning one article can have zero or more keywords, and one keyword can be assigned to zero or more articles.

Then searching by keywords is simply a matter of pulling up a specific keyword search, clicking checkboxes for all the keywords you want, and getting the results. That screen should even have a count of how many articles the keyword is used by in order to avoid clicking something just to get a "no articles matched" error message. If you wanted to get fancy you could provide for boolean logic among keywords (KW1 and KW2 or KW3) but I think that might be overkill.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
MarkTheDaemon
Former Team Member
Posts: 2770
Joined: Thu Oct 20, 2005 2:42 am
Location: United Kingdom
Name: Mark Barnes

Post by MarkTheDaemon »

Well i've been away for the weekend and have missed some pretty revelant discussion.

I'll try to comment on all of the posts above, if i miss your post please give me a nudge and i'll answer any questions anyone might have.

drathbun: It was never my intention to reinvent the wheel and use anything other than the phpBB search system. While i think the search could be improved, i feel we could add to the search rather than totally rebuilding it.

phpBB3 has been a great consideration in the ideas for development, and i feel that this MOD will take a fairly large amount of time to develop. Therefore my initial idea was to develop it mainly around phpBB3, and then backport the code to phpBB2 standard. This way phpBB3 gets a Knowledge Base, phpBB2 gets one as well and everyone is happy :)

Sub-categories are also a good idea, as this allows for more flexibility for the Knowledge Base. This is easier to implement in phpBB3, but its certainly possible to implement in the phpBB2 version as well.

Sphenn: Thanks for the offer of being able to help, all help and guidance is appreciated

Everyone: As part of the development of this fairly large MODification to phpBB2 and phpBB3 i have decided to register a Sourceforge project for development of this MOD. http://www.sourceforge.net/projects/phpbbkb and http://phpbbkb.sourceforge.net are the new development areas.

To all people interested in developing this MOD: The SVN server will change to the new project house soon. If you would like access to the SVN server drop me a PM on this forum and i'll add you to the list of developers. I'll also put up a development chat board on the site so developers can communicate with one another. The mailing list will also change to reflect the new setup, please give me a couple of days to sort out all of these changes.

I hope that answers everyones questions. If not feel free to nudge me again.


Mark :)
ToonArmy
Former Team Member
Posts: 4608
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith
Contact:

Post by ToonArmy »

I think the phpBB 2/3 combo plan is an awesome idea. If the code can be written so it is dependant as much as possible on each of the phpBB cores without much modification it should be easier to run the project for each version in parallel. I would suggest some sort of extraction API which will then present a consistent set of functions to be used by the KB, and then to reneder another API which again will sort the quirks of each version out :D

The only real problem is hiding the forums/categories that the KB uses from the phpBB core this is where modifcation of phpBB would be needed sadly :(
Chris SmithGitHub
MarkTheDaemon
Former Team Member
Posts: 2770
Joined: Thu Oct 20, 2005 2:42 am
Location: United Kingdom
Name: Mark Barnes

Post by MarkTheDaemon »

I've been reading slightly more of Dave's post above and I agree with most, if not all, of the points he's made. The seperate forum for the KB has always been, IMO, a good idea. I'm not one for reinventing the wheel, and if we can use as much phpBB code as possible, while keeping everything with as little code editing for the end user :wink: as possible we have a good solution.

Anybody who has offered to help: I'll be contacting you all via PM shortly to discuss what you can do in order to make the project into a sucess :)


Mark
Last edited by MarkTheDaemon on Sun Jul 23, 2006 11:34 pm, edited 1 time in total.
ToonArmy
Former Team Member
Posts: 4608
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith
Contact:

Post by ToonArmy »

Send one of those PMs my way, I would like to help, if I am not too stretched for time.
Chris SmithGitHub
MarkTheDaemon
Former Team Member
Posts: 2770
Joined: Thu Oct 20, 2005 2:42 am
Location: United Kingdom
Name: Mark Barnes

Post by MarkTheDaemon »

ToonArmy wrote: Send one of those PMs my way, I would like to help, if I am not too stretched for time.


Welcome to the developers ;-)

The Subversion details have been re-added to the initial post. There are currently two code branches, phpBB3 and phpBB2.

The Mailing List is also active again, should you subscribe you will recieve a commit notification (much like the CVS version that phpBB.com uses).


Mark
MarkTheDaemon
Former Team Member
Posts: 2770
Joined: Thu Oct 20, 2005 2:42 am
Location: United Kingdom
Name: Mark Barnes

Post by MarkTheDaemon »

Just to let everyone know that the Feature Tracker on SF is now open for people to request features. The link to it, with explanation, is in the first post of this topic.

Also the first commits have started going into SVN;

"It's one small step for man, but one giant leap for the project ;-)"


Mark
Post Reply

Return to “[2.0.x] MODs in Development”