우선 그누보드와 관련 없는 글이라 죄송합니다(__)
워낙 관련 정보를 찾을 수가 없어서 이곳에 글을 남깁니다ㅠㅠ
웨드프레스의 kboard가 아니구요 kport라는 개발그룹에서 만든
php 웹보드인 kboard입니다. 군더더기 없이 깔끔한 게시판이었는데
개발자분들이 손을 떼셔서 공식 사이트도 사라졌더라구요.
다름이아니라 이 게시판으로 홈페이지를 만든게 있는데
최근갤러리 출력부분을 수정해야하는데, 도저히 모르겠어서 질문드립니다.
보통 제로보드나 그누보드는 가로몇개, 세로몇줄 이런식으로 설정이 가능한데
kboard는 그런게 없더라구요.
메인페이지의 최근갤러리 출력명령은
<? $FUNC->print_latest('용품','gallery2','4','kb_gallery','15','50','m-d','',''); ?>
입니다.
현재 한줄로 가로 4개가 출력되게 되어 있는거구요.
저걸 가로4개 세로2줄로 바꿔야 하는데, 도통 모르겠습니다.
m-d 뒤에 비어있는건 다른 옵션입니다.
그래서 그누보드의 board.php와 비슷한 역할을 하는 kboard 폴더에 library.php라는
파일의 최근글 관련부분을 봤는데 어딜 고쳐야할지 모르겠습니다ㅠㅠ
아래는 관련 소스 일부분인데요.
이게 간단하게 수정해서 해결되는 문제인지 많은 부분을 손대야하는건지 잘 모르겠네요.
복잡한거면 당연히 의뢰를 할 생각입니다. 제가 워낙 php 프로그램쪽을 몰라서 혹시나 하고
소스코드를 올립니다.
////////////////////////////////////////////////////////////
}최근 게시물
////////////////////////////////////////////////////////////
function print_latest($subject,$table_id,$limit,$skin,$len_title,$len_content,$date_type,$headline='',$motion='')
{
global $FUNC;
global $_kb_root;
global $_kb_path;
$_img_path=$_kb_path."skin/latest_skin/".$skin."/img/";
$_file_path=$_kb_path."data/".$table_id."/";
// 게시판 관리
$ADMIN=new CLASS_ADMIN("fetch_array",$table_id);
$ADMIN->data("");
$_tb_skin=$ADMIN->tb_skin;
// 코멘트
$COMM=new CLASS_COMM($table_id);
// 첨부파일
$ATTACH=new CLASS_ATTACH($table_id);
// 날짜 연산
$_set_date=$ADMIN->size_new;
$_set_time=24*$_set_date;
$this->subject=$subject;
$this->table_id=$table_id;
// 스킨 읽기
$_read_file = $FUNC->Read_File($_kb_root."skin/latest_skin/".$skin."/index.html");
if(!$_read_file) echo "$skin 스킨이 존재하지 않습니다.";
// 헤드뉴스
if($headline=="news")
{
$query=" SELECT * FROM kport_".$table_id."_board ORDER BY reg_date DESC LIMIT 1 ";
$row=mysql_fetch_array(mysql_query($query));
$headdate=date("Y-m-d",$row[reg_date]);
$_content=str_replace("<BR>"," ",$row[content]); // 에디터 적용 때문
$headno=$row[no];
$headline=stripslashes($row[title]);
$headnews=$FUNC->Cut_String(stripslashes($_content),$len_content);
$headview="<a href=".$_kb_path."kboard.php?board=".$table_id."&act=view&no=".$headno.">";
$more="<span style=font-size=8pt><b>more</b></span>";
$headline=$headview.$headline."</a>";
$headnews=$headnews.$headview.$more."</a>";
$n=1;
}else{
$n=0;
}
// 데이터 쿼리
$query=" SELECT * FROM kport_".$table_id."_board ORDER BY reg_date DESC LIMIT $n, $limit ";
$res=mysql_query($query);
// 페이지 분리
$tmp = explode("[loop]",$_read_file);
$header = $tmp[0];
$tmp2 = explode("[/loop]",$tmp[1]);
$loop = $tmp2[0];
$footer = $tmp2[1];
// 헤드라인뉴스
$header = str_replace("[headline]",$headline,$header);
$header = str_replace("[headnews]",$headnews,$header);
$header = str_replace("[headdate]",$headdate,$header);
// 목록보기 경로
$_list_path="<a href='".$_kb_path."kboard.php?board=".$table_id."'>";
$_body="";
while($row=mysql_fetch_array($res))
{
$name=stripslashes($row[name]);
$title=$FUNC->Cut_String(stripslashes($row[title]),$len_title);
$content=str_replace("<BR>","",$row[content]); // 에디터 적용 때문
#------------------------------------------------------------------------------------------------
# setup.php 파일에서 $motion='_array'; 선언 시
#------------------------------------------------------------------------------------------------
if($motion == "_array") {
$array_data=explode("||",$content);
$content = $array_data[(sizeof($array_data)-1)];
}
$content=$FUNC->Cut_String($content,$len_content);
$reg_date=date($date_type,$row[reg_date]);
// 관련 코멘트 수
$sql=$COMM->viewData($row[no]);
$_comm_cnt=mysql_num_rows($sql);
if($_comm_cnt>0) $_comm_cnt="[".$_comm_cnt."]";
else $_comm_cnt="";
// 첨부파일 (이미지 등)
$sql2=$ATTACH->viewData($row[no]);
$_attach=mysql_fetch_array($sql2);
$file_name=$_attach[name];
// 파일이 없거나 이미지 파일이 아닌 경우 no_img 출력
if($FUNC->Check_Image($file_name)==false OR ereg("([^[:space:]]+)",$file_name)==false)
{
$file_name=$_img_path."no_img.gif";
}else{
$file_name=$_file_path.$file_name;
}
// new 아이콘 출력
$_display=$FUNC->Display_New($_set_time,$row[reg_date]);
if($_display==1)
{
if(file_exists($_kb_root."skin/bbs_skin/".$_tb_skin."/img/ico_new.gif")) // new 아이콘
$_ico_new="<img src='".$_kb_path."skin/bbs_skin/".$_tb_skin."/img/ico_new.gif' border='0'>";
}
else $_ico_new="";
// 내용보기 경로 ( 케이보드 페이지 추가 2004.10.07.)
if($table_id == "kp_recomm" OR $table_id == "kp_star") $_view_path=$_list_path;
else $_view_path="<a href='".$_kb_path."kboard.php?board=".$table_id."&act=view&no=".$row[no]."'>";
$body = $loop;
$body = str_replace("[path]",$_img_path,$body);
$body = str_replace("[imgfile]",$file_name,$body);
$body = str_replace("[name]",$name,$body);
$body = str_replace("[date]",$reg_date,$body);
$body = str_replace("[href_view]",$_view_path,$body);
$body = str_replace("[icon]",$_ico_new,$body);
$body = str_replace("[title]",$_view_path.$title."</a>",$body);
$body = str_replace("[comment]",$_comm_cnt,$body);
// $motion='_array'
if($motion=="_array") {
for($i=0; $i <(sizeof($array_data)-1); $i++) {
$body = str_replace("[array_data".($i+1)."]",$array_data[$i],$body);
}
}
$body = str_replace("[content]",$content,$body);
$_body.= "\n".$body;
}
$list = $header.$_body.$footer;
$list = str_replace("[path]",$_img_path,$list);
$list = str_replace("[href_list]",$_list_path,$list);
$list = str_replace("[subject]",$_list_path.$subject."</a>",$list);
echo $list;
}
댓글 12개
global $FUNC;
ob_start();
$FUNC->print_latest($subject,$table_id,$limit,$skin,$len_title,$len_content,$date_type,$headline,$motion);
$latest_buffer = ob_get_clean();
preg_match_all('|<td align.+?</table>.+?</td>|s', $latest_buffer, $loop_elements);
for($i = 0; $i < $limit - 4; $i++) {
$latest_buffer = str_replace($loop_elements[0][$i],'',$latest_buffer);
}
return $latest_buffer;
}
$latest1 = kboard_print_latest('용품','gallery2','4','kb_gallery','15','50','m-d','','');
$latest2 = kboard_print_latest('용품','gallery2','8','kb_gallery','15','50','m-d','','');
$latest3 = kboard_print_latest('용품','gallery2','12','kb_gallery','15','50','m-d','','');
$latest4 = kboard_print_latest('용품','gallery2','16','kb_gallery','15','50','m-d','','');
echo $latest1;
echo $latest2;
echo $latest3;
echo $latest4;
출력하고 싶은 위치에 넣으세요.
게시글 목록
| 번호 | 제목 |
|---|---|
| 28213 | |
| 31006 |
CSS
css가 충돌이 됬을때
4
|
| 7898 | |
| 7897 | |
| 19935 |
JavaScript
풀스크린 스크립트
|
| 7892 | |
| 7885 | |
| 31005 | |
| 28209 | |
| 7880 | |
| 7877 | |
| 7871 | |
| 7865 | |
| 7862 | |
| 7858 | |
| 7852 | |
| 19933 |
웹서버
vi 온라인 학습장
1
|
| 19931 |
jQuery
강력한 무료 멀티 업로더...
1
|
| 19928 | |
| 19927 | |
| 31003 |
HTML
HTML5 자바스크립트 API
1
|
| 19920 |
기타
P3P 규약의 이해
6
|
| 28206 | |
| 19918 | |
| 28200 | |
| 7850 | |
| 19916 | |
| 28180 | |
| 28165 | |
| 19911 | |
| 7842 | |
| 7838 | |
| 7830 | |
| 7818 | |
| 28150 | |
| 19906 |
PHP
외부이미지 썸네일 만들기
5
|
| 19905 |
웹서버
퍼미션 계산기-아주 좋습니다.
|
| 19903 |
JavaScript
화면전체에 눈 내리는 효과
1
|
| 19901 |
PHP
외부이미지 서버에 저장하기
1
|
| 19900 |
PHP
유튜브 api 사용하기
|
| 28145 | |
| 7815 | |
| 31002 | |
| 7803 | |
| 7799 | |
| 7785 | |
| 19898 | |
| 7780 | |
| 7779 | |
| 7777 | |
| 7776 | |
| 7775 | |
| 7758 | |
| 19893 | |
| 19892 | |
| 19891 | |
| 20850 |
도로명주소
다음 우편번호 api
2
|
| 19885 | |
| 7752 | |
| 7747 | |
| 7738 | |
| 19883 |
JavaScript
자바스크립트로 오버로딩 구현하기
1
|
| 7735 | |
| 28139 | |
| 7734 | |
| 7731 | |
| 7725 | |
| 7717 | |
| 19879 | |
| 7715 | |
| 7710 | |
| 19858 | |
| 7709 | |
| 7703 | |
| 28134 | |
| 28129 | |
| 7694 | |
| 7690 | |
| 28125 | |
| 7672 | |
| 7660 | |
| 28111 | |
| 19857 | |
| 19856 |
MySQL
사이트 관리자 비밀번호 재설정하기
|
| 7658 | |
| 28106 | |
| 28098 | |
| 7655 | |
| 28095 | |
| 7651 | |
| 19851 | |
| 7646 | |
| 19850 | |
| 24661 | |
| 28089 | |
| 7633 | |
| 7623 | |
| 28087 | |
| 28085 | |
| 7620 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기