해당 소스가 되려면 어찌해야되나요? 짧습니다.

해당 소스가 되려면 어찌해야되나요? 짧습니다.

QA

해당 소스가 되려면 어찌해야되나요? 짧습니다.

본문

[​​code]

echo makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_3], $board[bo_4], $list[$i][subject], $latest_skin_path);
  echo "</div>";

[/code]

 

위 부분에서

 

$list[$i][subject]

 

제목 부분 앞에 이미지를 넣으려고 하는데

img src 로 하면 아예 다 안나와버리네요

 

어찌해야하나요>?

실력이 부족하여 간단한 예제라도 주시면 감사하겠습니다.

이 질문에 댓글 쓰기 :

답변 3

<?

$img = "<img src='이미지경로'>"

?>

 

echo makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_3], $board[bo_4], $img, $list[$i][subject], $latest_skin_path);

  echo "</div>";

이렇게 하면 되지 않을까요? ^^;

일단 성의 있는 답변 감사드립니다.

01 <?
02 $img = "<img src='이미지경로'>"
03 ?> 

말씀하신대로 이 부분을 추가했는데..
변화가 없네요.

저 부분을 추가한다고 해서
18번째 줄에 $list[$i][subject] 부분 앞에 이미지가 생길수가 있나요?

제가 원하는 것은 최근 게시물 제목부분 앞에 이미지를 넣으려는 의도입니다.

좋은 답변 부탁드리겠습니다!!


----- 추가적으로

 echo "$img​{$list[$i]['subject']}";

이 소스가 수정되었네요.
이 부분도 수정하였는데도 안되네요!! ㅠㅠㅠㅠㅠ

네이트온 하시면 원격제어로 도와드릴수가 있을텐데.. 혹시 네이트온 하시면 쪽지로 ID 보내주세요..
직접 도와드리는게 더 빠를 것 같은데..ㅠㅠ

제목앞에 넣을 이미지를 최근게시물 스킨내부 img 폴더에 넣어주시고,
<? $img ="<img src='/img/이미지.gif'>"; ?>
이렇게 확장자를 확인하시고 최상단에 넣어주세요.

그리고 24번째줄에

echo "​{$list[$i]['subject']}"; 이 부분을

echo "$img​{$list[$i]['subject']}"; 이 부분으로 바꿔보세요.

ps. 헉.. <? $img ="<img src='/img/이미지.gif'>" ?> 가 아니라
<? $img ="<img src='/img/이미지.gif'>"; ?> 요놈입니당..


<?
$img = "<img src='이미지경로'>"
?> 
 
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<?
for ($i=0; $i<count($list); $i++) {
  if ($i && $i%$mod==0) {
    echo "</tr><tr>";
  }
?>
<td style="padding:10px 5px; text-align:center;">
  <?
  echo "<a href='{$list[$i][wr_link1]}' target='_blank'>";
  echo "<div style='border:1px solid #bbb; background:#fff; width:{$board[bo_3]}px; height:{$board[bo_4]}px; margin:0 auto; padding:5px;'>";
  echo " " . $list[$i]['icon_rect'];
  echo makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_3], $board[bo_4], $list[$i][subject], $latest_skin_path);
  echo "</div>";
  echo "<div style='padding-top:5px; margin:0 auto;'>";
  if ($list[$i]['is_notice'])
      echo "<strong>{$list[$i]['subject']}</strong>";
  else
      echo "$img​{$list[$i]['subject']}";
  if ($list[$i]['comment_cnt'])
      echo " <a href=\"{$list[$i]['wr_link1']}\"><span style='font-size:7pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";
  echo " " . $list[$i]['icon_new'];
  echo " " . $list[$i]['icon_hot'];
  echo " " . $list[$i]['icon_secret'];
  
  echo "</div></a>";
  ?>
</td>
<?
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
    for ($i=$cnt; $i<$mod; $i++)
        echo "<td width='{$td_width}%'> </td>";
?>
</tr>
<? if (count($list) == 0) { ?><tr><td align="center" height="50"><span style="color:#555;">게시물이 없습니다.</span></td></tr><? } ?>
<tr><td colspan="<?=$rows?>" style="width:100%; height:1px; background:#ccc;"></td></tr>
</table>

 

아래질문 글 방금 봤네요~ 이렇게 한번 해보세요..^^;


