close× Call Us +49 (1805) 01 29 59

Thread Author: Gokyil1234
Thread ID: 129
Thread Info
Es gibt 32 Beiträge zu diesem Thema, und es wurde 6106 mal angesehen.
Wer ist hier? 1 Gäste

 Thema drucken
Most Wanted Fotos
Gokyil1234
Habe hier ein Code das ich in einer eigenen seite anzeigen lasse.

Der zeigt die Meist angesehensten 6 Fotos an von der gesamten Fotogallery.

Der zeigt bloss alle 6 Fotos in einer Reihe an.

Und somit verzieht der die Seite richtig.

Wie kann ich das hinkriegen das er pro Reihe nur 3 Fotos anzeigt.

hier der code


<?php
if(!iMEMBER) { redirect(BASEDIR."hinweis.php"); }
//MOST Viewed Fotos


//Letzten Foto Kommentare
$sql = dbquery("SELECT * FROM ".$db_prefix."photos ORDER BY photo_views DESC LIMIT 0,6");
if(dbrows($sql))
{
echo"<table width='100' border='0'><tr>";
while($data = dbarray($sql))

{
echo "
<td>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='side'><img src='".PHOTOS."album_".$data['album_id']."/".$data['photo_thumb1']."' width='175' height='140' title='' alt='".$data['photo_title']."'></a>
<b><center><font color='white'> Hits: </font><font color='#FF9900'>".$data['photo_views']."</font></center></b>
</td>";
}
}
else
{
echo "<center>".$locale['PHOC_002']."</center>";
}
echo "</tr></table>";
//MOST Viewed Fotos

?>
 
SC-Ad-Bot
 
Nathan
Hab gerade einen Denkfehler gehabt in meinem Quellcode. Ich poste gleich von zuhause aus die Lösung ;-)

Sorry, ich sollte mir das posten auf der Arbeit abgewöhnen.
Bearbeitet von Nathan am 21.10.2008 00000010 04:38
Denke nie gedacht zu haben, denn gedankenloses denken sind verschwendete Gedanken.
 
emblinux
versuchs mal hiermit:


if(!iMEMBER) { redirect(BASEDIR."hinweis.php"); }
//MOST Viewed Fotos

//Letzten Foto Kommentare
$sql = dbquery("SELECT * FROM ".$db_prefix."photos ORDER BY photo_views DESC LIMIT 0,6");
if ( dbrows($sql)>0 )
 {
   echo"<table width='100' border='0'><tr>";
   $cnt=0;
   while($data = dbarray($sql))
         {
            if ( $cnt==3)
              {
                 echo "\n</tr><tr>\n";
                 $cnt=0;
              }
            echo "<td>
                      <a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='side'><img       
                          src='".PHOTOS."album_".$data['album_id']."/".$data['photo_thumb1']."' width='175' height='140' title='' 
                          alt='".$data['photo_title']."'></a>
                         <b><center><font color='white'> Hits: </font><font color='#FF9900'>".$data['photo_views']."</font></center></b>
                     </td>";
             $cnt++;
         }
  }
else
  {
    echo "<td align=\"center\">".$locale['PHOC_002']."</td>";
  }
echo "</tr></table>";
//MOST Viewed Fotos

Das Lernen ist wie ein Meer ohne Ufer. Konfuzius

Alles wird Gut!

KEIN Support per Mail, ICQ oder PN !
www.heiseclan.de/fusion/sig.gif

www.heiseclan.de/geosig.gif
 
