Hi guys. Work is going along nicely with integrating JForum here. Now I'd like to be able to show the most recent posts elsewhere on our JSP based site, and also replies to posts submitted by the SSO'ed user. My main problem is I do not know how to access the JForum variables. For example, say I wanted to list all the forums:
<#list allCategories as category>
<#list category.getForums() as forum>
<#assign lpi = fir.getLastPostInfo(forum.id)/>
Is there a way to access these variables? Should I perhaps create a .htm or .jsp file inside the templates/default JForum folder which creates the output I want from JForum variables, then include this in the JSP page I need it displayed in?
Thanks for any help. [originally posted on jforum.net by akindo]
A lot of it depends on how you are integrating jForum. There are two ways to do this. One is to have jForum embedded into your application (a single webapp ). The other is to have jForum as a separate webapp with some sort of "embedding" code (iframes and the like).
In the single webapp format, you can add your own jforum commands (e.g., add a new method to a jForum action class like PostAction). So you could create your own command with it's own template file and variables. This could be an HTML "snippet" page that could be embedded in other pages via a JSP dynamic include.
In the multiple webapp situation, the problem becomes a little more complicated. You could add the same sort of commands as above, but produce the info you need and embed it via iFrames or XML/Ajax or XML/Java parsing code in your application. (FYI, the XML version of recent topics is already built in...) Alternatively, you could just go directly to the raw data either via native SQL or just by integrating the jForum DAO classes into your application.
I do have JForum embedded into my existing application (single webapp). I will try to add my own methods to a JForum class as you suggested. I'm currently working on Lucene searching of our website, so I'll get back to you with the results of JForum integration later. [originally posted on jforum.net by akindo]
Just an FYI... V2.1.8 of JForum... (in beta?..) will use Lucene for searching. You may want to take a look at the code in CVS to see how well your search and jForums might mesh.. [originally posted on jforum.net by monroe]
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop