MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Privacy setting and multi-user Blogs  (Mono Support )

Viewed 30004 time(s), 12 post(s) 8/3/2011 1:47:42 PMby Vijay
Vijay

Vijay

8/3/2011 1:48:03 PM
i have been reviewing the product for social networking purposes. I would like users to create and manage their own blog and discussion forums. And also, i would like users to have privacy setting for the self managed blogs and forums to be viewed by invited users only.

Could anyone respond to on how this can be configured?

Vijay
This content has not been rated yet. 
43 Reputation 5 Total posts
khorvat

khorvat

8/3/2011 2:37:58 PM
Hi,

recently we had a project with this kind of functionality, basically you need to create a two small Web parts that will allow your user to create a blog and forum. If needed we can provide you with the guide lines on how to do this. Privacy settings inside the MonoX blog and discussion forum system is managed by user roles so you can add a small role management for the blog user is crating (and same for the discussion forum).

If you need anything else let us know.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
denis

denis

8/3/2011 3:06:59 PM
The Web parts Kristijan was referring to are used to open a separate blog or forum for each user during the registration process, or at some other place where it would be convinient. There is an earlier forum post describing how to allow users to open their own blogs during the registration process - you can view it here (look for the post #19).
This content has not been rated yet. 
7207 Reputation 956 Total posts
Vijay

Vijay

8/17/2011 4:39:27 AM
Hi khorvat/denis,

Can you post some more details on this.
like do we need to build our own libraries for this etc..

Regards
Vijay
This content has not been rated yet. 
43 Reputation 5 Total posts
khorvat

khorvat

8/18/2011 10:06:19 AM
Hi,

  you can put this code on registration form or you can create a WebPart module that you can use on user's profile page etc. generally these are the scenarios in which we are using it.

Mark-up
<asp:CheckBox ID="chBlog" runat="server" Checked="true" />

Code:
if (chBlog.Checked)
{
    BlogEntity blog = new BlogEntity(GuidExtension.NewSequentialGuid());
    blog.Name = membershipUser.UserName;
    blog.Slug = UrlSeoOptimizer.GetOptimizedString(blog.Name);
    blog.DateCreated = DateTime.Now;
    blog.UserId = new Guid(membershipUser.ProviderUserKey.ToString());
    blog.ApplicationId = MembershipRepository.GetInstance().GetApplicationId();
    blog.LanguageId = LocalizationUtility.GetCurrentLanguageId();
    BlogRepository repository = BlogRepository.GetInstance();
    repository.SaveBlog(blog, String.Empty);
    CacheManager cacheManager = CacheManager.GetInstance();
    cacheManager.RemoveAll("MonoXBlog");
    cacheManager.RemoveAll("MonoXBlogEditors");
}


Note: In WebPart module scenario you need to tweak the code above.

I hope this gives you an overview of what you need to do, sorry for a delay.


Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
Vijay

Vijay

8/23/2011 12:09:28 PM
Hi Khorvat,

Thanks for the reply.
Want to know some more details...
1. The above also holds true for discussion forum?
2. Hope the DB design supports the above customization?
3. Would like to know users to have privacy setting for the self managed blogs and forums to be viewed by invited users only.

Regards
Vijay

This content has not been rated yet. 
43 Reputation 5 Total posts
khorvat

khorvat

8/26/2011 10:53:29 AM
Hi,

  sorry for the delayed response,

1. No, you need different code for the "Create new discussion board" functionality (I'll get my colleague to provide you with the code)
2. Database supports the customization but to be sure what exactly you are talking about please send us some more information ?
3. To handle this you will need to put these Blogs and Boards in separate roles (Every user which creates his Blog or Board will have his own role which will be assigned to this Blog or Board) and you will need to develop some invitation WebPart which will be used by the Blog or Board owner to invite the registered user and give him a view role used for this Blog or Board. (Note: These are only the suggestions how to implement this functionality maybe there is another way that better suites you)

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
imarusic

imarusic

8/26/2011 11:19:05 AM
Hi Vijay,

you can use the following code snippet:

DiscussionRepository discussionRepository = DiscussionRepository.GetInstance();
discussionRepository.CreateBoard(null, new Guid(membershipUser.ProviderUserKey.ToString()), membershipUser.UserName, "Board description", membershipUser.UserName, null);
MonoXCacheManager cacheManager = MonoXCacheManager.GetInstance(CacheKeys.Discussion.Root, MonoXCacheManager.DefaultSystemCacheDuration);
cacheManager.RemoveAll();

Regards.
This content has not been rated yet. 
3016 Reputation 428 Total posts
Vijay

Vijay

9/26/2011 8:55:08 AM
Hi,

Thanks for the response.
Can i set my blogs and blogposts permission something like this...

1. Can be viewed only by my friends or a particular group
2. Only my friends or a particualr group be able to comment
etc...

Same for discussion forums.

Regards
Vijay
This content has not been rated yet. 
43 Reputation 5 Total posts
khorvat

khorvat

9/26/2011 4:18:28 PM
Hi,

MonoX blog system is not oriented to social networking friends and groups (although you can extend it by your self with a bit of programming).

Can be viewed only by my friends or a particular group
My suggestion would be to add the BlogContainer WebPart to some page and then manipulate the visibility of BlogContainer directly on the page. To do so you can use the following built-in repositories and BLLs:
MonoSoftware.MonoX.BusinessLayer.GroupBLL
MonoSoftware.MonoX.Repositories.GroupRepository
MonoSoftware.MonoX.Repositories.FriendRepository
With these few classes you can get all the Group statuses and Friend relations for your scenario.

Only my friends or a particualr group be able to comment
For this functionality you will need to inherit the BlogContainer WebPart where you will do almost the same but this time for comments permissions

I hope that I have pointed you in the right direction, let me know if you need anything else.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
1 2