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.

Monox Blog question  (Mono Support )

Viewed 76106 time(s), 13 post(s) 6/1/2011 2:19:49 AMby virk0009

Related topics

virk0009

virk0009

6/1/2011 2:19:49 AM
Hi There,

I am testing the blog part of Monox. Just want to know how can a user be able to edit his blog entry not others. What role he/she should be in to do that.
At the moment if he is part of publisher role, he can edit anyone's blog. Help will be appreciated.


Regards
Parminder
Rated 5.00, 1 vote(s). 
73 Reputation 9 Total posts
imarusic

imarusic

6/1/2011 7:27:26 AM
Hi,

you need to set your user as a blog editor. Blogeditors can add and modify existing blog posts. At first you need to log in as administrator, go to the portal administration area( monox-administration.png ) then to Blog settings area ( monox-blog-settings.png ) select your blog and click on edit ( monox-blog-editor.png ).
Under the Blog editor section you can set an user that will be able to edit the blog posts.


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

virk0009

6/1/2011 9:43:22 AM
Thanks imarusic,

Seems ok, but does it mean you have to add every user as an editor manually. Why this strange process.
Also when I try to post the comments, it throws an exception. I am attaching a screenshot. have a look.

Regards
Parminder
This content has not been rated yet. 
73 Reputation 9 Total posts
virk0009

virk0009

6/1/2011 10:30:57 AM
Hi imarusic,

Now one more issue. Why a user is able to change someone else's blog entry. Isnt it strage.
If you look at facebook and any other social networking site, no one is allowed to change the contents you havent created.

Or I am doing something wrong.

My requirment is simple.

Step 1. User joins the website
Step 2 Can add friends, can blog entries, can add photos and videos.

thats it. Is it possible to achieve it with this product.

Regards
Parminder
This content has not been rated yet. 
73 Reputation 9 Total posts
denis

denis

6/1/2011 11:21:54 AM
Of course. You have a total control over user privileges. By default, only administrators and users that are explicitly set as blog editors can edit blogs. Our demo site (the one that is shipped with the installation package) contains a single blog with several demo blog posts.

Do you want to have a separate blog for each user? Or should each user publish his posts to a single, site-wide blog? It is very important to understand the hierarchy blog-blog post. Permissions are set on a blog level, so it seems to me that in your scenario each user should have his own blog and do whatever he wants with it. That's the kind of scenario we have on sites like http://www.jobsmarket.ie
This content has not been rated yet. 
7207 Reputation 956 Total posts
virk0009

virk0009

6/1/2011 11:42:17 AM
Hi Denis,

Thanks a lot for your reply.

Yes, I want to all the users to write blog posts under one blog not one blog for every user.
But the user writes the blog entry should be allowed to edit or delete it not other person other than administrator.
Its same like you upload photos to photos section and only you can change it.

So is it possible to achieve ??

Regards
Parminder
This content has not been rated yet. 
73 Reputation 9 Total posts
virk0009

virk0009

6/1/2011 11:47:19 AM
Hi Denis,

One more question. In the user profile page, their is no link to his videos or photos.
What if I want it in my site.

Also in IE when i click at any photo, it gets open as an image in different windows where as in firefox it opens in some facbox kind of box.

regards
Parminder
This content has not been rated yet. 
73 Reputation 9 Total posts
denis

denis

6/1/2011 1:53:18 PM
Hi Parminder,
1. all scenarios are possible, however this one would require custom coding. Allowing all users to post to the same blog, but not promoting them to blog editors is a scenarios that cannot be accomplished just by setting properties. I still think that you can accomplish the same effects by using separate blogs. It is easier to develop a part that shows all posts on a same page (regardless of the blog they are published to) - we already have it used on some projects - than to customize the logic the permission assignment logic.
2. if you want to put custom links to the user profile page, you would have to create a custom profile part by inheriting from the base MonoX Web part and add your links to it.
3. I cannot get the behavior you are describing in IE. For example, all photos on http://monox.mono-software.com/MonoX/Pages/SocialNetworking/PhotoGallery/activeview/PhotoList/albumview/Km4nlH9FDkystp5aAWy1MA/ open a "pretty photo" box in all browsers. This Web part (and other similar parts) can be configured to show the popup window instead of it, but it should behave identically in all browsers.

This content has not been rated yet. 
7207 Reputation 956 Total posts
virk0009

virk0009

6/1/2011 10:56:36 PM
Denis,

Thanks a lot for the quick reply.
Lets take the easy way. How can I accomplish it using seperate blog for every user.

Also what if If we use blogengine.net for blogging. Do we need to take same steps what we are doing for MOnOX blog.

2. Regarding the pics in IE, I think something is wrong on my machine, it opens the link you send in pretty photo. but when i use my local server
it behaves different.


Regards
Parminder
This content has not been rated yet. 
73 Reputation 9 Total posts
denis

denis

6/2/2011 10:17:41 AM
Hi Parminder,
DotNetBlogEngine and similar third-party products that use the standard provider-based infrastructure (eg. use Membership and Role providers). We had a few older posts on this forum describing how to do it. All you have to do is to put a blog application in MonoX virtual folder, modify its web.config to point Membership and Role providers to MonoX instances, and to remove instances of HTTP handlers and modules that are not needed in the third party app.

As for opening a new blog for each user, below is the sample code you can put in your custom registration Web part. It overrides the MonoX MembershipEditor part and assumes that each new user can choose wheter he wants a blog when registering (there is a checkbox in the front end saying "Open my blog" or something like that):

...
using MonoSoftware.Core;
using MonoSoftware.MonoX.Caching;
using MonoSoftware.MonoX.Utilities;
using System.Net.Mail;
using MonoSoftware.MonoX.Mail;
using MonoSoftware.Web;
using MonoSoftware.Web.Caching;
using MonoSoftware.Core.Mail;
...
 
namespace MyProjectName.WebParts
{
    public partial class MembershipEditor : MonoSoftware.MonoX.ModuleGallery.MembershipEditor
    {
 
    ...
 
        public override void CreateAccount(MembershipUser membershipUser)
        {
        ...
            PostAccountCreationActions(membershipUser);
        }
 
 
        protected virtual void PostAccountCreationActions(MembershipUser membershipUser)
        {
             
            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);
            }
 
        }
    ...
 
    }
}

This content has not been rated yet. 
7207 Reputation 956 Total posts
1 2