이름 같이 연락처나 메일주소 출력에 대해 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

이름 같이 연락처나 메일주소 출력에 대해 정보

이름 같이 연락처나 메일주소 출력에 대해

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : http://mufd.co.kr/gnuboard4/bbs/board.php?bo_table=qan

이름처럼 작성자가 메일이랑 연락처를 썼을때 내용에 출력하는 것에 대해 알고싶은데요.

지금은 메일, 연락처 부분은 나오는데 썼을때 안나오거든요;


제가 해본것은 이름부분 출력하는걸 복사해서


<? if ($is_category) { echo ($category_email ? "[$view[ca_email]] " : ""); } ?>
<? if ($is_category) { echo ($category_homepage ? "[$view[ca_homepage]] " : ""); } ?>

이거 추가하고

글쓴이

밑에 테이블을 추가하고 소스를 넣었거든요...

근데 저 가변파일이 쫌 걸리네요 -_-;;;;

뭔가 수정해야될거같은데 어케 손봐야하는지....



<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" cellpadding="0" cellspacing="0">
  <tr><td>

<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
    <td width=75%>
        <? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle'></a> "; } ?>
        <? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>

        <? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_update.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_good.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_nogood.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('$scrap_href');\"><img src='$board_skin_path/img/btn_scrap.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_move.gif' border='0' align='absmiddle'></a> "; } ?>
    </td>
    <td width=25% align=right>
        <? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle'></a>&nbsp;"; } ?>
        <? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle'></a>&nbsp;"; } ?>
    </td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>

      <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td height=2 bgcolor=#0A7299></td>
        </tr>
        <tr>
          <td height=30 bgcolor=#F8F8F9 style="padding:5 0 5 0;">&nbsp;&nbsp;<strong>
            <? if ($is_category) { echo ($category_name ? "[$view[ca_name]] " : ""); } ?>
<? if ($is_category) { echo ($category_email ? "[$view[ca_email]] " : ""); } ?>
<? if ($is_category) { echo ($category_homepage ? "[$view[ca_homepage]] " : ""); } ?>
            <?=$view[subject]?>
            </strong></td>
        </tr>
        <tr>
          <td height=30>&nbsp;&nbsp;<font color=#7A8FDB>글쓴이</font> :
            <?=$view[name]?>
            &nbsp;&nbsp;&nbsp;&nbsp; <font color=#7A8FDB>날짜</font> :
            <?=substr($view[wr_datetime],2,14)?>
            &nbsp;&nbsp;&nbsp;&nbsp; <font color=#7A8FDB>조회</font> :
            <?=$view[wr_hit]?>
            &nbsp;&nbsp;&nbsp;&nbsp;</td>
        </tr>
        <tr>
          <td height=1 bgcolor=#E7E7E7></td>
        </tr>
        <? if ($trackback_url) { ?>
        <?}?>
        <?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++)
{
    if ($view[file][$i][source] && !$view[file][$i][view])
    {
        $cnt++;
        //echo "<tr><td height=22>&nbsp;&nbsp;<img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle> <a href='{$view[file][$i][href]}' title='{$view[file][$i][content]}'><strong>{$view[file][$i][source]}</strong> ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</a></td></tr>";
        echo "<tr><td height=22>&nbsp;&nbsp;<img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle> <a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'><strong>{$view[file][$i][source]}</strong> ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</a></td></tr>";
    }
}

// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++)
{
    if ($view[link][$i])
    {
        $cnt++;
        $link = cut_str($view[link][$i], 70);
        echo "<tr><td height=22>&nbsp;&nbsp;<img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle> <a href='{$view[link_href][$i]}' target=_blank><strong>{$link}</strong> ({$view[link_hit][$i]})</a></td></tr>";
    }
}
?>
        <tr>
          <td height=1 bgcolor=#E7E7E7></td>
        </tr>
        <tr>
          <td height="30" style='word-break:break-all; padding:10px; border:1px solid #BBBBBB;' bgcolor=#F8F8F9><font color=#7A8FDB>E-mail</font>
            :
            <?=$view[email]?>
            &nbsp;&nbsp;&nbsp;&nbsp; <font color="#7A8FDB">연락처</font>:
            <?=$view[homepage]?>
        </tr>
        <tr>
          <td height="75" style='word-break:break-all; padding:10px; border:1px solid #BBBBBB;' bgcolor=#F8F8F9>
            <?
        // 파일 출력
        for ($i=0; $i<=count($view[file]); $i++) {
            if ($view[file][$i][view])
                echo $view[file][$i][view] . "<p>";
        }
        ?>
            <span class="ct lh">
            <?=$view[content];?>
            </span>
            <?//echo $view[rich_content]; // 과 같은 코드를 사용할 경우?>
            <!-- 테러 태그 방지용 -->
            <a href=""></a><a href=''></a>
            <? if ($is_signature) { echo "<br>$signature<br><br>"; } // 서명 출력 ?>
          </td>
        </tr>
      </table>
      <br>

<?
include_once("./view_comment.php");
?>

<?=$link_buttons?>

</td></tr></table><br>

<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
    var target = document.getElementsByName('target_resize_image[]');
    var image_width = parseInt('<?=$board[bo_image_width]?>');
    var image_height = 0;

    for(i=0; i<target.length; i++) {
        // 원래 사이즈를 저장해 놓는다
        target[i].tmp_width  = target[i].width;
        target[i].tmp_height = target[i].height;
        // 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
        if(target[i].width > image_width) {
            image_height = parseFloat(target[i].width / target[i].height)
            target[i].width = image_width;
            target[i].height = parseInt(image_width / image_height);
        }
    }
}

window.onload = resize_image;

function file_download(link, file)
{
<? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href = link;
}
</script>
<!-- 게시글 보기 끝 -->
  • 복사

댓글 전체

<? if ($is_category) { ?> <? } ?>

부분은 카테고리 사용시 나오는 코드이므로
코드가 약간 잘못된듯하네요.

그리고 ca_email,ca_homepage 가 아니고 wr_email wr_homepage 입니다.
<? if ($is_category) { echo ($category_email ? "[$view[ca_email]] " : ""); } ?>
<? if ($is_category) { echo ($category_homepage ? "[$view[ca_homepage]] " : ""); } ?>

이렇게 왜 하셨는지 모르겠네요.

그냥 $view[wr_email] $view[wr_homepage] 로 출력하면 됩니다.
© SIRSOFT
현재 페이지 제일 처음으로