Jump to content

Comments php script colour change


DJ_pluto

Recommended Posts

i have just got a free php comment script of the net. but the defualt theme is black text on white back ground.

 

Wile on my web site i have a dark back ground and white writing, so after many hours of php code readying and learning i have finaly managed to change most of the text into white exept for the last 3 text pices.

 

1. the "Name/ tilttle" of the comment/s

 

2. the "date and time" of when the comment was posted

 

3. the " comment/ text" which the user posted

 

 

 

from what i have found i belive i need to set the colour in this part of the script here but everything i have tryed hasnt worked.

 

 

1.  $COM_LANG['header'] = "Comments";

 

2.  $COM_LANG['months'] = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");

 

3.  not sure where the code is for this :|

 

 

i have just started with php.

 

 

 

 

 

Link to comment
Share on other sites

this is the theme file out of the comments script , if u look thrue most of the code u can see that ive changed most text into white already exept for the ones which are values.

 

 

 

 

 

 

print<<<EOF

<style type="text/css">

div#usernotes {

background-color: transparent;

}

div#usernotes div.head, div#usernotes div.foot {

background-color: transparent;

padding: 4px;

}

div#usernotes div.foot {

text-align: right;

}

div#usernotes div.foot a, div#usernotes div.head a {

background-color: transparent;

}

div#usernotes span.action {

float: right;

}

div#usernotes div.note {

margin-left: 2em;

margin-right: 2em;

border-bottom:1px dashed;

padding: 4px;

}

div#usernotes div.text {

padding: 2px;

margin-top: 4px;

}

</style>

 

<div id="usernotes">

<div class="head">

<H3><font color="white">{$COM_LANG['header']}</font></H3>

</div>

EOF;

 

if ($comments_count) {

  for($i=0; $i<$comments_count; $i++) {

  if ($dont_show_email[$i] != '1' && $email != '') { $author[$i] = "<a href=\"mailto:{$email[$i]}\">{$author[$i]}</a>"; }

  $text[$i] = str_replace(chr(13), '<br />', $text[$i]);

 

  print<<<EOF

<div class="note">

  <strong>{$author[$i]}</strong><br />

  <small>{$time[$i]}</small>

  <div class="text">

  {$text[$i]}

  </div>

</div>

EOF;

 

  }

}

else {

  print<<<EOF

<div class="note">

  <div class="text">

  <font color="white">{$COM_LANG['no_comments_yet']}</font>

  </div>

</div>

EOF;

}

 

print<<<EOF

<div class="foot">

<form method=POST action='{$COM_CONF['script_url']}'>

              <input type=hidden name="action" value="add">

      <input type=hidden name="href" value="{$_SERVER['REQUEST_URI']}">

  <table width="290" border="0" cellspacing="1" cellpadding="2" align="center">

    <tr>

      <td width="83" align="right"><font color="red">*</font><font color="white">{$COM_LANG['Name']}:</font>

        </td>

      <td width="196" align="left">

        <input type=text name="disc_name" maxlength=40 size=30>

        <input type=hidden name="r_disc_name" value="{$COM_LANG['r_disc_name']}">

        </td>

    </tr>

    <tr>

      <td width="83" align="right"><font color="red">*</font><font color="white">{$COM_LANG['E-mail']}:</font></td>

      <td width="196" align="left">

        <input type="Text" name="disc_email" size="30" maxlength="70">

        </td>

    </tr>

    <tr>

      <td width="83"></td>

      <td width="196" align="left">

<input type="checkbox" name="email_me"><font size=2><nobr><font color="white">{$COM_LANG['Notify']}</font></nobr></font><br>

<input type="checkbox" name="dont_show_email" CHECKED><font size=2><nobr><font color="white">{$COM_LANG['Dont_show_email']}</font></nobr></font><br>

        </td>

    </tr>

    <tr>

      <td valign="top" width="83" align="right">

        <font color="red">*</font><font color="white">{$COM_LANG['Text']}:</font>

      </td>

      <td valign="top" width="196" align="left">

        <textarea name="disc_body" cols="40" rows="13" wrap="VIRTUAL"></textarea>

        <input type=hidden name="r_disc_body" value="{$COM_LANG['r_disc_text']}">

        </td>

    </tr>

    <tr>

      <td valign="top" width="83" align="right">  </td>

      <td valign="top" width="196">

        <div align="center">

          <input type="submit" name="Submit" value="{$COM_LANG['Submit']}">

          </div>

      </td>

    </tr>

  </table>

</form>

 

</div>

</div>

EOF;

 

?><body background="../../../../images/grey%20black%20box.jpg">

Link to comment
Share on other sites

this is the COM_LANG files it refers to.

 

<?

$COM_LANG['header'] = "Comments";

$COM_LANG['no_comments_yet'] = "No comments yet";

$COM_LANG['Name'] = "Name";

$COM_LANG['r_disc_name'] = "Field 'Name' must be not empty";

$COM_LANG['E-mail'] = "Email";

$COM_LANG['Notify'] = "Notify me about new comments on this page";

$COM_LANG['Dont_show_email'] = "Hide my email";

$COM_LANG['Text'] = "Text";

$COM_LANG['r_disc_text'] = "Field 'Text' must be not empty";

$COM_LANG['Submit'] = "Submit";

$COM_LANG['not_allowed'] = "You are not allowed to post comments here";

 

$COM_LANG['months'] = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");

 

$COM_LANG['email_new_comment'] = "New comment on the page";

$COM_LANG['email_from'] = "From";

$COM_LANG['email_to_unsubscribe'] = "If you don't want to receive emails about new comments on this page use this link:";

 

$COM_LANG['unsubscribed'] = "You've been unsubscribed";

$COM_LANG['not_unsubscribed'] = "You are not subscribed";

 

?>

Link to comment
Share on other sites

This is the style you can use to change everything

style="color: white; background-color: black"

 

Example, in your

     <textarea name="disc_body" cols="40" rows="13" wrap="VIRTUAL"></textarea>

 

you can add the first piece of code to change the BD and FG.

     <textarea name="disc_body" cols="40" rows="13" wrap="VIRTUAL" style="color: white; background-color: black"</textarea>

You can also add those to your DIV layer

 

background-color:black;

layer-background-color:black;

visibility: visible;

 

div#usernotes {
background-color:black; 
layer-background-color:black; 
visibility: visible;
}
div#usernotes div.head, div#usernotes div.foot {
background-color:black; 
layer-background-color:black; 
visibility: visible;
padding: 4px;
}
div#usernotes div.foot {
   text-align: right;
}
div#usernotes div.foot a, div#usernotes div.head a {
background-color:black; 
layer-background-color:black; 
visibility: visible;
}

 

I hope it help.

Link to comment
Share on other sites

when I look at your source ... I see this

</div> <div class="note">
 <strong>swear test</strong><br />
 <small>27 Aug 2007, 06:03</small>
 <div class=<font color="white">"text"</font>>
 Your text ....
 </div>
</div> <div class="note">

 

 

<div class=<font color="white">"text"</font>> is wrong...

 

Look in your code for "<div class=<font" and replace it to something like

 

<div class="yourdivclass"><font color="white">$yourcode</font></div>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.