Adjusting the component's look and feel

Though RSComments! comes with a well organized display, there may be times when you would like to improve / adjust the look and feel of a certain area. The team thought this through and designed RSComments! in such a way that almost every view can be adjusted via template overrides.

Template overrides offer tremendous flexibility in terms of content look and feel. Basically you can control any aspect - HTML output and CSS, without affecting the component's update process (changes to the source code would have been lost if an update occurred). As a drawback, this method requires a basic understanding of PHP, HTML and CSS.

The template override methods presented below are only available for Joomla! 3.x installations, if you want to adjust the look and feel of the component for Joomla! 2.5 you will need to create templates similar to the default DarkScheme and LightScheme templates. These can be found in the following folders:




The template override technique consists in duplicating the component's (this works for modules too) view files into the template's HTML folder. A complete list of what file controls what view can be found below:

  • comment display view / items loaded when clicking 'Load more comments': components\com_rscomments\views\rscomments\tmpl\default_item.php
  • commenting form: components\com_rscomments\views\rscomments\tmpl\form.php
  • comments list: components\com_rscomments\views\rscomments\tmpl\default.php
  • subscription modal: components\com_rscomments\views\rscomments\tmpl\subscribe.php

If you are new to Joomla! development, then it is probably easiest to start with an existing view, and try modifying it to achieve the desired result. To do this, you should make a copy of the existing view in the html directory of your template, and then modify the copy. The directory structure would be similar to this:


For example, if you wish to change the way in which the comments are being displayed, then you should copy default_item.php file, maintaining the directory structure within the template's HTML folder:

copy: PATH_TO_JOOMLA/components/com_rscomments/views/rscomments/tmpl/default_item.php
to: TEMPLATE_NAME/html/com_rscomments/rscomments/default_item.php

As an example, if you would like to remove the 'Quote' button from the comment display, simply comment or remove the following piece of code:

<?php if (isset($this->permissions['new_comments']) && $this->permissions['new_comments'] && !$thread) { ?>
  <span class="btn" onclick="rsc_quote('<?php echo $name['cleanname']; ?>', '<?php echo $this->comment->IdComment; ?>');">
    <a href="javascript:void(0);"><?php echo JText::_('COM_RSCOMMENTS_COMMENT_QUOTE'); ?></a>
<?php } ?>

5 persons found this article helpful.

Was this article helpful?

Yes No
Sorry about that

You Should Also Read

Configuration HOT

What does RSComments! do? HOT