갤러리 목록 이미지 클릭시 링크주소로 가고 싶어요
관련링크
본문

글작성후 목록 이미지 클릭시 주소링크 접속된곳으로 이동하게 하고싶어요.
답변 3
주소링크 접속된곳 이란게 뭔말이에요?
기본값은 해당글로 이동할텐데 이 부분을 삭제하고 link1 이나 link2 에 기재했던 주소로 가고 싶다는거에요?
어렵진않은부분인데 의뢰자님 설명이 애매해서요..
아래 톡으로 내용 주시면 한번 봐드릴께요.
게시판 스킨의 style.css 파일에서
#gallery-list .gallery-bg 랑 #gallery-list > article figcaption
에 pointer-events: none; 을 주면 해결되겠네요
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
// add_javascript('<script src="'.$board_skin_url.'/js/board.js></script>', 999);
?>
<!-- 게시판 목록 시작 { -->
<section id="board-box" style="width:<?php echo $width; ?>">
<div class="list-header">
<!-- 게시판 카테고리 시작 { -->
<?php if ($is_category) { ?>
<nav id="bo_cate">
<h2><?php echo $board['bo_subject'] ?> 카테고리</h2>
<div class="category-box">
<ul id="bo_cate_ul">
<?php echo $category_option ?>
</ul>
<button><span class="sound_only">전체 카테고리 보기</span></button>
</div>
</nav>
<?php } ?>
<!-- 게시판 검색 시작 { -->
<fieldset class="bo_sch">
<form name="fsearch" method="get">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="sop" value="and">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<?php echo get_board_sfl_select_options($sfl); ?>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<div class="sch_bar">
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx"
class="sch_input" size="25" maxlength="20" placeholder=" 검색어를 입력해주세요">
<button type="submit" value="검색" class="sch_btn"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-5">
<path fill-rule="evenodd" d="M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z" clip-rule="evenodd" />
</svg>
<span class="sound_only">검색</span></button>
</div>
</form>
</fieldset>
<!-- } 게시판 검색 끝 -->
</div>
<!-- } 게시판 카테고리 끝 -->
<form name="fboardlist" id="fboardlist" action="<?php echo G5_BBS_URL; ?>/board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="spt" value="<?php echo $spt ?>">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="sw" value="">
<!-- 게시판 페이지 정보 및 버튼 시작 { -->
<nav id="board-menu">
<button><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-dots">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
<path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
<path d="M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
</svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-x">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M18 6l-12 12" />
<path d="M6 6l12 12" />
</svg></button>
<ul>
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" title="관리자"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-settings">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z" />
<path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
</svg>관리자</a></li><?php } ?>
<?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" title="RSS"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-rss">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M5 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
<path d="M4 4a16 16 0 0 1 16 16" />
<path d="M4 11a9 9 0 0 1 9 9" />
</svg>RSS</a></li><?php } ?>
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" title="글쓰기"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-plus">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M12 5l0 14" />
<path d="M5 12l14 0" />
</svg>글쓰기</a></li><?php } ?>
<?php if ($is_admin == 'super' || $is_auth) { ?>
<?php if ($is_checkbox) { ?>
<li><button type="submit" name="btn_submit" value="선택삭제" onclick="document.pressed=this.value"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-trash">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M4 7l16 0" />
<path d="M10 11l0 6" />
<path d="M14 11l0 6" />
<path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" />
<path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" />
</svg>선택삭제</button></li>
<li><button type="submit" name="btn_submit" value="선택복사" onclick="document.pressed=this.value"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-copy">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" />
<path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" />
</svg>선택복사</button></li>
<li><button type="submit" name="btn_submit" value="선택이동" onclick="document.pressed=this.value"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-arrows-move">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M18 9l3 3l-3 3" />
<path d="M15 12h6" />
<path d="M6 9l-3 3l3 3" />
<path d="M3 12h6" />
<path d="M9 18l3 3l3 -3" />
<path d="M12 15v6" />
<path d="M15 6l-3 -3l-3 3" />
<path d="M12 3v6" />
</svg>선택이동</button></li>
<?php } ?>
<?php } ?>
</ul>
</nav>
<div id="bo_list_total">
<div>
<?php if ($is_checkbox) { ?>
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
<label for="chkall">
<span></span>
<b class="sound_only">현재 페이지 게시물 전체선택</b>
</label>
<?php } ?>
<span>Total <?php echo number_format($total_count) ?>건</span>
<?php echo $page ?> 페이지
</div>
<ul>
<li<?php if ($sst == 'wr_hit' && $sod == 'desc') echo " class=\"ordered\""; ?>><?php echo subject_sort_link('wr_hit', $qstr2, 1) ?>조회<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-down">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M6 9l6 6l6 -6" />
</svg></a></li>
<?php if ($is_good) { ?>
<li<?php if ($sst == 'wr_good' && $sod == 'desc') echo " class=\"ordered\""; ?>><?php echo subject_sort_link('wr_good', $qstr2, 1) ?>추천<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-down">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M6 9l6 6l6 -6" />
</svg></a></li>
<?php } ?>
<?php if ($is_nogood) { ?>
<li class="nogood<?php if ($sst == 'wr_nogood' && $sod == 'desc') echo " ordered\""; ?>"><?php echo subject_sort_link('wr_nogood', $qstr2, 1) ?>비추천<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-down">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M6 9l6 6l6 -6" />
</svg></a></li>
<?php } ?>
<li<?php if ($sst == 'wr_datetime' && $sod == 'desc') echo " class=\"ordered\""; ?>><?php echo subject_sort_link('wr_datetime', $qstr2, 1) ?>날짜<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chevron-down">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M6 9l6 6l6 -6" />
</svg></a></li>
</ul>
</div>
<!-- } 게시판 페이지 정보 및 버튼 끝 -->
<?php
function isInArithmeticSequence($value, $startArray, $difference = 10)
{
foreach ($startArray as $start) {
if ($value == $start || (($value - $start) % $difference === 0 && $value >= $start)) {
return true;
}
}
return false;
}
?>
<section id="gallery-list">
<?php for ($i = 0; $i < count($list); $i++) {
$bo_gallery_cols;
?>
<article>
<?php if ($is_checkbox) { ?>
<fieldset>
<input type="checkbox" name="chk_wr_id[]" value="<?php echo $list[$i]['wr_id'] ?>" id="chk_wr_id_<?php echo $i ?>">
<label for="chk_wr_id_<?php echo $i ?>">
<span></span>
<b class="sound_only"><?php echo $list[$i]['subject'] ?></b>
</label>
</fieldset>
<?php } ?>
<span class="sound_only">
<?php
if ($wr_id == $list[$i]['wr_id'])
echo "<span class=\"bo_current\">열람중</span>";
else
echo $list[$i]['num'];
?>
</span>
<figure>
<a href="<?php echo $list[$i]['href'] ?>">
<?php
$big_size_nums = [3, 4, 8, 9];
if (isInArithmeticSequence($i, $big_size_nums)) {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], 400, 600, false, true);
} else {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], 400, 400, false, true);
}
if ($thumb['src']) {
$img_content = '<img src="' . $thumb['src'] . '" alt="' . $thumb['alt'] . '" >';
} else {
$img_content = '<div class="no_image"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-photo-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 8h.01" /><path d="M13 21h-7a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v7" /><path d="M3 16l5 -5c.928 -.893 2.072 -.893 3 0l3 3" /><path d="M14 14l1 -1c.928 -.893 2.072 -.893 3 0" /><path d="M22 22l-5 -5" /><path d="M17 22l5 -5" /></svg><span class="sound_only">이미지 없음</span></div>';
}
echo run_replace('thumb_image_tag', $img_content, $thumb);
?>
</a>
<figcaption>
<div class="title-box">
<ul class="info-box1">
<?php if ($is_category && $list[$i]['ca_name']) { ?>
<li><a href="<?php echo $list[$i]['ca_name_href'] ?>" class="bo_cate_link"><?php echo $list[$i]['ca_name'] ?></a></li>
<?php } ?>
<?php if ($list[$i]['is_notice']) { ?>
<li><span class="is_notice" style="<?php echo $line_height_style; ?>">공지</span></li>
<?php } ?>
</ul>
<?php if ($list[$i]['comment_cnt']) { ?>
<div class="cnt_cmt"><span class="sound_only">댓글</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-message-dots">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M12 11v.01"></path>
<path d="M8 11v.01"></path>
<path d="M16 11v.01"></path>
<path d="M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3z"></path>
</svg><?php echo $list[$i]['wr_comment']; ?><span class="sound_only">개</span></div><?php } ?>
<a href="<?php echo $list[$i]['href'] ?>">
<?php echo $list[$i]['subject']; ?>
</a>
<ul class="info-box2">
<li><span class="gall_date"><span class="sound_only">작성일 </span><?php echo $list[$i]['datetime2'] ?></span></li>
<li><span class="sound_only">작성자 </span><?php echo $list[$i]['name'] ?></li>
<li><span class="gall_view"><span class="sound_only">조회 </span><?php echo $list[$i]['wr_hit'] ?> Views</span></li>
</ul>
</div>
<?php
if ($list[$i]['icon_new'] || isset($list[$i]['icon_hot']) || isset($list[$i]['icon_secret'])) echo "<ul class=\"info-box3\">";
// if ($list[$i]['file']['count']) { echo '<'.$list[$i]['file']['count'].'>'; }
if ($list[$i]['icon_new']) echo "<li><span class=\"new_icon\">N<span class=\"sound_only\">새글</span></span></li>";
if (isset($list[$i]['icon_hot'])) echo "<li>" . rtrim($list[$i]['icon_hot']) . "</li>";
//if (isset($list[$i]['icon_file'])) echo rtrim($list[$i]['icon_file']);
//if (isset($list[$i]['icon_link'])) echo rtrim($list[$i]['icon_link']);
if (isset($list[$i]['icon_secret'])) echo "<li>" . rtrim($list[$i]['icon_secret']) . "</li>";
if ($list[$i]['icon_new'] || isset($list[$i]['icon_hot']) || isset($list[$i]['icon_secret'])) echo "</ul>";
?>
<div class="gall_option">
<?php if ($is_good) { ?><span class="sound_only">추천</span><strong><i class="fa fa-thumbs-o-up" aria-hidden="true"></i> <?php echo $list[$i]['wr_good'] ?></strong><?php } ?>
<?php if ($is_nogood) { ?><span class="sound_only">비추천</span><strong><i class="fa fa-thumbs-o-down" aria-hidden="true"></i> <?php echo $list[$i]['wr_nogood'] ?></strong><?php } ?>
</div>
</figcaption>
</figure>
<div class="gallery-bg"></div>
</article>
<?php } ?>
<?php if (count($list) == 0) {
echo "<article class=\"empty_table\"><p>게시물이 없습니다.</p></article>";
} ?>
</section>
<!-- 페이지 -->
<div class="pages-box"><?php echo $write_pages; ?></div>
<!-- 페이지 -->
</form>
</section>
<script>
jQuery(function($) {
$('.category-box button').on('click', function(e) {
e.preventDefault();
var box = $(this).closest('.category-box');
if (box.hasClass('active')) {
box.removeClass('active');
} else {
box.addClass('active');
}
});
if ($('#board-menu li').size() < 1) {
$('#board-menu').remove();
}
setTimeout(function() {
$('#board-menu > button').click();
}, 600);
$('#board-menu > button').on('click', function(e) {
e.preventDefault();
$(this).parent().toggleClass('active');
});
});
</script>
<?php if ($is_checkbox) { ?>
<noscript>
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
</noscript>
<?php } ?>
<?php if ($is_checkbox) { ?>
<script>
function all_checked(sw) {
var f = document.fboardlist;
for (var i = 0; i < f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function fboardlist_submit(f) {
var chk_count = 0;
for (var i = 0; i < f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택복사") {
select_copy("copy");
return;
}
if (document.pressed == "선택이동") {
select_copy("move");
return;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다\n\n답변글이 있는 게시글을 선택하신 경우\n답변글도 선택하셔야 게시글이 삭제됩니다."))
return false;
f.removeAttribute("target");
f.action = g5_bbs_url + "/board_list_update.php";
}
return true;
}
// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = g5_bbs_url + "/move.php";
f.submit();
}
</script>
<?php } ?>
<!-- } 게시판 목록 끝 -->
여기서 뭘 건들면 될거같은데 어딜 수정해야할지 모르겠습니다.
!-->
답변을 작성하시기 전에 로그인 해주세요.