Nathan
Quasi :-) Da war Emblinux schneller. Ich hatte heute auf der Arbeit einen kleinen Fehler eingebaut und musste dann los zum liefern :-(

Thx für die Rettung ^^
Denke nie gedacht zu haben, denn gedankenloses denken sind verschwendete Gedanken.
 
Gokyil1234
Vielen Vielen Dank.

Das forum gefällt mir besser wie im club. Hier wird ja schnell geholfen.

was ich noch versucht habe die bilder alle zentriert anzeigen habe vor der bildausgabe ein <center> und danach ein </center> gesetzt hat leider nicht geklappt
 
emblinux
Dann versuchs mal so:


if(!iMEMBER) { redirect(BASEDIR."hinweis.php"); }
//MOST Viewed Fotos

//Letzten Foto Kommentare
$sql = dbquery("SELECT * FROM ".$db_prefix."photos ORDER BY photo_views DESC LIMIT 0,6");
if ( dbrows($sql)>0 )
 {
   echo"<table width='100' border='0' align='center'><tr>";
   $cnt=0;
   while($data = dbarray($sql))
         {
            if ( $cnt==3)
              {
                 echo "\n</tr><tr>\n";
                 $cnt=0;
              }
            echo "<td align='center'>
                      <a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='side'><img       
                          src='".PHOTOS."album_".$data['album_id']."/".$data['photo_thumb1']."' width='175' height='140' title=''
                          alt='".$data['photo_title']."'></a>
                         <b><font color='white'> Hits: </font><font color='#FF9900'>".$data['photo_views']."</font></b>
                     </td>";
             $cnt++;
         }
  }
else
  {
    echo "<td align=\"center\">".$locale['PHOC_002']."</td>";
  }
echo "</tr></table>";
//MOST Viewed Fotos


Das mit dem schnell helfen ist immer so eine Sache. Da die Seite hier noch reltiv neu ist, sind hier auch noch nicht so viele User.

Es kann also auch hier mal vorkommen, dass man länger auf eine Antwort warten muss, wenn sich die Userzahl erhöht und das Anfrageaufkommen höher ist.

Aber es gibt hier zahlreiche und motivierte Moderatoren und auch User, die gerne helfen, wenn man ihnen den gebührenden Respekt entgegen bring.
Das Lernen ist wie ein Meer ohne Ufer. Konfuzius

Alles wird Gut!

KEIN Support per Mail, ICQ oder PN !
www.heiseclan.de/fusion/sig.gif

www.heiseclan.de/geosig.gif
 
Gokyil1234
vielen dank hat geklappt

--------------------
Ich weiss gehört hier nicht rein wollte aber nicht extra ein thread dafür aufmachen
habe mir die letzte fotokommentare zurecht gebastelt. Aber eins kriege ich nicht hin.

Ich möchte das er unter den Fotos so ein Strich macht. Der Strich der mit <hr> erzeugt wird.

aktuell sieht das so aus:
www.pic-upload.de/thumb/21.10.08/rfo3uf.jpg

ich hätte das gerne so direkt unter jedem foto thumbnail wie hier

www.pic-upload.de/thumb/21.10.08/6zhfvq.jpg
Bearbeitet von Gokyil1234 am 21.10.2008 00000010 11:53
 
Nathan
Ich nehme jetzt einfach mal an das das ganze in einer Tabelle steht. Sofern ich falsch liege bitte mal den Codeabschnitt posten in dem die Tabelle "zusammengebastelt" wird.

Um das zu erreichen könntest Du z.B. folgende Tabelle verwenden:



<table ...>
<tr>
<td><img src="linkzumbild" /></td>
<td>Kommentar</td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
</table>


Ist natürlich nur sinngemäß und muss noch an das richtige Script angepasst werden.
Denke nie gedacht zu haben, denn gedankenloses denken sind verschwendete Gedanken.
 
Gokyil1234
hier bitte schön der gesamte panel code


<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright (c) 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Snippets taken from PHP-Fusion and PHP-Fusion Mods Sites
| Code Credits to Tiido, rownet, and Prince Night Fox for Snippets
| Recoded by BadBoy aka GoogleDude http://www.googlecityforums.com/
| Coding Assistance by Digitanium
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }

