vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Facebook Videos updated BBCODE (https://vborg.vbsupport.ru/showthread.php?t=318877)

akz645 08-24-2015 09:05 PM

Quote:

Originally Posted by ximcix (Post 2553511)
Hello guys.
I have a problem here. I tried the above mod and it did not work for me.

You're doing it incorrectly. Please follow all the steps. This allows facebook to work in a BB code, it does not fix vbulletins built in video BB code for facebook.
If you're unsure about the original post, please look at my post here for further clarification -> Click this.

On the BB code, you only need to insert the ID, you do not insert anything else.

For example:
Code:

http://i.imgur.com/2j9USMi.png
->
Code:

http://i.imgur.com/ud8gggN.png
[fb]883585621689227[/fb]
The full video link is:
https://www.facebook.com/JustForFunT...83585621689227

mapleleaffans 08-31-2015 04:38 PM

Just installed this and it works fantastic. Thank you naveeid for sharing this mod with us! :)

Keyser Soze 09-09-2015 10:49 AM

Quote:

Originally Posted by ximcix (Post 2553511)
Hello guys.
I have a problem here. I tried the above mod and it did not work for me.

Facebook now shows video url with the person's (or page's) vanity url in the string:
https://www.facebook.com/JustForFunTvVideos/videos/883585621689227

I'm also interested in how vbulletin's internal video parser can be fixed so it will detect Facebook's new video-url-structure. If anyone could tell me where in the code for this is located in the vbulletin software, I can try to fix it. But I don't know where it is located.

akz645 09-09-2015 05:13 PM

Quote:

Originally Posted by Keyser Soze (Post 2554640)
I'm also interested in how vbulletin's internal video parser can be fixed so it will detect Facebook's new video-url-structure. If anyone could tell me where in the code for this is located in the vbulletin software, I can try to fix it. But I don't know where it is located.

https://vborg.vbsupport.ru/showthrea...=283594&page=3
That's where I discuss it with BOP5 (moderator on this website).

It is located here:
AdminCP -> Styles & Templates -> Search in Template: bbcode_video -> bbcode_video (edit)

The bottom vb if condition is for facebook.

You can also edit a file from your FTP.
/includes/xml/bbcode_video_vbulletin.xml file
-> http://tracker.vbulletin.com/browse/VBIV-15670

However the fix BOP5 provided no longer works.

Good luck :up:

Keyser Soze 09-10-2015 08:16 AM

Thanks, I was able to fix it by extending the regular expression in the file bbcode_video_vbulletin.xml with
HTML Code:

https?:\/\/www\.facebook\.com\/(?:[0-9a-z\.\-_]+)\/videos\/([0-9]+)\/
After doing that, you will have to set your admincp to debug mode an click on "Rebuild -> Rebuild Video BB Codes" to import the changes from the xml file.

akz645 09-10-2015 07:10 PM

Quote:

Originally Posted by Keyser Soze (Post 2554720)
Thanks, I was able to fix it by extending the regular expression in the file bbcode_video_vbulletin.xml with
HTML Code:

https?:\/\/www\.facebook\.com\/(?:[0-9a-z\.\-_]+)\/videos\/([0-9]+)\/

Could you be a little more specific please?

I changed this:
HTML Code:

https?:\/\/www\.facebook\.com\/(?:video\/video|photo)\.php\?v=([0-9]+)
To:
HTML Code:

https?:\/\/www\.facebook\.com\/(?:[0-9a-z\.\-_]+)\/videos\/([0-9]+)\/
I'm assuming I did this incorrectly. But I don't know where I should add that code inside the xml file...

From my template, I still kept it as this:
Code:

<vb:elseif condition="$provider == 'facebook'" />
<object class="restrain" type="application/x-shockwave-flash" width="576" height="432" data="//www.facebook.com/v/{vb:raw code}">
        <param name="movie" value="//www.facebook.com/v/{vb:raw code}" />
        <param name="wmode" value="{vb:raw wmode}" />
        <!--[if IE 6]>
        <embed width="576" height="432" type="application/x-shockwave-flash" src="//www.facebook.com/v/{vb:raw code}" />
        <![endif]--></object>
</vb:if>

--
I tried:
Code:

[video]https://www.facebook.com/WilliamSinge/videos/10153926357545620[/video]
But it didn't work.

Keyser Soze 09-11-2015 05:04 AM

Here's an improved version of my previous RegExp that should also work with video-URLs that don't have a trailing slash.
HTML Code:

https?:\/\/www\.facebook\.com\/(?:[0-9a-zA-Z\.\-_]+)\/videos\/([0-9]+)((?:\/[0-9a-z\.\-\?\&\/]?)?)


All times are GMT. The time now is 11:00 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01444 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (5)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete