At hwdVideoShare they found this method to use the discuss bot of kunena forum for being used as a comment system.How can we do something similar for K2?Am giving you exactly what the team of hwdVideoShare changed in the discuss bot of kunena.hwdVideoShare Comment system with Kunena 1.6
If you are using Kunena 1.6, you can use the original version however,
you will need to modify the file called kunenadiscuss.php. Around line
74, edit this:function enabled() { if ($this->_app->scope == 'com_content')
return true;
if ($this->_app->scope == 'com_kunena')
return true;
return false;
}[/code]
To this:function enabled() { if ($this->_app->scope == 'com_content')
return true;
if ($this->_app->scope == 'com_kunena')
return true;
if ($this->_app->scope == 'com_hwdvideoshare')
return true;
if ($this->_app->scope == 'com_hwdphotoshare')
return true;
return false;
}[/code]
Around line 372, edit this:$fields = "
To this:global $option, $Itemid; if ($option == "com_hwdvideoshare")
{
$url = JRoute::_('index.php?option=com_hwdvideoshare&task=viewvideo&Itemid='.$Itemid.'&video_id='.$row->id);
$title = stripslashes($row->title);
$fields = "Discuss video: [url=".$url."]".$title."[/url]";
}
else if ($option == "com_hwdphotoshare")
{
$url = JRoute::_('index.php?option=com_hwdphotoshare&task=viewphoto&Itemid='.$Itemid.'&photo_id='.$row->id);
$title = stripslashes($row->title);
if (empty($title)) { $title = "photo"; }
$fields = "Discuss photo: [url=".$url."]".$title."[/url]";
}
else
{
$fields = "
}[/code]
Then, go to your Joomla plugin manager, and edit the Content - Kunena Discuss plugin. In the parameters, enter the following into your Category Mapping field:5551,A;5552,B;5553,C;5554,D[/code]
Where A is the Kunena category you wish to discuss hwdVideoShare videos.
Where B is the Kunena category you wish to discuss hwdVideoShare groups.
Where C is the Kunena category you wish to discuss hwdPhotoShare photos.
Where D is the Kunena category you wish to discuss hwdPhotoShare groups.
If you are using Kunena 1.6, you can use the original version however,
you will need to modify the file called kunenadiscuss.php. Around line
74, edit this:function enabled() { if ($this->_app->scope == 'com_content')
return true;
if ($this->_app->scope == 'com_kunena')
return true;
return false;
}[/code]
To this:function enabled() { if ($this->_app->scope == 'com_content')
return true;
if ($this->_app->scope == 'com_kunena')
return true;
if ($this->_app->scope == 'com_hwdvideoshare')
return true;
if ($this->_app->scope == 'com_hwdphotoshare')
return true;
return false;
}[/code]
Around line 372, edit this:$fields = "
Article cannot be shown
";[/code]To this:global $option, $Itemid; if ($option == "com_hwdvideoshare")
{
$url = JRoute::_('index.php?option=com_hwdvideoshare&task=viewvideo&Itemid='.$Itemid.'&video_id='.$row->id);
$title = stripslashes($row->title);
$fields = "Discuss video: [url=".$url."]".$title."[/url]";
}
else if ($option == "com_hwdphotoshare")
{
$url = JRoute::_('index.php?option=com_hwdphotoshare&task=viewphoto&Itemid='.$Itemid.'&photo_id='.$row->id);
$title = stripslashes($row->title);
if (empty($title)) { $title = "photo"; }
$fields = "Discuss photo: [url=".$url."]".$title."[/url]";
}
else
{
$fields = "
Article cannot be shown
";}[/code]
Then, go to your Joomla plugin manager, and edit the Content - Kunena Discuss plugin. In the parameters, enter the following into your Category Mapping field:5551,A;5552,B;5553,C;5554,D[/code]
Where A is the Kunena category you wish to discuss hwdVideoShare videos.
Where B is the Kunena category you wish to discuss hwdVideoShare groups.
Where C is the Kunena category you wish to discuss hwdPhotoShare photos.
Where D is the Kunena category you wish to discuss hwdPhotoShare groups.