G4 [G4] 최신글 스킨에 사용하는 변수모음
페이지 정보
본문
최신글 스킨을 만드시거나 편집하실 때 사용할 수 있는 변수 모음입니다.
================================================================================================
1. 해당게시판에서 제목불러오기
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a>
2. 해당게시판에서 목록 불러오기
<a href='<?=$list[$i][href]?>'><?=$list[$i][subject]?></a>
3. 해당게시판에서 작성일자 불러오기
<?=$list[$i][datetime]?> // 1999-12-31 형식
<?=$list[$i][datetime2]?> // 12-31 형식.
4. 해당게시판에서 작성자 불러오기
<?=$list[$i][name]?>
5. 해당게시판에서 코멘트숫자 불러오기
<?=$list[$i][comment_cnt]?>
6. 해당게시판에서 코멘트 새창 띄우기 링크
<a href="<?=$list[$i][comment_href?>" target="_blank"><?=$list[$i][comment_cnt]?></a>
7. 해당게시판에서 새글표시 그림 나타내기
<?=$list[$i][icon_new]?>
8. 본문내용 모양 그대로 지정길이 만큼 줄여서 출력
<?=nl2br(stripslashes(cut_str($list[$i][content], 200, '....' )))?> //"200"이 지정길이를 의미함
9. 본문내용 모양 그대로 출력
<?=nl2br(stripslashes($list[$i][content]))?>
10. 본문내용 붙여서 출력
<?=$list[$i][content]?>
11. 본문내용 붙여서 지정길이 만큼 줄여서 출력
<?=cut_str($list[$i][wr_content],200,"…");?> //"200"이 지정길이를 의미함
12. 즐겨찾기용 게시판에서 링크된 url불러오기
<a href='<?=$list[$i]['wr_link1']?>' target=_blank><?=set_http(get_text(cut_str($list[$i][wr_link1], 45)))?></a> // url길이가 "45"보다 크면 자름
13. html로 작성된 본문을 html문서 적용된 내용으로 불러오기
<?=nl2br(stripslashes($list[$i][wr_content]))?>
14. html로 작성된 본문을 html문서 적용된 내용으로 지정한 길이만큼 불러오기
<?=nl2br(stripslashes(cut_str($list[$i][wr_content], 200, '....' )))?>
15. 최신글에서 게시판 제목이나 이미지 랜덤으로 볼러오기
- http://sir.co.kr/?doc=bbs/gnuboard.php&bo_table=tiptech&wr_id=7127
16. 해당 게시판에서 카테고리 불러오기
<a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a>
17. 첨부파일 불러오기
<?
echo "<a href='{$list[$i][href]}'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
echo "<img src='$g4[path]/data/file/$bo_table/$image' width='45' height='45' border='0'>"; // 이미지크기
} else
echo "<img src='$latest_skin_path/img/noimage.gif' style='border:#cdcdcd solid 1px'>"; ?>
</a>
18. 각종 아이콘 보여주기
<?=$list[$i][icon_file]?>
<?=$list[$i][icon_link]?>
<?=$list[$i][icon_hot]?>
<?=$list[$i][icon_secret]?>
19. 최근글에 카테고리 이름대신 이미지 넣기...
<?if($list[$i][ca_name] == "공지") {
echo "<img src='$latest_skin_path/icon_notice.gif' border=0 >";
} else {
}
?>
<?if($list[$i][ca_name] == "뉴스") {
echo "<img src='$latest_skin_path/icon_news.gif' border=0 >";
} else {
}
?>
<?if($list[$i][ca_name] == "행사") {
echo "<img src='$latest_skin_path/icon_event.gif' border=0 >";
} else {
}
?>
//sir root님
20. 추가필드 불러오기
<?=$list[$i][wr_1]?>
================================================================================================
1. 해당게시판에서 제목불러오기
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a>
2. 해당게시판에서 목록 불러오기
<a href='<?=$list[$i][href]?>'><?=$list[$i][subject]?></a>
3. 해당게시판에서 작성일자 불러오기
<?=$list[$i][datetime]?> // 1999-12-31 형식
<?=$list[$i][datetime2]?> // 12-31 형식.
4. 해당게시판에서 작성자 불러오기
<?=$list[$i][name]?>
5. 해당게시판에서 코멘트숫자 불러오기
<?=$list[$i][comment_cnt]?>
6. 해당게시판에서 코멘트 새창 띄우기 링크
<a href="<?=$list[$i][comment_href?>" target="_blank"><?=$list[$i][comment_cnt]?></a>
7. 해당게시판에서 새글표시 그림 나타내기
<?=$list[$i][icon_new]?>
8. 본문내용 모양 그대로 지정길이 만큼 줄여서 출력
<?=nl2br(stripslashes(cut_str($list[$i][content], 200, '....' )))?> //"200"이 지정길이를 의미함
9. 본문내용 모양 그대로 출력
<?=nl2br(stripslashes($list[$i][content]))?>
10. 본문내용 붙여서 출력
<?=$list[$i][content]?>
11. 본문내용 붙여서 지정길이 만큼 줄여서 출력
<?=cut_str($list[$i][wr_content],200,"…");?> //"200"이 지정길이를 의미함
12. 즐겨찾기용 게시판에서 링크된 url불러오기
<a href='<?=$list[$i]['wr_link1']?>' target=_blank><?=set_http(get_text(cut_str($list[$i][wr_link1], 45)))?></a> // url길이가 "45"보다 크면 자름
13. html로 작성된 본문을 html문서 적용된 내용으로 불러오기
<?=nl2br(stripslashes($list[$i][wr_content]))?>
14. html로 작성된 본문을 html문서 적용된 내용으로 지정한 길이만큼 불러오기
<?=nl2br(stripslashes(cut_str($list[$i][wr_content], 200, '....' )))?>
15. 최신글에서 게시판 제목이나 이미지 랜덤으로 볼러오기
- http://sir.co.kr/?doc=bbs/gnuboard.php&bo_table=tiptech&wr_id=7127
16. 해당 게시판에서 카테고리 불러오기
<a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a>
17. 첨부파일 불러오기
<?
echo "<a href='{$list[$i][href]}'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
echo "<img src='$g4[path]/data/file/$bo_table/$image' width='45' height='45' border='0'>"; // 이미지크기
} else
echo "<img src='$latest_skin_path/img/noimage.gif' style='border:#cdcdcd solid 1px'>"; ?>
</a>
18. 각종 아이콘 보여주기
<?=$list[$i][icon_file]?>
<?=$list[$i][icon_link]?>
<?=$list[$i][icon_hot]?>
<?=$list[$i][icon_secret]?>
19. 최근글에 카테고리 이름대신 이미지 넣기...
<?if($list[$i][ca_name] == "공지") {
echo "<img src='$latest_skin_path/icon_notice.gif' border=0 >";
} else {
}
?>
<?if($list[$i][ca_name] == "뉴스") {
echo "<img src='$latest_skin_path/icon_news.gif' border=0 >";
} else {
}
?>
<?if($list[$i][ca_name] == "행사") {
echo "<img src='$latest_skin_path/icon_event.gif' border=0 >";
} else {
}
?>
//sir root님
20. 추가필드 불러오기
<?=$list[$i][wr_1]?>
댓글목록
등록된 댓글이 없습니다.