Example #1
0
function conv_link_video($link)
{
    if (!$link) {
        return;
    }
    // 비디오, 오디오 체크
    $vext = array("mp4", "m4v", "f4v", "mov", "flv", "webm", "acc", "m4a", "f4a", "mp3", "ogg", "oga", "rss");
    list($link_video) = explode("|", $link);
    $file = apms_get_filename($link_video);
    $str = '';
    if (isset($file['ext']) && $file['ext'] && in_array($file['ext'], $vext)) {
        if (apms_jwplayer($link_video)) {
            $str = '<p>{동영상:' . $link_video . '|file=1}</p>';
        }
    } else {
        $video = apms_video_info($link_video);
        if (isset($video['vid']) && $video['vid']) {
            $str = '<p>{동영상:' . $link_video . '}</p>';
        }
    }
    return $str;
}
Example #2
0
 $view['content'] = conv_content($view['wr_content'], $html);
 if (strstr($sfl, 'content')) {
     $view['content'] = search_font($stx, $view['content']);
 }
 // APMS 글내용 컨버터
 $exceptfile = array();
 $autoplay = '';
 if ($board['as_autoplay'] && $view['file']['count']) {
     //첨부동영상 오디오 자동실행
     $autoplay_ext = array("mp4", "m4v", "f4v", "mov", "flv", "webm", "acc", "m4a", "f4a", "mp3", "ogg", "oga", "rss");
     for ($i = 0; $i < count($view['file']); $i++) {
         if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
             $file = apms_get_filename($view['file'][$i]['source']);
             if (in_array($file['ext'], $autoplay_ext)) {
                 list($screen, $caption, $exceptnum) = apms_get_caption($view['file'], $file['name'], $i);
                 $autoplay .= apms_jwplayer($view['file'][$i]['path'] . '/' . $view['file'][$i]['file'], $screen, $caption);
                 if (count($exceptnum) > 0) {
                     $exceptfile = array_merge($exceptfile, $exceptnum);
                 }
             }
         }
     }
     if (count($exceptfile)) {
         // 동영상 이미지는 출력이미지에서 제외
         $refile = array();
         $j = 0;
         for ($i = 0; $i < count($view['file']); $i++) {
             if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && $view['file'][$i]['view']) {
                 continue;
             }
             if (in_array($i, $exceptfile)) {
Example #3
0
function apms_link_video($link, $one = '', $img = '')
{
    // 비디오, 오디오 체크
    $vext = array("mp4", "m4v", "f4v", "mov", "flv", "webm", "acc", "m4a", "f4a", "mp3", "ogg", "oga", "rss");
    $j = 0;
    $video = '';
    for ($i = 1; $i <= count($link); $i++) {
        if (!$link[$i]) {
            continue;
        }
        list($link_video) = explode("|", $link[$i]);
        $file = apms_get_filename($link_video);
        if (isset($file['ext']) && $file['ext'] && in_array($file['ext'], $vext)) {
            $player = apms_jwplayer($link_video, $img);
        } else {
            $player = apms_video($link_video);
        }
        if ($player) {
            $video .= $player;
            $j++;
            if ($one && $j == $one) {
                return $video;
            }
        }
    }
    return $video;
}