비슷한 스킨이 많을거라고 생각합니다.
제가 스킨을 수정하고 이미지 영역만 수정하려고 하다보니 기존에 있는 링크스킨이랑 안맞아서 제가 그누5 스킨에서 소스를 따왔더니 잘 되네요 .
게시판 작성할때 첨부파일로 이미지를 올리고 링크1에 홈페이지 주소를 넣습니다.
그럼 리스트에서 사진 클릭시 새창으로 외부 홈페이지가 뜹니다.
<?
for ($i=0; $i<count($list); $i++) {
if ($i && $i%$mod==0)
echo "</tr><tr>";
$style = "";
$subject = "<span $style>{$list[$i][subject]}</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i][comment_cnt]}</span></a>";
$list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);
$list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);
$list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);
echo "<td width='{$td_width}%' valign=middle style='word-break:break-all; padding:2px;'>";
echo "<table align=center>";
echo "<tr><td height=5></td></tr>";
echo "<tr><td align=center valign=top><div style='border:0px solid #ccc; background:#fff; padding:4px; font-size:0; line-height:0;'><a href='".$list[$i][link_href][1]."' target='_blank'><img style=\"width: 300px;\" src=\"".$g4[path]."/data/file/".$bo_table."/".$list[$i][file][0][file]."\" /></a></div></td></tr>";
echo "<tr><td align=center class=lh>";
//echo "<nobr style='display:block; overflow:hidden; width:100%'><a href='{$list[$i][ca_name_href]}'>[{$list[$i][ca_name]}]</a> ";
echo "<a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</nobr>";
//echo " " . $list[$i][icon_new];
//echo " " . $list[$i][icon_file];
//echo " " . $list[$i][icon_link];
//echo " " . $list[$i][icon_hot];
//echo " " . $list[$i][icon_secret];
echo "</td></tr>";
//echo "<tr><td align=center style='font-size:11px; color:#888;'>Date.".$list[$i][datetime2]." / Hit.".$list[$i][wr_hit]."</td></tr>";
if ($is_checkbox) echo "<tr><td align=center></td></tr>";
echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
너무 복잡하다고 생각하시는 분은
<a href='".$list[$i][link_href][1]."' target='_blank'><img style=\"width: 300px;\" src=\"".$g4[path]."/data/file/".$bo_table."/".$list[$i][file][0][file]."\" /></a>
이미지 영역 소스입니다. 이부분만 적용해주면 되요
별거아닌 소스이지만 저는 꼭 필요하던거라 ㅋㅋ 다른분들도 필요하실까 싶어서 올립니다.
제가 스킨을 수정하고 이미지 영역만 수정하려고 하다보니 기존에 있는 링크스킨이랑 안맞아서 제가 그누5 스킨에서 소스를 따왔더니 잘 되네요 .
게시판 작성할때 첨부파일로 이미지를 올리고 링크1에 홈페이지 주소를 넣습니다.
그럼 리스트에서 사진 클릭시 새창으로 외부 홈페이지가 뜹니다.
<?
for ($i=0; $i<count($list); $i++) {
if ($i && $i%$mod==0)
echo "</tr><tr>";
$style = "";
$subject = "<span $style>{$list[$i][subject]}</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i][comment_cnt]}</span></a>";
$list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);
$list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);
$list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);
echo "<td width='{$td_width}%' valign=middle style='word-break:break-all; padding:2px;'>";
echo "<table align=center>";
echo "<tr><td height=5></td></tr>";
echo "<tr><td align=center valign=top><div style='border:0px solid #ccc; background:#fff; padding:4px; font-size:0; line-height:0;'><a href='".$list[$i][link_href][1]."' target='_blank'><img style=\"width: 300px;\" src=\"".$g4[path]."/data/file/".$bo_table."/".$list[$i][file][0][file]."\" /></a></div></td></tr>";
echo "<tr><td align=center class=lh>";
//echo "<nobr style='display:block; overflow:hidden; width:100%'><a href='{$list[$i][ca_name_href]}'>[{$list[$i][ca_name]}]</a> ";
echo "<a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</nobr>";
//echo " " . $list[$i][icon_new];
//echo " " . $list[$i][icon_file];
//echo " " . $list[$i][icon_link];
//echo " " . $list[$i][icon_hot];
//echo " " . $list[$i][icon_secret];
echo "</td></tr>";
//echo "<tr><td align=center style='font-size:11px; color:#888;'>Date.".$list[$i][datetime2]." / Hit.".$list[$i][wr_hit]."</td></tr>";
if ($is_checkbox) echo "<tr><td align=center></td></tr>";
echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
너무 복잡하다고 생각하시는 분은
<a href='".$list[$i][link_href][1]."' target='_blank'><img style=\"width: 300px;\" src=\"".$g4[path]."/data/file/".$bo_table."/".$list[$i][file][0][file]."\" /></a>
이미지 영역 소스입니다. 이부분만 적용해주면 되요
별거아닌 소스이지만 저는 꼭 필요하던거라 ㅋㅋ 다른분들도 필요하실까 싶어서 올립니다.
댓글 6개
갤러리 리스트스킨에서 이미지 썸네일 부분입니다.
<a href='{$list[$i][href]}' onfocus='this.blur()'><img src='{$thumb}' width='{$thumb_width}' height='{$thumb_height}' border=1 style='border:1px solid #ffffff;'onmouseover=\"this.src='{$thumb1}'; this.style.cursor='hand'\" onmouseout=\"this.src='{$thumb}';\"></a>
이런식으로 되어있는걸
<a href='".$list[$i][link_href][1]."' target='_blank'><img style=\"width: 300px;\" src=\"".$g4[path]."/data/file/".$bo_table."/".$list[$i][file][0][file]."\" /></a>
위와같이 변경해주시면 됩니다.
<a href='{$list[$i][href]}'> // <a href='".$list[$i][link_href][1]."'>
이부분이 다릅니다. 여기를 변경해주시면 됩니다.
<a href='{$list[$i][href]}' onfocus='this.blur()'><img src='{$thumb}' width='{$thumb_width}' height='{$thumb_height}' border=1 style='border:1px solid #ffffff;'onmouseover=\"this.src='{$thumb1}'; this.style.cursor='hand'\" onmouseout=\"this.src='{$thumb}';\"></a>
이런식으로 되어있는걸
<a href='".$list[$i][link_href][1]."' target='_blank'><img style=\"width: 300px;\" src=\"".$g4[path]."/data/file/".$bo_table."/".$list[$i][file][0][file]."\" /></a>
위와같이 변경해주시면 됩니다.
<a href='{$list[$i][href]}'> // <a href='".$list[$i][link_href][1]."'>
이부분이 다릅니다. 여기를 변경해주시면 됩니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 33565 | |
| 33549 | |
| 33548 | |
| 33500 | |
| 33497 | |
| 33495 | |
| 33484 | |
| 33483 | |
| 33474 | |
| 33465 | |
| 33464 | |
| 33462 | |
| 33461 | |
| 33457 | |
| 33456 | |
| 33441 | |
| 33440 | |
| 33417 | |
| 33416 | |
| 33415 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기