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


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

I'm trying to show total rating in my ratings template as number (1-10). In api hints I read about using this:

$rating = CobaltApi::renderRating($type_id, $section_id, $condition);

How to use $condition in my case where comments are in record? How to show ratings as numbers? Will this $rating['total'] be ok? Or is this just for number 0-100?


Sergey
Total posts: 13,748
10 Дек 2013 09:23

r.parent_id = 10 AND r.parent = 'com_cobalt'

This is string you put as condition. You say you want to calculate rating off all records submitted as comments of Article ID 10. In the article template $item->id.

$rating['total'] is this just for number 0-100 but you can turn it into anything with simple math. You can render it as 1-10 or 1-5 system.


klox7 VIP
Total posts: 914
08 Янв 2014 03:06

New comment notification...this is probably easy but I can't find settings for it. I'm aware of sending email if there is new comment but I would like to know if I can turn this is notifications.


Sergey
Total posts: 13,748
08 Янв 2014 23:47

New comment notification should work.


klox7 VIP
Total posts: 914
13 Янв 2014 09:06

Another thing...is there an option in templates to hide stars (in record, not in form) but keep numeric rating? Please see pic.


Sergey
Total posts: 13,748
13 Янв 2014 22:46

In record instead of

$item->rating

you can use

$item->votes_result

to display number. It is again 0-100 scale.


klox7 VIP
Total posts: 914
14 Янв 2014 14:17

New comment notification...this is probably easy but I can't find settings for it. I'm aware of sending email if there is new comment but I would like to know if I can turn this is notifications.

New comment notification...this is probably easy but I can't find settings for it. I'm aware of sending email if there is new comment but I would like to know if I can turn this is notifications.

New comment notification should work.

New comment notification...this is probably easy but I can't find settings for it. I'm aware of sending email if there is new comment but I would like to know if I can turn this is notifications.

New comment notification should work.

Ahhh, somehow I still can't configure it properly! Where should this notification display? I'm also having problems with knowing if somebody edited their review and how to publish changes. My configuration is 1 comment per record but this one comment can be edited by user. And when edited I have to approve it.


Sergey
Total posts: 13,748
15 Янв 2014 00:33

I have tested and notification about new comment is added to article if user subscribed to it. Also not when you open article full view all notifications are erased. So check article list to see notifications. Also note that if you comment your own record, you will not get notifications.

There is also parameter Auto Approve after edit in type parameters. Set it no. this will publish article after it is been edited.


klox7 VIP
Total posts: 914
15 Янв 2014 14:39

Thanks but I have again couple of things:) And I will probably write some FAQ for Type as Comments when I'm done:)

To get notifications I subscribed to whole section of comments (auto subscribe on new comment). That way I will know when new comment is made. My question is if it's possible to subscribe to comment edit? In my case I don't need Auto Approve option because I have to approve every comment myself. And I want to know when comment is edited and how do I approve it? Also I don't want record owner to aprove or do anything with comments.

In notification settings under Articles Follows I have this notice:

Notice: Undefined property: stdClass::$access in components/com_cobalt/library/php/helpers/html.php on line 176

Comments on my site goes to specific section (in root) called Reviews. If I check section form backend I can normally see comments, but if I make menu with that section in frontend there is no list of comments. If I click on My Menu - My Homepage then I can see only comment I made. My question is how can I as administrator see all comments and at the same time normal user sees only his comments?

Regards


Sergey
Total posts: 13,748
15 Янв 2014 22:50

My question is if it's possible to subscribe to comment edit?

Unfortunately there is no Comment edited event. But because coment is an article, you have article edited event in comments section. You need to autosubscribe to all new comments. And subscribe to comments section to receive events about new comments.

My question is if it's possible to subscribe to comment edit?

In my case I don't need Auto Approve option because I have to approve every comment myself. And I want to know when comment is edited and how do I approve it?

Set auto approve on edit in Comment type parameters to NO. Then after comment article is edited it is unpublished again.

You are as admin actually do not need any notifications. In menu of comment section you will have On approval element.

May be at first it is on to get notifications when you receive less than one comment a day. But later you will have to check it on schedule. For example once a day and you will be sure there are some comments waiting.


klox7 VIP
Total posts: 914
30 Янв 2014 14:24

Can user add votes to comments? I mean if somebody makes a comment-review with rating can some other user vote on this comment by adding +1 (like you have here on this forum on top of every topic - "I also have this question")?


Sergey
Total posts: 13,748
31 Янв 2014 04:14

Can user add votes to comments? I mean if somebody makes a comment-review with rating can some other user vote on this comment by adding +1 (like you have here on this forum on top of every topic - "I also have this question")?

Yes for core Cobalt comments system. There is parameter.


pepperstreet VIP
Total posts: 3,837
31 Янв 2014 10:31

Can user add votes to comments?

Can user add votes to comments?

Yes for core Cobalt comments system. There is parameter.

Good point! Any chance to have something like this in "Cobalt Type as Comment" ?!

I remember, there was a +/- in MEresources. Does it require a new simple-rating field? Or maybe a complete rating field? Which was already discussed in other topics.


pepperstreet VIP
Total posts: 3,837
31 Янв 2014 10:39

I remember, there was a +/- in MEresources. Does it require a new simple-rating field?

What about utilizing the "favorite" feature? Actually the same functionality like +/-1 rating. Just a matter of templating and appearance, isn't it?


klox7 VIP
Total posts: 914
02 Фев 2014 14:04

Yes for core Cobalt comments system. There is parameter. .

I thought I can do it for Cobalt Type as Comments which will be a treat.

Ok, another thing...how to disable specific user group for commenting? I want registered user to be able to comment but subgroup of registered group not!

And how to allow public to go to "Show all comments"?


Sergey
Total posts: 13,748
02 Фев 2014 23:28

I thought I can do it for Cobalt Type as Comments which will be a treat.

For cobalt type as comment, simply enable rating in that type.

I thought I can do it for Cobalt Type as Comments which will be a treat.

Ok, another thing...how to disable specific user group for commenting? I want registered user to be able to comment but subgroup of registered group not!

This you may regulate with type submission parameters. Create 2 access levels. In one you add registered group, and another it's subgroup. And set second access level as Who can submit.

I thought I can do it for Cobalt Type as Comments which will be a treat.

Ok, another thing...how to disable specific user group for commenting? I want registered user to be able to comment but subgroup of registered group not!

And how to allow public to go to "Show all comments"?

Pardon? Just set it public.


klox7 VIP
Total posts: 914
13 Фев 2014 07:10

Is it possible to restrict article author for comment (cobalt type as comment)?


Sergey
Total posts: 13,748
14 Фев 2014 01:50

No it is not possible. But I have added this parameter to next version of Cobalt type as comment adapter.


klox7 VIP
Total posts: 914
10 Июнь 2014 17:59

If you add review (Cobalt type as comment) this review is shown in record. But you can see your reviews also in "My records". But in "My records" you don't know which review goes to which record. Can I show "parent" record in "My records" for reviews?


Sergey
Total posts: 13,748
11 Июнь 2014 00:29

You need to create custom template. And there you can use something like this.

$parent = ItemsStore($item->parent_id);
echo '<a href="'.JRoute::_(Url::record($parent->id)).'">'.$parent->title.'</a>';

This will show link to parent.

Работает на Cobalt