if (file_exists(INFUSIONS."latestcomments_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."latestcomments_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."latestcomments_panel/locale/English.php";
}
define("SAFEMODE", @ini_get("safe_mode") ? true : false);

opentable($locale['LCS_100']);
$show_pThumb = true;
$showontop = true;
$alignwhere = "left";
function checkImageExists($image_file) {
if(file_exists($image_file)) {
return $image_file;
}else{
return IMAGES."imagenotfound.jpg";
}
}
$i = 0;
$result = dbquery(
"SELECT * FROM ".DB_PREFIX."comments LEFT JOIN ".DB_PREFIX."users
ON ".DB_PREFIX."comments.comment_name=".DB_PREFIX."users.user_id
ORDER BY comment_datestamp DESC LIMIT 5"
);
if (dbrows($result)) {
echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
while ($data = dbarray($result)) {
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>";
echo "<span class='small'>";
if ($data['comment_type'] == "P" && $show_pThumb && $showontop && ($alignwhere == "left" || $alignwhere == "right")) {
echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='side'>";
$data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' width='55' height='50' style='border: 1px solid #FFFFFF' ALIGN='".$alignwhere."'>";
echo "</A>";
}
if ($data['user_avatar'] != "") {
echo "\n";
} else {
echo "\n";
}
if ($data['user_name']) {
echo "";
} else {
echo $data['comment_name'];
}
$comment_message = nl2br(parseubb($data['comment_message']));
$comment_item_id = $data['comment_item_id'];
$comment_type = $data['comment_type'];
if ($data['comment_smileys'] == "1") $comment_message = parsesmileys($comment_message);
echo "</span>
<span class='small'>".showdate("forumdate", $data['comment_datestamp'])."</span><br>
".$comment_message."<hr>";
if (checkrights("C")) echo "<div align='left'><a href='".ADMIN."comments.php".$aidlink."&ctype=".$data['comment_type']."&cid=".$data['comment_item_id']."'>".$locale['LCS_101']."</a></div>";
echo "<b>";
if ($data['comment_type'] == "P" && $show_pThumb && $showontop && $alignwhere == "none") {
echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='gallery'>";
$data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' title='".$data2['photo_title']."'>";
echo "</A>";
}

if ($data['comment_type'] == "N") {
echo "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'>".$locale['LCS_102']."</a><br>";
}
else if ($data['comment_type'] == "A") {
echo "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'>".$locale['LCS_103']."</a><br>";
}
else if ($data['comment_type'] == "P") {
echo "";
if ($show_pThumb && !$showontop) { echo "<br>"; } else { echo "</a></span><br>"; }
}
else if ($data['comment_type'] == "G") {
echo "<a href='".BASEDIR.INFUSIONS."arcade/comments.php?game_id=".$data['comment_item_id']."'>".$locale['LCS_105']."</a><br>";
}
else if ($data['comment_type'] == "S") {
echo "<a href='".BASEDIR.INFUSIONS."suggestion_box/suggestion_box.php?step=view&suggestion_id=".$data['comment_item_id']."'>".$locale['LCS_106']."</a><br>";
}
else if ($data['comment_type'] == "E") {
echo "<a href='".BASEDIR.INFUSIONS."error_reports/error_reports.php?step=view&error_id=".$data['comment_item_id']."'>".$locale['LCS_107']."</a><br>";
}
else if ($data['comment_type'] == "V") {
echo "<a href='".BASEDIR.INFUSIONS."videogallery/videogallery.php?video=".$data['comment_item_id']."'>".$locale['LCS_108']."</a><br>";
}
else if ($data['comment_type'] == "U") {
echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_item_id']."'>".$locale['LCS_109']."</a><br>";
}
else if ($data['comment_type'] == "C") {
echo "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'>".$locale['LCS_110']."</a><br>";
}
else {
echo $locale['LCS_111'];
}
if ($data['comment_type'] == "P" && $show_pThumb && !$showontop) {
echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='gallery'>";
$data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' title='".$data2['photo_title']."'>";
echo "</A>";
}
$i++;
}
echo "</b>";

echo "</td>\n</tr></table>\n";
} else {
echo "<center><br>".$locale['LCS_112']."<br><br></center>\n";
echo "</td>\n</tr></table>\n";
}
closetable();
?>

 
Nathan
Probier es mal mit dem unten stehenden Code. Sollte das nicht funktionieren bitte nochmal melden, dann hab ich was übersehen :-)



