klox7 VIP
Total posts: 914
02 Дек 2013 09:35

Hey, I would like to place comments and reviews in my records but I'm stuck. This is example of what I need.

How to achieve this? Must I create another section besides my main record section to handle comments? Can I submit comment directly on record page or am I redirected (to comment section)? What to select in Comments provider in Edit type?

Thanks for any help!

Последние изменения: 07 Май 2015


pepperstreet VIP
Total posts: 3,837
02 Дек 2013 12:19

What to select in Comments provider in Edit type?

The "JED" example uses "Cobalt type as Comment".

What to select in Comments provider in Edit type?

Must I create another section besides my main record section to handle comments

You don't have to, but the** demo page makes use of an extra section**. This allows easy search and filtering on Reviews only.

Your Type -> Comments adapter parameters allow also to save reviews in the same section. So, you might save into a certain sub-category. But this type of setup can be tricky and needs more parameters to be adjusted accordingly: Hide it in category tree; Hide/Show direct submission link in section menu? etc. Since you have to allow and restrict submission in this particular sub-caegory, submit links would show-up in your section toolbar. But you could turn this off in category parameters.

What to select in Comments provider in Edit type?

Must I create another section besides my main record section to handle comments

Can I submit comment directly on record page or am I redirected (to comment section)?

Submit button is displayed on article view. Since your review is another type/article of another section, the submission happens in review section. (you can see this behavior in the demo). I am not 100% sure about the default re-direct in this particular comments usecase... anyway, you may set a custom URL in review type! So, this should bring you back to the original article as well.


klox7 VIP
Total posts: 914
02 Дек 2013 13:02

So for "Cobalt type as Comment" I only need to setup "Comments parameters" in my type, select section, content type and force category (subcategory of same section) and it sholud work? Or is there any configuration elsewhere because when I click "Start new discussion" button I somehow end up editing record?


Sergey
Total posts: 13,748
03 Дек 2013 00:05

May be I know why. Do you have full category pass parameter in Cobalt global SEO parameters? Temporary turn it off. It is fixed for next version.


klox7 VIP
Total posts: 914
03 Дек 2013 02:07

Eh of course, I used same Type in Comments parameters that I use for submitting records.:O


klox7 VIP
Total posts: 914
03 Дек 2013 04:32

OK, I got this working, made some fields and now I would like to turn on rating in comments. How to do this?

Can I have this configuration for comments?:

-when you want to submit comment I would like ot have multiple ratings in it (ex. how was your food 1-5, how was the service 1-5,...). When you submit all this ratings are calculated to one average rating (for comment).

-when I view record I would also like to have some average rating (output by record title) of all average ratings in comments.

Hope I'm making sense!


klox7 VIP
Total posts: 914
03 Дек 2013 04:43

I'm also interested in posibility to show from where a user who submits comment is from. Can this be done like there is in admin (when you view records under author column you have flags and IP)? But instead of IP there will be your location (country or maybe even city)?


klox7 VIP
Total posts: 914
03 Дек 2013 05:09

Can I view all comments of one record on separate page and not bellow record?


Sergey
Total posts: 13,748
04 Дек 2013 01:23

Please check comment template parameters. Also rating parameters are in comment adapter settings in type parameters. But that is rating for comments. If you want rate article you comment by comments you better use Cobalt type as comment adapter. Create special section called reviews and set multiple rating for it. And make that section comment. That will allow to add ratings to eviews article. Do not forget to set access level for rating only author.

Can I view all comments of one record on separate page and not bellow record?

No

Can I view all comments of one record on separate page and not bellow record?

I'm also interested in posibility to show from where a user who submits comment is from. Can this be done like there is in admin (when you view records under author column you have flags and IP)? But instead of IP there will be your location (country or maybe even city)?

Yes you can do it in custom template using IP.


klox7 VIP
Total posts: 914
04 Дек 2013 05:15

Reviews didn't work because in content type of reviews under general parameters-rating-who can rate I didn't select "Only article author". Thanks for the tips.:)


klox7 VIP
Total posts: 914
04 Дек 2013 05:33

I added "Multiple rating options" and must say this is great functionality! My question is can I show multirating only when submiting rating but not in template? In template I would like to use only average rating. And in total rating of all ratings I would like to show average of what users selected in "Multiple rating options". Possible?

Can I have rating from 1-10? Do I have to change rating template?


pepperstreet VIP
Total posts: 3,837
04 Дек 2013 06:52

Can I have rating from 1-10? Do I have to change rating template?

Do want 10 "stars"? Read my comment over here...


pepperstreet VIP
Total posts: 3,837
04 Дек 2013 07:11

can I show multirating only when submiting rating but not in template? In template I would like to use only average rating.

In custom cobalt template you can access and output votes like this:

$item->votes

Total number of votes

$item->votes_result

Average vote in % based on 0%-100%

Not sure about any differences and further variables for multi-rating. Sorry, did not play with it in detail, yet.


klox7 VIP
Total posts: 914
04 Дек 2013 07:30

Great, will also try to play with it! Do you maybe know how to set multiple rating options as required?


Sergey
Total posts: 13,748
04 Дек 2013 07:41

You can hide rating in reviews list by turning it off in template settings.


Sergey
Total posts: 13,748
05 Дек 2013 00:34

For this you will have to create your own multiple rating template. Copy views/pating_tmpls/miltirating/default.php and edit it. And set new template in rating settings.


Sergey
Total posts: 13,748
05 Дек 2013 07:17

There is no overrides technique but you can create your own template that will be absolutely safe on updates.


klox7 VIP
Total posts: 914
05 Дек 2013 12:48

I noticed something when submiting review. In submit form you can select multiple ratings fine. But when you hit save an go to the list view total rating is not calculated. When you click same multiple rating value in list view calculation (total rating) starts working.


Sergey
Total posts: 13,748
06 Дек 2013 01:39

I could not reproduce it. It saves ok for me. Please provide access and I'll check.


klox7 VIP
Total posts: 914
06 Дек 2013 02:04

I have to say I have custom templates for mutirating. But I changed it back and it also didn't work.


klox7 VIP
Total posts: 914
06 Дек 2013 08:43

Maybe in the future this will be possible in reviews with a counter of votes:

Работает на Cobalt