karthik25 / sblog.net

sBlog.Net is a minimalistic blog engine created using the ASP.Net MVC 4 framework
http://sblogproject.net
BSD 3-Clause "New" or "Revised" License
117 stars 61 forks source link

Multi-User Blog #16

Closed samcov closed 9 years ago

samcov commented 9 years ago

I have a need to allow multiple users in a group to have an individual blog of their own. Not all posting in the same blog as authors.

Ideally, I would be able to switch to each authors blog via a URL. I do see that the Posts in the database has an owner field, but it appears to be ignored.

Is there an easy way to accomplish this with sBlog?

karthik25 commented 9 years ago

This is an interesting question! Out of the box its not possible. But let me think about it and get back to you, as to how easy it would be to add this feature!

Also, the OwnerUserID is being used. For example, private posts. A private post is something that is visible only for the author who created it. There are some other uses too, but can't recall them right away!!

samcov commented 9 years ago

Thanks, I'm glad you're still out there. I think the key is something above the Post entity, but you may know much better than I would.

karthik25 commented 9 years ago

This is kind of close to what you are asking for but you have to tell me whether it is!

sBlog.Net has the ability to view the posts for a certain author. For example, consider the blog for the sBlog.net. Here is the url that lists all the authors and their recent posts:

http://sblogproject.net/authors

You get to this page using the "Authors" link in the "Options" section.

Here is the url for all the posts by admin

http://sblogproject.net/authors/admin

If you don't need the "author" word as part of the url, you could modify the route table to take care of this. If you can post what you are expecting, I could give you more inputs!

On the other hand, if you are thinking of something like author1.site.net, author2.site.net etc, sBlog.Net might not work and I would definitely suggest something like Jekyll (static site generator) to keep it simple and manageable.

When I responded earlier it was too late at night, so this didn't even occur to me!

Let me know what you think!

samcov commented 9 years ago

Karthik, I apologize that I didn't spend enough time looking at the code before making a conclusion.

After a better review, you were correct, what I need is 100% there, I'll just have to do some things to prevent the user from being able to see posts from everybody. Since there was initially only one user, I couldn't see that each individual author was only able to edit his own posts, and that was my main concern.

Issue: The issue I'm having now is that I need to automate the creation of Authors, and you have a two step process which I will have to merge into one call, but it looks like it can be done.

BTW, I love the themes and design, and that's why I didn't give up too quick!

karthik25 commented 9 years ago

No problem, happy to know that you like the themes & the design and thanks for letting me know! If there is anything else, do post/create a comment/question!