<?
if (!defined("_GNUBOARD_")) exit;
$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
include_once("$latest_skin_path/skin.lib.php");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
if (!$board[bo_3]) {
    $board[bo_3] = "160";
    $sql = " update $g4[board_table] set bo_3 = '$board[bo_3]', bo_3_subj = '최신글 가로 픽셀' where bo_table = '$bo_table' ";
    sql_query($sql);
}
if (!$board[bo_4]) {
    $board[bo_4] = "100";
    $sql = " update $g4[board_table] set bo_4 = '$board[bo_4]', bo_4_subj = '최신글 세로 픽셀' where bo_table = '$bo_table' ";
    sql_query($sql);
}
?>
<style type="text/css">
.bbs_top_title  { font-weight:bold; color:#666666; text-align:center; height:30px; background-color:#000000; }
.bbs_line1      { height:1px; background-color:#c7c7c7; }
.bbs_line2      { height:2px; background-color:#495d84; }
</style>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td class="bbs_line1"></td></tr>
<tr><td class="bbs_top_title"><font color="white">유저들이 인정한 게임만을 위한  서비스!!   </font><font color="red">24시간</font><font color="white"> 고객센터 운영!! </font> <font color="red">안전</font><font color="white">하고 믿을 수 있는 곳만 추천해드립니다.</font></b></td></tr>
<tr><td class="bbs_line2"></td></tr>
</table>
<? $img ="<img src='/img/icon_rec.gif'>" ?>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<?
for ($i=0; $i<count($list); $i++) {
  if ($i && $i%$mod==0) {
    echo "</tr><tr>";
  }
?>
<td style="padding:10px 5px; text-align:center;">
  <?
  echo "<a href='{$list[$i][wr_link1]}' target='_blank'>";
  echo "<div style='border:1px solid #bbb; background:#fff; width:{$board[bo_3]}px; height:{$board[bo_4]}px; margin:0 auto; padding:5px;'>";
  echo " " . $list[$i]['icon_rect'];
  echo "<a href='{$list[$i][wr_link1]}' target='_blank'>";
  echo makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_3], $board[bo_4], $list[$i][subject], $latest_skin_path);
  echo "</div>";
  echo "<div style='padding-top:5px; margin:0 auto;'>";
  if ($list[$i]['is_notice'])
      echo "<strong>{$list[$i]['subject']}</strong>";
  else
      echo "$img​{$list[$i]['subject']}";
  if ($list[$i]['comment_cnt'])
      echo " <a href=\"{$list[$i]['wr_link1']}\"><span style='font-size:7pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";
  echo " " . $list[$i]['icon_new'];
  echo " " . $list[$i]['icon_hot'];
  echo " " . $list[$i]['icon_secret'];
  
  echo "</div></a>";
  ?>
</td>
<?
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
    for ($i=$cnt; $i<$mod; $i++)
        echo "<td width='{$td_width}%'> </td>";
?>
</tr>
<? if (count($list) == 0) { ?><tr><td align="center" height="50"><span style="color:#555;">게시물이 없습니다.</span></td></tr><? } ?>
<tr><td colspan="<?=$rows?>" style="width:100%; height:1px; background:#ccc;"></td></tr>
</table>
​
 

 


<?
if (!defined("_GNUBOARD_")) exit;
$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
include_once("$latest_skin_path/skin.lib.php");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
if (!$board[bo_3]) {
    $board[bo_3] = "160";
    $sql = " update $g4[board_table] set bo_3 = '$board[bo_3]', bo_3_subj = '최신글 가로 픽셀' where bo_table = '$bo_table' ";
    sql_query($sql);
}
if (!$board[bo_4]) {
    $board[bo_4] = "100";
    $sql = " update $g4[board_table] set bo_4 = '$board[bo_4]', bo_4_subj = '최신글 세로 픽셀' where bo_table = '$bo_table' ";
    sql_query($sql);
}
?>
<?
$pa = "<img src='/img/icon_rec.gif'>";
?>
<style type="text/css">
.bbs_top_title  { font-weight:bold; color:#666666; text-align:center; height:30px; background-color:#000000; }
.bbs_line1      { height:1px; background-color:#c7c7c7; }
.bbs_line2      { height:2px; background-color:#495d84; }
</style>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td class="bbs_line1"></td></tr>
<tr><td class="bbs_top_title"><font color="white">유저들이 인정한 게임만을 위한&nbsp;서비스!!&nbsp;&nbsp;</font><font color="red">24시간</font><font color="white">고객센터 운영!!</font>&nbsp;<font color="red">안전</font><font color="white">하고 믿을 수 있는 곳만 추천해드립니다.</font></b></td></tr>
<tr><td class="bbs_line2"></td></tr>
</table>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<?
for ($i=0; $i<count($list); $i++) {
  if ($i && $i%$mod==0) {
    echo "</tr><tr>";
  }
?>
<td style="padding:10px 5px; text-align:center;">
  <?
  echo "<a href='{$list[$i][wr_link1]}' target='_blank'>";
  echo "<div style='border:1px solid #bbb; background:#fff; width:{$board[bo_3]}px; height:{$board[bo_4]}px; margin:0 auto; padding:5px;'>";
  echo " " . $list[$i]['icon_rect'];
  echo "<a href='{$list[$i][wr_link1]}' target='_blank'>";
  echo makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_3], $board[bo_4], $list[$i][subject], $latest_skin_path);
  echo "</div>";
  echo "<div style='padding-top:5px; margin:0 auto;'>";
  if ($list[$i]['is_notice'])
      echo "<strong>$pa{$list[$i]['subject']}</strong>";
  else
      echo "$pa​{$list[$i]['subject']}";
  if ($list[$i]['comment_cnt'])
      echo " <a href=\"{$list[$i]['wr_link1']}\"><span style='font-size:7pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";
  echo " " . $list[$i]['icon_new'];
  echo " " . $list[$i]['icon_hot'];
  echo " " . $list[$i]['icon_secret'];
  
  echo "</div></a>";
  ?>
</td>
<?
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
    for ($i=$cnt; $i<$mod; $i++)
        echo "<td width='{$td_width}%'>&nbsp;</td>";
?>
</tr>
<? if (count($list) == 0) { ?><tr><td align="center" height="50"><span style="color:#555;">게시물이 없습니다.</span></td></tr><? } ?>
<tr><td colspan="<?=$rows?>" style="width:100%; height:1px; background:#ccc;"></td></tr>
</table>
​

답변을 작성하시기 전에 로그인 해주세요.
전체 6
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT