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.

Personal user blog  (Mono Support )

Viewed 18570 time(s), 11 post(s) 12/30/2012 10:58:27 AMby alexsk
alexsk

alexsk

12/30/2012 10:58:27 AM
Hi,
Now there is just a general blog for all users.
Could you please tell me is it possible to create a personal user blog? With the possibility of publishing articles in the general blog.
This content has not been rated yet. 
61 Reputation 8 Total posts
khorvat

khorvat

12/30/2012 6:31:53 PM
Hi, There is a possibility to create a personal blog we can provide you with a sample code, but if you want it to propagate to general blog you will have to copy it to that blog. But I think that you are thinking about showing blog articles.without the filter when you say general blog, this is possible and it will work without any additional effort. Regards
Rated 5.00, 1 vote(s). 
15993 Reputation 2214 Total posts
alexsk

alexsk

12/30/2012 6:55:27 PM
Thank you for answer. Could you give me sources sample to review?
This content has not been rated yet. 
61 Reputation 8 Total posts
khorvat

khorvat

1/3/2013 7:54:52 PM
Sorry for a delay we will provide you with small sample code soon.

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

alexsk

1/3/2013 8:13:18 PM
Thank you
This content has not been rated yet. 
61 Reputation 8 Total posts
imarusic

imarusic

1/4/2013 8:47:27 AM
Hi,

here is a sample code for creating a user blog:

It's a good place to call this method in membership editor after user registration. You can use Membership editor AccountCreated event. I believe that you already have some existing users who do not have blog created so you will also need to create a blog for those users.

public void CreateBlogForUser(MembershipUser user)
        {
            BlogEntity blog = new BlogEntity(GuidExtension.NewSequentialGuid());
            blog.Name = user.UserName;
            blog.Slug = UrlSeoOptimizer.GetOptimizedString(blog.Name);
            blog.DateCreated = DateTime.Now;
            blog.UserId = new Guid(user.ProviderUserKey.ToString());
            blog.ApplicationId = MembershipRepository.GetInstance().GetApplicationId();
            blog.LanguageId = LocalizationUtility.GetCurrentLanguageId();
 
            MonoXCacheManager cacheManager = MonoXCacheManager.GetInstance();
            cacheManager.RemoveAll(MonoSoftware.MonoX.Caching.CacheKeys.Blog.Root);
            cacheManager.RemoveAll(MonoSoftware.MonoX.Caching.CacheKeys.Blog.Editors);
 
            using (BlogRepository rep = BlogRepository.GetInstance())
                rep.SaveBlog(blog);
        }
Regards.
This content has not been rated yet. 
3016 Reputation 428 Total posts
alexsk

alexsk

1/4/2013 1:46:30 PM
Hi,
Thank you for answer. I have another question.
I can do reflection articles posted users on common blogs to user's wall such as it make messages from discussion board?

Best wishes
This content has not been rated yet. 
61 Reputation 8 Total posts
imarusic

imarusic

1/4/2013 3:13:47 PM
Sorry, I got confused, can you please provide me with more details regarding your last issue?

I can do reflection articles posted users on common blogs to user's wall such as it make messages from discussion board?
Regards
This content has not been rated yet. 
3016 Reputation 428 Total posts
alexsk

alexsk

1/4/2013 3:43:56 PM
I mean functionality of LATEST DISCUSSION block, on MY PROFILE page, only for user's articles on blogs
This content has not been rated yet. 
61 Reputation 8 Total posts
imarusic

imarusic

1/7/2013 12:06:12 PM
Hi,

You can use BlogPostList.ascx module and set the UserId property. In order to change styling you need to change the template which can be found here(~\Portal\App_Templates\Default\BlogTemplates\BlogList and BlogListShort)

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