Creating a simple commenting system to my blog posts
Hello folks.. I could really use a hand with Umbraco.
How do I create a blog where I and my visitors can post comments to the blog topic? I've been looking everywhere, on google, here and youtube to find somesort of guide. But I am lost. :)
I have had a look at SurfaceController, but I dont know where to put the data? Is this the only way to create a commenting system? Or can I create these via document type/pages? I dont mind getting my hands abit dirty as I'm an old ASP.NET (Webforms) developer. And this seems like a good way to both learn abit Razor and MVC, the same time.
So any of you who can give me some pointers? I just want to start simple with this. The documentation leaves me with more questions than answers, so maybe I have to start somewhere else?
I'll try uCommentsy, see if the package contains what I need to create this on my own. I have thought of disqus. But I really want to progress my use with Umbraco. And learn in the making as I liiiike Umbraco's UI and simplicity :)
Is it more correct to create a controller to do this form of submit via frontend? Or do it via the backend, creating a macro scripting file and add some document types? With this code in my scripting file:
Creating a simple commenting system to my blog posts
Hello folks.. I could really use a hand with Umbraco.
How do I create a blog where I and my visitors can post comments to the blog topic? I've been looking everywhere, on google, here and youtube to find somesort of guide. But I am lost. :)
I have had a look at SurfaceController, but I dont know where to put the data? Is this the only way to create a commenting system? Or can I create these via document type/pages? I dont mind getting my hands abit dirty as I'm an old ASP.NET (Webforms) developer. And this seems like a good way to both learn abit Razor and MVC, the same time.
So any of you who can give me some pointers? I just want to start simple with this. The documentation leaves me with more questions than answers, so maybe I have to start somewhere else?
Kind regards, aven
you might want to build it yourself , but the uCommentsy package http://our.umbraco.org/projects/website-utilities/ucommentsy does this.
I would install this package see if it does what you need and if not, all the code will be there so you can see how it has acheived it.
Hey Aven,
You could just use http://disqus.com/ if you want something simple :)
Rich
Copy that. :)
I'll try uCommentsy, see if the package contains what I need to create this on my own. I have thought of disqus. But I really want to progress my use with Umbraco. And learn in the making as I liiiike Umbraco's UI and simplicity :)
Kind regards
Alright I partly solved my 'issue'. I guess :)
Is it more correct to create a controller to do this form of submit via frontend? Or do it via the backend, creating a macro scripting file and add some document types? With this code in my scripting file:
@using umbraco.MacroEngines
@using umbraco.cms.businesslogic.web
@{
int root = int.Parse("1130")
if (IsPost)
{
DocumentType dct = umbraco.cms.businesslogic.web.DocumentType.GetByAlias("Post");
Document newSubscriber = Document.MakeNew(Request.Form["name"], dct, new umbraco.BusinessLogic.User(1), root);
newSubscriber.getProperty("name").Value = Request.Form["name"];
newSubscriber.Publish(new umbraco.BusinessLogic.User(0));
umbraco.library.RefreshContent();
}
}
<form action="@Model.Url" method="post">
<div class="row">
<div class="span1">
Navn:
</div>
<input type="text" name="name" value="" class="span3" />
</div>
<input type="submit" class="btn" name="tilmeld" value="Tilmed" />
</form>
is working on a reply...