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

I'd like to be able to modify the following.
#1
Question 

I was wondering how I could change the area where I drew the arrow.

Basically it would say after the name, from (The City ---->Blue Springs, -----> State abbreviated. Mo) says...
Pic 1

Not sure if a field would need to be added to where they also put in there state and it abbreviates it for them.

I'd also like to know if the following can be modified as well.
Pic 2
Reply
#2

Hi,

The state modification will be difficult but all of the other changes are definitely easy.

It's a bit late here now, so I'll reply again tomorrow with the solutions.

Have you completed the interview?
Reply
#3

(28-Apr-2012, 09:35 PM)Steven Wrote:  Hi,

The state modification will be difficult but all of the other changes are definitely easy.

It's a bit late here now, so I'll reply again tomorrow with the solutions.

Ok, thanks so much.
Reply
#4

To change the text "Add Comment"

Open /comments/includes/language/english/form.php and edit this (line 32):

PHP Code:
<?php 
define
('CMTX_FORM_HEADING', 'Add Comment');

To this:

PHP Code:
<?php 
define
('CMTX_FORM_HEADING', 'Add Testimonial');


To remove the powered by statement:

In the admin panel go to Layout -> Powered and change the 'Display' setting to 'Off'.

Related FAQ: http://www.commentics.org/support/knowle...article=27


To remove the Newest | Oldest:

In the admin panel go to Layout -> Comments -> Sort By and turn the 'Enabled' setting off.

Related FAQ: http://www.commentics.org/wiki/doku.php?...g_features


To change the background colour of the comment boxes:

Open /comments/css/stylesheet.css and edit this (line 86):

Code:
.comment_box_1 {
padding: 5px;
background-color: #FFF8DC;
border: 1px solid #828282;
overflow: hidden;
}

and

Code:
.comment_box_2 {
padding: 5px;
background-color: #FFF8DC;
border: 1px solid #828282;
overflow: hidden;
}

The reason there is a box 1 and box 2 is in case you want alternate styling where you have for example a white box and then a grey box and then a white box etc. If you simply want every comment box to be the same then change the background-color for both box 1 and box 2. If you intend on ever posting as the administrator then also do the same for admin_comment_box_1 and admin_comment_box_2. I noticed that you don't have the reply feature enabled so you don't really need to change the reply box styling.


To change the font of the comment text:

In the same file, edit this (line 198):

Code:
.comment_text {
font-family: helvetica;
font-size: 0.8em;
}

If you intend on ever posting an admin reply underneath the comment then also edit this:

Code:
.reply_text {
font-family: helvetica;
font-size: 0.8em;
}

Just out of interest, what changes are you making to the font?

Have you completed the interview?
Reply
#5

I was just curious, if I wanted to change the font on how I could do this.

Thanks for all your help Steven, is there anyway I can send you a donation? By the way is there anyway of doing the city and abbreviated state that I show on the first pic at the top?

(29-Apr-2012, 11:33 AM)Steven Wrote:  To change the text "Add Comment"

Open /comments/includes/language/english/form.php and edit this (line 32):

PHP Code:
<?php 
define
('CMTX_FORM_HEADING', 'Add Comment');

To this:

PHP Code:
<?php 
define
('CMTX_FORM_HEADING', 'Add Testimonial');


To remove the powered by statement:

In the admin panel go to Layout -> Powered and change the 'Display' setting to 'Off'.

Related FAQ: http://www.commentics.org/support/knowle...article=27


To remove the Newest | Oldest:

In the admin panel go to Layout -> Comments -> Sort By and turn the 'Enabled' setting off.

Related FAQ: http://www.commentics.org/wiki/doku.php?...g_features


To change the background colour of the comment boxes:

Open /comments/css/stylesheet.css and edit this (line 86):

Code:
.comment_box_1 {
padding: 5px;
background-color: #FFF8DC;
border: 1px solid #828282;
overflow: hidden;
}

and

Code:
.comment_box_2 {
padding: 5px;
background-color: #FFF8DC;
border: 1px solid #828282;
overflow: hidden;
}

The reason there is a box 1 and box 2 is in case you want alternate styling where you have for example a white box and then a grey box and then a white box etc. If you simply want every comment box to be the same then change the background-color for both box 1 and box 2. If you intend on ever posting as the administrator then also do the same for admin_comment_box_1 and admin_comment_box_2. I noticed that you don't have the reply feature enabled so you don't really need to change the reply box styling.


To change the font of the comment text:

In the same file, edit this (line 198):

Code:
.comment_text {
font-family: helvetica;
font-size: 0.8em;
}

If you intend on ever posting an admin reply underneath the comment then also edit this:

Code:
.reply_text {
font-family: helvetica;
font-size: 0.8em;
}

Just out of interest, what changes are you making to the font?
Reply
#6

Are you not wanting to use the country field then?

If not then you could just modify the /comments/includes/template/countries.php file.

A small example:
PHP Code:
<?php 
$countries
= "<select name='cmtx_country' title='" . CMTX_TITLE_COUNTRY . "'>
<option value='blank'>"
. CMTX_TOP_COUNTRY . "</option>
<option value='Ca'>California</option>
<option value='Mo'>Missouri</option>
<option value='Ta'>Texas</option>
</select>"
;

