Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Invite individual users to view a thread

 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a user requirement to create a forum, and invite only individual users to view that thread. The application would then e-mail those people inviting them to view the thread and disallow everyone else from viewing the thread.
Does JForum support anything like this? If not, I was going to make the modifications and post the code I used here. If it already does something like that, please let me know and save me a bunch of trouble.
The approach I was going to use is to create a "group" for each user named the same as that user_id and then grant access to the "groups" of those users who were invited. Let me know if you have any thoughts.
Thanks.

Ryan
[originally posted on jforum.net by rzavi4jc]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you can add a new field to jforum_forums, like "forum_private" and "forum_creator_id" (the id of the user who created the forum).

Then you can add a new table, like jforum_forum_permissions, or jforum_forum_members, that will have the forum_id and the user_id of usrs who're allowed to browse that forum.

Something like this.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I did this, and I am adding the new forum to the table jforum_forums, but I am not getting it on the forum. Is there some sort of reload or sync command that I should be calling?
[originally posted on jforum.net by rzavi4jc]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you do it externally to the application, you should add the forum to the cache. Take a look in the class ForumRepository

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I do that. It returns the forums in genericforumDAO.selectAll. My first thought was there, but I don't have access to the ForumRepository from there. Thanks for the help.
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not? if you can access the ForumDAO, you can access net.jforum.repository.ForumRepository

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to turn off caching completely, so it goes to the database every time for the data?
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forums and Categories? no, there isn't.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic