아이보드의 최근글 출력형태는 기본적으로 가로로 나열됩니다. 그러니까 제목 - 본문 - 날짜 이런 식으로 가로로 출력이 된다는거져.
웹진형의 응용으로 이미지 - 제목+본문 형태로 응용을 한 것이 아래의 형태입니다. 이 것은 가로로 나열되는 것은 맞으나 본문출력부분에 제목을 본문위로 출력되게 한 모양입니다.
http://webplay.tistory.com
실력이 부족하여 이렇게 가로나열이 기본인 상태에서 제목만 세로로 위치시켜본다는 것이 어려웠습니다. 그래서 약간 응용하여 제목 먼저뽑고, 이미지 - 본문의 형태로 출력해봤습니다.
아래처럼 헤드라인으로 올 제목과 바디부분을 둘로 나눴습니다. 제목은 글자크기를 5로. 진하게 설정했고 바디부분은 웹진형태에서 제목만 빠지도록 수정했습니다.
// 헤드라인 제목
$headline_title=array(
TABLE_head_function => "none",
TD_function_set => "TD_subject6", # 섬네일/본문
subject_width => "98%",
subject_length => "100",
category => "1",
table_width => "98%",
index_many => "1",
line_color => "none",
);
// 헤드라인 바디
$headline=array(
TABLE_head_function => "none",
TD_function_set => "TD_album/TD_body2", # 섬네일/본문
category => "1",
table_width => "98%",
index_many => "1",
line_color => "#f2f2f2",
album_click_after => '3',
img_width => "70", // 이미지 가로크기
img_height => "none", // 이미지 세로크기
);
TD_subject6과 TD_body2의 정의를 보자면 아래와 같습니다.
TD_subject6
// <td> 글제목 style3 - 글제목 클릭시 '현재창' 에서 '본문+목록+스킨적용' 출력하는 형태
function TD_subject6(){global $CONFIG,$Print_option, $Index_data; $SUBJECT=get_subject_data();?>
<td width="<?=$Print_option[subject_width]?>">
<a href="<?=$SUBJECT[url]?>"><b><font size=5><?=$SUBJECT[str]?></font></b></a>
<?=$SUBJECT[lock]?> <?=$SUBJECT[comment]?> <?=$SUBJECT[point]?> <?=$SUBJECT[new_icon]?>
</td>
<?}
//------------------------------------------------------------------------------
TD_body2
// <td> 헤드라인 본문내용
function TD_body2(){ global $CONFIG,$Print_option,$Index_data,$search_string; if($Index_data[secret]==1){echo "<td> 비공개 글입니다.</td>";return;}?>
<td style='line-height:140%;' valign=top>
<a href="<?=$CONFIG[board_php]?>?board=<?=$Index_data[board_name]?>&config=<?=$Print_option[config]?>&command=body&no=<?=$Index_data[no]?>&<?=$search_string?>">
<font color=#606060>
<?
$Index_data[tbody]=stripslashes(strip_tags($Index_data[tbody])); // htm 태그 제거,stripslashes
//$Index_data[tbody]=preg_replace("/ +/",'<br>',$Index_data[tbody]); // 줄바꿈 적용
echo string_cut($Index_data[tbody],170,'..'); // 본문: 길이를 170 으로 잘라 출력
?>
</font>
</a>
</td>
<?}
//--------------------
출력되어야 할 위치에 아래와 같이 했습니다. 즉, 제목과 이미지-본문을 별도로 출력되게 했져. 세로로 출력하는 방법은 제 수준에서 이 정도밖에 없는 것 같습니다. 헤드라인인 만큼 둥근 박스에도 넣었구요.
<?
// 헤드라인 뉴스
round_slim_top(" width=98% round_color=#eeeeee bgcolor=#fafafa "); // 곡선 테두리 top
iBoard_Print_Here('zine',$headline_title); // 첫번째 뉴스 제목만 크게
iBoard_Print_Here('zine',$headline); // 첫번재 뉴스 그림+본문
round_slim_bottom(); // 곡선 테두리 bottom
iBoard_Print_Here('zine',$Image_and_body); // 두번째 뉴스부터
?>
작은 팁이지만 도움이 되셨으면 합니다. ^^ 질문은 제
블로그 방명록을 통해서...