Merge branch 'master' of github.com:gnuboard/g5

This commit is contained in:
whitedot
2013-10-02 09:41:05 +09:00
2 changed files with 11 additions and 7 deletions

View File

@ -81,7 +81,7 @@ if ($is_admin) {
<script src="<?php echo G5_JS_URL ?>/wrest.js"></script>
<?php
if(G5_IS_MOBILE) {
echo '<script> set_cookie("device_width", screen.width, 6, g5_cookie_domain); </script>'.PHP_EOL;
echo '<script> set_cookie("device_width", $(window).width(), 6, g5_cookie_domain); </script>'.PHP_EOL;
echo '<script src="'.G5_JS_URL.'/modernizr.custom.70111.js"></script>'.PHP_EOL; // overflow scroll 감지
}
//if(!defined('G5_IS_ADMIN'))

View File

@ -86,12 +86,16 @@ function get_view_thumbnail($contents, $thumb_width=0)
// 썸네일 width 설정
$thumb_width = 320;
if($dvc_width >= 1000) {
return $contents;
} else if($dvc_width >= 760 && $dvc_width < 1000) {
$thumb_width = 760;
} else if($dvc_width >= 480 && $dvc_width < 760) {
$thumb_width = 480;
if($dvc_width > $board['bo_image_width']) {
$thumb_width = $board['bo_image_width'];
} else {
if($dvc_width >= 1000) {
$thumb_width = 1000;
} else if($dvc_width >= 760 && $dvc_width < 1000) {
$thumb_width = 760;
} else if($dvc_width >= 480 && $dvc_width < 760) {
$thumb_width = 480;
}
}
} else {
$thumb_width = $board['bo_image_width'];