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

링크를 걸려고 합니다.

아래는 타이핑스크롤 한줄 최신글입니다.
최신글 제목에 링크를 걸려고 하는데, 어떻게 하면 되는가요?

아래는 소스입니다. 고수님들 알려주세요....

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

<script language="JavaScript1.2">
<!--

/*
Typing Scroller
Submitted by bengaliboy00@hotmail.com (hp: http://www.angelfire.com/nt/bengaliboy/)
With modifications by Dynamicdrive.com
For full source code, usage terms, and 100s more scripts, visit http://dynamicdrive.com
*/

//Secify scroller contents
var line=new Array()
<? for ($i=0; $i<count($list); $i++) { ?>
line[<?=$i?>+1]="<?=$list[$i][subject]?>"
<? } ?>

<? if (count($list) == 0) { ?>line[0]="게시물이 없습니다.";<? } ?>

//Specify font size for scoller
var ts_fontsize="13px"

//--Don't edit below this line

var longestmessage=1
for (i=2;i<line.length;i++){
if (line[i].length>line[longestmessage].length)
longestmessage=i
}

//Auto set scroller width
var tscroller_width=line[longestmessage].length

lines=line.length-1 //--Number of lines

//if IE 4+ or NS6
if (document.all||document.getElementById){
document.write('<form name="bannerform">')
document.write('<input type="text" name="banner" size="100"')
document.write(' style="background:none; color: #666666; font-size: '+ts_fontsize+'; border:0px" onfocus="blur()">')
document.write('</form>')
}

temp=""
nextchar=-1;
nextline=1;
cursor="\\"
function animate(){
if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines){
nextline++;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",3000)}
else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length){
nextline=1;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",3000)}
else{
nextstep()}}

function nextstep(){

if (cursor=="\\"){
cursor="|"}
else if (cursor=="|"){
cursor="/"}
else if (cursor=="/"){
cursor="-"}
else if (cursor=="-"){
cursor="\\"}


nextchar++;
temp+=line[nextline].charAt(nextchar);
document.bannerform.banner.value=temp+cursor
setTimeout("animate()",25)}

//if IE 4+ or NS6
if (document.all||document.getElementById)
window.onload=animate
// -->
</script>
++++++++++++++++++++++

댓글 작성

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

로그인하기

댓글 5개

line[<?=$i?>+1]="<?=$list[$i][subject]?>"
부분에서
line[<?=$i?>+1]="<?=<a href='{$list[$i]['href']}'>$list[$i][subject]</a>?>"
와 같이 해주면 되지 않을지...
감사합니다.....
한번 해보고 답 드리겠습니다.....^^
아,,,,,안되네요....에러가 납니다...ㅜㅜ
line[<?=$i?>+1]="<?="<a href='{$list[$i]['href']}'>$list[$i][subject]</a>"?>";
요로케..
답변 감사합니다...ㅜㅜ
그런데 아래 같이 에러가 나네요...
<a href='./board/bbs/board.php?bo_table=jeongbo_notice&wr_id=30&sfl='>Array[subject]</a>

게시글 목록

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