Hallo,
habe folgendes Comment Script ein wenig abgeändert: http://www.scriptsmill.com/comments.html
Nun wollte ich gerne neben dem Author, Text und Datum die ID mit anzeigen!
Dachte es mir so:
1. template
	
2. comments.php ergänzt im Teil function view:
	
Aber er zeigt sie mir nicht an - daneben wollte ich noch neben den Feldern Author, E-Mail ein weiteres Feld Website hinzufügen (ist im Script gar nicht vorgehesen - aber wenn das Abfragen aus der DB der ID schon nicht einwandfrei funktioniert - es liegt an mir und nicht am Script ;-) - dann nehme ich das erst gar nicht in Angriff!
Danke & Gruß
Wollte die zwei Punkte mit der ID ot hervorheben... geht irgendwie nicht!
					habe folgendes Comment Script ein wenig abgeändert: http://www.scriptsmill.com/comments.html
Nun wollte ich gerne neben dem Author, Text und Datum die ID mit anzeigen!
Dachte es mir so:
1. template
PHP Code:
	
	
 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="commentbody">
  <strong>{$author[$i]} - {$ID[$i]}</strong><br />
  <small>{$time[$i]}</small>
  <div class="text">
  {$text[$i]}
  </div>
 </div>
EOF;
  
  }
 }
 else {
   print<<<EOF
 <div class="note">
  <div class="text">
  {$COM_LANG['no_comments_yet']}
  </div>
 </div>
EOF;
 } 
PHP Code:
	
	
function view() {
    global $comments_db_link, $COM_CONF, $COM_LANG;
    $request_uri = mysql_escape_string($_SERVER['REQUEST_URI']);
    $result = mysql_query("select ID, time, text, author, email, 
dont_show_email from {$COM_CONF['dbmaintable']} 
where href='$request_uri' order by time 
{$COM_CONF['sort_order']}", $comments_db_link);
    $comments_count=0;
    $ID=$time=$text=$author=$email=$dont_show_email=array();
    while (list($ID[comments_count], $time[$comments_count], 
$text[$comments_count], $author[$comments_count], 
$email[$comments_count], 
$dont_show_email[$comments_count])=mysql_fetch_array($result)) {
        $time[$comments_count] = format_date($time[$comments_count]);
        $comments_count++;
    }
    require("./alben/01/comments/templates/{$COM_CONF['template']}.php");
} 
Danke & Gruß
Wollte die zwei Punkte mit der ID ot hervorheben... geht irgendwie nicht!
 
          

 
							
						
 
							
						
Comment