• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

User/Group/Forum setup direction from mysql

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I have a large set of user and group info and I'd like to be able to import this somehow directly into the jforum database tables so that it sets up the users, groups and forums automatically (one forum for each group), insteaed of having to go through the Admin page and doing it manually. Is there any documentation on how one would go about doing this? I haven't dug into the database tables yet, I was just wondering if this is something I should even try and/or if there was any documentation on this?

Thanks,
Jeff
[originally posted on jforum.net by netbracketsJeff]
 
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
If you want to import users to JForum, then just fill the jforum_users table. For groups, it is jforum_user_groups.

On the other hand, if you want to integrate your current user database to JForum - for example, to have a single sign on location -, then take a look at http://www.jforum.net/doc/LoginAuthenticationIntegration

Rafael
[originally posted on jforum.net by Rafael Steil]
 
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 just want to import, but it doesn't seem to work. I added users to the jforum_users database, but I get an error now when I bring up the users list from the Admin Control panel. I also tried adding a forum to the jforum_forums table, but that doesn't show up in my jforum list. Is there some other config files I need to update somewhere for my added users/groups/forums/categories to show up in the forum correctly?

Thanks,
jeff
[originally posted on jforum.net by netbracketsJeff]
 
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
OK, I'm working my way through it. Problem with Forum not showing up was the permissions for the new forum was set so it wasn't accessible to any groups, not even Admin. Where is the group permissions info kept? Is it accessible programatically? Looks like the default for forums when just creating them directly into the database is to make them inaccessible to all, I'd like to be able to make them accessible programatically when creating the forum.

Problem with user was I wasn't setting the user registration date. I also need to figure out how to set the encrypted password field. Inserting straight text into that field doesn't work.
[originally posted on jforum.net by netbracketsJeff]
 
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
Importing a group with rights can get complicated.

The group definitions and membership are fairly straight forward (jforum_group and jforum_user_groups tables)

Permissions are more difficult. Basically, each group should have the correct set of roles created for it (jforum_roles table). This can be tricky since there are three types of roles:

Global roles, e.g. perm_administration which make users in this group admins, etc.

Forum related permissions, e.g. perm_forum which combined with a matching entry in the jforum_role_values table that has a role_value = to the forum_id to grant permission to the forum.

Category related permissions, e.g. perm_category which combines with a matching entry in the jforum_role_values table that equals the category_id

FYI, the roles are defined in the permissions.xml file. From this you can figure out which ones are which type.

That said, an easier way to approach this would be to have a default (or general) group with the common permissions set that you add all your users to. Then use the admin screens to add any extra rights you need for your imported application groups. The only trouble with this might be that rights are additive and AFAIK with 2.1.7, there is no way for a sub group to deny rights granted by another group. E.g., if you have rights to a forum in general, you can't deny rights to it in subgroup1.


[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
OK, I seem to have it basically working. For permissions I just set everything up and then use the web interface to manually set permissions for the groups. Think I have them figured out, and it seems like it's the restrictions that are additive. i.e. I basically opened up the General group to everything, and then add restrictions on the subgroups, and that seems to work.

The only thing now is the "Who's is online" box doesn't seem to account for the users I added directly to the database. Do I need to update information for users somewhere else when I add them to the database to get this to work?

Thanks,
Jeff
[originally posted on jforum.net by netbracketsJeff]
 
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
OK, it's working now. Just needed to restart. Makes sense I guess since I'm doing things behind Jforum's back, so to speak.

Jeff
[originally posted on jforum.net by netbracketsJeff]
 
I've never won anything before. Not even a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic