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 )

32170 put(a) pogledan, 12 odgovor(a) 3.8.2011. 13:47:42Kreirao(la) Vijay
Vijay

Vijay

3.8.2011. 13:48:03
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
Ovaj sadržaj još nije ocijenjen. 
43 Reputacija 5 Ukupno objava
khorvat

khorvat

3.8.2011. 14:37:58
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
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
denis

denis

3.8.2011. 15:06:59
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).
Ovaj sadržaj još nije ocijenjen. 
7207 Reputacija 956 Ukupno objava
Vijay

Vijay

17.8.2011. 4:39:27
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
Ovaj sadržaj još nije ocijenjen. 
43 Reputacija 5 Ukupno objava
khorvat

khorvat

18.8.2011. 10:06:19
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
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
Vijay

Vijay

23.8.2011. 12:09:28
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

Ovaj sadržaj još nije ocijenjen. 
43 Reputacija 5 Ukupno objava
khorvat

khorvat

26.8.2011. 10:53:29
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
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
imarusic

imarusic

26.8.2011. 11:19:05
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.
Ovaj sadržaj još nije ocijenjen. 
3016 Reputacija 428 Ukupno objava
Vijay

Vijay

26.9.2011. 8:55:08
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
Ovaj sadržaj još nije ocijenjen. 
43 Reputacija 5 Ukupno objava
khorvat

khorvat

26.9.2011. 16:18:28
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
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
1 2