Comments 1.2.0
This release features a number of key improvements and new features. The most important part of this release is an improved data model which allows us to better leverage the system as a whole and provide a greater feature set.
Features and Improvements
- Cleaner, more efficient Comment Moderation screen.
- Improved error handling for Comment and Rating submissions.
- Support for degraded Comment and Rating submissions. No longer requires JavaScript.
- Added RSS feed support for latest comments.
- New Comments Summary module for Administrators. Great for the Joomla Control Panel.
- New Latest Comments module with RSS feed support.
- New Most Commented module.
- New Highest Rated module.
- New, more reliable BB code parser.
- New smilies and a new smiley palette.
- New stars with 6 color options.
- The ability to hide/show user web site and subject fields in the comment form.
- The ability to hide/show the comment form by default.
- Completely reworked CSS styles that should result in fewer conflicts and issues.
- More reliable identification of the page that a comment is attached to.
- Many bug fixes!
Layout Overrides
There are a vast number of changes that have gone into the CSS and Layouts of this release. Your layout overrides may need to be updated so that they are loading the necessary CSS and JavaScript files and so that they are posting all of the required form fields. If you are experiencing problems with the new release on your site, try removing any layout overrides first.
Upgrading
Because of the data model changes that are implemented in this release, it is very important that you back-up your Joomla database before installing this release! If you have any questions, please ask them before upgrading.
- Download the JXtended Libraries 1.0.8 (release 15 January 2008) via the My Document link.
- Use the Joomla extension installer to install the new Libraries package.
- Download the Comments 1.2.0 package via the My Documents link.
- Use the Joomla extension installer to install the new Comments package.
- Select Comments from the Component menu after the installation has completed.
- You will be notified that a Database Upgrade is required. Click the link to process the upgrade.
Optional Downloads
Integration with Magazine and Catalog
If you use JXtended Magazine or Catalog, you will need to make a small modification to Magazine/Catalog to keep them working correctly. There is a file attached to this post that contains instructions on what to do. Please read through the instructions and make sure you understand them before performing the upgrade. This is most likely not the final version of the API but it will keep your site running for now. We are trying to make the API as simple as possible but it is still a work in progress.
Instructions for Updating Catalog to work with Comments 1.2.0
If you are using a version of Catalog earlier than 1.1.2.1 follow the following instructions.
1. Open components/com_catalog/views/node/tmpl/default.php in a Text/Code editor.
2. Locate the code below in the file. It should be toward or at the very bottom.
3. Remove the entirety of the code between the line of dashes (Dashes NOT included).
// Display ratings, sharing and comments $renderer = $this->document->loadRenderer('module'); $options = array('style' => 'raw'); if ($this->params->get('enable_sharing')) : $module = JModuleHelper::getModule('mod_comments_share'); $module->params = 'heading=2'; echo $renderer->render($module, $options); endif; if ($this->params->get('enable_ratings')) : $module = JModuleHelper::getModule('mod_comments_rating'); $module->params = "context=catalog\ncontext_id=".$this->item->id; echo $renderer->render($module, $options); endif; if ($this->params->get('enable_comments')) : $module = JModuleHelper::getModule('mod_comments_comment'); $module->params = "context=catalog\ncontext_id=".$this->item->id; echo $renderer->render($module, $options); endif;
4. Copy the code below the next line of dashes and paste it in place of the code you just removed.
5. Save the file and upload it to the server if editing locally.
// Get the settings for sharing, rating, and comments.
$sharing = (bool)$this->params->get('enable_sharing');
$rating = (bool)$this->params->get('enable_ratings');
$comments = (bool)$this->params->get('enable_comments');
// Check if any of the features are enabled.
if ($sharing || $rating || $comments)
{
$path = JPATH_SITE.DS.'components'.DS.'com_comments'.DS.'helpers'.DS.'html'.DS.'comments.php';
// Check if the comments HTML helper is available.
if (file_exists($path))
{
// Include the HTML helper.
require_once($path);
// Include the zine route helper if necessary.
if (!class_exists('ZineHelperRoute')) {
require_once(JPATH_SITE.DS.'components'.DS.'com_zine'.DS.'helpers'.DS.'route.php');
}
// Get the Itemid for the article.
$Itemid = ZineHelperRoute::getItemId('article', $this->item->id);
$Itemid = $Itemid ? '&Itemid='.$Itemid : '';
// Get the item properties.
$title = $this->item->title;
$url = 'index.php?option=com_zine&view=article&id='.$this->item->id;
$route = $url.':'.$this->item->alias.$Itemid;
// If sharing is enabled, render the module.
if ($sharing) {
echo JHTML::_('comments.share', $route, $title);
}
// If ratings are enabled, render the module.
if ($rating) {
echo JHTML::_('comments.rating', 'zine', $this->item->id, $url, $route, $title);
}
// If comments are enabled, render the module.
if ($comments) {
echo JHTML::_('comments.comments', 'zine', $this->item->id, $url, $route, $title);
}
}
}
Instructions for Updating Magazine to work with Comments 1.2.0
If you are using a verison of Magazine earlier than 2.1.5RC4 then follow the following instructions.
1. Open components/com_zine/views/article/tmpl/default.php in a Text/Code editor.
2. Locate the code below in the file. It should be toward or at the very bottom.
3. Remove the entirety of the code between the line of dashes (Dashes NOT included).
$renderer = $this->document->loadRenderer('module');
$options = array('style' => 'raw');
if ($this->params->get('enable_sharing')) :
$module = JModuleHelper::getModule('mod_comments_share');
$module->params = 'heading=2';
echo $renderer->render($module, $options);
endif;
if ($this->params->get('enable_ratings')) :
$module = JModuleHelper::getModule('mod_comments_rating');
$module->params = "context=zine\ncontext_id=".$this->item->id;
echo $renderer->render($module, $options);
endif;
if ($this->params->get('enable_comments')) :
$module = JModuleHelper::getModule('mod_comments_comment');
$module->params = "context=zine\ncontext_id=".$this->item->id;
echo $renderer->render($module, $options);
endif;
4. Copy the code below the next line of dashes and paste it in place of the code you just removed.
5. Save the file and upload it to the server if editing locally.
// Get the settings for sharing, rating, and comments.
$sharing = (bool)$this->params->get('enable_sharing');
$rating = (bool)$this->params->get('enable_ratings');
$comments = (bool)$this->params->get('enable_comments');
// Check if any of the features are enabled.
if ($sharing || $rating || $comments)
{
$path = JPATH_SITE.DS.'components'.DS.'com_comments'.DS.'helpers'.DS.'html'.DS.'comments.php';
// Check if the comments HTML helper is available.
if (file_exists($path))
{
// Include the HTML helper.
require_once($path);
// Include the zine route helper if necessary.
if (!class_exists('ZineHelperRoute')) {
require_once(JPATH_SITE.DS.'components'.DS.'com_zine'.DS.'helpers'.DS.'route.php');
}
// Get the Itemid for the article.
$Itemid = ZineHelperRoute::getItemId('article', $this->item->id);
$Itemid = $Itemid ? '&Itemid='.$Itemid : '';
// Get the item properties.
$title = $this->item->title;
$url = 'index.php?option=com_zine&view=article&id='.$this->item->id;
$route = $url.':'.$this->item->alias.$Itemid;
// If sharing is enabled, render the module.
if ($sharing) {
echo JHTML::_('comments.share', $route, $title);
}
// If ratings are enabled, render the module.
if ($rating) {
echo JHTML::_('comments.rating', 'zine', $this->item->id, $url, $route, $title);
}
// If comments are enabled, render the module.
if ($comments) {
echo JHTML::_('comments.comments', 'zine', $this->item->id, $url, $route, $title);
}
}
}
No problem, support subscriptions give you access to one-on-one help from real Joomla experts.