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 20131 time(s), 11 post(s) 30.12.2012 10:58:27by alexsk
alexsk

alexsk

30.12.2012 10:58:27
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.
Dieser Inhalt wurde noch nicht bewertet. 
61 Reputation 8 Total posts
khorvat

khorvat

30.12.2012 18:31:53
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
Bewertet mit 5,00, 1 Besucher. 
15993 Reputation 2214 Total posts
alexsk

alexsk

30.12.2012 18:55:27
Thank you for answer. Could you give me sources sample to review?
Dieser Inhalt wurde noch nicht bewertet. 
61 Reputation 8 Total posts
khorvat

khorvat

03.01.2013 19:54:52
Sorry for a delay we will provide you with small sample code soon.

Regards
Dieser Inhalt wurde noch nicht bewertet. 
15993 Reputation 2214 Total posts
alexsk

alexsk

03.01.2013 20:13:18
Thank you
Dieser Inhalt wurde noch nicht bewertet. 
61 Reputation 8 Total posts
imarusic

imarusic

04.01.2013 08:47:27
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.
Dieser Inhalt wurde noch nicht bewertet. 
3016 Reputation 428 Total posts
alexsk

alexsk

04.01.2013 13:46:30
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
Dieser Inhalt wurde noch nicht bewertet. 
61 Reputation 8 Total posts
imarusic

imarusic

04.01.2013 15:13:47
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
Dieser Inhalt wurde noch nicht bewertet. 
3016 Reputation 428 Total posts
alexsk

alexsk

04.01.2013 15:43:56
I mean functionality of LATEST DISCUSSION block, on MY PROFILE page, only for user's articles on blogs
Dieser Inhalt wurde noch nicht bewertet. 
61 Reputation 8 Total posts
imarusic

imarusic

07.01.2013 12:06:12
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.
Dieser Inhalt wurde noch nicht bewertet. 
3016 Reputation 428 Total posts
1 2