Posts: 2
Threads: 1
Joined: Aug 2012
First of all thank you for this wonderful commenting system! Setup and customization has gone very well.
I have modified the css to fit within my site, however looking through the "Add Comment" and "Preview" input buttons, they contain no id or class and will only accept a call to globally modify all submit buttons. I have submit buttons in the rest of my site that I don't really want inheriting this.
Can you tell me in which PHP file I can modify the tags to include IDs so that I can assign ID selectors in my CSS.
Thank you for your help!
Posts: 2,895
Threads: 59
Joined: Jun 2010
Hi,
The file is /comments/includes/template/form.php
There are two lines of code for the submit button. The first line (line 856) is for when the submit button is disabled, and the second line (line 858) is for when it's not disabled.
Same with the preview button, but lines 865 and 867.
I think the reason I didn't add a class or ID was because I used an inline style (which is set on line 837) to make the buttons green if the admin is detected, and I felt that the inline style may have conflicted with a class or ID.
Have
you completed
the interview?
Posts: 2
Threads: 1
Joined: Aug 2012
(30-Aug-2012, 10:23 AM)Steven Wrote: I think the reason I didn't add a class or ID was because I used an inline style (which is set on line 837) to make the buttons green if the admin is detected, and I felt that the inline style may have conflicted with a class or ID.
Thanks so much Steven, you saved me a lot of time searching. Here are the changes I implemented on
form.php and
stylesheet.css for anyone who might find them useful.
First I created some new styles in
stylesheet.css. The very last line & class is a slight color change for admin.
Code:
/***** Input Buttons *****/
.cmtx_input_btn{
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #fe1a00), color-stop(1, #ce0100) );
background:-moz-linear-gradient( center top, #fe1a00 5%, #ce0100 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fe1a00', endColorstr='#ce0100');
background-color:#fe1a00;
border:1px solid #d83526;
display:inline-block;
color:#ffffff;
font-family:arial;
font-size:17px;
font-weight:bold;
padding:7px 24px;
text-decoration:none;
}.cmtx_input_btn:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ce0100), color-stop(1, #fe1a00) );
background:-moz-linear-gradient( center top, #ce0100 5%, #fe1a00 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ce0100', endColorstr='#fe1a00');
background-color:#ce0100;
}
.cmtx_input_btn:active {position:relative;top:1px;}
.cmtx_input_btn_admin{color:#0F3;}
in form.php I made the following changes:
on line 837 I set the admin button var to a class
old:
PHP Code:
<?php if ($cmtx_is_admin) { $cmtx_admin_button = "color: #050; font-weight: bold;"; } else { $cmtx_admin_button = ""; } ?>
new:
PHP Code:
<?php if ($cmtx_is_admin) { $cmtx_admin_button = " cmtx_input_btn_admin"; } else { $cmtx_admin_button = ""; } ?>
For anyone who uses this note that I left a blank space before the class name between the quotes.
in lines: 856, 858, 865 and 867 I changed them to call classes instead of inline styles. Per the original code the admin css code gets called conditionally.
old:
Code:
style="<?php echo $cmtx_admin_button; ?>"
new:
Code:
class="cmtx_input_btn<?php echo $cmtx_admin_button; ?>"
You can see this in action here:
http://everything-ladybug.com/ladybug-species.html
regards,
HaleGrafx
http://halegrafx.com