<?php echo latest('theme/ziney_hover', 'table', 10, 22, '', '500,300,800'); // '썸네일너비,썸네일높이,최신글ul너비' ?>
이 최신글 갤러리를 적용했는데여
가로사이즈를 적당히만 늘리니까 아까처럼 비율이 엉망되지않고
적당히 보여서 그 사이즈로 하면서
하단 제목을 오른쪽으로 옮기고 싶습니다
소스를 봐도 잘 모르겠서서
.latest-ziney-hover li a.link{display:inline-block; padding:4px 0; float: right;}
float:right만 추가하고 제목이 오른쪽으로갔는데요
http://rhdtkd77.dothome.co.kr/
하단에 있는것을 아예 오른쪽으로 옮기려면 어떻게 해야될까여?
<?phpif (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 include_once(G5_LIB_PATH.'/thumbnail.lib.php'); $sql = " select * from {$g5['board_table']} where bo_table = '{$bo_table}' ";$board = sql_fetch($sql); if ($options) list($width, $height, $wrap_width) = explode(',', $options);if (!$width) $width = 136;if (!$height) $height = 96; $ul_style = 'padding-top:'.($height + 10).'px;';if ($wrap_width) { $ul_style .= 'width:'.$wrap_width.'px;';} add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);add_javascript('<script src="'.$latest_skin_url.'/ziney_hover.js"></script>', 1);?> <ul class="latest-ziney-hover" style="<?php echo $ul_style; ?>"><?php for ($i=0; $i<count($list); $i++) { ?> <li><?php $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height, false, false); if($thumb['src']) { $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">'; } else { $img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px">No image</span>'; } echo $img_content;?><i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></li><?php}if (count($list) == 0) { //게시물이 없을 때 ?> <li class="nodata">게시물이 없습니다.</li><?php } ?></ul>
답변 3개 / 댓글 3개
방법1
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
$sql = " select * from {$g5['board_table']} where bo_table = '{$bo_table}' ";
$board = sql_fetch($sql);
if ($options) list($width, $height, $wrap_width) = explode(',', $options);
if (!$width) $width = 136;
if (!$height) $height = 96;
$ul_style = 'padding-top:'.($height + 10).'px;';
if ($wrap_width) {
$ul_style .= 'width:'.$wrap_width.'px;';
}
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
add_javascript('<script src="'.$latest_skin_url.'/ziney_hover.js"></script>', 1);
?>
<ul class="latest-ziney-hover" style="<?php echo $ul_style; ?>">
<?php for ($i=0; $i<count($list); $i++) { ?>
<li><?php
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height, false, false);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
} else {
$img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px">No image</span>';
}
//echo $img_content;
?><div style="float:left;"><?php echo $img_content;?></div>
<div><i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></div>
</li> <?php } if (count($list) == 0) { //게시물이 없을 때 ?> <li class="nodata">게시물이 없습니다.</li> <?php } ?> </ul>
방법2
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
$sql = " select * from {$g5['board_table']} where bo_table = '{$bo_table}' ";
$board = sql_fetch($sql);
if ($options) list($width, $height, $wrap_width) = explode(',', $options);
if (!$width) $width = 136;
if (!$height) $height = 96;
$ul_style = 'padding-top:'.($height + 10).'px;';
if ($wrap_width) {
$ul_style .= 'width:'.$wrap_width.'px;';
}
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
add_javascript('<script src="'.$latest_skin_url.'/ziney_hover.js"></script>', 1);
?>
<ul class="latest-ziney-hover" style="<?php echo $ul_style; ?>">
<?php for ($i=0; $i<count($list); $i++) { ?>
<li><?php
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height, false, false);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
} else {
$img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px">No image</span>';
}
//echo $img_content;
?><table>
<tr>
<td><?php echo $img_content;?></td>
<td><i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></td>
</tr>
</table>
</li>
<?php
}
if (count($list) == 0) { //게시물이 없을 때 ?>
<li class="nodata">게시물이 없습니다.</li>
<?php } ?>
</ul>
답변에 대한 댓글 1개
댓글 달아드리긴했는데 이거 에디터가 깔끔하게 안나오네요;;;
부분 확인하시고 적용해보세요.
방법 1
<li>
<div style="float:left;"><?php echo $img_content;?</div>
<div><i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></div>
</li>
방법2
<li>
<table>
<tr>
<td><?php echo $img_content;?></td>
<td><i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></td>
</tr>
</table>
</li>
답변에 대한 댓글 2개
<?php
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height, false, false);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
} else {
$img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px">No image</span>';
}
echo $img_content;
?> </div>
<div><i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></div>
스킨이 특이한건지 div를 넣었는데 오류만 나네요 ㅜㅜ
<table><tr><td><?php
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height, false, false);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
} else {
$img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px">No image</span>';
}
echo $img_content;
?> </td>
<td><i></i> <a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></td></tr></table>
</li>
요렇게 해도 오류가 나구요
li를 분리하거나 건드리는 순간
오버도 안되고 오류만 나네요 ㅜㅜ
답변을 작성하려면 로그인이 필요합니다.
