최신글 링크관련 질문! 정보
최신글 링크관련 질문!본문
아래 소스는 최신글이고 링크1번의 주소로 이동하게 되어있는 최신글입니다.
궁금한 사항은 링크가 없을시에는 본문으로 이동하고 싶은데
어떻게 해야되나요???
-----------------------------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
/*
* ez_cineV_Gallery Gnuboard4
*
* latest.skin.php
*
* Copyright 2011 Man Hyung, cho
*
* File encoding: Korean(Euc-kr)
*
*/
$is_crop = 1;
// $is_crop : 세로 높이가 $height를 넘을 때 crop 할 것인지를 결정
// 0 : crop 하지 않습니다
// 1 : 기본 crop
// 2 : 중간을 기준으로 crop
//불당썸---------------------------------------------------------------//
$img_width = 100; //표시할 이미지의 가로사이즈
$img_height = 65; //표시할 이미지의 세로사이즈
//언샾마스트 퀄리티(썸 노이즈바지)
$filter[type] = 99;
$filter[arg1] = 100;
$filter[arg2] = 1;
$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");
//불당썸---------------------------------------------------------------//
$list_content = "200"; //내용길이
?>
<link rel="stylesheet" type="text/css" href="<?=$latest_skin_path?>/ez100_web.css"/>
<div class="ez100_web_latest_box">
<? 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, $is_crop, 90, 0, "", $filter, $noimg); //언샾마스크추가
}
}
?>
<div class="rListiFlexible">
<ul>
<li>
<span class="thumb">
<?
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $thumb) && file_exists($thumb)) {
echo "<a href='{$list[$i][link_href][1]}' target='_blank'>";
echo "<img src='$thumb' border='0' align='absmiddle'>";
echo "</a>";
}
?>
</span>
<strong>
<? //제목
echo "<a href='{$list[$i][link_href][1]}' target='_blank' class=\"b\">";
echo "<b>{$list[$i]['subject']}</b>";
echo "</a>";
?></strong>
<p><font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'><?=cut_str(strip_tags($list[$i][wr_content]),$list_content,"...")?></font></p>
</li>
</ul>
</div>
<? } ?>
<? if (count($list) == 0) { echo "<table width='500' border='0' cellpadding='0' cellspacing='0'><tr><td colspan=3 align=center height=100>자료가 없습니다.</td></tr></table>"; } ?>
</div>
궁금한 사항은 링크가 없을시에는 본문으로 이동하고 싶은데
어떻게 해야되나요???
-----------------------------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
/*
* ez_cineV_Gallery Gnuboard4
*
* latest.skin.php
*
* Copyright 2011 Man Hyung, cho
*
* File encoding: Korean(Euc-kr)
*
*/
$is_crop = 1;
// $is_crop : 세로 높이가 $height를 넘을 때 crop 할 것인지를 결정
// 0 : crop 하지 않습니다
// 1 : 기본 crop
// 2 : 중간을 기준으로 crop
//불당썸---------------------------------------------------------------//
$img_width = 100; //표시할 이미지의 가로사이즈
$img_height = 65; //표시할 이미지의 세로사이즈
//언샾마스트 퀄리티(썸 노이즈바지)
$filter[type] = 99;
$filter[arg1] = 100;
$filter[arg2] = 1;
$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");
//불당썸---------------------------------------------------------------//
$list_content = "200"; //내용길이
?>
<link rel="stylesheet" type="text/css" href="<?=$latest_skin_path?>/ez100_web.css"/>
<div class="ez100_web_latest_box">
<? 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, $is_crop, 90, 0, "", $filter, $noimg); //언샾마스크추가
}
}
?>
<div class="rListiFlexible">
<ul>
<li>
<span class="thumb">
<?
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $thumb) && file_exists($thumb)) {
echo "<a href='{$list[$i][link_href][1]}' target='_blank'>";
echo "<img src='$thumb' border='0' align='absmiddle'>";
echo "</a>";
}
?>
</span>
<strong>
<? //제목
echo "<a href='{$list[$i][link_href][1]}' target='_blank' class=\"b\">";
echo "<b>{$list[$i]['subject']}</b>";
echo "</a>";
?></strong>
<p><font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'><?=cut_str(strip_tags($list[$i][wr_content]),$list_content,"...")?></font></p>
</li>
</ul>
</div>
<? } ?>
<? if (count($list) == 0) { echo "<table width='500' border='0' cellpadding='0' cellspacing='0'><tr><td colspan=3 align=center height=100>자료가 없습니다.</td></tr></table>"; } ?>
</div>
댓글 전체
//제목 <-- 다음 행에다 아래 코드를 넣으면 됩니다
if(!$list[$i][link_href][1]) $list[$i][link_href][1]=$list[$i][href];
if(!$list[$i][link_href][1]) $list[$i][link_href][1]=$list[$i][href];
안되는데요!ㅠㅠ