I'm converting an old site to use Umbraco. It's a site with recipes, where you can add comments for each of the recipes. Members should be able to flag or dislike comments they find rude or irrelevant. If a comment has five or more dislikes, it should be hidden for all members. Is this possible with Umbraco? I would like the dislikes to be registered on the member, not as a counter on the actual comment.
Everything on the old site was handcoded in raw sql (for MySQL) and classic ASP. But there is no dislike-function on the existing site.
Edit: Ahh, of course you mean on the new Umbraco site... :) The comments are just nodes (without templates) on the recipes. Subquestion; is there a better way to do it?
Yes, I know how to do it this way, but as I wrote above, I would like the dislike to be registered on the member. The reason for this is so he/she cannot dislike it multiple times.
Super, this looks exactly like the thing I need! :) However, I installed the package, and I get the following error every time I click the only relation there is:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DUAL, NAME, ALIAS FROM UMBRACORELATIONTYPE WHERE ID = 1' at line 1
Also, I cannot create any new relations. I'm running Umbraco 4.7. The documentation for the package also seems sparse, do you have any useful links?
i have no idea, you can use relations without the package, unfortunely there's no good documenation about it without umbraco.tv :\ maybe someone know a good article for it?
Dislike comments
I'm converting an old site to use Umbraco. It's a site with recipes, where you can add comments for each of the recipes. Members should be able to flag or dislike comments they find rude or irrelevant. If a comment has five or more dislikes, it should be hidden for all members. Is this possible with Umbraco? I would like the dislikes to be registered on the member, not as a counter on the actual comment.
sure it can do with umbraco, how did you implement the comments so far ?
Everything on the old site was handcoded in raw sql (for MySQL) and classic ASP. But there is no dislike-function on the existing site.
Edit: Ahh, of course you mean on the new Umbraco site... :) The comments are just nodes (without templates) on the recipes. Subquestion; is there a better way to do it?
you can use your way, i saw someone implement it here http://our.umbraco.org/forum/developers/razor/18551-CommentsHow-to with razor.
you can define on your document type of comment a property of number that will hold the number of dislikes.
if you want to show the comments you can do something like this.
another option is to enable the "umbracoNaviHide" once the counter of numOfDislikes reaches 5 and then you can do
@foreach(var item in Model.Children.Where("Visible") { }
and about changing the property on the frontend you can do it with the API, read more about it http://our.umbraco.org/wiki/reference/api-cheatsheet/modifying-document-properties
hope that help you to get started.
Yes, I know how to do it this way, but as I wrote above, I would like the dislike to be registered on the member. The reason for this is so he/she cannot dislike it multiple times.
you can use relations for this thing, you can relate a "dislike" to comment and a member http://our.umbraco.org/wiki/reference/api-cheatsheet/relationtypes-and-relations
Super, this looks exactly like the thing I need! :) However, I installed the package, and I get the following error every time I click the only relation there is:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DUAL, NAME, ALIAS FROM UMBRACORELATIONTYPE WHERE ID = 1' at line 1
Also, I cannot create any new relations. I'm running Umbraco 4.7. The documentation for the package also seems sparse, do you have any useful links?
i have no idea, you can use relations without the package, unfortunely there's no good documenation about it without umbraco.tv :\
maybe someone know a good article for it?
found something http://blog.hendyracher.co.uk/umbraco-relation-api/#content
Awesome, thank you! :) It's a shame Umbraco is so poorly documented. But the community, and especially the forums, make up for it! :)
is working on a reply...