<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright (c) 2005 Nick Jones
| http://www.php-fu...
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Snippets taken from PHP-Fusion and PHP-Fusion Mods Sites
| Code Credits to Tiido, rownet, and Prince Night Fox for Snippets
| Recoded by BadBoy aka GoogleDude http://www.google...orums.com/
| Coding Assistance by Digitanium
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }

if (file_exists(INFUSIONS."latestcomments_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."latestcomments_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."latestcomments_panel/locale/English.php";
}
define("SAFEMODE", @ini_get("safe_mode") ? true : false);

opentable($locale['LCS_100']);
$show_pThumb = true;
$showontop = true;
$alignwhere = "left";
function checkImageExists($image_file) {
if(file_exists($image_file)) {
return $image_file;
}else{
return IMAGES."imagenotfound.jpg";
}
}
$i = 0;
$result = dbquery(
"SELECT * FROM ".DB_PREFIX."comments LEFT JOIN ".DB_PREFIX."users
ON ".DB_PREFIX."comments.comment_name=".DB_PREFIX."users.user_id
ORDER BY comment_datestamp DESC LIMIT 5"
);
if (dbrows($result)) {
echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
while ($data = dbarray($result)) {
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>";
echo "<span class='small'>";
if ($data['comment_type'] == "P" && $show_pThumb && $showontop && ($alignwhere == "left" || $alignwhere == "right")) {
echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='side'>";
$data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' width='55' height='50' style='border: 1px solid #FFFFFF' ALIGN='".$alignwhere."'>";
echo "</A>";
}
if ($data['user_avatar'] != "") {
echo "\n";
} else {
echo "\n";
}
if ($data['user_name']) {
echo "";
} else {
echo $data['comment_name'];
}
$comment_message = nl2br(parseubb($data['comment_message']));
$comment_item_id = $data['comment_item_id'];
$comment_type = $data['comment_type'];
if ($data['comment_smileys'] == "1") $comment_message = parsesmileys($comment_message);
echo "</span>
<span class='small'>".showdate("forumdate", $data['comment_datestamp'])."</span><br>
".$comment_message."<hr>";
if (checkrights("C")) echo "<div align='left'><a href='".ADMIN."comments.php".$aidlink."&ctype=".$data['comment_type']."&cid=".$data['comment_item_id']."'>".$locale['LCS_101']."</a></div>";
echo "<b>";
if ($data['comment_type'] == "P" && $show_pThumb && $showontop && $alignwhere == "none") {
echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='gallery'>";
$data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' title='".$data2['photo_title']."'>";
echo "</A>";
}

if ($data['comment_type'] == "N") {
echo "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'>".$locale['LCS_102']."</a><br>";
}
else if ($data['comment_type'] == "A") {
echo "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'>".$locale['LCS_103']."</a><br>";
}
else if ($data['comment_type'] == "P") {
echo "";
if ($show_pThumb && !$showontop) { echo "<br>"; } else { echo "</a></span><br>"; }
}
else if ($data['comment_type'] == "G") {
echo "<a href='".BASEDIR.INFUSIONS."arcade/comments.php?game_id=".$data['comment_item_id']."'>".$locale['LCS_105']."</a><br>";
}
else if ($data['comment_type'] == "S") {
echo "<a href='".BASEDIR.INFUSIONS."suggestion_box/suggestion_box.php?step=view&suggestion_id=".$data['comment_item_id']."'>".$locale['LCS_106']."</a><br>";
}
else if ($data['comment_type'] == "E") {
echo "<a href='".BASEDIR.INFUSIONS."error_reports/error_reports.php?step=view&error_id=".$data['comment_item_id']."'>".$locale['LCS_107']."</a><br>";
}
else if ($data['comment_type'] == "V") {
echo "<a href='".BASEDIR.INFUSIONS."videogallery/videogallery.php?video=".$data['comment_item_id']."'>".$locale['LCS_108']."</a><br>";
}
else if ($data['comment_type'] == "U") {
echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_item_id']."'>".$locale['LCS_109']."</a><br>";
}
else if ($data['comment_type'] == "C") {
echo "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'>".$locale['LCS_110']."</a><br>";
}
else {
echo $locale['LCS_111'];
}
if ($data['comment_type'] == "P" && $show_pThumb && !$showontop) {
echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='gallery'>";
$data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' title='".$data2['photo_title']."'>";
echo "</A>";
}
$i++;
}
echo "</b>";

echo "</td>\n</tr><tr><td colspan='2'><hr /></td></tr>";
} else {
echo "<center><br>".$locale['LCS_112']."<br><br></center>\n";
echo "</td>\n</tr>";
}
closetable();
?>

Denke nie gedacht zu haben, denn gedankenloses denken sind verschwendete Gedanken.
 
Gokyil1234
ne hat nicht ganz geklappt jetzt sind die ganz rechten panels runter gerutscht nach ganz unten und sind in den panel von den letzten kommentaren reingerutscht und es sieht so aus:

www.pic-upload.de/thumb/22.10.08/ig767z.jpg
 
Nathan
Hupsi ^^ Da hab ich vergessen was mit zu kopieren:



echo "</td>\n</tr><tr><td colspan='2'><hr /></td></tr>";
} else {
echo "<center><br>".$locale['LCS_112']."<br><br></center>\n";
echo "</td>\n</tr>";
}

