모바일 이미지수 설정인듯?

This commit is contained in:
whitedot
2013-03-07 18:32:18 +09:00
parent 9d1053863b
commit d047a0933d
3 changed files with 70 additions and 13 deletions

View File

@ -29,8 +29,8 @@ if (!isset($board['bo_mobile_skin'])) {
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_skin` ", false);
}
if (!isset($board['bo_mobile_gallery_cols'])) {
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_gallery_cols` INT NOT NULL AFTER `bo_gallery_cols` ", false);
if (!isset($board['bo_gallery_width'])) {
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_gallery_width` INT NOT NULL AFTER `bo_gallery_cols`, ADD `bo_gallery_height` INT NOT NULL AFTER `bo_gallery_width`, ADD `bo_moblie_gallery_cols` INT NOT NULL AFTER `bo_gallery_height`, ADD `bo_mobile_gallery_width` INT NOT NULL AFTER `bo_mobile_gallery_cols`, ADD `bo_mobile_gallery_height` INT NOT NULL AFTER `bo_mobile_gallery_width` ", false);
}
if ($w == '') {
@ -48,6 +48,11 @@ if ($w == '') {
$board['bo_download_point'] = $config['cf_download_point'];
$board['bo_gallery_cols'] = 4;
$board['bo_gallery_width'] = 200;
$board['bo_gallery_height'] = 150;
$board['bo_mobile_gallery_cols'] = 2;
$board['bo_mobile_gallery_width'] = 160;
$board['bo_mobile_gallery_height'] = 120;
$board['bo_table_width'] = 97;
$board['bo_page_rows'] = $config['cf_page_rows'];
$board['bo_subject_len'] = 60;
@ -694,9 +699,9 @@ $pg_anchor = "<ul class=\"anchor\">
</td>
</tr>
<tr>
<th scope="row"><label for="bo_gallery_cols">가로 이미지수<strong class="sound_only">필수</strong></label></th>
<th scope="row"><label for="bo_gallery_cols">갤러리 이미지 수<strong class="sound_only">필수</strong></label></th>
<td>
<?=help('갤러리 형식의 게시판 목록에서 이미지를 한줄에 몇장씩 보여것인지를 설정하는 값')?>
<?=help('갤러리 형식의 게시판 목록에서 이미지를 한줄에 몇장씩 보여것인지를 설정하는 값')?>
<input type="text" id="bo_gallery_cols" name="bo_gallery_cols" class="required numeric frm_input" required value="<?=$board['bo_gallery_cols']?>" size="4">
</td>
<td class="group_setting">
@ -705,14 +710,58 @@ $pg_anchor = "<ul class=\"anchor\">
</td>
</tr>
<tr>
<th scope="row"><label for="bo_mobile_gallery_cols">모바일<br>가로 이미지<strong class="sound_only">필수</strong></label></th>
<th scope="row"><label for="bo_gallery_width">갤러리 이미지<strong class="sound_only">필수</strong></label></th>
<td>
<?=help('모바일 접속시 갤러리 형식의 게시판 목록에서 이미지를 한줄에 몇장씩 보여줄것인지를 설정하는 값')?>
<?=help('갤러리 형식의 게시판 목록에서 썸네일 이미지의 폭을 설정하는 값')?>
<input type="text" id="bo_gallery_width" name="bo_gallery_width" class="required numeric frm_input" required value="<?=$board['bo_gallery_width']?>" size="4">
</td>
<td class="group_setting">
<input type="checkbox" id="chk_gallery_width" name="chk_gallery_width" value="1">
<label for="chk_gallery_width">동일그룹 모두 적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_gallery_height">갤러리 이미지 높이<strong class="sound_only">필수</strong></label></th>
<td>
<?=help('갤러리 형식의 게시판 목록에서 썸네일 이미지의 높이를 설정하는 값')?>
<input type="text" id="bo_gallery_height" name="bo_gallery_height" class="required numeric frm_input" required value="<?=$board['bo_gallery_height']?>" size="4">
</td>
<td class="group_setting">
<input type="checkbox" id="chk_gallery_height" name="chk_gallery_height" value="1">
<label for="chk_gallery_height">동일그룹 모두 적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_mobile_gallery_cols">모바일<br>갤러리 이미지 수<strong class="sound_only">필수</strong></label></th>
<td>
<?=help('모바일로 접속시 갤러리 형식의 게시판 목록에서 이미지를 한줄에 몇장씩 보여 줄 것인지를 설정하는 값')?>
<input type="text" id="bo_mobile_gallery_cols" name="bo_mobile_gallery_cols" class="required numeric frm_input" required value="<?=$board['bo_mobile_gallery_cols']?>" size="4">
</td>
<td class="group_setting">
<input type="checkbox" id="chk_mobile_gallery_cols" name="chk_mobile_gallery_cols" value="1">
<label for="chk_mobile_gallery_cols">동일그룹 모두 적용</label>
<input type="checkbox" id="chk_gallery_cols" name="chk_gallery_cols" value="1">
<label for="chk_gallery_cols">동일그룹 모두 적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_mobile_gallery_width">모바일<br>갤러리 이미지 폭<strong class="sound_only">필수</strong></label></th>
<td>
<?=help('모바일로 접속시 갤러리 형식의 게시판 목록에서 썸네일 이미지의 폭을 설정하는 값')?>
<input type="text" id="bo_mobile_gallery_width" name="bo_mobile_gallery_width" class="required numeric frm_input" required value="<?=$board['bo_mobile_gallery_width']?>" size="4">
</td>
<td class="group_setting">
<input type="checkbox" id="chk_gallery_width" name="chk_gallery_width" value="1">
<label for="chk_gallery_width">동일그룹 모두 적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_mobile_gallery_height">모바일<br>갤러리 이미지 높이<strong class="sound_only">필수</strong></label></th>
<td>
<?=help('모바일로 접속시 갤러리 형식의 게시판 목록에서 썸네일 이미지의 높이를 설정하는 값')?>
<input type="text" id="bo_mobile_gallery_height" name="bo_mobile_gallery_height" class="required numeric frm_input" required value="<?=$board['bo_mobile_gallery_height']?>" size="4">
</td>
<td class="group_setting">
<input type="checkbox" id="chk_gallery_height" name="chk_gallery_height" value="1">
<label for="chk_gallery_height">동일그룹 모두 적용</label>
</td>
</tr>
<tr>

View File

@ -99,7 +99,11 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_content_tail = '{$_POST['bo_content_tail']}',
bo_insert_content = '{$_POST['bo_insert_content']}',
bo_gallery_cols = '{$_POST['bo_gallery_cols']}',
bo_mobile_gallery_cols='{$_POST['bo_mobile_gallery_cols']}',
bo_gallery_width = '{$_POST['bo_gallery_width']}',
bo_gallery_height = '{$_POST['bo_gallery_height']}',
bo_mobile_gallery_cols = '{$_POST['bo_mobile_gallery_cols']}',
bo_mobile_gallery_width = '{$_POST['bo_mobile_gallery_width']}',
bo_mobile_gallery_height= '{$_POST['bo_mobile_gallery_height']}',
bo_upload_count = '{$_POST['bo_upload_count']}',
bo_upload_size = '{$_POST['bo_upload_size']}',
bo_reply_order = '{$_POST['bo_reply_order']}',
@ -248,7 +252,11 @@ if (is_checked('chk_use_email')) $fields .= " , bo_use_email = '{$bo_use_
if (is_checked('chk_skin')) $fields .= " , bo_skin = '{$bo_skin}' ";
if (is_checked('chk_mobile_skin')) $fields .= " , bo_mobile_skin = '{$bo_mobile_skin}' ";
if (is_checked('chk_gallery_cols')) $fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
if (is_checked('chk_mobile_gallery_cols'))$fields.=" , bo_mobile_gallery_cols = '{$bo_mobile_gallery_cols}' ";
if (is_checked('chk_gallery_width')) $fields .= " , bo_gallery_width = '{$bo_gallery_width}' ";
if (is_checked('chk_gallery_height')) $fields .= " , bo_gallery_height = '{$bo_gallery_height}' ";
if (is_checked('chk_mobile_gallery_cols')) $fields .= " , bo_mobile_gallery_cols = '{$bo_mobile_gallery_cols}' ";
if (is_checked('chk_mobile_gallery_width')) $fields .= " , bo_mobile_gallery_width = '{$bo_mobile_gallery_width}' ";
if (is_checked('chk_mobile_gallery_height'))$fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
if (is_checked('chk_table_width')) $fields .= " , bo_table_width = '{$bo_table_width}' ";
if (is_checked('chk_page_rows')) $fields .= " , bo_page_rows = '{$bo_page_rows}' ";
if (is_checked('chk_subject_len')) $fields .= " , bo_subject_len = '{$bo_subject_len}' ";

View File

@ -68,7 +68,7 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
$k += 1;
if ($k % $board['bo_gallery_cols'] == 0) $style .= "margin:0 !important;";
?>
<li class="bo_img_list_li <? if ($wr_id == $list[$i]['wr_id']) { ?>bo_img_now<? } ?>" style="<?=$style?>width:<?=$board['bo_9']?>px">
<li class="bo_img_list_li <? if ($wr_id == $list[$i]['wr_id']) { ?>bo_img_now<? } ?>" style="<?=$style?>">
<? if ($is_checkbox) { ?><input type="checkbox" name="chk_wr_id[]" value="<?=$list[$i]['wr_id']?>" title="<?=$list[$i]['subject']?> 선택"><? } ?>
<span class="sound_only">
<?
@ -89,13 +89,13 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
$filepath = G4_DATA_PATH.'/file/'.$bo_table;
if(preg_match("/\.({$config['cf_image_extension']})$/i", $file['bf_file']) && is_file($filepath.'/'.$file['bf_file'])) {
$thumb = get_list_thumbnail($file['bf_file'], $filepath, $board['bo_9'], $board['bo_10']);
$thumb = get_list_thumbnail($file['bf_file'], $filepath, $board['bo_gallery_width'], $board['bo_gallery_height']);
$imgsrc = G4_DATA_URL.'/file/'.$bo_table.'/'.$thumb;
} else {
$imgsrc = $board_skin_url.'/img/noimg.jpg';
}
?>
<img src="<?=$imgsrc?>" alt="<?=get_text($file['bf_content'])?>" width="<?=$board['bo_9']?>" height="<?=$board['bo_10']?>">
<img src="<?=$imgsrc?>" alt="<?=get_text($file['bf_content'])?>" width="<?=$board['bo_gallery_width']?>" height="<?=$board['bo_gallery_height']?>">
<? } ?>
</a>
</li>