aspose file tools*
The moose likes JForum and the fly likes Integrating forum with current website - examples? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Integrating forum with current website - examples?" Watch "Integrating forum with current website - examples?" New topic
Author

Integrating forum with current website - examples?

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Ideally I would like to have information from the jforum database shown on my front page, for example:

Recent Topics
Online User
Post/Topic Stats

All very simple common stuff, and I know methods exists for all of these, but only once I am "inside" the forum.

Does anybody have any examples or sites that do this kind of thing, where I can see how it's done easily?

I'm pretty sure I'm not the first person to want to do this, and thought I'd check if examples existed before I started work on it.

Thanks.
[originally posted on jforum.net by degsy]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I do this in my app, and so far I find it to be very simple. Just define a new datasource that points to the jforum database and start writing queries. Most of them are pretty obvious.
[originally posted on jforum.net by time]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
degsy wrote:On the front page of jetnuke, do you use the methods to access the number of users online etc or do you use direct sql calls?


No, JetNuke uses the JForum's DAO layer.
[originally posted on jforum.net by mazzolini]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
That's the thing, I don't want to define a new datasource, I would like to use the objects that already exist for querying the database inside the application itself.

There are methods that return you the recent topics, the count of users etc, etc.

Currently my site uses jsp and I use phpBB methods to query my phpBB forum as these methods exist in phpBB but it's a bit of a pain calling php from jsp as some of you probably know, so I moved to using straight jdbc calls, which isn't the greatest either.

I thought when moving to jforum, methods would exist to allow me to do this in java (and I've seen the methods) but I can't get access to them.
[originally posted on jforum.net by degsy]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
JetNuke is an example of a (complex) site that is integrated with JForum. It's free and open source. You can browse the source code
[originally posted on jforum.net by mazzolini]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
On the front page of jetnuke, do you use the methods to access the number of users online etc or do you use direct sql calls?
[originally posted on jforum.net by degsy]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
jetnuke don't work for me when trying to view thread get

<html><head><title>Apache Tomcat/4.0.3 - Error report</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>Apache Tomcat/4.0.3 - HTTP Status 404 - /do;jsessionid=157F49BB9032BC3F9BBA38CE749D5F6D</h1>

type Status report

message /do;jsessionid=157F49BB9032BC3F9BBA38CE749D5F6D

description The requested resource (/do;jsessionid=157F49BB9032BC3F9BBA38CE749D5F6D) is not available.


</body></html>


when trying to view a thread ?
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
ignore ^^^ - cookie issue :blush:
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I'm not completely exicted about downloading/installing/configuring jetnuke to find the code to integrate jforum to my site, is it possible you could show me examples?

I can obviously do it if necessary but my interest lies with jforum not jetnuke for now.

Thanks.
[originally posted on jforum.net by degsy]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Integrating JForum 2.1.4 inside JetNuke was not easy at all. And the source code couldn't help you very much.
JForum 2.1.5 (cvs version) is instead much more pluggable. Let the servlet net.jforum.JForum do its work (managing URL pattern in the '*.page' form) and don't forget to use the session listener. If you wish to call the DAO from your pages you have to be sure to set the JDBC connection.
Something like:

JForum.DataHolder dataHolder = new JForum.DataHolder();
dataHolder.setConnection(conn);
JForumBaseServlet.localData.set(dataHolder);


I hope this can help you
[originally posted on jforum.net by mazzolini]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thanks for the update.

I don't want to use the *.page form of coding though, I want full control over my content through my own serlvets/jsps etc.

From the sites I can find on the web it looks like they are all mainly the same with limited customisation of the jforum look, feel or otherwise.

Whereas if you look at phpBB sites, there are hundreds of layouts, templates, etc to work with.

I really like the idea of jforum but can't use it unless I can integrate it with my existing site, other than database calls.
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Oops, the above post was by me, I just forgot to log in... ops:
[originally posted on jforum.net by degsy]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Integrating forum with current website - examples?
 
Similar Threads
compiling and deploying EJB with ant
I8N for all data
Sample resin.conf file
Swing Multiple Window
Static variables problem