Modified PHP comment script file

This is a version of the default.php file from Scriptsmill. It has been modified to get rid of the xhtml errors and eliminate conflicts with my css file. This and the original file are released under the GPL. To change its appearance, define classes for head, cnote, and text in your css.

<?

// Please don't modify or delete the copyright notice. Doing that is a violation of GPL.

print<<<EOF

<div id="usernotes">
 <div class="head">
 <h3>{$COM_LANG['header']}</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="cnote">
  <strong>{$author[$i]}</strong><br />
  <small>{$time[$i]}</small>
  <div class="text">
  {$text[$i]}
 </div>
 </div>
EOF;
  
  }
 }
 else {
   print<<<EOF
 <div class="cnote">
  <div class="text">
  {$COM_LANG['no_comments_yet']}
  </div>
 </div>
EOF;
 }
 
print<<<EOF
 <h4> Comment on this article </h4>
		<form method="post" action='{$COM_CONF['script_url']}'>
		  <table width="290" border="0" cellspacing="1" cellpadding="2">
		    <tr> 
		      <td>{$COM_LANG['Name']}: 
                      </td>
		      <td>
                        <input type="text" name="disc_name" maxlength="40" />
                        <input type="hidden" name="r_disc_name" value="{$COM_LANG['r_disc_name']}" />
                        <input type="hidden" name="action" value="add" />
                        <input type="hidden" name="href" value="{$_SERVER['REQUEST_URI']}" />
		        </td>
		    </tr>
		    <tr> 
		      <td>{$COM_LANG['E-mail']}:</td>
		      <td>
		        <input type="text" name="disc_email" maxlength="70" />
		        </td>
		    </tr>
		    <tr> 
		      <td></td>
		      <td>
			<input type="checkbox" name="email_me" />{$COM_LANG['Notify']}<br />
			<input type="checkbox" name="dont_show_email" />{$COM_LANG['Dont_show_email']}<br />
		        </td>
		    </tr>
		    <tr> 
		      <td valign="top"> 
		        {$COM_LANG['Text']}:
		      </td>
		      <td valign="top">
		        <textarea name="disc_body" cols="40" rows="13"></textarea>
		        <input type="hidden" name="r_disc_body" value="{$COM_LANG['r_disc_text']}" />
		        </td>
		    </tr>
		    <tr> 
		      <td valign="top">  </td>
		      <td valign="top">
		        <div>
		          <input type="submit" name="Submit" value="{$COM_LANG['Submit']}" />
		          </div>
		      </td>
		    </tr>
		  </table>
		</form>
		<!-- ScritsMill Comments Copyright Notice -->
          Powered by  <a href="http://www.scriptsmill.com/comments.html">Scriptsmill Comments Script</a>
		<!-- /ScritsMill Comments Copyright Notice -->
</div>
EOF;

?>