안녕하세요..조언좀 부탁 드릴까해서^^ 정보
안녕하세요..조언좀 부탁 드릴까해서^^본문
안녕하세요.
네이버에서 dq 스타일 게시판 질문을 검색을 하다가 여기까지 오게 되었네요..
조금 어려운 문제가 생겨서, 이렇게 도움을 얻고 싶은 마음에 글을 올려 봅니다.^^
한번 읽어주시고 도와주시면 감사하겠습니다.^^
제가 현재 스킨하나를 만들고 있습니다.
디큐님의 bbs 게시판으로 수정하여 쓰고 있습니다.
http://writerkorea.com/zeroboard/zboard.php?id=f3zpboard&category=4
이건 아티스트의 프로필용으로 만들고 있는 스킨입니다.
왼쪽에 이미지는 썸네일 이미지로서, 이미지 업로드 하였을 때, 왼쪽 상단에 나타나게 되지요.
여기서 제가 생각해 본 것은, 달랑 한장의 프로필 사진이 들어가기에, 조금 아쉬운 감이 있어 더 많은 썸네일 이미지를 출력하고 싶었습니다.
이 스킨은 방명록 형태의 오픈형 스킨이기에, 글 제목이나 썸네일 클릭 후 본문을 보는 방식은 아니거든요.
그러니 글 작성시 업로드 되는 사진 이미지들의 섬네일이 목록에 출력되는 것이 가장 중요하다 할 수 있겠습니다.
현재는 하나의 이미지가 올라갔을때, 왼쪽에 보이는 것 처럼, 썸네일이 아주 잘~ 출력 됩니다.
헌데 그 이상의 파일 업로드시에는 출력이 되지 않지요.
디큐 스타일 게시판은 아시는 것처럼 최대 99장의 이미지 파일을 받을수 있게 설정이 가능 합니다.
해서 제가 파일을 한번 열어 보았습니다.
일단 list_main.php 입니다.
<?
if(eregi(basename(__FILE__),$PHP_SELF)) die('정상적인 접근이 아닙니다');
if(!$setup[use_alllist]) $_zb_exec="view.php"; else $_zb_exec="zboard.php";
// 코멘트 재설정
$comment_css = (get_newComment($data[no]))? 'list_comment2' : 'list_comment';
$comment_num = ($comment_num) ? ' <span class='.$comment_css.'> '.$data[total_comment].' </span>' : '';
//$comment_num = ($comment_num) ? " <span class=list_comment>$comment_num </span>" : '';
// 제목 재설정
$bgm = is_mediafile($data[sitelink1])? "<font class=han style='font-size:10pt;'> ♬</font>" : '';
if($skin_setup['using_newicon']) $new_icon = ($data[reg_date] > (time() - (60*60*$skin_setup['using_newicon2']))) ? ' <img src='.$_css_dir.'icon_new.gif align=absmiddle>' : '';
$chk_subj = cut_str($data[subject],$setup[cut_length]);
$subject = str_replace(" >$chk_subj"," ><font class=list_title>$chk_subj</font>",$subject).$bgm.$comment_num.$new_icon;
if(!$skin_setup['using_subjicon'] && $data['is_secret'] && !$skin_setup['using_secretonly']) $subject = str_replace("class=list_title>","class=list_title>[<span class=han2>비밀글</span>] ",$subject);
$subject_padding="2 5 0 5";
// 재설정
$name = str_replace(">$data[name]<","><span class=list_name>$data[name]</span><","$name");
if(eregi('<b>',$face_image)) $name = $name.'</b>';
$number = str_replace(".gif",".gif height=13",$number);
$reg_date = date('Y-m-d',$data[reg_date]);
if($skin_setup['using_subjicon']) {
$icon = str_replace(".gif",".gif height=13",$icon);
$icon = str_replace($dir.'/',$_css_dir,$icon);
} else $icon = '';
// 썸네일 설정
$dqEngine['thumb_resize'] = isset($skin_setup['thumb_resize'])? $skin_setup['thumb_resize'] : 0;
if($data[depth] && $skin_setup['using_thumbnail']) {
$thumb_area_space = ($skin_setup['thumb_imagex']/5)*$data[depth] + ($data[depth]*10);
$insert = ''; // 들여쓰기 초기화
}
// 섬네일 가져오기
if($skin_setup[using_thumbnail]) {
$subject_padding="0 5 0 0";
$_thumb_bgcolor = "white";
include $dir."/include/get_thumbnail.php";
} else {
$_line_height = '16';
}
$m_data=@mysql_fetch_array(mysql_query("select is_vdel from dq_revolution where zb_id='$id' and zb_no='$data[no]'"));
$is_vdel = $m_data[is_vdel];
if($is_vdel) {
$subject = "<a href=$_zb_exec?$href&$sort&no=$data[no] onfocus=blur()><font class=list_title>$_strSkin[is_vdel]</font></a>";
$data[memo] = '';
}
// 짧은 본문내용
if($skin_setup[using_shortmemo]) {
unset($_smemo);
$subject = str_replace("class=list_title>","class='color_h'>",$subject);
if(!$is_vdel && $skin_setup[using_shortmemo] && !$data[is_secret]) {
if($data[memo] && trim(strip_tags($data[memo])) != '.') {
$dwidth = $data[depth] ? (19+(5*$data[depth])-7):0;
$dwidth = $skin_setup['using_subjicon'] ? $dwidth+15 : $dwidth;
// 즐겨찾기 기능 --------------------------------------------------------
$_smemo = str_replace(" ","",nl2br(stripslashes($data[memo])));
$_smemo = cut_str($_smemo,$skin_setup[smemo_maxlen]);
$_smemo = "<div class='color_d' style='padding:3 0 5 $dwidth;line-height:135%'>$_smemo</div>";
$_smemo = autolink($_smemo);
// 즐겨찾기 기능 --------------------------------------------------------
}
}
}
// 제목아래 게시물 정보 출력
if($skin_setup[using_shortinfo] || $skin_setup[using_guestbook]) {
unset($shortinfo);
if(!$data[is_secret]) $subject = str_replace("class=list_title>","class='color_h'>",$subject);
//$dwidth2 = $dwidth ? $dwidth : ($data[depth] ? (19+(5*$data[depth])-7):0);
//$dwidth2 = $skin_setup['using_subjicon'] ? $dwidth2+15 : $dwidth2;
$dwidth2 = '0';
$shortinfo = "<div>$insert<span style='padding:3 10 0 ".$dwidth2.";line-height:135%' class='eng color_d'>등록일: $reg_date 조회수: $hit";
if($skin_setup[using_guestbook]) {
include $dir."/".$skin_setup['language_dir']."view.php";
$shortinfo .= $bt_reply.$bt_modify.$bt_delete;
}
$shortinfo .= "</span></div>";
$subject = $subject.' - '.$face_image.'<span class=list_name>'.$name.'</span>';
}
// 공지사항이 출력 되었다면 구분선을 넣는다.
if($_notice_display) {
unset($_notice_display);
?>
<tr><td colspan=<?=$colspan?> class=line_dark height=1></td></tr>
<tr><td colspan=<?=$colspan?> class=line_shadow height=3></td></tr>
<? }?>
<?if($put_mainList){?><tr><td colspan=<?=$colspan?> class=line_separator height=1></td></tr><?}?>
<tr align="center" class="list<?=$coloring%2?>" onMouseOver="this.style.backgroundColor='<?=$skin_setup[over_color]?>'" onMouseOut="this.style.backgroundColor=''" style="height:<?=$_line_height?>;word-break:break-all;" valign='<?=$list_valign?>'>
<?if($_ss_['using_titlebar1']){?><td class='eng list_vspace' colspan=2><?=str_replace($dir.'/',$_css_dir,$number)?></td><?}?>
<?if($_ss_['using_titlebar2']){?><?=$hide_category_start?><td class='han list_vspace' nowrap colspan=2><nobr><?=$category_name?></nobr></td><?=$hide_category_end?><?}?>
<?=$hide_cart_start?><td nowrap colspan=2 style='padding:0'><input type=checkbox name=cart value="<?=$data[no]?>"></td><?=$hide_cart_end?>
<?if($_ss_['move_name'] && $_ss_['using_titlebar4']){?><td colspan=2 class='list_vspace' align="left"><div style='width:<?=$skin_setup['namedsp_width']?>;overflow:hidden;text-overflow:ellipsis' class='list_name'><nobr> <?=$name?></nobr></div></td><?}?>
<?if($_ss_['using_titlebar3']){?><td align=left class=list_vspace>
<?if($skin_setup[using_thumbnail]) {?>
<table border=0 cellpadding=0 cellspacing=0 height=100% width=100% style='table-layout:fixed'>
<tr>
<?if($data[depth]){ ?><td width="<?=$thumb_area_space?>"></td><? } ?>
<td align='<?=$skin_setup['thumb_align']?>' valign='top' width='<?=($skin_setup['thumb_imagex'] + 15)?>' style="padding:<?=$subject_padding?>">
<?=$_thumbnail_tag?><br>
<?=$_thumbnail_tag1?>
</td>
<td valign='center'>
<?}?>
<?/* 즐겨찾기 기능 --------------------------------------------------------*/?>
<?$subject=eregi_replace("([\_\-\./~@?=%&! ]+)","",str_replace(" "," ",strip_tags($subject)));?>
<?=$insert?><?=$icon?><b><?=$subject?></b><?=$shortinfo?><?=$_smemo?>
<?if($is_admin||$data[ismember]==$member[no]){ include $dir."/".$skin_setup['language_dir']."view.php";?><?=$bt_modify?><?=$bt_delete?><?}?>
<?/* 즐겨찾기 기능 --------------------------------------------------------*/?>
<?if($skin_setup[using_thumbnail]) {?>
</td></tr></table></td>
<?}?>
<?}?>
<?if(!$_ss_['move_name'] && $_ss_['using_titlebar4']){?><td colspan=2 class='list_vspace'><div style='width:<?=$skin_setup['namedsp_width']?>;overflow:hidden;text-overflow:ellipsis' class='list_name'><nobr><?=$face_image?><?=$name?></nobr></div></td><?}?>
<?if($_ss_['using_titlebar5']){?><td nowrap class='eng list_vspace' colspan=2><nobr><?=$reg_date?></nobr></td><?}?>
<?if($_ss_['using_titlebar6']){?><td nowrap class='eng list_vspace' colspan=2><?=$vote?></td><?}?>
<?if($_ss_['using_titlebar7']){?><td nowrap class='eng list_vspace' colspan=2><?=$hit?></td><?}?>
</tr>
<?$coloring++;?>
<?
$put_mainList = true;
// 썸네일 설정
$dqEngine['thumb_resize'] = '';
?>
<tr> <td colspan=<?=$colspan?> width=100% height=4></td>
<tr> <td colspan=<?=$colspan?> width=100% height=5 align=center background="http://writerkorea.com/main3.files/f2dot.gif"></td>
</tr>
--------------------------------
<?=$_thumbnail_tag?> 태그 밑에 <?=$_thumbnail_tag?> 를 하나 더 넣어보니, 목록에서 똑같은 섬네일이 두개가 출력 되더군요.
--------------------------------
아래 소스는 get_thumbnail.php 파일 입니다.
<?
// 섬네일 생성
// 글 작성자의 프로필 사진 가져오기
if($skin_setup[using_mpicThumb]) {
if($data[ismember]) {
$tmp = mysql_fetch_array(mysql_query("select is_admin,open_picture,picture from zetyx_member_table where no = '$data[ismember]'"));
$data = array_merge($data,$tmp);
if($tmp[is_admin] < 3) $tmp[open_picture] = '1';
if($tmp[picture] & $tmp[open_picture]) {
$data['file_name1'] = $tmp[picture];
$data['s_file_name1'] = basename($tmp[picture]);
} else {
$data['file_name1'] = ($tmp[is_admin] < 3) ? $_css_dir.'admin_face.jpg' : $_css_dir.'no_face.jpg';
$data['s_file_name1'] = ($tmp[is_admin] < 3) ? 'admin_face.jpg' : 'no_face.jpg';
}
$tmp = $dqEngine['thumb_source'];
$dqEngine['thumb_source'] = 'member';
$thumb_tag = get_thumbTag(&$data,$skin_setup['thumb_imagex'],$skin_setup['thumb_imagey'],$dir);
$dqEngine['thumb_source'] = $tmp;
} else {
$thumb_tag = @getimagesize($_css_dir."no_member.jpg");
$thumb_tag[2] = "<img src=\"$_css_dir"."no_member.jpg \" width=\"$thumb_tag[0]\" height=\"$thumb_tag[1]\" class=\"thumb_border\" onFocus=\"blur()\" border=\"0\">";
}
} else {
$thumb_tag = get_thumbTag(&$data,$skin_setup['thumb_imagex'],$skin_setup['thumb_imagey'],$dir);
}
// 섬네일에 여백주기
if($skin_setup['thumb_align'] == 'left') $margin = "0 ".($skin_setup[thumb_imagex]-$thumb_tag[0]+5)." 0 5";
if($skin_setup['thumb_align'] == 'right') $margin = "0 5 0 ".($skin_setup[thumb_imagex]-$thumb_tag[0]+5);
$thumb_tag[2] = str_replace(">"," style=\"margin:".$margin.";\" align=absmiddle>",$thumb_tag[2]);
if($skin_setup['thumb_align'] == 'center') {
$_thumb_area_width = $skin_setup['thumb_imagex']+10;
$_thumb_area_height = $skin_setup['thumb_imagey']+10;
$thumb_tag[2] = str_replace(" class=\"thumb_border\"","",$thumb_tag[2]);
$border_tag[1] = "<table cellpadding=3 cellspacing=0 bgcolor=$_thumb_bgcolor width=".$_thumb_area_width." height=".$_thumb_area_height."><tr><td align=center class=thumb_border>";
$border_tag[2] = "</td></tr></table>";
$_line_height = $skin_setup['thumb_imagey']+10;
} else {
$_thumb_area_width = $thumb_tag[0]+10;
$_line_height = $thumb_tag[1];
}
// 새 창으로 띄우기 위한 원본 이미지파일 결정
if($skin_setup[using_newWindow]) {
if(!$_zb_url) $_zb_url = str_replace(basename($PHP_SELF),"",$PHP_SELF);
// 업로드된 이미지 목록가져오기
$tmp = get_uploadImages($data,1);
if($tmp[0][0]) $tfile = $_zb_url.$tmp[0][0]; else $tfile = "";
// 업로드파일이 없을경우 HTML태그 분석
if(!$tfile) {
$tfile = get_imgTag($data[memo]);
$tfile = get_urlPath($tfile[0]);
$tfile = str_replace("&","dq_amp_temp",$tfile);
}
// 이미지 파일을 못찾았을때
if(!$tfile) $_thumbnail_tag = $border_tag[1].$thumb_tag[2].$border_tag[2];
// 이미지 파일을 찾았을때
else $_thumbnail_tag = $border_tag[1]."<a href=# onclick=\"view_img('$tfile','$data[ismember]')\">$thumb_tag[2]</a>".$border_tag[2];
} else $_thumbnail_tag = $border_tag[1]."<a href=$_zb_exec?$href&$sort&no=$data[no] onfocus=blur()>".$thumb_tag[2]."</a>".$border_tag[2];
// 즐겨찾기 기능 (썸네일을 통한 보기링크생성 금지) ----------------------
$_thumbnail_tag = $border_tag[1].$thumb_tag[2].$border_tag[2];
if($data[sitelink2]) $_thumbnail_tag = "".$_thumbnail_tag."";
// 즐겨찾기 기능 --------------------------------------------------------
?>
----------------------------------------------------------------------------
이 부분을 보시면 이것이 아마도 sitelink 2를 배열화하여 여러 이미지를 올릴수 있도록 한것이 아닐까 생각이 드는데요...
$tmp = get_uploadImages($data,1);
if($tmp[0][0]) $tfile = $_zb_url.$tmp[0][0]; else $tfile = "";
이것저것 수정해보고, 적용을 해 보았는데, 결국은 실패하고 말았습니다.
제가 뭘 착각하고 있는 것일까요??
어떻게 하면, 목록에서 올라간 이미지 파일 만큼 썸네일을 추출할 수 있을까요??
조언과 도움 부탁드립니다.^^
디큐님의 bbs 게시판으로 수정하여 쓰고 있습니다.
http://writerkorea.com/zeroboard/zboard.php?id=f3zpboard&category=4
이건 아티스트의 프로필용으로 만들고 있는 스킨입니다.
왼쪽에 이미지는 썸네일 이미지로서, 이미지 업로드 하였을 때, 왼쪽 상단에 나타나게 되지요.
여기서 제가 생각해 본 것은, 달랑 한장의 프로필 사진이 들어가기에, 조금 아쉬운 감이 있어 더 많은 썸네일 이미지를 출력하고 싶었습니다.
이 스킨은 방명록 형태의 오픈형 스킨이기에, 글 제목이나 썸네일 클릭 후 본문을 보는 방식은 아니거든요.
그러니 글 작성시 업로드 되는 사진 이미지들의 섬네일이 목록에 출력되는 것이 가장 중요하다 할 수 있겠습니다.
현재는 하나의 이미지가 올라갔을때, 왼쪽에 보이는 것 처럼, 썸네일이 아주 잘~ 출력 됩니다.
헌데 그 이상의 파일 업로드시에는 출력이 되지 않지요.
디큐 스타일 게시판은 아시는 것처럼 최대 99장의 이미지 파일을 받을수 있게 설정이 가능 합니다.
해서 제가 파일을 한번 열어 보았습니다.
일단 list_main.php 입니다.
<?
if(eregi(basename(__FILE__),$PHP_SELF)) die('정상적인 접근이 아닙니다');
if(!$setup[use_alllist]) $_zb_exec="view.php"; else $_zb_exec="zboard.php";
// 코멘트 재설정
$comment_css = (get_newComment($data[no]))? 'list_comment2' : 'list_comment';
$comment_num = ($comment_num) ? ' <span class='.$comment_css.'> '.$data[total_comment].' </span>' : '';
//$comment_num = ($comment_num) ? " <span class=list_comment>$comment_num </span>" : '';
// 제목 재설정
$bgm = is_mediafile($data[sitelink1])? "<font class=han style='font-size:10pt;'> ♬</font>" : '';
if($skin_setup['using_newicon']) $new_icon = ($data[reg_date] > (time() - (60*60*$skin_setup['using_newicon2']))) ? ' <img src='.$_css_dir.'icon_new.gif align=absmiddle>' : '';
$chk_subj = cut_str($data[subject],$setup[cut_length]);
$subject = str_replace(" >$chk_subj"," ><font class=list_title>$chk_subj</font>",$subject).$bgm.$comment_num.$new_icon;
if(!$skin_setup['using_subjicon'] && $data['is_secret'] && !$skin_setup['using_secretonly']) $subject = str_replace("class=list_title>","class=list_title>[<span class=han2>비밀글</span>] ",$subject);
$subject_padding="2 5 0 5";
// 재설정
$name = str_replace(">$data[name]<","><span class=list_name>$data[name]</span><","$name");
if(eregi('<b>',$face_image)) $name = $name.'</b>';
$number = str_replace(".gif",".gif height=13",$number);
$reg_date = date('Y-m-d',$data[reg_date]);
if($skin_setup['using_subjicon']) {
$icon = str_replace(".gif",".gif height=13",$icon);
$icon = str_replace($dir.'/',$_css_dir,$icon);
} else $icon = '';
// 썸네일 설정
$dqEngine['thumb_resize'] = isset($skin_setup['thumb_resize'])? $skin_setup['thumb_resize'] : 0;
if($data[depth] && $skin_setup['using_thumbnail']) {
$thumb_area_space = ($skin_setup['thumb_imagex']/5)*$data[depth] + ($data[depth]*10);
$insert = ''; // 들여쓰기 초기화
}
// 섬네일 가져오기
if($skin_setup[using_thumbnail]) {
$subject_padding="0 5 0 0";
$_thumb_bgcolor = "white";
include $dir."/include/get_thumbnail.php";
} else {
$_line_height = '16';
}
$m_data=@mysql_fetch_array(mysql_query("select is_vdel from dq_revolution where zb_id='$id' and zb_no='$data[no]'"));
$is_vdel = $m_data[is_vdel];
if($is_vdel) {
$subject = "<a href=$_zb_exec?$href&$sort&no=$data[no] onfocus=blur()><font class=list_title>$_strSkin[is_vdel]</font></a>";
$data[memo] = '';
}
// 짧은 본문내용
if($skin_setup[using_shortmemo]) {
unset($_smemo);
$subject = str_replace("class=list_title>","class='color_h'>",$subject);
if(!$is_vdel && $skin_setup[using_shortmemo] && !$data[is_secret]) {
if($data[memo] && trim(strip_tags($data[memo])) != '.') {
$dwidth = $data[depth] ? (19+(5*$data[depth])-7):0;
$dwidth = $skin_setup['using_subjicon'] ? $dwidth+15 : $dwidth;
// 즐겨찾기 기능 --------------------------------------------------------
$_smemo = str_replace(" ","",nl2br(stripslashes($data[memo])));
$_smemo = cut_str($_smemo,$skin_setup[smemo_maxlen]);
$_smemo = "<div class='color_d' style='padding:3 0 5 $dwidth;line-height:135%'>$_smemo</div>";
$_smemo = autolink($_smemo);
// 즐겨찾기 기능 --------------------------------------------------------
}
}
}
// 제목아래 게시물 정보 출력
if($skin_setup[using_shortinfo] || $skin_setup[using_guestbook]) {
unset($shortinfo);
if(!$data[is_secret]) $subject = str_replace("class=list_title>","class='color_h'>",$subject);
//$dwidth2 = $dwidth ? $dwidth : ($data[depth] ? (19+(5*$data[depth])-7):0);
//$dwidth2 = $skin_setup['using_subjicon'] ? $dwidth2+15 : $dwidth2;
$dwidth2 = '0';
$shortinfo = "<div>$insert<span style='padding:3 10 0 ".$dwidth2.";line-height:135%' class='eng color_d'>등록일: $reg_date 조회수: $hit";
if($skin_setup[using_guestbook]) {
include $dir."/".$skin_setup['language_dir']."view.php";
$shortinfo .= $bt_reply.$bt_modify.$bt_delete;
}
$shortinfo .= "</span></div>";
$subject = $subject.' - '.$face_image.'<span class=list_name>'.$name.'</span>';
}
// 공지사항이 출력 되었다면 구분선을 넣는다.
if($_notice_display) {
unset($_notice_display);
?>
<tr><td colspan=<?=$colspan?> class=line_dark height=1></td></tr>
<tr><td colspan=<?=$colspan?> class=line_shadow height=3></td></tr>
<? }?>
<?if($put_mainList){?><tr><td colspan=<?=$colspan?> class=line_separator height=1></td></tr><?}?>
<tr align="center" class="list<?=$coloring%2?>" onMouseOver="this.style.backgroundColor='<?=$skin_setup[over_color]?>'" onMouseOut="this.style.backgroundColor=''" style="height:<?=$_line_height?>;word-break:break-all;" valign='<?=$list_valign?>'>
<?if($_ss_['using_titlebar1']){?><td class='eng list_vspace' colspan=2><?=str_replace($dir.'/',$_css_dir,$number)?></td><?}?>
<?if($_ss_['using_titlebar2']){?><?=$hide_category_start?><td class='han list_vspace' nowrap colspan=2><nobr><?=$category_name?></nobr></td><?=$hide_category_end?><?}?>
<?=$hide_cart_start?><td nowrap colspan=2 style='padding:0'><input type=checkbox name=cart value="<?=$data[no]?>"></td><?=$hide_cart_end?>
<?if($_ss_['move_name'] && $_ss_['using_titlebar4']){?><td colspan=2 class='list_vspace' align="left"><div style='width:<?=$skin_setup['namedsp_width']?>;overflow:hidden;text-overflow:ellipsis' class='list_name'><nobr> <?=$name?></nobr></div></td><?}?>
<?if($_ss_['using_titlebar3']){?><td align=left class=list_vspace>
<?if($skin_setup[using_thumbnail]) {?>
<table border=0 cellpadding=0 cellspacing=0 height=100% width=100% style='table-layout:fixed'>
<tr>
<?if($data[depth]){ ?><td width="<?=$thumb_area_space?>"></td><? } ?>
<td align='<?=$skin_setup['thumb_align']?>' valign='top' width='<?=($skin_setup['thumb_imagex'] + 15)?>' style="padding:<?=$subject_padding?>">
<?=$_thumbnail_tag?><br>
<?=$_thumbnail_tag1?>
</td>
<td valign='center'>
<?}?>
<?/* 즐겨찾기 기능 --------------------------------------------------------*/?>
<?$subject=eregi_replace("([\_\-\./~@?=%&! ]+)","",str_replace(" "," ",strip_tags($subject)));?>
<?=$insert?><?=$icon?><b><?=$subject?></b><?=$shortinfo?><?=$_smemo?>
<?if($is_admin||$data[ismember]==$member[no]){ include $dir."/".$skin_setup['language_dir']."view.php";?><?=$bt_modify?><?=$bt_delete?><?}?>
<?/* 즐겨찾기 기능 --------------------------------------------------------*/?>
<?if($skin_setup[using_thumbnail]) {?>
</td></tr></table></td>
<?}?>
<?}?>
<?if(!$_ss_['move_name'] && $_ss_['using_titlebar4']){?><td colspan=2 class='list_vspace'><div style='width:<?=$skin_setup['namedsp_width']?>;overflow:hidden;text-overflow:ellipsis' class='list_name'><nobr><?=$face_image?><?=$name?></nobr></div></td><?}?>
<?if($_ss_['using_titlebar5']){?><td nowrap class='eng list_vspace' colspan=2><nobr><?=$reg_date?></nobr></td><?}?>
<?if($_ss_['using_titlebar6']){?><td nowrap class='eng list_vspace' colspan=2><?=$vote?></td><?}?>
<?if($_ss_['using_titlebar7']){?><td nowrap class='eng list_vspace' colspan=2><?=$hit?></td><?}?>
</tr>
<?$coloring++;?>
<?
$put_mainList = true;
// 썸네일 설정
$dqEngine['thumb_resize'] = '';
?>
<tr> <td colspan=<?=$colspan?> width=100% height=4></td>
<tr> <td colspan=<?=$colspan?> width=100% height=5 align=center background="http://writerkorea.com/main3.files/f2dot.gif"></td>
</tr>
--------------------------------
<?=$_thumbnail_tag?> 태그 밑에 <?=$_thumbnail_tag?> 를 하나 더 넣어보니, 목록에서 똑같은 섬네일이 두개가 출력 되더군요.
--------------------------------
아래 소스는 get_thumbnail.php 파일 입니다.
<?
// 섬네일 생성
// 글 작성자의 프로필 사진 가져오기
if($skin_setup[using_mpicThumb]) {
if($data[ismember]) {
$tmp = mysql_fetch_array(mysql_query("select is_admin,open_picture,picture from zetyx_member_table where no = '$data[ismember]'"));
$data = array_merge($data,$tmp);
if($tmp[is_admin] < 3) $tmp[open_picture] = '1';
if($tmp[picture] & $tmp[open_picture]) {
$data['file_name1'] = $tmp[picture];
$data['s_file_name1'] = basename($tmp[picture]);
} else {
$data['file_name1'] = ($tmp[is_admin] < 3) ? $_css_dir.'admin_face.jpg' : $_css_dir.'no_face.jpg';
$data['s_file_name1'] = ($tmp[is_admin] < 3) ? 'admin_face.jpg' : 'no_face.jpg';
}
$tmp = $dqEngine['thumb_source'];
$dqEngine['thumb_source'] = 'member';
$thumb_tag = get_thumbTag(&$data,$skin_setup['thumb_imagex'],$skin_setup['thumb_imagey'],$dir);
$dqEngine['thumb_source'] = $tmp;
} else {
$thumb_tag = @getimagesize($_css_dir."no_member.jpg");
$thumb_tag[2] = "<img src=\"$_css_dir"."no_member.jpg \" width=\"$thumb_tag[0]\" height=\"$thumb_tag[1]\" class=\"thumb_border\" onFocus=\"blur()\" border=\"0\">";
}
} else {
$thumb_tag = get_thumbTag(&$data,$skin_setup['thumb_imagex'],$skin_setup['thumb_imagey'],$dir);
}
// 섬네일에 여백주기
if($skin_setup['thumb_align'] == 'left') $margin = "0 ".($skin_setup[thumb_imagex]-$thumb_tag[0]+5)." 0 5";
if($skin_setup['thumb_align'] == 'right') $margin = "0 5 0 ".($skin_setup[thumb_imagex]-$thumb_tag[0]+5);
$thumb_tag[2] = str_replace(">"," style=\"margin:".$margin.";\" align=absmiddle>",$thumb_tag[2]);
if($skin_setup['thumb_align'] == 'center') {
$_thumb_area_width = $skin_setup['thumb_imagex']+10;
$_thumb_area_height = $skin_setup['thumb_imagey']+10;
$thumb_tag[2] = str_replace(" class=\"thumb_border\"","",$thumb_tag[2]);
$border_tag[1] = "<table cellpadding=3 cellspacing=0 bgcolor=$_thumb_bgcolor width=".$_thumb_area_width." height=".$_thumb_area_height."><tr><td align=center class=thumb_border>";
$border_tag[2] = "</td></tr></table>";
$_line_height = $skin_setup['thumb_imagey']+10;
} else {
$_thumb_area_width = $thumb_tag[0]+10;
$_line_height = $thumb_tag[1];
}
// 새 창으로 띄우기 위한 원본 이미지파일 결정
if($skin_setup[using_newWindow]) {
if(!$_zb_url) $_zb_url = str_replace(basename($PHP_SELF),"",$PHP_SELF);
// 업로드된 이미지 목록가져오기
$tmp = get_uploadImages($data,1);
if($tmp[0][0]) $tfile = $_zb_url.$tmp[0][0]; else $tfile = "";
// 업로드파일이 없을경우 HTML태그 분석
if(!$tfile) {
$tfile = get_imgTag($data[memo]);
$tfile = get_urlPath($tfile[0]);
$tfile = str_replace("&","dq_amp_temp",$tfile);
}
// 이미지 파일을 못찾았을때
if(!$tfile) $_thumbnail_tag = $border_tag[1].$thumb_tag[2].$border_tag[2];
// 이미지 파일을 찾았을때
else $_thumbnail_tag = $border_tag[1]."<a href=# onclick=\"view_img('$tfile','$data[ismember]')\">$thumb_tag[2]</a>".$border_tag[2];
} else $_thumbnail_tag = $border_tag[1]."<a href=$_zb_exec?$href&$sort&no=$data[no] onfocus=blur()>".$thumb_tag[2]."</a>".$border_tag[2];
// 즐겨찾기 기능 (썸네일을 통한 보기링크생성 금지) ----------------------
$_thumbnail_tag = $border_tag[1].$thumb_tag[2].$border_tag[2];
if($data[sitelink2]) $_thumbnail_tag = "".$_thumbnail_tag."";
// 즐겨찾기 기능 --------------------------------------------------------
?>
----------------------------------------------------------------------------
이 부분을 보시면 이것이 아마도 sitelink 2를 배열화하여 여러 이미지를 올릴수 있도록 한것이 아닐까 생각이 드는데요...
$tmp = get_uploadImages($data,1);
if($tmp[0][0]) $tfile = $_zb_url.$tmp[0][0]; else $tfile = "";
이것저것 수정해보고, 적용을 해 보았는데, 결국은 실패하고 말았습니다.
제가 뭘 착각하고 있는 것일까요??
어떻게 하면, 목록에서 올라간 이미지 파일 만큼 썸네일을 추출할 수 있을까요??
조언과 도움 부탁드립니다.^^
댓글 전체
뭐 고수분들이라 z모 보드도 다 잘 아시겠지만,
nzeo.com으로 가서 물으시는 것이 더 낫지 않나 싶다는...
nzeo.com으로 가서 물으시는 것이 더 낫지 않나 싶다는...
음..,,