순

불량감자님 스킨중 문의드립니다.

안녕하세요. 불량감자님 스킨을 이용하고 있습니다. 스폰서 스킨이라고 불량감자님 사이트에서 받아서 이용하고 있습니다.
하지만 이미지를 클릭시 새로운 창이 뜨면서 글작성시에 입력했던 URL로 이동을 하는 형식입니다.
소스에서 새창을 _self로 변경하는건 간단하지만 클릭시 해당게시물로 이동하는건 저같은 초보에겐
정말 찾아봐도 이해할 수 없네요.. 너무 답답하고 힘들어서 이렇게 글남겨서 도움을 요청합니다..

------------------------------------소스-------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

// 위로 스크롤되는 최신글

// 사용법 :
// 스킨, 게시판아이디, 출력라인, 글자수, "몇개라인,라인높이"
// latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")

// $rows(출력라인)는 $line_mod의 2의 배수 이상으로 설정하셔야 합니다.

// 유니크 값 (최신글은 한페이지에 여러개 둘 수 있으므로... 자바스크립트에서 함수, 변수 충돌을 방지)
$uni = md5(uniqid(rand(), true));

list($td_mod,$tr_mod) = explode(",", $options);
$img_width=80; //이미지 가로
$img_height=60; //이미지세로
$margin_right = 2; // 이미지 우측 여백
$margin_bottom = 1; // 이미지 아래쪽 여백
$height = $img_height+$margin_bottom;
$line_mod=1;
$box_height = (int)$line_mod * (int)$height;

