크게 작게 인쇄

[그누보드]게시판 댓글에 회원사진 나오게하기

view_comment_skin.php 에 다음글 추가

<!-- 코멘트 리스트 -->
<div id="commentContents" class="commentContents">

<? if (trim($board[bo_comment_notice])) { ?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
    <td></td>
    <td width="100%">
        <table width=100% cellpadding=0 cellspacing=0>
        <tr>
            <!-- 이름, 아이피 -->
            <td>
                <span class=mw_basic_comment_name><img src="<?=$board_skin_path?>/img/icon_notice.gif"></span>
            </td>
            <!-- 링크 버튼, 코멘트 작성시간 -->
            <td align=right>
                <span class=mw_basic_comment_datetime><?=substr($view[wr_datetime],2,14)?></span>
            </td>
        </tr>
        <tr height=5><td></td></tr>
        </table>
        <table width=100% cellpadding=0 cellspacing=0 class=mw_basic_comment_content>
        <tr>                            
            <td colspan=2>
                <div><?=get_text($board[bo_comment_notice], 1)?></div>
            </td>
        </tr>
        </table>
    </td>
</tr>
</table>
<br/>
<? } ?>

<?
for ($i=0; $i<count($list); $i++) {
    $comment_id = $list[$i][wr_id];
$mb_id = $list[$i][mb_id];
$mb_dir = substr($list[$i][mb_id],0,2);
$profile_image = "$g4[path]/memberimg/$mb_dir/$mb_id.gif";
if (file_exists($profile_image)) { // 회원이 아니거나, 파일이 없으면 noimage 출력
}
else{
$profile_image = "$board_skin_path/img/noimage.gif";
}

?>
<a name="c_<?=$comment_id?>"></a>
<table width=100% cellpadding=0 cellspacing=0 border=0 id=view_<?=$wr_id?> >
<tr>
    <td><? for ($k=0; $k<strlen($list[$i][wr_comment_reply]); $k++) echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"; ?></td>
    <td width='100%'>

        <table border=0 cellpadding=0 cellspacing=0 width=100%>
        <tr>
            <td height=1 colspan=3 bgcolor="#dddddd"><td>
        </tr>
        <tr>
            <td height=1 colspan=3></td>
        </tr>
        <tr>
         <td width=70 valign=top style="padding-top:6px;">
                <img src="<?=$profile_image?>" width=58 height=58 style="border:3px solid #f2f2f2">
            </td>
            <td valign=top>
                <div style="height:28px; background:url(<?=$board_skin_path?>/img/co_title_bg.gif); clear:both; line-height:28px;">
                <div style="float:left; margin:2px 0 0 2px;">
                <strong><?=$list[$i][name]?></strong>
                <span style="color:#888888; font-size:11px;"><?=$list[$i][datetime]?></span>
                </div>
                <div style="float:right; margin-top:5px;">
                <? if ($is_ip_view) { echo "&nbsp;<span style="color:#B2B2B2; font-size:11px;\">{$list[$i][ip]}</span>"; } ?>
                <? if ($list[$i][is_reply] && $check_comment_allow) { echo "<a href=\"javascript:comment_box('{$comment_id}','c');\"><img src='$board_skin_path/img/co_btn_reply.gif' border=0 align=absmiddle alt='답변'></a> "; } ?>
                <? if ($list[$i][is_edit]) { echo "<a href=\"javascript:comment_box('{$comment_id}', 'cu');\"><img src='$board_skin_path/img/co_btn_modify.gif' border=0 align=absmiddle alt='수정'></a> "; } ?>
                <? if ($list[$i][is_del])  { echo "<a href=\"javascript:comment_delete('{$list[$i][del_link]}');\"><img src='$board_skin_path/img/co_btn_delete.gif' border=0 align=absmiddle alt='삭제'></a> "; } ?>
                <? if ($list[$i][singo_href]) { ?>&nbsp;<a href="javascript:;" onclick="win_singo('<?=$list[$i][singo_href]?>');"><img src='<?=$board_skin_path?>/img/icon_singo.gif'></a><?}?>
                <? if ($list[$i][secret_href]) { ?>&nbsp;<a href="<?=$list[$i][secret_href]?>"><img src='<?=$board_skin_path?>/img/icon_comment_secret.gif' border='0' align='absmiddle'></a><?}?>
                <? if ($list[$i][nosecret_href]) { ?>&nbsp;<a href="<?=$list[$i][nosecret_href]?>"><img src='<?=$board_skin_path?>/img/icon_comment_nosecret.gif' border='0' align='absmiddle'></a><?}?>
                &nbsp;
                </div>
                </div>

                <!-- 코멘트 출력 -->
                <div style='line-height:20px; padding:7px; word-break:break-all; overflow:hidden; clear:both; '>
                <?
                //if (strstr($list[$i][wr_option], "secret") and ($list[$i][mb_id] == $member[mb_id] or $is_admin or $member[mb_id] == $write[mb_id])) echo "<span style='color:#ff6600;FONT-WEIGHT:bold'>*비밀글입니다</span><BR> ";
                if (strstr($list[$i][wr_option], "secret")) echo "<span style='color:#ff6600;FONT-WEIGHT:bold'>*비밀글입니다</span><BR> ";
                
                if (strstr($list[$i][wr_option], "html"))
                    $str = $list[$i][content];
             else if ($is_dhtml_editor) {
                    $str = nl2br($list[$i][content]);
                } else {
                    $str = $list[$i][content];
                }
                if (strstr($list[$i][wr_option], "secret"))
                    $str = "<span class='small'>$str</span>";

                if (strstr($list[$i][wr_option], "html")) {
                $str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);'>", $str);
                } else {
                $str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
                // FLASH XSS 공격에 의해 주석 처리 - 110406
                //$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(swf)\".*\<\/a\>\]/i", "<script>doc_write(flash_movie('$1://$2.$3'));</script>", $str);
                //$str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);'>", $str);
                // resize code는 view_comment.php로 이동
                //$str = preg_replace("/(\<img )([^\>]*)(\>)/i", "\\1 name='target_resize_image[]' onclick='image_window(this)' style='cursor:pointer;' \\2 \\3", $str);
                }
                //if (strstr($list[$i][wr_option], "secret")) $str = "<span class='secret'>$str</span>"; 

                //echo resize_content($str, $board[bo_image_width] - 50 * strlen($list[$i][wr_comment_reply]));
                echo resize_content($str, $board[bo_image_width] - 150);
                ?>
                </div>
                <? if ($list[$i][trackback]) { echo "<p>".$list[$i][trackback]."</p>"; } ?>
                <span id='edit_<?=$comment_id?>' style='display:none;'></span><!-- 수정 -->
                <span id='reply_<?=$comment_id?>' style='display:none;'></span><!-- 답변 -->
                </div>
                <input type=hidden id='secret_comment_<?=$comment_id?>' value="<?=strstr($list[$i][wr_option],"secret")?>">
                <textarea id='save_comment_<?=$comment_id?>' style='display:none;'><? if (strstr($list[$i][wr_option], "html")) {if ($is_dhtml_editor) echo get_text($list[$i][content1],0); else echo $list[$i][wr_content0]; } else if ($is_dhtml_editor) echo get_text(nl2br($list[$i][content1]),0); else echo get_text($list[$i][content1], 0)?></textarea></td>
            </td>
        </tr>
        <tr>
            <td height=5 colspan=3></td>
        </tr>
        </table>

    </td>
</tr>
</table>
<? } ?>
</div>



