Monday, May 21, 2012
Out of all the commenting extensions for Joomla, jComments is my favorite. But let’s be honest, since a lot of people are using jComments for their website, there is a big chance that your commenting system will look very similar and ordinary. So what do you have to do?
Well, let’s start by customizing the Send button. For me the ‘Post’ or ‘Post Comment’ or ‘Submit’ is a lot better than the word send. So after some time I found where this ‘Send’ text is coming from and I changed that and made it ‘Post Comment’. Actually, I was able to make my jComments extension look like it was something different. I have made many customizations to it and I’ll post the customization of the button only for now. If you would like to know about other customizations, please leave your comments here.
So, let’s get right to it then.

I used Xampp as a web server and my website name is ‘mywebsite’. So go to components\com_jcomments\tpl\default and open the file tpl_form.php. On my computer it is located in C:\xampp\htdocs\mywebsite\components\com_jcomments\tpl\default\tpl_form.php
After you find and open this file, go to line 135 and find the following code.

<div id="comments-form-buttons">
    <div class="btn" id="comments-form-send"><div><a href="#" tabindex="7" onclick="jcomments.saveComment();return false;" title="<?php echo JText::_('FORM_SEND_HINT'); ?>"><?php echo JText::_('FORM_SEND'); ?></a></div></div>






The function <?php echo JText::_('FORM_SEND'); ?> is the reason why you see the word send. I don't where the word 'Send' is set to the variable but this is the function that is bringing the text for the button from somewhere.

Replace the above code with the code provided below.

<div id="comments-form-buttons">
    <div class="btn" id="comments-form-send"><div><a href="#" tabindex="7" onclick="jcomments.saveComment();return false;" title="<?php echo JText::_('FORM_SEND_HINT'); ?>">Post Comment</a></div></div>


If you don’t want ‘Post Comment’, just change the green highlighted word into anything you want.


0 comments:

Ads

Recommended Post Slide Out For Blogger