[수정] 최신글 스킨수정 만으로 최신글에 제목만 나오도록 처리 정보
그누호환 [수정] 최신글 스킨수정 만으로 최신글에 제목만 나오도록 처리본문
** 죄송합니다. 기존에 올린 아래쪽의 방식은 너무 복잡해서 생각하던중 더 쉬운 방법을 찾았습니다.
최신글 스킨에 새로운 스킨을 하나 만드시고요 이것을 공지제목만 나오도록 스킨을 수정한후 다음처럼 호출하시면 됩니다.
<?
latest('새로만든최신글시킨폴더명', '뉴스테이블', 5, 40);
?>
ps : 기본에 충실해야 하는데... 어제저녁에 급하게 적용하느라고 위와 같이 기본적인 방법을 생각하지 못했었군요.
** 장점 : 기존 최신글 로직을 그대로 사용하면서 스킨만 수정해서 테이블별로 최신글을 적용시킬수있다.
1. news 테이블의 공지사항을 뽑고자 할경우 다음 처럼 호출한다.
<?
latest('', news, 5, 40);
?>
2. 해당 최신글 스킨에서 latest.skin.php을 다음처럼 수정한다.
<?
if($bo_table != 'news') { // 다음은 테이블이 news가 아닐경우 공지사항 처리...
?>
<table width=100% cellpadding=0 cellspacing=0>
<tr><td class='subjectbg ht' colspan=3> <a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table"?>'><span class=subject><?=$bo_subject?></span></a></td></tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22>
<td width=60><?=$list[$i][date]?></td>
<td><?=$list[$i][icon_new]?><a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=content><?=$list[$i][subject]?></span></a> <span style='font-size:8pt;'><font class=pt7><?=$list[$i][commentcnt]?></font></span></td>
<td width=70 align=center><?=$list[$i][name]?></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>
<? } else { // 여기서부터 테이블이 news 일때의 공지사항 처리가 시작 ?>
<table width=100% cellpadding=0 cellspacing=0 border=1>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22>
<td colspan=3><?=$list[$i][icon_new]?><a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=content><?=$list[$i][subject]?></span></a> <span style='font-size:8pt;'><font class=pt7><?=$list[$i][commentcnt]?></font></span></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
<? } ?>
최신글 스킨에 새로운 스킨을 하나 만드시고요 이것을 공지제목만 나오도록 스킨을 수정한후 다음처럼 호출하시면 됩니다.
<?
latest('새로만든최신글시킨폴더명', '뉴스테이블', 5, 40);
?>
ps : 기본에 충실해야 하는데... 어제저녁에 급하게 적용하느라고 위와 같이 기본적인 방법을 생각하지 못했었군요.
** 장점 : 기존 최신글 로직을 그대로 사용하면서 스킨만 수정해서 테이블별로 최신글을 적용시킬수있다.
1. news 테이블의 공지사항을 뽑고자 할경우 다음 처럼 호출한다.
<?
latest('', news, 5, 40);
?>
2. 해당 최신글 스킨에서 latest.skin.php을 다음처럼 수정한다.
<?
if($bo_table != 'news') { // 다음은 테이블이 news가 아닐경우 공지사항 처리...
?>
<table width=100% cellpadding=0 cellspacing=0>
<tr><td class='subjectbg ht' colspan=3> <a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table"?>'><span class=subject><?=$bo_subject?></span></a></td></tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22>
<td width=60><?=$list[$i][date]?></td>
<td><?=$list[$i][icon_new]?><a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=content><?=$list[$i][subject]?></span></a> <span style='font-size:8pt;'><font class=pt7><?=$list[$i][commentcnt]?></font></span></td>
<td width=70 align=center><?=$list[$i][name]?></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>
<? } else { // 여기서부터 테이블이 news 일때의 공지사항 처리가 시작 ?>
<table width=100% cellpadding=0 cellspacing=0 border=1>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22>
<td colspan=3><?=$list[$i][icon_new]?><a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=content><?=$list[$i][subject]?></span></a> <span style='font-size:8pt;'><font class=pt7><?=$list[$i][commentcnt]?></font></span></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
<? } ?>
추천
0
0
댓글 전체
기존 방법보다 쉬운 방법이 생각나서 위의 내용 앞부분에 추가하였습니다.
참고하세요.
참고하세요.
좋은 팁 주셔서 감사합니다...^^
감사 합니다^^
root님~~!!
그리고 7쟁이님~~완성 되었습니다~~~^^;;
root님~~!!
그리고 7쟁이님~~완성 되었습니다~~~^^;;
참 밑줄(점선)도 넣고 싶은데...
<?
if($bo_table != 'news') { // 다음은 테이블이 news가 아닐경우 공지사항 처리...
?>
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22>
<td width=60> <img src='<?=$latest_skin?>/a_icon.gif' width='2' height='2' border='0'></td>
<td><a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=content><?=$list[$i][subject]?></span></a> <span style='font-size:8pt;'><font class=pt7><?=$list[$i][commentcnt]?> <?=$list[$i][icon_new]?></font></span></td>
<td width=70 align=center><?=$list[$i][date]?></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>
<? } else { // 여기서부터 테이블이 news 일때의 공지사항 처리가 시작 ?>
<table width=100% cellpadding=0 cellspacing=0 border=1>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22>
<td colspan=3><?=$list[$i][icon_new]?><a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=content><?=$list[$i][subject]?></span></a> <span style='font-size:8pt;'><font class=pt7><?=$list[$i][commentcnt]?></font></span></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
<? } ?>
루트님 이것좀 봐주세요..
글앞에 아이콘좀 넣을려고 하는데 안되네요...
if($bo_table != 'news') { // 다음은 테이블이 news가 아닐경우 공지사항 처리...
?>
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22>
<td width=60> <img src='<?=$latest_skin?>/a_icon.gif' width='2' height='2' border='0'></td>
<td><a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=content><?=$list[$i][subject]?></span></a> <span style='font-size:8pt;'><font class=pt7><?=$list[$i][commentcnt]?> <?=$list[$i][icon_new]?></font></span></td>
<td width=70 align=center><?=$list[$i][date]?></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>
<? } else { // 여기서부터 테이블이 news 일때의 공지사항 처리가 시작 ?>
<table width=100% cellpadding=0 cellspacing=0 border=1>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22>
<td colspan=3><?=$list[$i][icon_new]?><a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=content><?=$list[$i][subject]?></span></a> <span style='font-size:8pt;'><font class=pt7><?=$list[$i][commentcnt]?></font></span></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
<? } ?>
루트님 이것좀 봐주세요..
글앞에 아이콘좀 넣을려고 하는데 안되네요...
저는 글앞에 아이콘 넣을려고 하는데 안오네요..
으~짜증나
으~짜증나
팁란이 북적 거리네요.^^;
안 주무시고 ....^^ 감사합니다.
안 주무시고 ....^^ 감사합니다.
bbs/latest/latest.skin.php 를 <---이거는 안건드렸는데...
bbs/1latest/latest.skin.php 로 고치고 <---이거는 안건드렸는데...
그냥 기존스킨에 latest.skin.php만 바꾸세요
bbs/1latest/latest.skin.php 로 고치고 <---이거는 안건드렸는데...
그냥 기존스킨에 latest.skin.php만 바꾸세요
<?
latest('news', seng_life, 5, 40);
?>
이렇게 해보세요
latest('news', seng_life, 5, 40);
?>
이렇게 해보세요
감사합니다
root님~~~^^
그런데~~
이런 에러가 나네요~~~
Fatal error: Call to undefined function: latest1() in /home/flower/public_html/gnu/head.php on line 97
bbs/latest/latest.skin.php 를
bbs/1latest/latest.skin.php 로 고치고
위소스를 latest.skin.php 로 만들어서 저장
그리고 <? latest('', news, 5, 40); ?> 를
<? 1latest('', news, 5, 40); ?> 으로 호출 하였는데 위와 같은 에러가 나네요~~^^;;
죄송합니다 한수만 더 알려 주실수 없을까요~~?
root님~~~^^
그런데~~
이런 에러가 나네요~~~
Fatal error: Call to undefined function: latest1() in /home/flower/public_html/gnu/head.php on line 97
bbs/latest/latest.skin.php 를
bbs/1latest/latest.skin.php 로 고치고
위소스를 latest.skin.php 로 만들어서 저장
그리고 <? latest('', news, 5, 40); ?> 를
<? 1latest('', news, 5, 40); ?> 으로 호출 하였는데 위와 같은 에러가 나네요~~^^;;
죄송합니다 한수만 더 알려 주실수 없을까요~~?