※ 로그인 하시면 원본파일을 볼 수 있습니다. ※

0
코멘트 1
  • 슈퍼맨 관리자 2011-06-21 23:54:26

    0

    <span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: Tahoma, 굴림; line-height: 20px; ">if ($profile_image)&nbsp; ==&gt; if ($file_exists(profile_image))&nbsp; 변경 필요</span>

    답글달기

자동등록방지 코드
그누보드팁 | 전체게시물 160
안내

포인트안내닫기

  • 글읽기0
  • 글쓰기100
  • 댓글쓰기50
  • 다운로드-500
그누보드팁리스트
번호 제목 글쓴이 날짜 조회 추천
40 텍스트 슈퍼맨 웹스터디 06-22 3993 0
39 텍스트 슈퍼맨 웹스터디 06-22 3526 0
38 텍스트 +1 슈퍼맨 관리자 06-22 5065 0
37 텍스트 슈퍼맨 웹스터디 06-22 4635 0
36 파일첨부 +1 슈퍼맨 웹스터디 06-22 3684 0
35 파일첨부 슈퍼맨 웹스터디 06-22 4512 0
34 텍스트 슈퍼맨 웹스터디 06-22 3799 0
33 파일첨부 링크 슈퍼맨 웹스터디 06-22 6937 0
32 텍스트 슈퍼맨 웹스터디 06-22 3633 0
31 파일첨부 슈퍼맨 웹스터디 06-22 3593 0
30 텍스트 슈퍼맨 웹스터디 06-22 3552 0
29 텍스트 +1 슈퍼맨 웹스터디 06-22 3516 0
28 파일첨부 슈퍼맨 웹스터디 06-22 3637 0
27 텍스트 슈퍼맨 웹스터디 06-22 5634 0
26 텍스트 슈퍼맨 웹스터디 06-21 3383 0
25 텍스트 슈퍼맨 웹스터디 06-21 5695 0
24 텍스트 슈퍼맨 관리자 06-21 3590 0
23 텍스트 슈퍼맨 관리자 06-21 3458 0
22 텍스트 슈퍼맨 관리자 06-21 3431 0
21 텍스트
[그누보드]게시판 댓글에 회원사진 나오게하기
+1
슈퍼맨 웹스터디 06-21 3979 0