Judah Raine
Total posts: 332
12 Oct 2013 09:21

I am looking everywhere, and been doing so for a couple of days, I have also tried creating a field for this (text was the only one I could think of) and setting this as the default value, but that didn't work either.

As I understand it, this should link to the type and section? I don't have categories at all.

I'd appreciate some assistance, thank you.

Last Modified: 20 Aug 2014


Judah Raine
Total posts: 332
12 Oct 2013 09:24

Perhaps I should clarify. I have the Library (type and section) to which users add books. I would like to use the review plugin to enable members to add reviews to each book (article). I don't want discussions, or a forum, just the ability to add a short review.

Thanks.


pepperstreet VIP
Total posts: 3,837
12 Oct 2013 14:38

Do I get it right? You want to use the Cobalt Content plugin "Reviews/Discussion" in a native Cobalt article? Although, it is possible to call and trigger a content plugin, I would consider to use "Cobalt Type as Comments" adapter.

This has also an "average rating total", and additionally "limits".


Judah Raine
Total posts: 332
12 Oct 2013 23:12

Hi there, I had though of the Cobalt Type as Comments. It's just difficult to determine what's best to use, and how.

User lists book in library (type and section)

CRR does full (official) review - I've got around this by Inserting a link to the review article (separate type and section, as it may be that people find the books by going through reviews not library type)

Members add informal reviews - either using type as comments or cobalt review

The problem is that i still need to be able to add comments - it's a community site, people will want to comment :D but that would then mean two comment components, which isn't possible...

I had thought that with the plugin it would solve this problem - I was under the impression that this had rating too? Best I go back and look at that again, lol


pepperstreet VIP
Total posts: 3,837
13 Oct 2013 06:44

two comment components, which isn't possible...

I had thought that with the plugin it would solve this problem

Ah, I see. If you are already using the Cobalt comments, you have a problem. Comment adapter allows 1 omment solution.

So, your idea was to add a second comment by the plugin... clever ;-) Did not try that, yet. Not sure if there might be any collision with the type-comment adapter!? Worth a try.

Plugin Syntax & Call:

AFAIK, a plugin can be called/executed in textarea-field / category descriptions and for sure in HTML-field. HTML field allows to select one or more specific content plugins. If it does not show-up, it might be a simple syntax issue, or the simple text field output does not run your content plugins. You may add a new output template and this:

<?php echo JHtml::_('content.prepare', $this->value); ?>

Since you need it in EVERY article, it would make sense to call the content-plugin in the article template. You may look into the HTML-field for code reference... i think you can load and call the reviews/discussion plugin explicitely...

two comment components, which isn't possible...

I had thought that with the plugin it would solve this problem

I was under the impression that this had rating too? Best I go back and look at that again, lol

Yes, the rating and total average parameter is also there. An advantage over standard comments.

BTW, if you need basic visiter comments, you might add social comments i.e. facebok, disqus etc. directly. Maybe a better idea, because it attracts more people to your site.


Judah Raine
Total posts: 332
13 Oct 2013 22:56

Thank you! I'm hoping that there won't be a conflict with the plugin, at it seems it relates to a specific type... To be honest, I am working here by trial and error and haven't quite worked out how to get only those reviews related to that particular article... but I shall forge on and give it my best shot. Nothing ventured, nothing gained as they say.


Judah Raine
Total posts: 332
14 Dec 2013 00:17

I am back to trying to run the plugin in individual library articles and cannot seem to get it to show, so would appreciate it if you could point out where I am going wrong.

I have set up the plugin as follows:

I have set the html field for the type as follows:

I have created an output template for the html field using this:

<?php echo JHtml::_('content.prepare', $this->value); ?>

Then added this to the article template as follows:

fields_by_id[14]->result; ?>

I think that perhaps this last (article template) code is incorrect, but not sure how to fix it.

I would greatly appreciate your help.

Thank you!


Judah Raine
Total posts: 332
14 Dec 2013 00:40

Hmmm.... I have noticed that the comment editor has now disappeared, so maybe it's not possible to run the review/discussion plugin on the same page as cobalt comments?

Powered by Cobalt