Menu

 

수정할곳은 outlogin.php 입니다.

1)먼저 공지사항 수정부분입니다.
outlogin.php 207번째줄의
// 공지사항 형식을 만들때 사용
아래의 소스를 찾습니다.
$header = str_replace("[notice_memo]",$memolenx,$header);
$header = str_replace("[notice_subject]",$subject,$header);
$header = str_replace("[notice_date]",$date,$header);
이분분의 $header = str_replace("[notice_subject]",$subject,$header); 을 아래와 같이 수정합니다.

$header = str_replace("[notice_subject]","<a href='.javascript//' OnClick=\".javascriptwindow.open('".$_zb_url.$target."&no=$data[no]','notice_subject','width=700,height=600,toolbars=yes,resizable=yes,scrollbars=yes')\" onfocus=this.blur()>".$subject."  .....more</a>",$header);

2)일반게시물 수정입니다.
공지사항아래의 다음의 소스를 찾아 두곳을 수정합니다.
$main = $loop;
$main = str_replace("[name]",$name,$main);
$main = str_replace("[date]",$date,$main);
$main = str_replace("[subject]","<a href='".$_zb_url.$target."&no=$data[no]'>".$subject."</a>",$main);
$main = str_replace("[comment]",$comment.$new,$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);

$main = str_replace("[subject]","<a href='".$_zb_url.$target."&no=$data[no]'>".$subject."</a>",$main);
이부분을 아래와같이 수정합니다.

$main = str_replace("[subject]","<a href='.javascript//' OnClick=\".javascriptwindow.open('".$_zb_url.$target."&no=$data[no]','notice','width=750,height=600,toolbars=yes,resizable=yes,scrollbars=yes')\" onfocus=this.blur()>".$subject."</a>",$main);

$list = str_replace("[title]","<a href='".$_zb_url."zboard.php?id=".$id."'>".$title."</a>",$list);
이분분도 수정합니다.

$list = str_replace("[title]","<a href='.javascript//' OnClick=\".javascriptwindow.open('".$_zb_url."zboard.php?id=".$id."','notice','width=750,height=600,toolbars=yes,resizable=yes,scrollbars=yes')\" onfocus=this.blur()>".$title."</a>",$list);

3)설문조사 새창띄우기
// 최근 설문조사 (일반 게시판 형)아래에서 다음부분을 찾습니다.

$main_subject="<a href='".$_zb_url.$target."&no=$no'>".stripslashes($tmpData[subject])."</a>";
if($tmpData[vote]) $main_vote = "[".$tmpData[vote]."]"; else $main_vote="";

$result = mysql_query("select * from $t_board"."_$id where headnum='$headnum' and arrangenum > 0 order by arrangenum", $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)) {
$subject = cut_str(stripslashes($data[subject]),$textlen)."</font></b>";
if($data[vote]) $vote = "[".$data[vote]."]"; else $vote="";
$main = $loop;
$main = str_replace("[subject]","<a href='".$_zb_url."apply_vote.php?id=$id&no=$no&sub_no=$data[no]'>".$subject."</a>",$main);
$main = str_replace("[vote]",$vote,$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);
$list = str_replace("[main_subject]",$main_subject,$list);
$list = str_replace("[main_vote]",$main_vote,$list);

$main_subject="<a href='".$_zb_url.$target."&no=$no'>".stripslashes($tmpData[subject])."</a>";
이곳을 아래처럼 수정합니다.

$main_subject="<a href=.javascript//' OnClick=\".javascriptwindow.open('".$_zb_url.$target."&no=$no','vote_main_subject','width=750,height=600,toolbars=yes,resizable=yes,scrollbars=yes')\" onfocus=this.blur()>".stripslashes($tmpData[subject])."</a>";

$main = str_replace("[subject]","<a href='".$_zb_url."apply_vote.php?id=$id&no=$no&sub_no=$data[no]'>".$subject."</a>",$main);
이부분도 아래처럼 수정합니다.

$main = str_replace("[subject]","<a href='.javascript//' OnClick=\".javascriptwindow.open('".$_zb_url.$target."&no=$data[no]','vote_subject','width=600,height=600,toolbars=yes,resizable=yes,scrollbars=yes')\" onfocus=this.blur()>".$subject."</a>",$main);

$list = str_replace("[title]","<a href='".$_zb_url."zboard.php?id=".$id."'>".$title."</a>",$list);
이부분도 수정합니다.

$list = str_replace("[title]","<a href='.javascript//' OnClick=\".javascriptwindow.open('".$_zb_url."zboard.php?id=".$id."','vote_title','width=600,height=600,toolbars=yes,resizable=yes,scrollbars=yes')\" onfocus=this.blur()>".$title."</a>",$list);

4)갤러리 새창띄우기.
// 갤러리 이미지 뽑아오는 스킨...이부분 아래의 다음소스를 찾습니다.

