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

Heiseclan
Thread Author: spike09
Thread ID: 1137
Thread Info
Es gibt 6 Beiträge zu diesem Thema, und es wurde 3869 mal angesehen.
 Thema drucken
html codes werden angezeigt
spike09
habe ein code womit ich letzten 10 foto kommentare anzeigen lassen kann.

funzt auch alles. was nur komisch ist das er bei den kommentaren die HTML Codierungen mit anzeigt.

www3.pic-upload.de/thumb/31.05.09/q6lfup.jpg

hier der code

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(!iMEMBER) { redirect(BASEDIR."hinweis.php"); }
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);



$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 10");

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='105' height='90' 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>
              " . trimlink($comment_message,220);


        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";
}

?>




hat jemand vielleicht einen entscheidenen tipo für mich?
 
SC-Ad-Bot
 
Gr@n@dE
Schreib uns lieber bitte einmal wie du das speicherst! Den ich glaube eher das da der Fehler liegt. schlecht
Gruß Ralf
__________________________________
KEIN Support per Mail, ICQ oder PN !
 
spike09
das ganze wird per panel angezeigt eigenes panel .also panel mit code.

bloss hierfür benutze ich folgenden code:

Code

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 2");

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='75' height='70' 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>
             " . trimlink($comment_message,220);
     

        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();
 
Gr@n@dE
Glaube du hast mich falsch verstanden. schlecht

Ich meinte mit den Speichern, das du uns den Code Abschnitt anhängst, wo du den Inhalt von "comment_message" speicherst!
Gruß Ralf
__________________________________
KEIN Support per Mail, ICQ oder PN !
 
spike09
hä meinste die include datei?

ja das müsste diese include datei sein:

Code

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 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
+----------------------------------------------------+
| Comments system developed by CrappoMan
| email: simonpatterson@dsl.pipex.com
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }

include LOCALE.LOCALESET."comments.php";

function showcomments($ctype,$cdb,$ccol,$cid,$clink) {

        global $settings,$locale,$userdata,$aidlink;

        if (isset($_POST['post_comment'])) {
                if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
                        fallback(BASEDIR."index.php");
                }
                if (iMEMBER) {
                        $comment_name = $userdata['user_id'];
                } elseif ($settings['guestposts'] == "1") {
                        $comment_name = trim(stripinput($_POST['comment_name']));
                        $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
                        if (isNum($comment_name)) $comment_name="";
                }
                $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
                $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
                if ($comment_name != "" && $comment_message != "") {
                        $result = dbquery("INSERT INTO ".DB_PREFIX."comments VALUES('', '$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
                }
                redirect($clink);
        }

        tablebreak();
        opentable($locale['c100']);
        $result = dbquery(
                "SELECT tcm.*,user_name,user_avatar FROM ".DB_PREFIX."comments tcm
                LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
                WHERE comment_item_id='$cid' AND comment_type='$ctype'
                ORDER BY comment_datestamp DESC"
        );
        if (dbrows($result) != 0) {
                $i = 0;
                echo "<table width='' cellpadding='0' cellspacing='1' class=''>\n";
                while ($data = dbarray($result)) {
                        if ($data['user_avatar'] != "") {
                                $avatar = "<a target='_blank' href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'><img height='70' width='70' src='".IMAGES."avatars/".$data['user_avatar']."'>";
                        } else {
                                $avatar = "<img height='70' width='70' src='".IMAGES."avatars/noav.gif'";
                        }
                        echo "<tr><td class='".($i% 2==0?"tbl1":"tbl2")."'>".$avatar."</td>\n<td class='".($i% 2==0?"tbl1":"tbl2")."' valign='top'><span class='comment-name'>\n";
                        if ($data['user_name']) {
                                echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'><font color='FF9900'>".$data['user_name']."</font></a>";
                        } else {
                                echo $data['comment_name'];
                        }
                        if ($data['comment_smileys'] == "1") {
                                $comment_message = parsesmileys($data['comment_message']);
                        } else {
                                $comment_message = $data['comment_message'];
                        }
                        //
                        $comment_message = parseubb($comment_message);
                        echo "</span>\n<span class='small'><font color='white'>schrieb am ".showdate("forumdate", $data['comment_datestamp'])."</span><br>\n";
                        echo $comment_message."</font></td>\n</tr>\n";
                        $i++;
                }
                if (checkrights("C")) echo "<tr>\n<td colspan='2' align='right' class='".($i% 2==0?"tbl1":"tbl2")."'><a href='".ADMIN."comments.php".$aidlink."&ctype=$ctype&cid=$cid'><center>Kommentar Bearbeiten</center></a></td>\n</tr>\n";
                echo "</table>\n";
        } else {
                echo $locale['c101']."\n";
        }
        closetable();
        tablebreak();
        opentable($locale['c102']);
        if (iMEMBER || $settings['guestposts'] == "1") {
                echo " <form name='inputform' method='post' action='$clink'>
<table align='center' cellspacing='0' cellpadding='0' class='tbl'>\n";
                if (iGUEST) {
                        echo "<tr>
<td>".$locale['c103']."</td>
</tr>
<tr>
<td><input type='text' name='comment_name' maxlength='50' class='textbox' style='width:100%;'></td>
</tr>\n";
                }
echo "<p>Verbleibend: <input name='input1' size='1' style='border-width:1; ' style='color:#ffffff' onfocus='if(this.blur)this.blur()'><br>
<textarea name='comment_message' cols='40' rows='5' onkeyup='count(event)'  style='font-family:arial' style='color:white'></textarea>

<script language='JavaScript'>

var max = 250;

document.inputform.input1.value = max;
document.inputform.comment_message.focus();

function count(e) {

if (!e.which) keyCode = event.keyCode; // ie5+ op5+
else keyCode = e.which; // nn6+

if (document.inputform.comment_message.value.length<max+1) document.inputform.input1.value = max-document.inputform.comment_message.value.length;
else {
document.inputform.comment_message.value = document.inputform.comment_message.value.substring(0,max);
document.inputform.input1.value = 0;
}
}

</script>


<tr><input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('comment_message', '', '');\">
</tr>
<tr>
<td align='center'><input type='submit' name='post_comment' value='".$locale['c102']."' class='button'></td>
</tr>
</table>
</form>\n";
        } else {
                echo $locale['c105']."\n";
        }
        closetable();
}
?>
 
spike09
hast ne idee meisteR?
 
Springe ins Forum:
SGI Fusion