Donations are much appreciated:
http://www.commentics.org/support/knowle...article=16

Have you completed the interview?
Reply
#7

Yea, I can reuse the country field. I'm bad about reading. I'll have to read the knowledge base before bothering you.

So if someone types in Missouri as the state, then down below in the comment it will abbreviate it?
Also how can I get the from after the name? And then the (Blue Springs, Mo) says....
(29-Apr-2012, 01:27 PM)Steven Wrote:  Are you not wanting to use the country field then?

If not then you could just modify the /comments/includes/template/countries.php file.

A small example:
PHP Code:
<?php 
$countries
= "<select name='cmtx_country' title='" . CMTX_TITLE_COUNTRY . "'>
<option value='blank'>"
. CMTX_TOP_COUNTRY . "</option>
<option value='Ca'>California</option>
<option value='Mo'>Missouri</option>
<option value='Ta'>Texas</option>
</select>"
;

Donations are much appreciated:
http://www.commentics.org/support/knowle...article=16
Reply
#8

That's right, the visitor would see "Missouri" in the form drop-down box and it would say "Mo" for the comment.

Sorry I totally missed the bit about adding the word "from".

You would need to open /comments/includes/functions/comments.php

In between the 'Name and Website' and 'Town and Country' sections (line 228), add this:

PHP Code:
<?php 
$box
.= " from";

So it would look like this:

PHP Code:
<?php 
//Name and Website
if ($settings->show_website && !empty($website) && $website != "http://") {
$attribute = ""; //initialize variable
if ($settings->website_new_window) { $attribute = " target='_blank'"; } //if website should open in new window
if ($settings->website_nofollow) { $attribute .= " rel='nofollow'"; } //if website should contain nofollow tag
$box .= "<a class='name_with_website_text' href='" . $website . "'$attribute>" . $name . "</a>";
} else {
$box .= "<span class='name_without_website_text'>";
$box .= $name;
$box .= "</span>";
}

$box .= " from";

//Town and Country
if ($settings->show_town && !empty($town) && $settings->show_country && !empty($country)) {
$box .= "<span class='town_country_text'>";
$box .= " (" . $town . ", " . $country . ")";
$box .= "</span>";
} else if (
$settings->show_town && !empty($town)) {
$box .= "<span class='town_country_text'>";
$box .= " (" . $town . ")";
$box .= "</span>";
} else if (
$settings->show_country && !empty($country)) {
$box .= "<span class='town_country_text'>";
$box .= " (" . $country . ")";
$box .= "</span>";
}

Have you completed the interview?
Reply
#9

Thanks Steven.
Here's my site with the changes working.
Dan-Tech Computing
I like how the comments alternate on page refresh. Only thing I've noticed is with the pagination on, when you read a comment on the front page and then click to page 2 it's possible that something that you read on the first page now shows up on page 2. Not sure if there's any way of really fixing that.

Also after a comment has been submitted is there any way to change where it says "Thank you. Your comment has been added." and make it say something like Thank you. Your comment has been submitted and is waiting for approval.

(29-Apr-2012, 02:40 PM)Steven Wrote:  That's right, the visitor would see "Missouri" in the form drop-down box and it would say "Mo" for the comment.

Sorry I totally missed the bit about adding the word "from".

You would need to open /comments/includes/functions/comments.php

In between the 'Name and Website' and 'Town and Country' sections (line 228), add this:

PHP Code:
<?php 
$box
.= " from";

So it would look like this:

PHP Code:
<?php 
//Name and Website
if ($settings->show_website && !empty($website) && $website != "http://") {
$attribute = ""; //initialize variable
if ($settings->website_new_window) { $attribute = " target='_blank'"; } //if website should open in new window
if ($settings->website_nofollow) { $attribute .= " rel='nofollow'"; } //if website should contain nofollow tag
$box .= "<a class='name_with_website_text' href='" . $website . "'$attribute>" . $name . "</a>";
} else {
$box .= "<span class='name_without_website_text'>";
$box .= $name;
$box .= "</span>";
}

$box .= " from";

//Town and Country
if ($settings->show_town && !empty($town) && $settings->show_country && !empty($country)) {
$box .= "<span class='town_country_text'>";
$box .= " (" . $town . ", " . $country . ")";
$box .= "</span>";
} else if (
$settings->show_town && !empty($town)) {
$box .= "<span class='town_country_text'>";
$box .= " (" . $town . ")";
$box .= "</span>";
} else if (
$settings->show_country && !empty($country)) {
$box .= "<span class='town_country_text'>";
$box .= " (" . $country . ")";
$box .= "</span>";
}
Reply
#10

Hi,

I'll look into whether it's possible to fix the random pagination issue but I'm not sure if it will be possible.

Regarding the message after posting a comment, it will only say "Your comment has been added" if it doesn't require admin approval. If it *does* require admin approval then it will say "Your comment is awaiting approval". You can change these messages in /comments/includes/language/english/processor.php.

Have you completed the interview?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)