This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JForum and the fly likes Several JForum shares same user database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Several JForum shares same user database" Watch "Several JForum shares same user database" New topic
Author

Several JForum shares same user database

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I just found out this forum software today and I think this is a great java based forum! Good job! :lol:

I have a question, though. I need to have several JForums shares the same user database. Is it possible or is it easy to update the JForum source code or database tables to achieve this? I know it's doable with PHPBB.

I am planning to run a couple of forums on my site, each covering different topics, and maybe with different styles, but they should all share the same user database, so the member only need to register once.

Any answer is appreciated. Thanks!
[originally posted on jforum.net by frank123]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
We recently discussed about something similar here:
http://www.coderanch.com/t/575576

I think he was talking about having complete separate users though. Not sure about how one can do it in phpBB, as my phpBB forum does not have that option, it might be you need to install something extra, but JForum right now does not have that capability.

But if you want to have a go with it, Rafael would surely appreciate it ;).


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

Joined: Apr 22, 2012
Posts: 17424
frank123 wrote:I just found out this forum software today and I think this is a great java based forum! Good job! :lol:

I have a question, though. I need to have several JForums shares the same user database. Is it possible or is it easy to update the JForum source code or database tables to achieve this? I know it's doable with PHPBB.

I am planning to run a couple of forums on my site, each covering different topics, and maybe with different styles, but they should all share the same user database, so the member only need to register once.

Any answer is appreciated. Thanks!


You can use a workaround which I use:
do a script (using sed) which would edit SQL query files:
WEB-INF/config/database/generic/generic_queries.sql
WEB-INF/config/database/mysql/*.sql

1. s/jforum_users/GLOBAL_userstable/
2. s/jforum_/FORUMNAMEprefix_/

where FORUMNAMEprefix is a unique forum prefix.

(It is also useful to keep modified SQL files in files like
WEB-INF/config/database/generic/generic_queries.sql.FORUMNAMEprefix_
and modify SystemGlobals.properties sql.queries.driver and sql.queries.generic to avoid confusing with multiple filenames.

At least this works for me.

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

Joined: Apr 22, 2012
Posts: 17424
Anonymous wrote:
You can use a workaround which I use:
do a script (using sed) which would edit SQL query files:
WEB-INF/config/database/generic/generic_queries.sql
WEB-INF/config/database/mysql/*.sql

1. s/jforum_users/GLOBAL_userstable/
2. s/jforum_/FORUMNAMEprefix_/

where FORUMNAMEprefix is a unique forum prefix.

(It is also useful to keep modified SQL files in files like
WEB-INF/config/database/generic/generic_queries.sql.FORUMNAMEprefix_
and modify SystemGlobals.properties sql.queries.driver and sql.queries.generic to avoid confusing with multiple filenames.

At least this works for me.


Great! I will try this out. Thanks a lot!


[originally posted on jforum.net by Anonymous]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Several JForum shares same user database
 
Similar Threads
JFourm
difference between instance and schema in dbms
Forum List
SSO, users groups, roles, LDAP, etc.
Origins of JForum?