Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » User blog system

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1087 Views
  • Sam
    679 Posts

    User blog system Link to this post

    Someone was asking about developing a system where site users could have their own blogs. Rather than email them personally I thought it would be more useful to post here.

    I would think that this could be built on top of the existing blog module; you would need to extend it in two ways:

    1) Have some kind of facility for creating new blogs. This might be a registration form on the site, or your site administrator might just go into the CMS and do this manually.

    The following actions would need to be performed:
    - Create a BlogHolder Page - e.g. "Sam's Blog"
    - Create a Group - e.g. "Sam's Blog Administrators"
    - Add the relevant user to the "Sam's Blog Administrators" group
    - In the access tab of the BlogHolder page, say that the "Sam's Blog Administrators" group is allowed to administer this page.

    This multi-step process is a little unwieldy, so it would be better to write a script to do it. Ideally, you would build these scripts onto the blog model object themselves, rather than baking them into a specific controller. This will make it easier to re-use these scripts in other contexts.

    $blog = new BlogHolder();
    $blog->ParentID = XX;

    2) Update the security checks on BlogManagementWidget class and BlogEntry::EditLink to perform a more sophisticated access check. You probably want to create a new permission code like "BLOG_EDIT", and check that the current user has that permission as well as having been given access to this specific blog.

  • Blackdog
    Community Member
    156 Posts

    Re: User blog system Link to this post

    It would probably be handy if Admin didn't have to setup a blog for user as it could create a lot of work for little reward.

    Would be good if the user could activate the blog in their member profile.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.