답변 12개 / 댓글 6개
echo $list[$i][icon_reply] . " ";
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
echo "<tr><td valign='top' align='center'><a href='{$list[$i]['href']}'target='_self'>".$thumb_file."</a></td></tr>";
echo "<tr><td valign='top' align='center' height='30'><img src='".$g4[path]."/img/이미지명' width='30' height='30'><a href='{$list[$i]['href']}'target='_self'><span style='font-size:8.7pt; color:464646;'>
{$list[$i]['subject']}</b></span></a></td></tr>";echo "</table>";
?>
헌이님 감사합니다~
정말 실력이 제일 좋은신듣^^
앞으로 조언좀 많이해주세요 ㅎㅎ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$cols = 4; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$imgwidth=200; //표시할 이미지의 가로사이즈
$imgheight=120; //표시할 이미지의 세로사이즈
$img_quality = 100;
$image_h = 0; // 이미지 상하 간격
$col_width = (int)(100 / $cols);
$data_path = $g4[path]."/data/file/$bo_table";
?>
<table width="100%" style="border:1px solid e1e1e1;" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="white">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" width="80" height="25" bgcolor="white"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"target="_self">
<img src="<?=$g4['path']?>/img/btn_more.gif" border="0" title="더보기"></a></td>
<td height="35" align="left"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>" target="_self"><b style="font-size:13px; color:black;">
<?=$board[bo_subject]?></b></a></td>
<td width="30" height="35" align="center" valign="middle"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"target="_self">
<img src="<?=$latest_skin_path?>/img/btn_more.gif" alt="전체보기" border="0" title="전체보기" /></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="0"><!--여백--></td>
</tr>
<tr>
<td align="center" valign="top">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td width="<?=$col_width?>%" align="center" valign="top" style="padding-top:0px;">
<?
$image = $list[$i][file][0][file]; //원본
$thumb = $data_path. "/".$image; //썸네일이 없을경우 원본출력
if (preg_match("@<embed.*src=\"//www.youtube.com/v/([^&]+)&?@",$list[$i][wr_content])) {
preg_match("/<embed.*?src=[\"']\/\/www\.youtube\.com\/v\/([^?]+)\?(.*?)['\"]/", $list[$i][wr_content], $matches);
$v = $matches[1];
$thumb_file="<img src='http://img.youtube.com/vi/".$v."/hqdefault.jpg' width='{$imgwidth}' height='{$imgheight}' align='absmiddle' border='0' style='margin:10px;'>";
}elseif (file_exists($thumb)) {
$thumb_file = "<img src='".$thumb."' width='{$imgwidth}' height='{$imgheight}' align='absmiddle' border='0' style='margin:10px;'>";
}else{
$thumb_file = "<img src='".$g4[path]."/img/noimage.png' width='{$imgwidth}' height='{$imgheight}' align='absmiddle' border='0' style='margin:10px;'>";
}
echo $list[$i][icon_reply] . " ";
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
echo "<tr><td valign='top' align='center'><a href='{$list[$i]['href']}'target='_self'>".$thumb_file."</a></td></tr>";
echo "<tr><td valign='top' align='center' height='30'><a href='{$list[$i]['href']}'target='_self'><span style='font-size:8.7pt; color:464646;'>
{$list[$i]['subject']}</b></span></a></td></tr>";echo "</table>";
?>
</td>
<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%></td>";
}
?>
<? if (count($list) == 0) { echo "<td align=center>게시물이 없습니다.</td>"; } ?>
</tr>
</table>
</td>
</tr>
</table>
꼭 필요한건 아니지만 저게 있으닌가 모양이 이쁘잖아요 그래서 제가 올릴때는 수동으로 걍 특수문자 입력해서 하고있는데 다른 분들이 올릴때는 특수문자를 수동으로 넣지 않아도 자동으로 삽입되게 할려고 하는거에요
ㅎㅎ
ㅋㅋ 그걸 어디에 쓰는게 아니구요 이건 걍 보고 참고하시라고 첨부한거에요 ㅎㅎ
안녕하세요 톰소여님 관심답변 감사합니다.
아래 그림은 메인하면 썸네일 인데요 썸네일 아래 제목에서
빨간색 부분의 블릿을 넣을려고 그러는 거예요 "수고하세요" ^^
헌이님 안녕하세요
알려주신대로 아래처럼 작성해서 넣었는데요 그림처럼 화면이 뜨네요 ㅡ.ㅡ"
<img src='".$g4[path]."/img/icon_bulet' width="15" height="15"/>
답변감사합니다. 그런데
아래 소스에서 빨간색부분이 제목 부분인거 같은데요 소스를 어캐 작성해서 넣어야 될질 모르겠네요
몇가지를 나름 작성해 보았는데요 전체가 출력이 안되네요 ㅎㅎ
좀더 자세하게 알려주세요~ "감사합니다"
echo $list[$i][icon_reply] . " ";
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
echo "<tr><td valign='top' align='center'><a href='{$list[$i]['href']}'target='_self'>".$thumb_file."</a></td></tr>";
echo "<tr><td valign='top' align='center' height='30'><a href='{$list[$i]['href']}'target='_self'><span style='font-size:8.7pt; color:464646;'>
{$list[$i]['subject']}</b></span></a></td></tr>";echo "</table>";
?>
</td>
<? } ?>
<?
답변을 작성하려면 로그인이 필요합니다.
