사진을 클릭하면 그 사진이 있는 곳으로 이동을 해야 하는데......
본문
최근게시물 가져오기 입니다.
사진을 클릭하면 그 사진이 있는 곳으로 이동을 해야 하는데
이동을 하지 않습니다. 아무리 연구해도 아직 제가 하기는 힘든 것
같아서 여기에 도움 요청합니다.
감사합니다.
--------------------------------------------------------------------------------
<최근게시물 가져오기>
--------------------------------------------------------------------------------
<div><?=mw_latest_rand("good2", "products", 1, 28, 0, $group[gr_cache])?></div><br>
--------------------------------------------------------------------------------
<good2 소스>
--------------------------------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?
for ($i=0; $i<count($list); $i++)
{
if ($i > 0)
echo "<tr><td width=30> </td></tr>";
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 80);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo <<<HEREDOC
<tr>
<td width="210" valign="top">
<table width="210" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="210" colspan="3"><img src="{$latest_skin_path}/img/skin_top.gif" width="210" height="16"></td>
</tr>
<tr>
<td width="19" height="128" background="{$latest_skin_path}/img/skin_l_bg.gif"></td>
<td width="170"><a href="{$href}"><img src="{$img}" width="170" height="128" border="0" title="$title"></a></td>
<td width="21" valign="top" background="{$latest_skin_path}/img/skin_r_bg.gif"><img src="{$latest_skin_path}/img/skin_right_img.gif" width="21" height="57"></td>
</tr>
<tr>
<td height="18" colspan="3"><img src="{$latest_skin_path}/img/skin_down.gif" width="210" height="18"></td>
</tr>
<tr>
<td width="19" height='22' background="{$latest_skin_path}/img/skin_t_left_bg.gif"></td>
<td width="170" align=center><a href="{$href}">{$list[$i][subject]}</a></td>
<td width="21" background="{$latest_skin_path}/img/skin_t_right_bg.gif"></td>
</tr>
<tr>
<td height="5" colspan="3"><img src="{$latest_skin_path}/img/skin_bottom.gif" width="210" height="5"></td>
</tr>
</table>
</td>
</tr>
HEREDOC;
/*
echo <<<HEREDOC
<tr>
<td width="210" valign="top">
<table width="210" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="210" colspan="3"><img src="{$latest_skin_path}/img/skin_top.gif" width="210" height="16"></td>
</tr>
<tr>
<td width="19" height="90" background="{$latest_skin_path}/img/skin_l_bg.gif"></td>
<td width="170" height="90"><a href="{$href}"><img src="{$img}" width="170" height="90" border="0" title="$title"></a></td>
<td width="21" valign="top" background="{$latest_skin_path}/img/skin_r_bg.gif"><img src="{$latest_skin_path}/img/skin_right_img.gif" width="21" height="57"></td>
</tr>
<tr>
<td height="18" colspan="3"><img src="{$latest_skin_path}/img/skin_down.gif" width="210" height="18"></td>
</tr>
<tr>
<td width="19" height="65" background="{$latest_skin_path}/img/skin_t_left_bg.gif"></td>
<td width="170" valign="top"><table cellpadding=4 cellspacing=0><tr>
<td>
<a href="{$href}"><font class="blue"><b>{$list[$i][subject]}</b></font></a><br>
<a href="{$href}"><font class="gray">{$content}</font></a></td></tr></table></td>
<td width="21" background="{$latest_skin_path}/img/skin_t_right_bg.gif"></td>
</tr>
<tr>
<td height="5" colspan="3"><img src="{$latest_skin_path}/img/skin_bottom.gif" width="210" height="5"></td>
</tr>
</table>
</td>
</tr>
HEREDOC;
*/
}
?>
</table>
답변 2
<td width="170" align=center><a href="{$href}">{$list[$i][subject]}</a></td>
여기를
<td width="170" align=center><a href="{$list[$i]['href']}">{$list[$i][subject]}</a></td>
이렇게 수정하세요
레스트님,
적용했습니다.
<a href="{$list[$i]['href']}"> 를 여기저기 붙였어요.
감사합니다.