This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

in the comment box, adding text label to like button
#1

I want to add a text label with like button as u did with reply and flag button. How can i do that? + I dont want flag,like and reply button images in the comment box. How can i remove them?
Thanks a lot for ur support.
Reply
#2

Hi,

Open /comments/includes/functions/comments.php

Flag

To remove the image button for the Flag link, replace the following (line 330):

PHP Code:
<?php 
$cmtx_box
.= "<a class='cmtx_flag' href='' id='flag_" . $id . "' name='flag' title='" . CMTX_TITLE_FLAG . "' rel='nofollow'><img src='" . $cmtx_settings->url_to_comments_folder . "images/buttons/flag.png' alt='Flag' title='" . CMTX_TITLE_FLAG . "'/>" . CMTX_FLAG . "</a>";

With this:

PHP Code:
<?php 
$cmtx_box
.= "<a class='cmtx_flag' href='' id='flag_" . $id . "' name='flag' title='" . CMTX_TITLE_FLAG . "' rel='nofollow'>" . CMTX_FLAG . "</a>";

Reply

To remove the image button for the Reply link, replace the following (line 317):

PHP Code:
<?php 
$cmtx_box
.= "<img src='" . $cmtx_settings->url_to_comments_folder . "images/buttons/reply.png' alt='Reply' title='" . CMTX_TITLE_REPLY . "'/>" . CMTX_REPLY . "</a>";

With this:

PHP Code:
<?php 
$cmtx_box
.= CMTX_REPLY . "</a>";

And replace the following (line 320):

PHP Code:
<?php 
$cmtx_box
.= "<img src='" . $cmtx_settings->url_to_comments_folder . "images/buttons/reply.png' alt='Reply' title=''/>" . CMTX_REPLY . "</a>";

With this:

PHP Code:
<?php 
$cmtx_box
.= CMTX_REPLY . "</a>";

Have you completed the interview?
Reply
#3

Regarding adding a text label for the Like/Dislike links, can you provide a screenshot of how you want it to look. For example, should the label be before or after the number of likes/dislikes, and what colour should the label be etc etc.

Have you completed the interview?
Reply
#4

Thanks for ur reply. In the like button, i want the label to be before the no. of likes. I want the Colour #ebebeb, and not in capitals---'Recommend'
Reply
#5

Actually, before I provide a solution to that, there's one other thing to do to remove the Flag button.

Open /comments/flag.php and on line 62 replace this:

PHP Code:
<?php 
echo "<img src='" . $cmtx_settings->url_to_comments_folder . "images/buttons/flag.png' alt='Flag' title='" . CMTX_TITLE_FLAG . "'/>" . CMTX_FLAG;

With this:

PHP Code:
<?php 
echo CMTX_FLAG;

Have you completed the interview?
Reply
#6

It would be difficult to make both the label and the number to be clickable and yet have different colour styling. The following solution is for the label and the number to be clickable but have the same colour styling.

Open /comments/includes/functions/comments.php

Replace this (line 340):

PHP Code:
<?php 
$cmtx_box
.= "<a class='cmtx_vote cmtx_vote_up' href='' id='vote_up_" . $id . "' name='up' title='" . CMTX_TITLE_VOTE_UP . "' rel='nofollow'><img src='" . $cmtx_settings->url_to_comments_folder . "images/buttons/up.png' alt='Up' title='" . CMTX_TITLE_VOTE_UP . "'/>" . $vote_up . "</a>";

With this:

PHP Code:
<?php 
$cmtx_box
.= "<a class='cmtx_vote cmtx_vote_up' href='' id='vote_up_" . $id . "' name='up' title='" . CMTX_TITLE_VOTE_UP . "' rel='nofollow'>Recommend " . $vote_up . "</a>";

Then open /comments/vote.php

Replace this (line 133):

PHP Code:
<?php 
echo "<img src='" . $cmtx_settings->url_to_comments_folder . "images/buttons/up.png' alt='Up' title='" . CMTX_TITLE_VOTE_UP . "'/>" . $vote_up;

With this:

PHP Code:
<?php 
echo "Recommend " . $vote_up;

Have you completed the interview?
Reply
#7

Thanks a lot, Steven. Its working perfectly. Thanks again.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
29-Sep-2021, 11:41 AM
Last Post by afoster
02-Aug-2020, 10:40 PM
Last Post by Steven
10-Jan-2018, 09:58 PM
Last Post by freaked
11-Oct-2017, 01:14 PM
Last Post by noblues
08-Mar-2015, 05:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)