Example #1
0
                <li class="gall_href" style="padding:4px; border:1px solid #ddd;">
                    <a href="<?php 
    echo $list[$i]['href'];
    ?>
">
                    <?php 
    if ($list[$i]['is_notice']) {
        // 공지사항
        ?>
                        <strong style="width:<?php 
        echo $thumb_width;
        ?>
px;height:45px">공지</strong>
                    <?php 
    } else {
        $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $thumb_width, $thumb_height);
        // 썸네일 크기를 위에서 선언한 크기사용
        //  유튜브, 비메오 썸네일 추출
        if (!$thumb) {
            // 썸네일이 없는 경우
            if ($list[$i]['wr_1']) {
                // 유튜브 이미지 출력
                $thumb['src'] = "http://img.youtube.com/vi/{$list[$i][wr_1]}/default.jpg";
            } elseif ($list[$i]['wr_2']) {
                // 비메오 이미지 출력
                $output = get_vimeo("http://vimeo.com/api/v2/video/" . $list[$i]['wr_2'] . ".php");
                $output = unserialize($output);
                // echo "<img src='".$output[0][thumbnail_medium]."'>"; //thumbnail_small, thumbnail_medium, thumbnail_large
                $thumb['src'] = $output[0][thumbnail_medium];
            }
        }
Example #2
0
 public function latest_image($source, $direct = 'n')
 {
     global $g5, $eb;
     switch ($direct) {
         case 'y':
             $thumb = get_list_thumbnail($this->bo_table, $source['wr_id'], $this->img_width, $this->img_height);
             if ($thumb['src']) {
                 $image = $thumb['src'];
             } else {
                 $video = unserialize($source['wr_4']);
                 if ($video['thumb_src']) {
                     $image = $video['thumb_src'];
                 }
             }
             break;
         default:
             $images = unserialize($source['wr_image']);
             unset($g5_root);
             if (is_array($images)) {
                 for ($k = 0; $k < count($images['bf']); $k++) {
                     if (!$images['bf'][$k]) {
                         continue;
                     } else {
                         $img = $images['bf'][$k];
                         break;
                     }
                 }
                 if (!$img) {
                     for ($j = 0; $j < count($images['url']); $j++) {
                         if (!$images['url'][$j]) {
                             continue;
                         } else {
                             $img = $images['url'][$j];
                             if (preg_match('/http/', $img)) {
                                 $extra_img = true;
                             } else {
                                 $g5_root = G5_ROOT;
                                 if ($g5_root != '/') {
                                     $img = str_replace(substr($g5_root, 1), '', $img);
                                 }
                             }
                             break;
                         }
                     }
                 }
                 // 파일첨부 또는 에디터 이미지 처리
                 if ($img && !$extra_img) {
                     $imgfile = G5_PATH . $img;
                     if (@file_exists($imgfile)) {
                         $img_path = explode('/', $img);
                         for ($i = 0; $i < count($img_path) - 1; $i++) {
                             $path[$i] = $img_path[$i];
                         }
                         if (is_array($path)) {
                             $filename = $img_path[count($img_path) - 1];
                             $filepath = G5_PATH . implode('/', $path);
                             $tname = thumbnail($filename, $filepath, $filepath, $this->img_width, $this->img_height, '');
                             $image = G5_URL . implode('/', $path) . '/' . $tname;
                         }
                     }
                 } else {
                     $image = $img;
                 }
                 // 외부이미지는 썸네일화 기능을 지원하지 않습니다.
             } else {
                 $video = unserialize($source['wr_4']);
                 if ($video['thumb_src']) {
                     $image = $video['thumb_src'];
                 }
             }
             break;
     }
     if ($image) {
         return $image;
     }
 }
Example #3
0
' onfocus='this.blur()'  title=" 전체 보기 "><i class="fa fa-list"></i></a>
</div>
<div class="panel-body">
<div class="row">
<?php 
for ($i = 0; $i < count($list); $i++) {
    ?>
	
<div class="col-sm-6 col-md-4 col-lg-4">
      <div class="thumbnail">
        <a href="<?php 
    echo $list[$i]['href'];
    ?>
">
		<?php 
    $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $imgwidth, $imgheight);
    if ($thumb['src']) {
        $img_content = '<img class="img_left" src="' . $thumb['src'] . '" alt="' . $list[$i]['subject'] . '" width="' . $imgwidth . '" height="' . $imgheight . '">';
    } else {
        $img_content = '<div class="text-center tooltip-top" title="이미지없음" style="font-size:50px;" >
							<span class="fa-stack fa-lg">
							<i class="fa fa-image fa-stack-1x"></i>
							<i class="fa fa-ban fa-stack-2x text-danger"></i>
							</span>
							</div>';
    }
    echo $img_content;
    ?>
		</a>
		<hr>
        <div class="caption">
Example #4
0
    ?>
">
                    <?php 
    if ($list[$i]['is_notice']) {
        // 공지사항
        ?>
                        <strong style="width:<?php 
        echo $board['bo_mobile_gallery_width'];
        ?>
px;height:<?php 
        echo $board['bo_mobile_gallery_height'];
        ?>
px">공지</strong>
                    <?php 
    } else {
        $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_mobile_gallery_width'], $board['bo_mobile_gallery_height']);
        if ($thumb['src']) {
            $img_content = '<img src="' . $thumb['src'] . '" alt="' . $thumb['alt'] . '" width="' . $board['bo_mobile_gallery_width'] . '" height="' . $board['bo_mobile_gallery_height'] . '">';
        } else {
            $img_content = '<span style="width:' . $board['bo_mobile_gallery_width'] . 'px;height:' . $board['bo_mobile_gallery_height'] . 'px">no image</span>';
        }
        echo $img_content;
    }
    ?>
                    </a>
                </li>
                <li class="gall_text_href">
                    <?php 
    // echo $list[$i]['icon_reply']; 갤러리는 reply 를 사용 안 할 것 같습니다. - 지운아빠 2013-03-04
    if ($is_category && $list[$i]['ca_name']) {
        ?>
Example #5
0
    }
    if (!$_switcher[$theme]) {
        if (preg_match('/community/', $theme)) {
            $_switcher[$theme] = array("sw_color" => "default", "sw_fixed" => "", "sw_boxed" => "", "usemember" => "", "sw_use" => "");
        }
        if (preg_match('/dynamic/', $theme)) {
            $_switcher[$theme] = array("sw_color" => "default", "sw_fixed" => "fixed", "sw_boxed" => "boxed", "sw_sideopen" => "closed", "sw_sidebar" => "default", "sw_sidemenu" => "accordion", "sw_sidepos" => "left", "sw_footer" => "default", "usemember" => "on", "sw_use" => "off");
        }
    }
    $switcher = $_switcher[$theme];
}
// SNS용 이미지/제목/내용 추가 메타태그
if ($bo_table && $wr_id || $it_id) {
    if ($bo_table && $wr_id) {
        $head_title = strip_tags(conv_subject($write['wr_subject'], 255)) . ' > ' . $board['bo_subject'] . ' | ' . $config['cf_title'];
        $first_image = get_list_thumbnail($bo_table, $wr_id, 600, 0);
        $sns_image = $first_image['src'];
        $target_url = G5_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $wr_id;
        $contents = cut_str(trim(str_replace(array("\r\n", "\r", "\n"), '', strip_tags(preg_replace("/\\?/", "", $write['wr_content'])))), 200, '…');
    }
    if ($it_id) {
        $sitem = sql_fetch("select * from {$g5['g5_shop_item_table']} where it_id = '" . $it_id . "'");
        $head_title = strip_tags(conv_subject($sitem['it_name'], 255)) . ' | ' . $config['cf_title'];
        $sns_image = G5_DATA_URL . '/item/' . $sitem['it_img1'];
        $target_url = G5_SHOP_URL . '/item.php?it_id=' . $it_id;
        $contents = cut_str(trim(str_replace(array("\r\n", "\r", "\n"), '', strip_tags(preg_replace("/\\?/", "", $sitem['it_explan'])))), 200, '…');
    }
    $config['cf_add_meta'] .= '
			<meta property="og:id" content="' . G5_URL . '" />
			<meta property="og:url" content="' . $target_url . '" />
			<meta property="og:type" content="article" />