• 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Different themes in one installation

 
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 would very much like to integrate jforum to my web application. A key feature is, however, to have different themes in one installtion. I already searched the forums but did not find any answer.

So here is what I have:
- I have an eLearning environment with different courses running on the same server,
- each course has its own theme / style, so each course needs to have a forum with its own theme
- our users can participate in different courses at the same time

And this is what I need:
1) I understand that it is possible to have different themes with jforum. Is that correct?
2) I need to switch the theme to be uesed at runtime. It would be sufficient if the theme is chosen once per web session. The ideal solution, however, would be to be able to switch the theme on a request base.

I already tried to use the jforum_themes table in the database, yet had no success.

I was thinking of implementing a simple servlet filter that could make the decision which theme to be used. But where do I have to tell jforum about this decision?

Thanks for your help!!



[originally posted on jforum.net by rdkamm]
 
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
There currently isn't an easy way to do this. You might be able to modify the Command.process method to map the current request to the desired template directory. But then you'd also have to fix the dozen or so places that command implimentors set the template as well.

Another possible option is to create a generic "content only" set of jForum templates and then wrap them in a theme based page that uses an iFrame to display the neutral active content.


[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
RE: Second suggestion:

Yes. It is fairly easy to trim down the header and footer template include files so that jForum just produces the "content" section (e.g., the white part of this page). With a little CSS and image work, this can become a nice neutral colored content section that gets embedded with the other application's theme.

The advantage to doing it this way is that your jForum code does not have to be customized (easier version upgrades, etc). Plus, if your "theme" is managed by HTML savvy folks who don't code, they can play with the framework and the code savvy people don't have to get involved.
[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
Thank you, monroe!

I tend to take the first option - in fact, some tests were already very promising. It seems to be sufficient for me to just adapt the Command.process-method. I have already implemented an SSO-class, so the name for the template to be used can be delivered there.

I did not quite understand your second suggestion, however. Am I right to assume, that I should create a neutral template and "project" it into the site via the iframe?
[originally posted on jforum.net by rdkamm]
 
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
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic