뽀라닷컴
Loading...




웹디자인,포토샵,그누보드,제로보드,동영상제작 관련 메모 >>


전체(437)인터넷,컴퓨터 (94) | 웹디자인tip (182) | CG,그래픽tip (70) | BBS_Tip (74) | 영상tip (17) |
그누보드 수정할때 팁 2017-09-20 13:54:20
홈페이지홈페이지



- 날짜 0000/00/00 형식

<?=ereg_replace("-","/",substr($row[wr_datetime],0,10))?>


- 최근글 또는 제목이 링크된 값으로 페이지 넘어가기
echo "<a href='{$list[$i][link][1]}' target=_blank>link</a>";

if( $list[$i][link][1])  //링크 없는 값은 안나오게 함
    echo "<a href='{$list[$i][link][1]}' target=_blank>link</a>"; 


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. 최신글에서 게시판 제목이나 이미지 랜덤으로 볼러오기 

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' width='45' height='45' 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][wr_good]) echo "추천({$list[$i][wr_good]})";?> 

20. 비추천수 보이기 
<? if ($list[$i][wr_nogood]) echo "비추천({$list[$i][wr_nogood]})";?> 




    



목록보기 삭제하기