Hi Yuri,
I am developing a site using Joomla! 1.5.1 Production/Stable. I just installed yvComment to take a look. It seems very promising.
The question I have is regarding using this tool in custom components I am developing. My initial thoughts are it is too integrated with Articles to be used elsewhere. Is this correct? If not, do you have some details on how to apply it to other components?
Thanks in advance, and keep up the great work!
Nick
Hi, Nick!
Here are my suggestions:
1) You're making comments on some content, that may be:
- general 'Articles';
- news;
- other Comments;
- other (custom) 'Type of Content', that is handled by some custom component.
2) yvComment is integrated with 'content', not with Articles.
I consider Comments as special type of content, this is why jos_content table is default store for comments. In a way, yvComment 'extends' com_content.
And I think, that if you build custom component, that processes custom type of content, you should also use "Joomla!'s way" to describe (Title, Author, Date...) and classify (Section, Category) your custom content. This leads you to the natural decision, that you should 'extend com_content' and reuse jos_content table to store (at least) some part of your custom content.
Please read (and follow, if you like) discussion about extending of com_content here:
Generic Pattern to extend com_content
3) You may use almost every content plugin, including yvComment, with your custom component.
Your component have to do two things:
1. Load content plugins (they are not loaded automatically, if component is not com_content)
2. Fire some event like com_content does, passing to event function sumething, that is 'like' article (but may be some other 'content' to be commented).
As an example, you may see, how yvcomment itself uses other content plugins: see code in 'components\com_yvcomment\views\comment\tmpl\default.php':
Code: Select all
if ($this->params->get('execute_content_plugins')) {
$dispatcher = JDispatcher::getInstance();
$results = $dispatcher->trigger('onAfterDisplayContent', array (&$item, null, 0));
echo trim(implode("\n", $results));
}