?>
<style>
.title { float:left; font-family:'돋움', Tahoma; font-size:11px; line-height:13px; color:#999; letter-spacing:-0.06em; }
.subject { font-family:'돋움', Tahoma; font-size:11px; font-weight:bold; line-height:13px; color:#333; letter-spacing:-0.06em; }
</style>
<table width=95% cellpadding=0 cellspacing=0 border=0 align="center">
<tr><td style="padding-left:3px;">

<? if (count($list) == 0) { ?>
<tr><td align=center height=50>게시물이 없습니다.</td></tr>
<? } else { ?>
<script type="text/javascript">
var roll_height_<?=$uni?> = <?=$box_height?>;
var total_area_<?=$uni?> = 0;
var wait_flag_<?=$uni?> = true;

var bMouseOver_<?=$uni?> = 1;
var roll_speed_<?=$uni?> = 1;
var waitingtime_<?=$uni?> = 5000;
var s_tmp_<?=$uni?> = 0;
var s_amount_<?=$uni?> = <?=(int)$height?>;
var roll_text_<?=$uni?> = new Array();
var startPanel_<?=$uni?> = 0;
var n_panel_<?=$uni?> = 0;
var i_<?=$uni?> = 0;

function start_roll_<?=$uni?>()
{
i_<?=$uni?> = 0;
for (i_<?=$uni?> in roll_text_<?=$uni?>)
n_panel_<?=$uni?>++;

n_panel_<?=$uni?> = n_panel_<?=$uni?> -1 ;
startPanel_<?=$uni?> = Math.round(Math.random()*n_panel_<?=$uni?>);
if(startPanel_<?=$uni?> == 0) {
i_<?=$uni?> = 0;
for (i_<?=$uni?> in roll_text_<?=$uni?>)
insert_area_<?=$uni?>(total_area_<?=$uni?>, total_area_<?=$uni?>++);
} else if(startPanel_<?=$uni?> == n_panel_<?=$uni?>) {
insert_area_<?=$uni?>(startPanel_<?=$uni?>, total_area_<?=$uni?>);
total_area_<?=$uni?>++;
for (i_<?=$uni?>=0; i_<?=$uni?><startPanel_<?=$uni?>; i_<?=$uni?>++) {
insert_area_<?=$uni?>(i_<?=$uni?>, total_area_<?=$uni?>);
total_area_<?=$uni?>++;
}
} else if((startPanel_<?=$uni?> > 0) || (startPanel_<?=$uni?> < n_panel_<?=$uni?>)) {
insert_area_<?=$uni?>(startPanel_<?=$uni?>, total_area_<?=$uni?>);
total_area_<?=$uni?>++;
for (i_<?=$uni?>=startPanel_<?=$uni?>+1; i_<?=$uni?><=n_panel_<?=$uni?>; i_<?=$uni?>++) {
insert_area_<?=$uni?>(i_<?=$uni?>, total_area_<?=$uni?>);
total_area_<?=$uni?>++;
}
for (i_<?=$uni?>=0; i_<?=$uni?><startPanel_<?=$uni?>; i_<?=$uni?>++) {
insert_area_<?=$uni?>(i_<?=$uni?>, total_area_<?=$uni?>);
total_area_<?=$uni?>++;
}
}

if ( navigator.appName == "Microsoft Internet Explorer" ) {
if ( navigator.appVersion.indexOf ( "MSIE 4" ) > -1 )
return ;
}
window.setTimeout("rolling_<?=$uni?>()",waitingtime_<?=$uni?>);
}

function rolling_<?=$uni?>()
{
if (bMouseOver_<?=$uni?> && wait_flag_<?=$uni?>) {
for (i_<?=$uni?>=0;i_<?=$uni?><total_area_<?=$uni?>;i_<?=$uni?>++) {
tmp_<?=$uni?> = document.getElementById('scroll_area_<?=$uni?>'+i_<?=$uni?>).style;
tmp_<?=$uni?>.top = parseInt(tmp_<?=$uni?>.top)-roll_speed_<?=$uni?>;

if (parseInt(tmp_<?=$uni?>.top) <= -roll_height_<?=$uni?>) {
tmp_<?=$uni?>.top = roll_height_<?=$uni?>*(total_area_<?=$uni?>-1);
}

if (s_tmp_<?=$uni?>++ > (s_amount_<?=$uni?>-1)*roll_text_<?=$uni?>.length) {
wait_flag_<?=$uni?>=false;
window.setTimeout("wait_flag_<?=$uni?>=true;s_tmp_<?=$uni?>=0;",waitingtime_<?=$uni?>);
}
}
}
window.setTimeout("rolling_<?=$uni?>()", 1);
}

function insert_area_<?=$uni?>(idx_<?=$uni?>, n_<?=$uni?>)
{
document.write('<div style="left: 0px; width: 100%; position: absolute; top: '+(roll_height_<?=$uni?>*n_<?=$uni?>)+'px" id="scroll_area_<?=$uni?>'+n_<?=$uni?>+'">\n'+roll_text_<?=$uni?>[idx_<?=$uni?>]+'\n</div>\n');
}

<?
unset($roll_text);
for ($i=0; $i<count($list); $i++) {

$http = explode("://", $list[$i][wr_link1]);
if (($http[0] != "http") && ($http[0] != "ftp")) {
$link_01 = "http://" . $list[$i][wr_link1];
}else{
$link_01 = $list[$i][wr_link1];
}
$p_four = explode("|",$list[$i][wr_4]);
$four01 = $p_four[0];
$four02 = $p_four[1];
$four03 = $p_four[2];
$four04 = $p_four[3];

$img = "<img src=\"$latest_skin_path/img/noimage.gif\" border=0 heigth=\"$img_height\" width=\"$img_width\" title=\"이미지 없음\">";

$file = $list[$i][file][0][path] ."/". $list[$i][file][0][file];
if($file){
$img = "<a href=\"{$four04}\" target=\"_self\"><img src=\"$file\" style=\"border:1px solid #efefef;margin-right:".$margin_right."px;\" border=0 height=\"$img_height\" width=\"$img_width\"></a>";

$subject = cut_str($list[$i][wr_subject], 20, '..');
$content = cut_str($list[$i][wr_content], 20, '..');

$k = (int)($i / $td_mod);

$roll_text[$k] .= "<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td height=45 style=\"padding:4px 0 3px 0;\">";

$roll_text[$k] .= "{$img}";
$roll_text[$k] .= "</td><td height=45 style=\"line-height:15px; padding:3px 0 3px 0;\"><div class=\"subject\">{$list[$i][wr_8]}</div> <div class=\"title\">{$subject}</div><br>";
$roll_text[$k] .= "{$content}</td></tr>";
$roll_text[$k] .= "</table>";
}
}
for ($i=0; $i<=$k; $i++) {
echo "roll_text_{$uni}[$i] = '{$roll_text[$i]}';\n";
}
?>
</script>


<div style="width:100%; position:relative; left:0px; top:0px; height: <?=$box_height*$tr_mod?>px; overflow:hidden;" onMouseover="bMouseOver_<?=$uni?>=0" onMouseout="bMouseOver_<?=$uni?>=1" id="latest_scroll_<?=$uni?>">
<script type='text/javascript'>
var no_script_flag_<?=$uni?> = false ;
if ( navigator.appName == "Microsoft Internet Explorer" ) {
if ( navigator.appVersion.indexOf ( "MSIE 4" ) > -1 ) {
document.write ( roll_text_<?=$uni?>[0] ) ;
no_script_flag_<?=$uni?> = true ;
}
}
if ( no_script_flag_<?=$uni?> == false )
start_roll_<?=$uni?>();
</script>
</div>

<? } ?>

</td></tr>
</table>

댓글 2개

$http = explode("://", $list[$i][wr_link1]);
if (($http[0] != "http") && ($http[0] != "ftp")) {
$link_01 = "http://" . $list[$i][wr_link1];
}else{
$link_01 = $list[$i][wr_link1];
}

주소1에 입력된 곳 링크는 $list[$i][wr_link1]
링크된 곳으로 이동은 $list[$i][href]
$http = explode("://", $list[$i][href]);
if (($http[0] != "http") && ($http[0] != "ftp")) {
$link_01 = "http://" . $list[$i][href];
}else{
$link_01 = $list[$i][href];
이렇게 변경했지만 클릭시 그누보드 매인페이로만 이동되네요..현재는 index파일이 없어서
그누보드 화면이 매인으로 나옵니다..
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
10-05-17 조회 1,841
10-05-17 조회 1,597
10-05-17 조회 1,352
10-05-17 조회 1,665
10-05-17 조회 1,672
10-05-16 조회 1,440
10-05-16 조회 1,610
10-05-16 조회 2,398
10-05-16 조회 1,613
10-05-16 조회 1,660
10-05-16 조회 2,083
10-05-16 조회 1,600
10-05-16 조회 1,592
10-05-16 조회 1,822
10-05-16 조회 1,571
10-05-16 조회 1,701
10-05-16 조회 1,801
10-05-16 조회 1,616
10-05-16 조회 2,023
10-05-16 조회 1,594