// 간격 $gap_right = isset($wset['gap']) && ($wset['gap'] > 0 || $wset['gap'] == "0") ? (int) $wset['gap'] : 15; $minus_right = $gap_right > 0 ? '-' . $gap_right : 0; $gap_bottom = isset($wset['gapb']) && ($wset['gapb'] > 0 || $wset['gapb'] == "0") ? (int) $wset['gapb'] : 30; $minus_bottom = $gap_bottom > 0 ? '-' . $gap_bottom : 0; // 가로수 $item = isset($wset['item']) && $wset['item'] > 0 ? (int) $wset['item'] : 4; // 반응형 if (_RESPONSIVE_) { $lg = isset($wset['lg']) && $wset['lg'] > 0 ? $wset['lg'] : 3; $md = isset($wset['md']) && $wset['md'] > 0 ? $wset['md'] : 3; $sm = isset($wset['sm']) && $wset['sm'] > 0 ? $wset['sm'] : 2; $xs = isset($wset['xs']) && $wset['xs'] > 0 ? $wset['xs'] : 2; } // 랜덤아이디 $widget_id = apms_id(); // Random ID ?> <style> #<?php echo $widget_id; ?> { margin-right:<?php echo $minus_right; ?> px; margin-bottom:<?php echo $minus_bottom; ?> px; } #<?php echo $widget_id;
if (!defined('_GNUBOARD_')) { exit; } //개별 페이지 접근 불가 if (!$wset['slider_h']) { $wset['slider_h'] = 35; } if (!$wset['slider']) { $wset['slider'] = 0; } // 효과 $effect = apms_carousel_effect($wset['effect']); // 간격 $interval = apms_carousel_interval($wset['interval']); // 랜덤아이디 $slider_id = apms_id(); ?> <div id="<?php echo $slider_id; ?> " class="carousel div-carousel<?php echo $effect; ?> " data-ride="carousel" data-interval="<?php echo $interval; ?> "> <?php if (!$wset['nav']) { ?>
function apms_jwplayer($file, $img = '', $caption = '') { if (!$file) { return; } $video = array("mp4", "m4v", "f4v", "mov", "flv", "webm"); $audio = array("acc", "m4a", "f4a", "mp3", "ogg", "oga"); $ext = apms_get_ext($file); if ($ext == "rss") { $is_type = 'plist'; $cnt = apms_jwplayer_list($file); if ($cnt > 0) { } else { return; } } else { if (in_array($ext, $audio)) { $is_type = 'audio'; } else { if (in_array($ext, $video)) { $is_type = 'video'; } else { return; } } } if ($img == 'check') { return $is_type; } $jw_id = apms_id(); $jwplayer_script = ''; if ($is_type == 'audio' && !$img && !$caption) { $jwplayer_script .= '<script type="text/javascript"> jwplayer("' . $jw_id . '").setup({ file: "' . $file . '", width: "100%", height: "40", repeat: "file" }); </script>' . PHP_EOL; } else { if ($is_type == 'plist') { $plist_set = 'aspectratio: "16:9"'; if ($cnt > 1) { $plist_set = G5_IS_MOBILE ? 'aspectratio: "16:9", listbar: { position: "right", size:150 }' : 'aspectratio: "16:9", listbar: { position: "right", size:200 }'; } $jwplayer_script .= '<script type="text/javascript"> jwplayer("' . $jw_id . '").setup({ playlist: "' . $file . '", width: "100%", ' . $plist_set . ' }); </script>' . PHP_EOL; } else { $img = $img ? 'image: "' . $img . '",' : ''; $caption = $caption ? 'tracks: [{file: "' . $caption . '"}],' : ''; $jwplayer_script .= '<script type="text/javascript"> jwplayer("' . $jw_id . '").setup({ file: "' . $file . '", ' . $img . ' ' . $caption . ' aspectratio: "16:9", width: "100%" }); </script>' . PHP_EOL; } } $jwplayer = ''; if ($jwplayer_script) { if (!defined('APMS_JWPLAYER6')) { define('APMS_JWPLAYER6', true); $jwplayer .= '<script type="text/javascript" src="' . G5_PLUGIN_URL . '/jwplayer/jwplayer.js"></script>' . PHP_EOL; $jwplayer .= '<script type="text/javascript">jwplayer.key="' . APMS_JWPLAYER6_KEY . '";</script>' . PHP_EOL; } $jwplayer .= '<div id="' . $jw_id . '">Loading the player...</div>' . PHP_EOL; $jwplayer .= $jwplayer_script; $jwplayer .= '<div class="h15"></div>' . PHP_EOL; } return $jwplayer; }
// 개별 페이지 접근 불가 global $is_admin, $member; //add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 add_stylesheet('<link rel="stylesheet" href="' . $widget_url . '/widget.css" media="screen">', 0); $skin_dir = $wname; //위젯명 $list = apms_poll_rows($wset); $list_cnt = count($list); if (!$list_cnt) { return; } // 투표섞기 if ($list_cnt > 0 && isset($wset['rdm']) && $wset['rdm']) { shuffle($list); } $accordion_id = apms_id(); ?> <div class="panel-group" id="<?php echo $accordion_id; ?> " role="tablist" aria-multiselectable="true"> <?php for ($i = 0; $i < $list_cnt; $i++) { ?> <div class="panel panel-default"> <div class="panel-heading" id="<?php echo $accordion_id; ?> H<?php echo $i;