!!INTRO

__Features:__
* Quick, easy to install, easy to use, easy to expand.
* Searchable!!! Forum search results can be easily integrated into the main search page.
* Will work with whatever template you use.

__What You Will Need:__
* Working JSPWiki instance
* MySQL instance installed
* Java SQL (JDBC) Jarfile like [this one|http://dev.mysql.com/downloads/connector/j/3.0.html]

That's it! In less then 15 minutes you could have a (mostly) functional forum running on your wiki. What are you waiting for!

----
!!Overview

Allright, I confess, I'm really hoping this plugin gets both interest and support, I've put a lot of work into this and I'm hoping that some of you will be willing to help make it better.

__Structure:__\\
__''Category'' --> ''Topic'' --> ''Thread'' --> ''Post''__


__Topic__ - The star of the show. When you use the {{{[{Forum title='title'}]}}} plugin inline in your wiki page, the Forum plugin displays all threads for that topic. If the topic does not yet exist in the database it is created. Threads can be added to this topic using the "Add Thread" button. There is also a link to select the category that contains this topic. This is entirely optional and is just a convenience feature.\\
[topic.jpg]\\

__Category__ - An optional structure to help you organize your Topics. If you create a structure of Categories (and maybe subcategories) and select which is the parent Category of your topic, you will have the option of browsing the category tree. The idea behind Categories is to provide central organization.


__Thread__ - A single subject of discussion, a thread contains many posts related to it's subject.

__Post__ - An individual post in a thread, can currently be edited (by the author) but not deleted. Users enter posts in standard wiki markup that is translated by the wiki engine.\\
[thread.jpg]\\
\\
----
!!Installation

!Basic Installation:
# Install JSPWiki and get it working
# Make sure you edit the line in jspwiki.properties {{{jspwiki.baseURL=}}} to be the url of your wiki server. Without that line the forum plugin will not work. (* see note)
# In the folder of whichever template you are using, make a directory called ''Forum''. So the path should be ''/templates/yourtemplate/Forum/''. Download the files [Category_Add.jsp], [Category_Browser.jsp], [Category_Select.jsp], [Post_Edit.jsp], [Post_Save.jsp], [style.css], [Thread_Add.jsp], [Thread_View.jsp], and [Topic_View.jsp] into the ''Forum'' directory.
# Also download [images.zip] and [template_parts.zip] and unzip them into their respective ''images'' and ''template_parts'' directories inside of the ''Forum'' folder. When you are finished the directories should look like:
** /templates
*** /yourtemplatefolder
**** /Forum
***** /images
***** /template_parts
# Download [Forum.jar] into your ''/WEB-INF/lib/'' folder. Please note that I have attached the source files, please feel free to modify them. Just recompile and replace the class file in the jar.
## [Forum.java] - The plugin itself, it takes one operator, ''title'' to tell it which Topic to display.
## Forum/[DBaseConnection.java] - All of the jsp files and the Forum.java plugin use this as the connection to the database. If you want to change your connection settings you must edit and recompile this file.(and add the class file back to the jar) The default MySQL connection settings (* note 2) are:
** Connection string: ''jdbc:mysql://localhost:3306/forum''
** Username / Password: ''sticky / wicket''
# Download the appropriate JDBC connector for your platform from [MySQL|http://dev.mysql.com/downloads/connector/j/3.0.html]
# Install MySQL, create a database named ''forum'' and make sure to add a user with the username of ''sticky'' and password of ''wicket'' to have access to the ''forum'' database.
# Open and run [create_forum.sql], I've been using the sql pane in [MySQL Control Center|http://dev.mysql.com/downloads/other/mysqlcc.html], but use whatever works.

!Advanced Options:
# Some of you may remember my promise of searchable forums. Download and look at [FindContent.jsp], I've modified it from the original in the ''default'' template to include a rudimentary search of the forums. All later versions of MySQL allow a full-text search, so I've done a [FULLTEXT|http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html] key of the ''text'' column in the ''Post'' table. (See [link|http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html] for more details on doing searches in MySQL.) My implementation isn't the best, it merely links you to the ''Topic'' that contained a ''Post'' containing the word or words you searched for.
** Note - You must have at least 5 or more posts before the search will work. The way the database operates less than 5 posts will return no matches.
# You may also remember that I promised forums to use whatever template you choose. That's where the [template_parts.zip] file comes in, edit the ''top.jsp'' and ''bottom.jsp'' files to match your template. This is usually easier than it sounds, just crack open your ''~ViewTemplate.jsp'' file in your tempate folder and use what's above and below 
{{{
      <wiki:CheckRequestContext context="view">
         <wiki:Include page="PageContent.jsp" />
      </wiki:CheckRequestContext>
}}}
In top.jsp and bottom.jsp respectively

----
!!The Future

I am really hoping this plugin catches on, and I welcome comments, suggestions, and especially contributed code. I'm a little frustrated that I am limited in time and in what I know of Java. It'd be really nice to do this plugin right and I know I've only scraped the tip of the iceberg. So if you update or change this plugin in a way that you think would be useful for the rest of us, please feel free to upload your changes, comments, ideas to this page. Maybe we can make this better together.

!Changes we'd like to see:
* General code cleanup, addition of comments, documentation. (probably mostly my responsibility, I'll work on it)
* Handle database access with a connection pool.
* JSP pages cleaned up, error prevention added, forums mimic more closely forums like [JForum|http://www.jforum.net/].
* Improved search capabilities

!Ideas:
* Use Apache James to link newsgroups to forums, so that you can send emails or post on the forums and it will end up in the same thread.

----
!!Documentation

Coming soon!

''Jerry Andrews'': With Tomcat 5.5/JRE 1.5.0_03, I haven't been able to make the jsp's compile:  can't find "Forum".  I've tried adding an import tag at the head of the .jsps, but that's not solving the problem.  Is there something obvious I'm missing here?  JSPWiki couldn't find "Forum" either, until I added a "." to the jspwiki.plugin.searchPath: "jspwiki.plugin.searchPath = .".\\
\\
''[Carl Joeckel|mailto:cjoeckel@jhancock.com]'': I made some progress on this issue, but it is still far from resolved. It looks like tomcat 5.5 can only reference classes from within a JSP that are contained within a package - and had issues with the Forum class being outside the Forum package. I changed the code to put the Forum class into the Forum package (with the DB class), and the Topic_View.jsp page did compile. Unfortunetly, it looks like that change prohibits the plug-in from working properly. Anyone make better progress on this?\\
\\
''[GWP]'': Hi when with the issue with tomcat 5.5 be resolved?. Also please continue with this... it would be brilliant!!... Also might be asking a lot, but can you give this a bash at working with Oracle?


----

Some bugs are still present:
- the property jspwiki.baseURL is NOT used in all places where it should be used
- the Category_Select.jsp contains some hardcoded references to a special template
- the DBaseConnection uses wrong authentification scheme for mysql (at least for my installation)


--[Manfred|mailto:manfred.schenk@zerobyte.de], 04-Mar-2006


----

"back to" Link and Links between Topic-pages seem only to work when Forum is on Startpage of the wiki.

--[Manfred|mailto:manfred.schenk@zerobyte.de], 04-Mar-2006


----

Hi all!
I've tried to fix as many bugs as possible and uploaded a patchedversion as a zip file [ForumPlugin1.0/patchedVersion.zip]. The changes I made are mentioned in a README file inside the zip. There are still some bugs in it but now it fits my needs.

----

Suggest : why not add this feature that poster can inline something from JSPWikiPage ?
--[Manfred|mailto:manfred.schenk@zerobyte.de], 05-Mar-2006


----

Hi All!
I've modified the plugin, this is [patch|ForumPlugin1.0/JSPWiki-2.4.15-beta-plugin-Forum-patched-20060801.zip] installed on the [previous patch|ForumPlugin1.0/patchedVersion.zip].\\
The tag should be: e.g. [{Forum.Forum title='title'}].\\
The updated Forum.jar included in the patch, has classes in the package Forum, to work under Tomcat 5.5.
The template_parts jsps still require some more design modifications.
Enjoy!


--AnonymousCoward, 01-Aug-2006


----

The tag should be: e.g. { Forum.Forum title='title'}

--AnonymousCoward, 01-Aug-2006


----

The forum didn't work for me at all. I've modified it now so that it works with version 2.4.33 and PostgreSQL, see my attachment [pgsql_Forum_untested.zip]. (Actually it has been tested, but I wasn't able to rename the attachment...)

--[Candid Dauth], 21-Aug-2006


----

Forum doesn't work for me either. I am using Tomcat 5.5 and it's now working. If I use Forum I get, could not load, but if I use Forum.Forum everything is ok, only problem is that I see nothing... Am I missing something?

... Sorry about that message. I fixed the problem, there was problem with change of database. Since all database handling is done in pages, there was problem there. I plan to move all database handling from jsp to datalayer, so that it will be easier to adapt. I also plan to make changes in structure and setting...

__Structure (old):__\\
__''Category'' --> ''Topic'' --> ''Thread'' --> ''Post''__


__Structure (new):__\\
__''Forum'' --> ''Group'' --> ''Category'' --> ''Topic'' --> ''Thread'' --> ''Post''__

__Forum -__ There can be more forums on same wiki. This is root parent tag (can be only set in database not in runtime)\\

__Group -__ On forum can be one or more groups, which contains one or more categories (run-time readonly)\\

__Category -__ This is owner of certain threads. Category can not be changed in runtime.

__Thread__ - A single subject of discussion, a thread contains many posts related to it's subject. (same as old)\\

__Post__ - An individual post in a thread, can currently be edited (by the author) but not deleted. Users enter posts in standard wiki markup that is translated by the wiki engine.(same as old)\\

Runtime means, what user can use, all non-runtime stuff should be done in administrator part, which is not 
existent at this time, and it won't be so soon. I will make this admin part as external application, so that
changes are written directly to db, without web interface for now.

This changes will take some time, since I won't be at home so much now in holidays time.


--Andy, 04-Jul-2007

__I decided that I will move my forum changes into another topic, probably 'AT Forum Plugin 1.0'. I have started my work and I have already made so many changes that is not compatible with this version anymore. You can stay tuned for new version in Plugin list, but it will probably be a while (by the end of august it must work on my site... he he)... __

--Andy, 11-Jul-2007



----

Hello,

I got the Forum Plugin working with MySQL. Is there a solution for Oracle DB???

I think the only changes would be in modifying the SQL statements as well as the DB connection.



--MantschThomas, 27-Feb-2008


Anyone have a good sample site with this ForumPlugin1.0 in action ?


----

I am using JSPWiki 2.8 and trying to incorporate the Forum Plugin.  I get through the installation instructions fine, but then do not see how I am actually suppose to get to the Forum itself.....

I dont know if I am doing something wrong during installation or if it is not compatible with my version of JSPWiki 2.8.

Thanks,
Ken

--ken, 06-Feb-2009 22:05


----

Iam also facing the same problem with 2.8 version.
i cant see any forum stuff on the screen, though i hav followed all the installation instructions correctly.

--Ramanadh, 11-Apr-2009 10:43