최신글 스킨 에서 이미지 출력 안되게 하려고 하는데요 .. 정보
최신글 스킨 에서 이미지 출력 안되게 하려고 하는데요 ..본문
밑에 소스 인데 ... 이미지와 내용 나오는 부분을 빼버리려고 하는데 ..
잘 안되네요 ㅜ.ㅜ
어떻게 해야 이미지와 내용 나오는 부분을 빼고 사용 할수 있을까요 ㅜ.ㅜ
아 리플수도 좀 나오게 해주세요 ㅜ.ㅜ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="7" height="7"><img src="<?=$latest_skin_path?>/img/line_mid_p1.gif"></td>
<td background="<?=$latest_skin_path?>/img/line_mid_p5.gif"></td>
<td width="7"><img src="<?=$latest_skin_path?>/img/line_mid_p2.gif"></td>
</tr>
<tr>
<td background="<?=$latest_skin_path?>/img/line_mid_p8.gif"></td>
<td>
<table width="95%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%" colspan='2'>
<table width="100%" height="25" cellspacing="0" cellpadding="0" align='center'>
<tr>
<td><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td align='right'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font style='font-family:굴림; font-size:8pt; color:#0099cc;'>more</font></a></td>
</tr>
<tr><td height='1' colspan='2' bgcolor=#ff9933></td></tr>
</table>
</td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0){ //글목록 1번 출력?>
<? $image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) { ?>
<tr>
<td colspan='2'>
<table width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr>
<td rowspan='3' align='center' valign='top' style='padding-top:3px;'>
<?
$data_path = $g4[path]."/data/file/$bo_table";
$thum_path = $data_path.'/thumb';
$thumb = $thum_path.'/'.$list[$i][wr_id];
if ( file_exists($thumb) )
{ // 썸네일
$img = "<img src='$thumb' width='45' border='0' style='border:2 solid #d5d5d5;'>";
}
else {
$img = "<img src='$g4[path]/data/file/$bo_table/$image' width='45' border='0' style='border:1 solid #d5d5d5;'>";
}
echo "<table cellpadding='0' cellspacing='1' border='0'><tr><td><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" >$img</a></td></tr></table>";
?>
</td>
<td style='padding-top:5px;padding-left:3px;'><a href='<?=$list[$i][href]?>'><b><font style='font-family:돋움; font-size:9pt; color:#666666; line-height:13pt;'><?=nl2br(stripslashes(cut_str($list[$i][wr_content], 40, '...' )))?> <?=$list[$i][icon_new]?></font></b></a>
</td>
<!--<td align='right' style='padding-top:5px;padding-right:3px;'><span style='font-size:8pt; color:#AABFEA;'><?=$list[$i][datetime]?></span></td>-->
</tr>
</table>
</td>
</tr>
<tr>
<tr><td height='1' colspan='2' bgcolor=#f4f4f4></td></tr>
<? }else{ //이미지가 없으면 ?>
<colgroup>
<colgroup width='70'>
<tr>
<td height='20' style='padding-top:3px;padding-left:5px;'>
<img src='<?=$latest_skin_path?>/img/latest_icon.gif' align='absmiddle'>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font color='#FF6600'><strong>{$list[$i][subject]}</strong></font>";
else
{
$style1 = $style2 = "";
if ($list[$i][icon_new]) // 최신글은 검정
$style1 = "color:#FF3300;";
$style1 = "font-weight:bold;";
if (!$list[$i][comment_cnt]) // 코멘트 없는것만 굵게
$style2 = "font-weight:bold;";
$style2 = "color:#0066CC;";
echo "<span style='$style1 $style2'>{$list[$i][subject]}</span>";
}
echo "</a>";
//echo " " . $list[$i][icon_new];
?>
</td>
</tr>
<tr>
<tr><td height='1' colspan='2' bgcolor=#f4f4f4></td></tr>
<? } ?>
<? }else{ //글목록 2번부터 출력?>
<colgroup>
<colgroup width='70'>
<tr>
<td height='20' style='padding-top:3px;padding-left:5px;'>
<img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'><font style='font-family:돋움; font-size:9pt; color:#666666;'>{$list[$i][subject]}</font></a>";
echo " " . $list[$i][icon_new];
?>
</td>
</tr>
<tr>
<!--<tr><td height='1' colspan='2' bgcolor=#f4f4f4></td></tr>-->
<? } ?>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=2 align=center height=100>자료가 없습니다.</td></tr>"; } ?>
</table>
</td>
<td background="<?=$latest_skin_path?>/img/line_mid_p6.gif"></td>
</tr>
<tr>
<td height="7"><img src="<?=$latest_skin_path?>/img/line_mid_p4.gif"></td>
<td background="<?=$latest_skin_path?>/img/line_mid_p7.gif"></td>
<td><img src="<?=$latest_skin_path?>/img/line_mid_p3.gif"></td>
</tr>
</table>
<script language="javascript">
function popupImage(imageURL){
imageHandle=open("","popupForImage","toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no,width=100,height=100,top=0,left=0");
imageHandle.document.write("<title> </title>");
imageHandle.document.write("<style>");
imageHandle.document.write("*{margin:0;padding:0;border:0;}");
imageHandle.document.write("</style>");
imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>
잘 안되네요 ㅜ.ㅜ
어떻게 해야 이미지와 내용 나오는 부분을 빼고 사용 할수 있을까요 ㅜ.ㅜ
아 리플수도 좀 나오게 해주세요 ㅜ.ㅜ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="7" height="7"><img src="<?=$latest_skin_path?>/img/line_mid_p1.gif"></td>
<td background="<?=$latest_skin_path?>/img/line_mid_p5.gif"></td>
<td width="7"><img src="<?=$latest_skin_path?>/img/line_mid_p2.gif"></td>
</tr>
<tr>
<td background="<?=$latest_skin_path?>/img/line_mid_p8.gif"></td>
<td>
<table width="95%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%" colspan='2'>
<table width="100%" height="25" cellspacing="0" cellpadding="0" align='center'>
<tr>
<td><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td align='right'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font style='font-family:굴림; font-size:8pt; color:#0099cc;'>more</font></a></td>
</tr>
<tr><td height='1' colspan='2' bgcolor=#ff9933></td></tr>
</table>
</td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0){ //글목록 1번 출력?>
<? $image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) { ?>
<tr>
<td colspan='2'>
<table width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr>
<td rowspan='3' align='center' valign='top' style='padding-top:3px;'>
<?
$data_path = $g4[path]."/data/file/$bo_table";
$thum_path = $data_path.'/thumb';
$thumb = $thum_path.'/'.$list[$i][wr_id];
if ( file_exists($thumb) )
{ // 썸네일
$img = "<img src='$thumb' width='45' border='0' style='border:2 solid #d5d5d5;'>";
}
else {
$img = "<img src='$g4[path]/data/file/$bo_table/$image' width='45' border='0' style='border:1 solid #d5d5d5;'>";
}
echo "<table cellpadding='0' cellspacing='1' border='0'><tr><td><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" >$img</a></td></tr></table>";
?>
</td>
<td style='padding-top:5px;padding-left:3px;'><a href='<?=$list[$i][href]?>'><b><font style='font-family:돋움; font-size:9pt; color:#666666; line-height:13pt;'><?=nl2br(stripslashes(cut_str($list[$i][wr_content], 40, '...' )))?> <?=$list[$i][icon_new]?></font></b></a>
</td>
<!--<td align='right' style='padding-top:5px;padding-right:3px;'><span style='font-size:8pt; color:#AABFEA;'><?=$list[$i][datetime]?></span></td>-->
</tr>
</table>
</td>
</tr>
<tr>
<tr><td height='1' colspan='2' bgcolor=#f4f4f4></td></tr>
<? }else{ //이미지가 없으면 ?>
<colgroup>
<colgroup width='70'>
<tr>
<td height='20' style='padding-top:3px;padding-left:5px;'>
<img src='<?=$latest_skin_path?>/img/latest_icon.gif' align='absmiddle'>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font color='#FF6600'><strong>{$list[$i][subject]}</strong></font>";
else
{
$style1 = $style2 = "";
if ($list[$i][icon_new]) // 최신글은 검정
$style1 = "color:#FF3300;";
$style1 = "font-weight:bold;";
if (!$list[$i][comment_cnt]) // 코멘트 없는것만 굵게
$style2 = "font-weight:bold;";
$style2 = "color:#0066CC;";
echo "<span style='$style1 $style2'>{$list[$i][subject]}</span>";
}
echo "</a>";
//echo " " . $list[$i][icon_new];
?>
</td>
</tr>
<tr>
<tr><td height='1' colspan='2' bgcolor=#f4f4f4></td></tr>
<? } ?>
<? }else{ //글목록 2번부터 출력?>
<colgroup>
<colgroup width='70'>
<tr>
<td height='20' style='padding-top:3px;padding-left:5px;'>
<img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'><font style='font-family:돋움; font-size:9pt; color:#666666;'>{$list[$i][subject]}</font></a>";
echo " " . $list[$i][icon_new];
?>
</td>
</tr>
<tr>
<!--<tr><td height='1' colspan='2' bgcolor=#f4f4f4></td></tr>-->
<? } ?>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=2 align=center height=100>자료가 없습니다.</td></tr>"; } ?>
</table>
</td>
<td background="<?=$latest_skin_path?>/img/line_mid_p6.gif"></td>
</tr>
<tr>
<td height="7"><img src="<?=$latest_skin_path?>/img/line_mid_p4.gif"></td>
<td background="<?=$latest_skin_path?>/img/line_mid_p7.gif"></td>
<td><img src="<?=$latest_skin_path?>/img/line_mid_p3.gif"></td>
</tr>
</table>
<script language="javascript">
function popupImage(imageURL){
imageHandle=open("","popupForImage","toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no,width=100,height=100,top=0,left=0");
imageHandle.document.write("<title> </title>");
imageHandle.document.write("<style>");
imageHandle.document.write("*{margin:0;padding:0;border:0;}");
imageHandle.document.write("</style>");
imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>
댓글 전체
-. 기본스킨 참조 : /skin/latest/basic/latest.skin.php
현재 사용중인 스킨과 기본스킨파일을 동시에 열어 두고,
두개 파일의 비교가 가능한 텍스트 에디터로 비교해 보시기 바랍니다.
질문자 스스로도 익히 생각하고 계시겠지만,
이 내용 자체는 질문답변이 아니라 '제작의뢰'일 뿐입니다.
상기했듯이 두가지 스킨을 단순히 에디터로 비교검토하는 과정만으로도 충분히 문제는 해결될 수 있으며,
차후라도 질문자의 테크닉으로 작용될 수 있는 부분입니다.
현재 사용중인 스킨과 기본스킨파일을 동시에 열어 두고,
두개 파일의 비교가 가능한 텍스트 에디터로 비교해 보시기 바랍니다.
질문자 스스로도 익히 생각하고 계시겠지만,
이 내용 자체는 질문답변이 아니라 '제작의뢰'일 뿐입니다.
상기했듯이 두가지 스킨을 단순히 에디터로 비교검토하는 과정만으로도 충분히 문제는 해결될 수 있으며,
차후라도 질문자의 테크닉으로 작용될 수 있는 부분입니다.
맞는 말씀입니다만 사실 이런걸로 제작 의뢰하기는 좀 그래서.. .
그렇다구 제가 알수있는 부분도 아니고 해서 질문을 드린 겁니다..
나스카 님의 심기를 상하게 하였다면 정말 죄송 합니다..
그렇다구 제가 알수있는 부분도 아니고 해서 질문을 드린 겁니다..
나스카 님의 심기를 상하게 하였다면 정말 죄송 합니다..
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="7" height="7"><img src="<?=$latest_skin_path?>/img/line_mid_p1.gif"></td>
<td background="<?=$latest_skin_path?>/img/line_mid_p5.gif"></td>
<td width="7"><img src="<?=$latest_skin_path?>/img/line_mid_p2.gif"></td>
</tr>
<tr>
<td background="<?=$latest_skin_path?>/img/line_mid_p8.gif"></td>
<td>
<table width="95%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%" colspan='2'>
<table width="100%" height="25" cellspacing="0" cellpadding="0" align='center'>
<tr>
<td><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td align='right'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font style='font-family:굴림; font-size:8pt; color:#0099cc;'>more</font></a></td>
</tr>
<tr><td height='1' colspan='2' bgcolor=#ff9933></td></tr>
</table>
</td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<colgroup>
<colgroup width='70'>
<tr>
<td height='20' style='padding-top:3px;padding-left:5px;'>
<img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'><font style='font-family:돋움; font-size:9pt; color:#666666;'>{$list[$i][subject]}</font></a>";
echo " " . $list[$i][icon_new];
?>
</td>
</tr>
<tr>
<!--<tr><td height='1' colspan='2' bgcolor=#f4f4f4></td></tr>-->
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=2 align=center height=100>자료가 없습니다.</td></tr>"; } ?>
</table>
</td>
<td background="<?=$latest_skin_path?>/img/line_mid_p6.gif"></td>
</tr>
<tr>
<td height="7"><img src="<?=$latest_skin_path?>/img/line_mid_p4.gif"></td>
<td background="<?=$latest_skin_path?>/img/line_mid_p7.gif"></td>
<td><img src="<?=$latest_skin_path?>/img/line_mid_p3.gif"></td>
</tr>
</table>
이걸 원하시는건지 ;;
1번째 글 체크값만 지웠습니다. -_-;
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="7" height="7"><img src="<?=$latest_skin_path?>/img/line_mid_p1.gif"></td>
<td background="<?=$latest_skin_path?>/img/line_mid_p5.gif"></td>
<td width="7"><img src="<?=$latest_skin_path?>/img/line_mid_p2.gif"></td>
</tr>
<tr>
<td background="<?=$latest_skin_path?>/img/line_mid_p8.gif"></td>
<td>
<table width="95%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%" colspan='2'>
<table width="100%" height="25" cellspacing="0" cellpadding="0" align='center'>
<tr>
<td><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td align='right'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font style='font-family:굴림; font-size:8pt; color:#0099cc;'>more</font></a></td>
</tr>
<tr><td height='1' colspan='2' bgcolor=#ff9933></td></tr>
</table>
</td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<colgroup>
<colgroup width='70'>
<tr>
<td height='20' style='padding-top:3px;padding-left:5px;'>
<img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'><font style='font-family:돋움; font-size:9pt; color:#666666;'>{$list[$i][subject]}</font></a>";
echo " " . $list[$i][icon_new];
?>
</td>
</tr>
<tr>
<!--<tr><td height='1' colspan='2' bgcolor=#f4f4f4></td></tr>-->
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=2 align=center height=100>자료가 없습니다.</td></tr>"; } ?>
</table>
</td>
<td background="<?=$latest_skin_path?>/img/line_mid_p6.gif"></td>
</tr>
<tr>
<td height="7"><img src="<?=$latest_skin_path?>/img/line_mid_p4.gif"></td>
<td background="<?=$latest_skin_path?>/img/line_mid_p7.gif"></td>
<td><img src="<?=$latest_skin_path?>/img/line_mid_p3.gif"></td>
</tr>
</table>
이걸 원하시는건지 ;;
1번째 글 체크값만 지웠습니다. -_-;
-. 코멘트 카운트를 출력
joonjoon님의 소스코드를 최신글 스킨으로 저장한 후,
32라인 정도에서 하단처럼 comment_cnt구문만 추가하시면 됩니다.
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'><font style='font-family:돋움; font-size:9pt; color:#666666;'>{$list[$i][subject]}</font></a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
echo " " . $list[$i][icon_new];
?>
joonjoon님의 소스코드를 최신글 스킨으로 저장한 후,
32라인 정도에서 하단처럼 comment_cnt구문만 추가하시면 됩니다.
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'><font style='font-family:돋움; font-size:9pt; color:#666666;'>{$list[$i][subject]}</font></a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
echo " " . $list[$i][icon_new];
?>