테스트 사이트 - 개발 중인 베타 버전입니다

최신글 링크 연결 문의

· 12년 전 · 1985 · 4
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

/*
* latest.skin Gallery for Gnuboard4
*
* Copyright 2012.1.2 Man Hyung, cho
*
* File encoding: Korean(EUC-KR)
*
*/

//불당썸---------------------------------------------------------------//
$img_width = 898; //표시할 이미지의 가로사이즈
$img_height = 260; //표시할 이미지의 세로사이즈


//언샾마스트 퀄리티(썸 노이즈바지)
$th['filter'] = array();
$th['filter']['type'] = 90;
$th['filter']['arg1'] = 100;
$th['filter']['arg2'] = 1;
$th['filter']['arg3'] = 2;

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$no_img = $latest_skin_path."/img/no_img.gif";

// 불당썸을 include
include_once("$g4[path]/lib/thumb.lib.php");
//불당썸---------------------------------------------------------------//

?>
<link rel="stylesheet" href="<?php echo $latest_skin_path?>/themes/default/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $latest_skin_path?>/themes/pascal/pascal.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $latest_skin_path?>/themes/orman/orman.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $latest_skin_path?>/nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $latest_skin_path?>/style.css" type="text/css" media="screen" />

<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider" style="width:<?php echo "{$img_width}px" ?>">

<?php
for ($i=0; $i<count($list); $i++) {
$thumfile = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];

// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $file) && file_exists($file)) {
$thumb = thumbnail($file, $img_width, $img_height, 0, 1, 90, 0, "", $filter, $noimg); //첨부파일 언샾마스크추가

} else { //에디터에서 삽입한 이미지
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) { // data/cheditor------
$file = $g4[path].'/' . $tmp[0]; // 파일명
$thumb=thumbnail($file, $img_width, $img_height, 0, 1, 90, 0, "", $filter, $noimg); //언샾마스크추가
}
}
?>

<a href="#"><img src="<?php echo $thumb; ?>" alt="" title="" ></a>

<?php
}
?>

</div>
<div id="htmlcaption" class="nivo-html-caption">
<span class="font"><?php echo $list[$i]['subject']; ?></span>
</div>
</div>


<!--
<script type="text/javascript" src="<?php echo $latest_skin_path?>/scripts/jquery-1.7.1.min.js"></script>
-->
<script type="text/javascript" src="<?php echo $latest_skin_path?>/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>


////////////////////////////////////////////////////////////////////////////////////////////////


이천이지 님의 최신글 입니다. <a href="#"><img src="<?php echo $thumb; ?>" alt="" title="" ></a>

위부분이 링크 부분인거 같은데 게시글 링크1로 연결하고 싶습니다.
질문답변게시판 에 몇몇 질문을 검색하여 찾아보고 적용해 보니 안되더군요 워낙 초보라...

초보인점을 감안하시고 답변 부탁드립니다.

감사합니다.

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 4개

<a href="#"><img src="<?php echo $thumb; ?>" alt="" title="" ></a>
부분을 아래 같이
<?
$wr_link = ($list[$i]['link'][0])?$list[$i]['link'][0]:"#";
?>
<a href="<?=$wr_link?>"><img src="<?php echo $thumb; ?>" alt="" title="" ></a>
로 처리해 주시면 됩니다
내일 적용해 보겠습니다. 감사합니다.
onlymilk74 님 감사합니다.
적용해서 안되길래 아래 처럼 하니 되더군요 감사합니다. 덕분에 잘 처리했습니다.



<?
$wr_link = ($list[$i]['link'][0])?$list[$i]['link'][0]:"#";
?>
<a href="<?=$list[$i]['wr_link1'];?>"><img src="<?php echo $thumb; ?>" alt="" title="" ></a>
<? $wr_link = ($list[$i]['link'][1])?$list[$i]['link'][1]:"{$list[$i]['href']}"; ?>

<a href='$wr_link' title='$wr_subject1' target='_blank'>"

링크1이 있을시에는 링크1의 url로 연결되며 없을때는 게시물로 이동합니다.
구문에 따라 다르겠지만 링크1로 연결할때 저같은 경우에는 ['link'][0]의 배열숫자를 1로 수정하니깐 적용되네요 숫자를 바꿔가면서 적용시켜 보세요

게시글 목록

번호 제목
284508
284499
284492
284490
284484
284481
284478
284476
284474
284472
284470
284458
284457
284454
284453
284447
284446
284444
284441
284440