P

링크게시판일 때 링크 바로가기는 어떻게 구현할 수 있을까요?

제로보드를 사용할 때에는 이 분의 팁을 사용했었는데

그누보드는 어떻게 사용해야 할지.. Orz...

도움 말씀 부탁드립니다!

http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=3&sn1=&divpage=1&sn=off&ss=on&sc=off&keyword=링크&select_arrange=headnum&desc=asc&no=4297


ps. 스킨 게시판을 20페이지 정도 보았는데.. 눈이 휘둥그레 지네요! ^^;


===========================================================
링크를 올려 두는 게시판일경우에
링크를 받아서 링크로 바로 가게 만들어 주는 겁니다
print_bbs() 처럼
홈페이지 안에..
print_link라고 해주면 됩니다..
링크는 첫번째 링크에만 적용 됩니다.
소스는 아래와 같습니다. 이소스는 outlogin.php 파일안에 넣어주세요

function print_link($skinname, $title, $id, $num=5, $textlen=30, $datetype="Y/m/d") {
global $_zb_path, $_zb_url, $connect, $t_board, $admin_table;

if(!$skinname||!$id||!$title) return;

$str = zReadFile($_zb_path."latest_skin/".$skinname."/main.html");
if(!$str) {
echo "지정하신 $skinname 이라는 최근목록 스킨이 존재하지 않습니다<br>";
return;
}

$setup = mysql_fetch_array(mysql_query("select use_alllist from $admin_table where name='$id'"));
if($setup[use_alllist]) $target = "zboard.php?id=".$id;
else $target = "view.php?id=".$id;

$result = mysql_query("select * from $t_board"."_$id where is_secret=0 order by no desc limit $num", $connect) or die(mysql_error());

$tmpStr = explode("[loop]",$str);
$header = $tmpStr[0];
$tmpStr2 = explode("[/loop]",$tmpStr[1]);
$loop = $tmpStr2[0];
$footer = $tmpStr2[1];

$main_data = "";
while($data=mysql_fetch_array($result)) {
$name = stripslashes($data[name]);
$subject = cut_str(stripslashes($data[subject]),$textlen)."</font></b>";
$date = date($datetype, $data[reg_date]);
if($data[total_comment]) $comment = "[".$data[total_comment]."]"; else $comment="";

$main = $loop;
$main = str_replace("[name]",$name,$main);
$main = str_replace("[date]",$date,$main);

$main = str_replace("[subject]","<a href=$data[sitelink1] target=_blank>".$subject."</a>",$main);
$main = str_replace("[comment]",$comment,$main);
$main_data .= "\n".$main;
}
$list = $header.$main_data.$footer;
$list = str_replace("[title]","<a href='".$_zb_url."zboard.php?id=".$id."'>".$title."</a>",$list);
$list = str_replace("[dir]",$_zb_url."latest_skin/".$skinname."/images/",$list);

echo $list;
}
|

댓글 2개

<a href="$list[wr_link1]">$list[wr_link1]</a>
도움이 되셨으면^^
앗! 감사합니다! ^0^/
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
20년 전 조회 2,470
20년 전 조회 1,508
20년 전 조회 1,544
20년 전 조회 2,604
20년 전 조회 1,547
20년 전 조회 1,656
BB-Gril
20년 전 조회 1,958
20년 전 조회 1,522
20년 전 조회 1,524
20년 전 조회 1,732
20년 전 조회 1,558
20년 전 조회 1,720
20년 전 조회 1,564
20년 전 조회 1,604
20년 전 조회 1,522
20년 전 조회 1,528
에페
20년 전 조회 1,526
20년 전 조회 1,744
20년 전 조회 2,174
20년 전 조회 1,528
🐛 버그신고