while($data=mysql_fetch_array($result)) {
                        
        if(eregi("\.gif|\.jpg",$data[file_name1])) $filename = $_zb_url.$data[file_name1];
        elseif(eregi("\.gif|\.jpg",$data[file_name2])) $filename = $_zb_url.$data[file_name2];
        else $filename="";

        if($filename) $imgList.="<a href='".$_zb_url.$target."&no=$data[no]'><img src='$filename' border=1 style=border-color:black width=$xsize height=$ysize vspacing=10 hspacing=10></a>";
        else $imgList.="<a href='".$_zb_url.$target."&no=$data[no]'><img src='[dir]t.gif' border=1 style=border-color:black width=$xsize height=$ysize vspacing=10 hspacing=10></a>";
        $i++;
        if($i>=$xnum) {
        $imgList.="<br>";
        $i=0;
        } else {
        $imgList.=" ";
}
}
        $str = str_replace("[title]","<a href='".$_zb_url."zboard.php?id=".$id."'>".$title."</a>",$str);
        $str = str_replace("[img]",$imgList,$str);
        $str = str_replace("[dir]",$_zb_url."latest_skin/".$skinname."/images/",$str);
        echo $str;

위소스중 while($data=mysql_fetch_array($result)) {  이 부분부터 시작하여 끝부분까지를  다음과같이 수정합니다.

while($data=mysql_fetch_array($result)) {

                        if(eregi("\.gif|\.jpg",$data[file_name1])) $filename = $_zb_url.$data[file_name1];
                        elseif(eregi("\.gif|\.jpg",$data[file_name2])) $filename = $_zb_url.$data[file_name2];
                        else $filename="";
                         $_xsize=10;
                        $_ysize=10;
                         if($filename)
{
  $s_info = @getimagesize($filename);

        if($s_info[2]>0&&$s_info[2]<4)
        {
                $_xsize = $s_info[0];
                if($_xsize>$_ysize) $_xsize=$_ysize;
                
                
        }
}

                        if($filename) $imgList.="<a href='#' onclick=\"window.open('$filename','img','left=0,top=0,width=$s_info[0],height=$s_info[1],scrollbar=yes,resizable=yes,status=no')\" onfocus=blur()><img src='$filename' border=0 style=border-color:black width=$xsize height=$ysize vspacing=10 hspacing=10></a>";
                        else $imgList.="<a href='#' onfocus=blur()><img src='[dir]noimage.gif' border=0 style=border-color:black width=$xsize height=$ysize vspacing=10 hspacing=10></a>";
                        $i++;
                        if($i>=$xnum) {
                                $imgList.="<br>";
                                $i=0;
                        } else {
                                $imgList.=" ";
                        }
                }
                $str = str_replace("[title]","<a href='.javascript//' OnClick=\".javascriptwindow.open('".$_zb_url."zboard.php?id=".$id."','gallery_title','width=700,height=600,toolbars=yes,resizable=yes,scrollbars=yes')\" onfocus=this.blur()>".$title."</a>",$str);
                $str = str_replace("[img]",$imgList,$str);
                $str = str_replace("[dir]",$_zb_url."latest_skin/".$skinname."/images/",$str);
                echo $str;
         }
          
?>

이곳까지 수정을 하면 최근게시물의 모든내용들이 새창으로 띄워집니다.
불혹을 넘은나이에 늦깎이 공부좀한단고 어려움이 많네요...
이곳 저곳에서 소스를 얻어 정리하여 보았습니다....
도움들이 되셨으면 합니다.