This document is a brief overview of the default skin in Jive Forums.
The Jive Forums 5 default skin uses a MVC (model-view-controller) architecture. The JSP pages included in the distribution are the view - they act as templates for forum content. Jive Forums uses the WebWork framework as the controller - all page requests are made to WebWork actions (mapped to the .jspa extension). The WebWork action will handle the logic of loading forum objects, posting messages, searching, etc and then display the appropriate view. The model is the Jive Forums API.
Additionally, Jive Forums 5 uses a technology called SiteMesh for page templating. This makes customizations and writing new templates for the skin very easy.
The default skin templates (the JSP pages) contain all the display logic for forum content. All JSP pages for the default skin are located in the jiveforums.war directory of the distribution or in the "skins" directory of the source release. These JSP pages are not designed to be called directly - rather you need to call the pages via their action mapping - the .jspa extensions. For example, typing http://yoursite.com/jive/forum.jspa into your web browser actually makes a request to the forum controller which in turn will call the viewforum.jsp page. The file containing these mappings is called xwork-community.xml and is located in the jiveforums.jar. If you want to see how the .jspa commands map to the .jsp pages, extract the xwork-community.xml file from the JAR file with the following command:
As a result of this you should see:
Open xwork-community.xml in a text editor to see the view mappings. For example, to edit the file associated with the front page of the default skin, search the file for name="index" since you're looking for the mappings for the index.jspa alias. You should see a section like this:
The index.jspa alias uses the main.jsp file as the template it will redirect to if there were no errors loading the specified (or default) category. If an error occurred while loading the category, error-notfound.jsp will be used.
Sometimes it's necessary to make changes to support different or new actions, or different view definitions. To do this, you don't need to edit the xwork-community.xml file but you can use a different file to override or add to the action defintions in xwork-community.xml. Simply put a file called xwork-community-custom.xml in your webapp's classpath (the WEB-INF/classes directory will do) and define your actions there. You can override the actions defined in xwork-community.xml or make new ones.
Most of the changes you'll want to make involve changing the colors or fonts used in the default skin. This is easy to do via the Jive Forums admin tool. Simply log into the admin tool and click on the "Skin Settings" tab. From there click on "Fonts" or "Colors" on the left sidebar. From these screens you'll be able to change the global fonts and color schemes used by the default skin. You can also specify a chunk of HTML for the header and footer of the default skin. If you want to make more significant changes (ie, changing what happens to links when a mouse pointer is over them), look at modifying the CSS of the default skin. To do this, edit the style.jsp page, located in the same directory as the rest of the default skin JSP pages. This page can be replaced by your own CSS file. Simply edit templates/default/template.jsp and replace the line:
with your own include, for example:
If you need further help, please search for or post your questions on the Jive Software support forums at http://www.jivesoftware.com/jive/.