갤러리 게시판 리스트에서 사진 클릭시 바로 사이트 이동
비슷한 스킨이 많을거라고 생각합니다.
제가 스킨을 수정하고 이미지 영역만 수정하려고 하다보니 기존에 있는 링크스킨이랑 안맞아서 제가 그누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개
스피드애드
11년 전
감사합니다
11년 전
위의 소스로 바꾸어보아도 안되고
아래 '이부분만 적용해주면 되요'라는 건 무슨 뜻인지요? 그 부분을 삭제하라는 말씀인가요?
아래 '이부분만 적용해주면 되요'라는 건 무슨 뜻인지요? 그 부분을 삭제하라는 말씀인가요?
11년 전
갤러리 리스트스킨에서 이미지 썸네일 부분입니다.
<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]."'>
이부분이 다릅니다. 여기를 변경해주시면 됩니다.
10년 전
제게 꼭 필요한 팁입니다. 고맙습니다. 그런데 그누5에서는 어떻게 바꾸면 될까요?
10년 전
갤러리 스킨 76번쯔음
<ul class="gall_con">
<li class="gall_href">
<a href="<?php echo $list[$i]['href'] ?>">
이 부분을
<ul class="gall_con">
<li class="gall_href">
<a href="<?php echo $list[$i]['link_href'][1] ?>" target="_blank">
이렇게 변경해보세요
<ul class="gall_con">
<li class="gall_href">
<a href="<?php echo $list[$i]['href'] ?>">
이 부분을
<ul class="gall_con">
<li class="gall_href">
<a href="<?php echo $list[$i]['link_href'][1] ?>" target="_blank">
이렇게 변경해보세요
10년 전
친절한 답변 다시 한 번 감사 드립니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 34706 | |
| 34693 | |
| 34563 | |
| 34536 | |
| 34521 | |
| 34480 | |
| 34479 | |
| 34466 | |
| 34437 | |
| 34436 | |
| 34435 | |
| 34406 | |
| 34398 | |
| 34387 | |
| 34382 | |
| 34375 | |
| 34364 | |
| 34336 | |
| 34294 | |
| 34293 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기