Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Facebook Videos updated BBCODE Details »»
Facebook Videos updated BBCODE
Version: 1.00, by naveeid naveeid is offline
Developer Last Online: Apr 2019 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.x.x Rating:
Released: 05-29-2015 Last Update: Never Installs: 16
Template Edits
Translations  
No support by the author.



This mod will update the old cold of vbulletin mod to the latest code released until 1st june 2015 by facebook administration.

This mod will perform 2 major operations
1) update the old video codes posted through video button on vbulleten4 WYSWYG editor
2) we will create a new bbcode for facebook videos. e.g. [fb] Video id [/fb]

1) First of all make it sure that your facebook Platform is enabled for your forum.
Admin CP -> Settings -> Options -> Facebook options -> enable facebook platform
you need to create an application for your website on facebook , and configure all the settings. its easy , just search how to do it.

2) Go to style manager , edit templates -> BBCODE layout templates -> bbcode_video

Code:
Select FROM THIS LINE
<vb:elseif condition="$provider == 'facebook'" />
UNTIL THIS LINE
</vb:if>
 and replace these lines with this code 
<div class="fb-video" data-href="https://www.facebook.com/video.php?v={vb:raw code}" 
  data-width="500" data-allowfullscreen="true"></div>
<br><br><br><br>
<div class="fb-like" data-href="https://www.facebook.com/nidokidos1" data-layout="standard" data-action="like" data-show-faces="true" data-share="false"></div>
Now untill here we have updated the code of all the existing facebook videos on the forun
and now we will make a new BBCode for facebook videos

3) Go to admincp -> Custom BB code -> add a new BBCODE
Title :- Facebook videos
BB Code Tag Name :- fb

replacement :-
Code:
<div class="fb-video" data-href="https://www.facebook.com/video.php?v={param}" 
  data-width="500" data-allowfullscreen="true"></div>
<br><br><br><br>
<div class="fb-like" data-href="https://www.facebook.com/nidokidos1" data-layout="standard" data-action="like" data-show-faces="true" data-share="false"></div>
Example :- [fb]1411628811495[/fb]
description :- give video id between [fb] tags

Use option :- NO
Disable BB Code Within This BB Code :- Yes
Disable Smilies Within This BB Code :- Yes
Disable Word Wrapping Within This BB Code :- Yes
Disable Automatic Link Parsing Within This BB Code :- NO

Now save that BB code
and you have done it.
Note:- Please replace https://www.facebook.com/nidokidos1 with your website official page on facebook if you have any.

Thanks.

Demo Page
http://www.nidokidos.org/threads/232632
screen shots are attached

Screenshots

File Type: jpg 1.JPG (40.4 KB, 0 views)
File Type: jpg 2.JPG (33.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
mapleleaffans, RichieBoy67

Comments
  #12  
Old 08-24-2015, 09:05 PM
akz645 akz645 is offline
 
Join Date: Jul 2015
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ximcix View Post
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
Reply With Quote
  #13  
Old 08-31-2015, 04:38 PM
mapleleaffans's Avatar
mapleleaffans mapleleaffans is offline
 
Join Date: Apr 2011
Location: Toronto, ON Canada
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed this and it works fantastic. Thank you naveeid for sharing this mod with us!
Reply With Quote
  #14  
Old 09-09-2015, 10:49 AM
Keyser Soze Keyser Soze is offline
 
Join Date: Apr 2005
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ximcix View Post
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.
Reply With Quote
  #15  
Old 09-09-2015, 05:13 PM
akz645 akz645 is offline
 
Join Date: Jul 2015
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Keyser Soze View Post
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:
Reply With Quote
  #16  
Old 09-10-2015, 08:16 AM
Keyser Soze Keyser Soze is offline
 
Join Date: Apr 2005
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #17  
Old 09-10-2015, 07:10 PM
akz645 akz645 is offline
 
Join Date: Jul 2015
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Keyser Soze View Post
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.
Reply With Quote
  #18  
Old 09-11-2015, 05:04 AM
Keyser Soze Keyser Soze is offline
 
Join Date: Apr 2005
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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\.\-\?\&\/]?)?)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:27 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10644 seconds
  • Memory Usage 2,318KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (5)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (8)post_thanks_box
  • (2)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (2)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete