케빈엉클

유튜브/비메오 ID 갖고오기 (at list.skin.php)

· 11개월 전 · 606

[code]

//YOUTUBE

$videoId = get_youtube_id($list[$i]['wr_content']);

                            $youtube_thumbnail = get_youtube_thumbnail(get_youtube_id($list[$i]['wr_content']));                            

                            if($youtube_thumbnail) {

                                //$img_content = '<img src="'.$youtube_thumbnail.'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';

                                $img_content = "";

                                echo '<iframe width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'" src="https://www.youtube.com/embed/'.$videoId.'?control=0" frameborder="0" allowfullscreen></iframe>';                                                                                                  

                            }

 

//VIMEO

$videoIdofvimeo = get_vimeo_id($list[$i]['wr_content']);

                            $vimeo_thumbnail = get_vimeo_thumbnail(get_vimeo_id($list[$i]['wr_content']));

                            if($vimeo_thumbnail) {

                                $img_content = "";

                                echo '<iframe width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"

                                    src="https://player.vimeo.com/video/'.$videoIdofvimeo.'"

                                    frameborder="0"

                                    allow="autoplay; fullscreen; picture-in-picture"

                                    allowfullscreen></iframe>';

                            }

[/CODE]

단, youtube.lib.php이 lib에 folder에 있어야 합니다.

|
댓글을 작성하시려면 로그인이 필요합니다.

그누보드5 팁자료실

+
제목 글쓴이 날짜 조회
10개월 전 조회 982
10개월 전 조회 709
10개월 전 조회 841
10개월 전 조회 984
10개월 전 조회 600
10개월 전 조회 731
10개월 전 조회 1,078
11개월 전 조회 694
11개월 전 조회 783
11개월 전 조회 878
11개월 전 조회 886
11개월 전 조회 548
11개월 전 조회 946
11개월 전 조회 747
11개월 전 조회 607
11개월 전 조회 662
11개월 전 조회 622
11개월 전 조회 743
11개월 전 조회 694
11개월 전 조회 609
11개월 전 조회 725
11개월 전 조회 804
11개월 전 조회 722
11개월 전 조회 679
11개월 전 조회 1,222
11개월 전 조회 649
12개월 전 조회 1,188
12개월 전 조회 756
12개월 전 조회 618
12개월 전 조회 722