echo '</table>';
closetable();


Am Ende muss die Tabelle noch geschlossen werden ;-)
Denke nie gedacht zu haben, denn gedankenloses denken sind verschwendete Gedanken.
 
Gokyil1234
danke jetzt tabellen und so gut geschlossen aber

strich sieht so aus:

www.pic-upload.de/thumb/23.10.08/fnffb.jpg
 
Nathan
Und nu? Lag wohl daran das ich in dem Chaos übersehen hab das es nur eine Tabellenzelle ist und nicht zwei. Somit ist das colspan=2 unnötig geworden :D



echo "</td>\n</tr><tr><td><hr /></td></tr>";
} else {
echo "<center><br>".$locale['LCS_112']."<br><br></center>\n";
echo "</td>\n</tr>";
}

echo '</table>';

Denke nie gedacht zu haben, denn gedankenloses denken sind verschwendete Gedanken.
 
Gokyil1234
es will einfach nicht funtzen

sieht nun so aus
www.pic-upload.de/thumb/23.10.08/82q179.jpg

mit diesem code


<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright (c) 2005 Nick Jones
| http://www.php-fu...
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Snippets taken from PHP-Fusion and PHP-Fusion Mods Sites
| Code Credits to Tiido, rownet, and Prince Night Fox for Snippets
| Recoded by BadBoy aka GoogleDude http://www.google...
| Coding Assistance by Digitanium
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }

if (file_exists(INFUSIONS."latestcomments_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."latestcomments_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."latestcomments_panel/locale/English.php";
}
define("SAFEMODE", @ini_get("safe_mode") ? true : false);

opentable($locale['LCS_100']);
$show_pThumb = true;
$showontop = true;
$alignwhere = "left";
function checkImageExists($image_file) {
if(file_exists($image_file)) {
return $image_file;
}else{
return IMAGES."imagenotfound.jpg";
}
}
$i = 0;
$result = dbquery(
"SELECT * FROM ".DB_PREFIX."comments LEFT JOIN ".DB_PREFIX."users
ON ".DB_PREFIX."comments.comment_name=".DB_PREFIX."users.user_id
ORDER BY comment_datestamp DESC LIMIT 5"
);
if (dbrows($result)) {
echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
while ($data = dbarray($result)) {
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>";
echo "<span class='small'>";
if ($data['comment_type'] == "P" && $show_pThumb && $showontop && ($alignwhere == "left" || $alignwhere == "right")) {
echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='side'>";
$data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' width='55' height='50' style='border: 1px solid #FFFFFF' ALIGN='".$alignwhere."'>";
echo "</A>";
}
if ($data['user_avatar'] != "") {
echo "\n";
} else {
echo "\n";
}
if ($data['user_name']) {
echo "";
} else {
echo $data['comment_name'];
}
$comment_message = nl2br(parseubb($data['comment_message']));
$comment_item_id = $data['comment_item_id'];
$comment_type = $data['comment_type'];
if ($data['comment_smileys'] == "1") $comment_message = parsesmileys($comment_message);
echo "</span>
<span class='small'>".showdate("forumdate", $data['comment_datestamp'])."</span><br>
".$comment_message."<hr>";
if (checkrights("C")) echo "<div align='left'><a href='".ADMIN."comments.php".$aidlink."&ctype=".$data['comment_type']."&cid=".$data['comment_item_id']."'>".$locale['LCS_101']."</a></div>";
echo "<b>";
if ($data['comment_type'] == "P" && $show_pThumb && $showontop && $alignwhere == "none") {
echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='gallery'>";
$data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' title='".$data2['photo_title']."'>";
echo "</A>";
}

if ($data['comment_type'] == "N") {
echo "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'>".$locale['LCS_102']."</a><br>";
}
else if ($data['comment_type'] == "A") {
echo "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'>".$locale['LCS_103']."</a><br>";
}
else if ($data['comment_type'] == "P") {
echo "";
if ($show_pThumb && !$showontop) { echo "<br>"; } else { echo "</a></span><br>"; }
}
else if ($data['comment_type'] == "G") {
echo "<a href='".BASEDIR.INFUSIONS."arcade/comments.php?game_id=".$data['comment_item_id']."'>".$locale['LCS_105']."</a><br>";
}
else if ($data['comment_type'] == "S") {
echo "<a href='".BASEDIR.INFUSIONS."suggestion_box/suggestion_box.php?step=view&suggestion_id=".$data['comment_item_id']."'>".$locale['LCS_106']."</a><br>";
}
else if ($data['comment_type'] == "E") {
echo "<a href='".BASEDIR.INFUSIONS."error_reports/error_reports.php?step=view&error_id=".$data['comment_item_id']."'>".$locale['LCS_107']."</a><br>";
}
else if ($data['comment_type'] == "V") {
echo "<a href='".BASEDIR.INFUSIONS."videogallery/videogallery.php?video=".$data['comment_item_id']."'>".$locale['LCS_108']."</a><br>";
}
else if ($data['comment_type'] == "U") {
echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_item_id']."'>".$locale['LCS_109']."</a><br>";
}
else if ($data['comment_type'] == "C") {
echo "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'>".$locale['LCS_110']."</a><br>";
}
else {
echo $locale['LCS_111'];
}
if ($data['comment_type'] == "P" && $show_pThumb && !$showontop) {
echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='gallery'>";
$data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' title='".$data2['photo_title']."'>";
echo "</A>";
}
$i++;
}
echo "</b>";

echo "</td>\n</tr><tr><td><hr /></td></tr>";
} else {
echo "<center><br>".$locale['LCS_112']."<br><br></center>\n";
echo "</td>\n</tr>";
}

echo '</table>';
closetable();
?>

 
Nathan
SO! Nachdem ich heute ne ruhige Schicht hatte und demnach etwas mehr Zigarettenpausen als sonst hab ich den ganzen Code mal aufgedröselt und bin zu dem Ergebnis gekommen das das ziemlich grausig ist und ich mir überlegen würde ob ich das auf meiner Homepage einsetze. Lauter öffnende <tr> und <td> aber kein passendes schließendes Tag dazu u.s.w.

Dennoch hier eine Variante die "hoffentlich" zum gewünschten Ergebnis führt.



<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright (c) 2005 Nick Jones
| http://www.php-fu...
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Snippets taken from PHP-Fusion and PHP-Fusion Mods Sites
| Code Credits to Tiido, rownet, and Prince Night Fox for Snippets
| Recoded by BadBoy aka GoogleDude http://www.google...orums.com/
| Coding Assistance by Digitanium
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }

if (file_exists(INFUSIONS."latestcomments_panel/locale/".$settings['locale'].".php"))
{
    include INFUSIONS."latestcomments_panel/locale/".$settings['locale'].".php";
}
else
{
    include INFUSIONS."latestcomments_panel/locale/English.php";
}

define("SAFEMODE", @ini_get("safe_mode") ? true : false);

opentable($locale['LCS_100']);

$show_pThumb = true;
$showontop = true;
$alignwhere = "left";

function checkImageExists($image_file)
{
    if(file_exists($image_file)) {
    return $image_file;
    }
    else
    {
    return IMAGES."imagenotfound.jpg";
    }
}

$i = 0;
$result = dbquery("SELECT * FROM ".DB_PREFIX."comments LEFT JOIN ".DB_PREFIX."users
                   ON ".DB_PREFIX."comments.comment_name=".DB_PREFIX."users.user_id
                   ORDER BY comment_datestamp DESC LIMIT 5");

if (dbrows($result))
{
    echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
    while ($data = dbarray($result))
    {
        echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><div><span class='comment-name'>";
        echo "<span class='small'>";

        if ($data['comment_type'] == "P" && $show_pThumb && $showontop && ($alignwhere == "left" || $alignwhere == "right"))
        {
            echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='side'>";
            $data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
            echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' width='55' height='50' style='border: 1px solid #FFFFFF' ALIGN='".$alignwhere."'>";
            echo "</A>";
        }

        if ($data['user_avatar'] != "")
        {
            echo "\n";
        }
        else
        {
            echo "\n";
        }

        if ($data['user_name'])
        {
            echo "";
        }
        else
        {
            echo $data['comment_name'];
        }

        $comment_message = nl2br(parseubb($data['comment_message']));
        $comment_item_id = $data['comment_item_id'];
        $comment_type = $data['comment_type'];

        if ($data['comment_smileys'] == "1")
        {
            $comment_message = parsesmileys($comment_message);
        }

        echo "</span>
              <span class='small'>".showdate("forumdate", $data['comment_datestamp'])."</span><br>
             " . $comment_message;

        if (checkrights("C"))
        {
            echo "<div align='left'><a href='".ADMIN."comments.php".$aidlink."&ctype=".$data['comment_type']."&cid=".$data['comment_item_id']."'>".$locale['LCS_101']."</a></div>";
        }

        echo "<b>";

        if ($data['comment_type'] == "P" && $show_pThumb && $showontop && $alignwhere == "none")
        {
            echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='gallery'>";
            $data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
            echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' title='".$data2['photo_title']."'>";
            echo "</A>";
        }

        if ($data['comment_type'] == "N")
        {
            echo "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'>".$locale['LCS_102']."</a><br>";
        }
        else if ($data['comment_type'] == "A")
        {
            echo "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'>".$locale['LCS_103']."</a><br>";
        }
        else if ($data['comment_type'] == "P")
        {
            echo "";
            if ($show_pThumb && !$showontop)
            {
                echo "<br>"; } else { echo "</a></span><br>";
            }
        }
        else if ($data['comment_type'] == "G")
        {
            echo "<a href='".BASEDIR.INFUSIONS."arcade/comments.php?game_id=".$data['comment_item_id']."'>".$locale['LCS_105']."</a><br>";
        }
        else if ($data['comment_type'] == "S")
        {
            echo "<a href='".BASEDIR.INFUSIONS."suggestion_box/suggestion_box.php?step=view&suggestion_id=".$data['comment_item_id']."'>".$locale['LCS_106']."</a><br>";
        }
        else if ($data['comment_type'] == "E")
        {
            echo "<a href='".BASEDIR.INFUSIONS."error_reports/error_reports.php?step=view&error_id=".$data['comment_item_id']."'>".$locale['LCS_107']."</a><br>";
        }
        else if ($data['comment_type'] == "V")
        {
            echo "<a href='".BASEDIR.INFUSIONS."videogallery/videogallery.php?video=".$data['comment_item_id']."'>".$locale['LCS_108']."</a><br>";
        }
        else if ($data['comment_type'] == "U")
        {
            echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_item_id']."'>".$locale['LCS_109']."</a><br>";
        }
        else if ($data['comment_type'] == "C")
        {
            echo "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'>".$locale['LCS_110']."</a><br>";
        }
        else
        {
            echo $locale['LCS_111'];
        }

        if ($data['comment_type'] == "P" && $show_pThumb && !$showontop)
        {
            echo "<A HREF='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."' class='gallery'>";
            $data2=dbarray(dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$data[comment_item_id]'"));
            echo "<IMG SRC='".checkImageExists(PHOTOS.(!SAFEMODE ? "album_".$data2['album_id']."/" : "").$data2['photo_thumb1'])."' title='".$data2['photo_title']."'>";
            echo "</A>";
        }
       
        echo "</td></tr><tr><td><hr /></td></tr>";

        $i++;
    }
    echo "</b>";
    echo "</table>\n";
}
else
{
    echo "<center><br>".$locale['LCS_112']."<br><br></center>\n";
    echo "</td>\n</tr></table>\n";
}
closetable();
?>

Denke nie gedacht zu haben, denn gedankenloses denken sind verschwendete Gedanken.
 
Gokyil1234
jo geil das scheint zu funtzen.

hast du nur die striche bearbeitet oder den ganzen code? also nicht da was fehlt ne abfrage oder so.

dankeeeeeeeeeeeeee dir aber für all deine hilfe
 
Gokyil1234
so nächstes problem


  echo "</span>
              <span class='small'>".showdate("forumdate", $data['comment_datestamp'])."</span><br>
             " . $comment_message;


das gibt die kommentare wieder das wollte ich trimmen.hat aber nicht geklappt sobald ich den trimcode da einfüge verschwindet da spanel


habe probiert mit

".trimlink($comment_message,12)."
oder
"".trimlink($comment_message,12).";

klappt leider nicht
 
Nathan
Ich habe nichts entfernt, nur eingerückt weil der Quellcode sonst sehr schwer zu lesen war. Ist also alles noch da :-)

zum letzten Problem:



echo "</span>
              <span class='small'>".showdate("forumdate", $data['comment_datestamp'])."</span><br>
             " . trimlink($comment_message);


Du brauchst kein " mehr dahinter, da nach $comment_message kein weiterer Text mehr ausgegeben wird.
Denke nie gedacht zu haben, denn gedankenloses denken sind verschwendete Gedanken.
 
Gokyil1234
funzt gut danke

bloss wenn jemand bei einem foto eintrag mal ENTER drückt erscheint bei dem panel jetzt der code <br> wieso?

siehe screenshot

www.pic-upload.de/thumb/25.10.08/bz7ush.jpg

der code sieht nun so aus:

     echo "</span>
              <span class='small'>".showdate("forumdate", $data['comment_datestamp'])."</span><br>
            " . trimlink($comment_message,220);
 

Springe ins Forum:

 Ähnliche Themen 

TEST
Thema Forum Antworten Letzter Beitrag
News / Artikel / Fotos freischalten Allgemeine Support Fragen 2 24.02.2011 00000002 13:27
brauche Lizenzfreie Fotos ! Gemischtes 5 28.02.2009 00000002 10:49
Fotos mit Usernamen markieren Allgemeine Support Fragen 27 30.12.2008 00000012 07:38
Gr@n@dE