Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Multiple JForums on one box with single sign on

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to deploy mutliple JForums on one box. In this kind of style:

I will have a main forum (that can live as www.myserver.com/mainforum) that looks like this:

Category1:
[Link to /forum1]
[Link to /forum2]
[Link to /forum3]
Category2:
NormalForum1
NormalForum2

Is this possible to setup and then have single sign on so when they wander off to forum1/forum2/forum3 they dont have to sign in again?

Thanks in advance

[originally posted on jforum.net by sroberts82]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some possibilities come to mind are:

First, if you can keep the different forum user tables "synced" in some way so that user id #s are the same across all forums, then the jforum "remember me" will work to log in users in the sub forums.

Another option is to use some sort of cookie based SSO implementation to do the same thing.

A more complex solution might be to look at creating a custom UserDAO implementation that allows the use of a common user table across all jforum databases.


[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply. How can I set it up that the links to forum1 forum2 etc are actually links to other forums rather than internal ones if you understand me. Do I have to hardcode them as hyperlinks?
Thanks
[originally posted on jforum.net by sroberts82]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think so, as they have all a different application context. Or you could add them to a database table, and read the table and create the links for all entries found in the table.

Then you aswell could add some admin template to configure the database entries from the main jforum application...

The fastest way however should be the hardcoded links

... though there may be others that know better...
[originally posted on jforum.net by Sid]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another way to do it is to manually edit the template files and make it look like an "official" category....
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Humphrey my friend,
Can you elaborate on this editing of template files? I'm not sure what you mean
Thanks
[originally posted on jforum.net by sroberts82]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The "view"/look and feel part of jForum's MVC model are the files in the templates directory off the webapp main directory. The *.htm files here are FreeMarker template files that define what HTML the user "sees".

The default view is defined in the "default" subdirectory. You can either modify the files here or copy this directory and change a the template directory to this via a config property (can't remember it right now but it's well documented in the *.properties files and on the forums).

In you particular case, the template file to look at is the forum_list.htm file. In this, there is a table that contains all the categories. If you don't need a dynamic way to link to your other forums (e.g., you only add them occationally), just add in some HTML code above the <#list allCategories... Freemarker code so that it looks like a category but only contains links to your other forums. Repeat this in all your subforum templates so that there are links available everywhere.

Not jee whiz coding, just some standard HTML stuff. You probably could simplify the maintenance by using an template <#include "myForums.htm"> statement and just keep the myForums.htm up to date across all your jForum webapps.
[originally posted on jforum.net by monroe]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic