SCLUB免費論壇申請-使用者論壇's Archiver

wnjun1 發表於 2018-3-13 21:37

請問如何直接貼上臉書影片網址就能夠顯示在論壇?

如題~

請問有沒有甚麼代碼
是可以直接貼上臉書影片網頁的完整網址
例如直接貼上:
[url]https://www.facebook.com/fodezhihui/videos/929499617230988/[/url]
就能夠直接在論壇顯示撥放臉書影片的呢?

因為目前有的代碼彷彿都是必須擷取後半段的數字

[url]http://www.sclub.com.tw/discuz/viewthread.php?tid=19274&extra=page%3D1[/url]

但現在大多數人都是使用手機瀏覽
如果還要人家擷取那些數字
好像太過複雜了

想說站在用戶的立場
是不是能夠簡單化呢?
直接將臉書的影片網頁網址
完整的貼上論壇
是否就能夠直接呈現至論壇呢?

不知道有沒有人開發這種代碼?
還請指教~
謝謝!

rosa1414 發表於 2018-3-14 01:17

使用FB外掛程式、自己慢慢研究吧!

[url]https://developers.facebook.com/docs/plugins/embedded-video-player[/url]

[attach]78706[/attach]

wnjun1 發表於 2018-3-14 10:16

[quote]使用FB外掛程式、自己慢慢研究吧!
[size=2][color=#999999]rosa1414 發表於 2018-3-14 01:17[/color] [url=http://www.sclub.com.tw/discuz/redirect.php?goto=findpost&pid=290373&ptid=34309][img]http://www.sclub.com.tw/discuz/images/common/back.gif[/img][/url][/size][/quote]


   自己試著研究了幾個鐘頭
不過還是都不成功

不知道rosa1414前輩是否能夠指導一下呢?
由衷感謝!

無名. 發表於 2018-3-14 19:42

这代码是从 besv.net 网站转来的,你试试看应该能用。[code]<iframe width="560" height="315" style="max-width:90%;" src="https://www.facebook.com/plugins/video.php" allowfullscreen id="fb_{1}"></iframe>
<script type="text/javascript">
document.getElementById("fb_{1}").src='https://www.facebook.com/plugins/video.php?href='+encodeURIComponent("{1}")+'&width=560&show_text=false&height=315';
</script>[/code]

wnjun1 發表於 2018-3-15 17:13

[quote]这代码是从 besv.net 网站转来的,你试试看应该能用。
[size=2][color=#999999]無名. 發表於 2018-3-14 19:42[/color] [url=http://www.sclub.com.tw/discuz/redirect.php?goto=findpost&pid=290386&ptid=34309][img]http://www.sclub.com.tw/discuz/images/common/back.gif[/img][/url][/size][/quote]


    實在是太感謝您了!
照著您所提供的代碼
果然成功了!!
感恩!!

只是不知道
YOUTUBE是否也能夠這樣子呢?
就是能夠貼上完整的影片連結網址
不用在擷取後半段的數字
而是將整個影片的完整網址全部貼上
就可以直接撥放了?
不知道是不是有辦法呢?

無名. 發表於 2018-3-15 18:33

[i=s] 本帖最後由 無名. 於 2018-3-15 18:35 編輯 [/i]

[b]回復 [url=http://www.sclub.com.tw/discuz/redirect.php?goto=findpost&pid=290414&ptid=34309]5#[/url] [i]wnjun1[/i] [/b]

这个是youtube的,也是转自 besv。net[code]<iframe width="560" height="315" style="max-width:90%;" src="https://www.youtube.com/embed/" frameborder="0" allowfullscreen id="yt_{1}"></iframe>
<script type="text/javascript">
var Youtube = "{1}";if(Youtube.search("youtu.be") > -1 ){var URL = Youtube.split("be/")[1].split("?")[0];}else if(Youtube.search("youtube.com") > -1 ){var URL = Youtube.split("v=")[1].split("&")[0];}else{var URL = Youtube;}document.getElementById("yt_{1}").src='https://www.youtube.com/embed/'+URL;
</script>[/code]

wnjun1 發表於 2018-3-15 18:43

[quote]回復  wnjun1

这个是youtube的,也是转自 besv。net
[size=2][color=#999999]無名. 發表於 2018-3-15 18:33[/color] [url=http://www.sclub.com.tw/discuz/redirect.php?goto=findpost&pid=290417&ptid=34309][img]http://www.sclub.com.tw/discuz/images/common/back.gif[/img][/url][/size][/quote]


  實在是太感謝您了!
無以回報!

只能真誠的感恩!
謝謝您!

csdf 發表於 2018-3-17 00:10

[i=s] 本帖最後由 csdf 於 2018-3-17 00:38 編輯 [/i]

诶 竟然會在這邊看到前一陣子我改的東西

要是以前的我 應該會丟這個 [url]http://lmgtfy.com/?q=discuz+facebook%E5%BD%B1%E7%89%87[/url]

其實Google以下關鍵字 "discuz facebook影片"

前幾個搜尋結果 這個自動修改方式就會出現了

(如果是自己架設的網站 改程式的方法比較不會有問題)

對了 由於sclub使用的discuz沒手機觸屏版本頁面 不須 style="max-width:90%;" 這段

lxqhlgg5566 發表於 2018-3-17 00:37

[i=s] 本帖最後由 lxqhlgg5566 於 2018-3-17 00:39 編輯 [/i]

看视频发布电影可以用我的网站用的几个播放器都可以的啊。有解析的,有MP4的,有m3u8播放器都可以啊[url]http://88dy.six168.com[/url]

sineede 發表於 2018-5-30 00:00

我誠過不成功......請問{1}和[1]是有分別的嗎?

csdf 發表於 2018-5-31 22:16

[i=s] 本帖最後由 csdf 於 2018-5-31 22:18 編輯 [/i]

[b]回復 [url=http://www.sclub.com.tw/discuz/redirect.php?goto=findpost&pid=291681&ptid=34309]10#[/url] [i]sineede[/i] [/b]


    那是有差別的喔
    [] 是產生函數用的
    {} 是Discuz!識別用的

Facebook代碼 來源
[url]https://besv.net/thread-1110-1-1.html[/url]

Youtube代碼 來源
[url]https://besv.net/thread-1481-1-1.html[/url]

sineede 發表於 2018-5-31 22:56

謝謝喔
[quote]回復  sineede


    那是有差別的喔
    [] 是產生函數用的
    {} 是Discuz!識別用的

Facebook代碼 來 ...
[size=2][color=#999999]csdf 發表於 2018-5-31 22:16[/color] [url=http://sclub.com.tw/discuz/redirect.php?goto=findpost&pid=291696&ptid=34309][img]http://sclub.com.tw/discuz/images/common/back.gif[/img][/url][/size][/quote]

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.