Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

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
  #2  
Old 05-30-2015, 10:23 AM
thenicehorizon thenicehorizon is offline
 
Join Date: Dec 2012
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great job
thank you very much
Reply With Quote
  #3  
Old 05-30-2015, 10:31 AM
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

welcome sir
Reply With Quote
  #4  
Old 05-30-2015, 02:20 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Suggestion: Duplicate this to fix You-Tube BB code so it recognizes https://
Reply With Quote
  #5  
Old 05-31-2015, 11:29 PM
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok sir i will try but right now youtube is not working in my country.
Reply With Quote
  #6  
Old 06-09-2015, 06:42 AM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Get this error:

The following BB Code replacement may not be properly formed. All HTML attributes should be enclosed within double quotes.
<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>
Reply With Quote
  #7  
Old 06-09-2015, 01:43 PM
concepts's Avatar
concepts concepts is offline
 
Join Date: May 2005
Location: Woodland Hills, Ca
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ignore it.... I did, code still works perfectly. Just choose continue
Reply With Quote
  #8  
Old 07-01-2015, 05:46 PM
edgeless edgeless is offline
 
Join Date: Mar 2013
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, ignore the warning and click 'continue'. The code works beautifully! Thank you kindly, naveeid
Reply With Quote
  #9  
Old 08-04-2015, 06:06 PM
akz645 akz645 is offline
 
Join Date: Jul 2015
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It worked

Here are some 'improvements'/ 'further help' for those who need it:
The bbcode_video template is located here:
Admin CP -> Styles & Templates -> Style Manger -> Edit templates -> BB Code Layout Templates (double click) -> bbcode_video (edit)

Quote:
Originally Posted by naveeid View Post
1) you need to create an application for your website on facebook , and configure all the settings. its easy , just search how to do it.
Link: https://www.vbulletin.com/docs/html/facebook_enable
Note: Skip the 'quick settings' once you select that you're using for a website (the WWW. circle)
Then you'll see:


Quote:
Originally Posted by naveeid View Post
Code:
Select FROM THIS LINE
<vb:elseif condition="$provider == 'facebook'" />
UNTIL THIS LINE
</vb:if>
You get an error if you remove the first and last line. Hence I didn't remove them.

In other words, I replaced 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>
With:
Code:
<vb:elseif condition="$provider == 'facebook'" />
<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></vb:if>
Oh & I didn't like the whole 'like' button below the facebook video + it was much lower down than the video.
Hence I removed things from the replacement code (when adding a new BB code):
Code:
<div class="fb-video" data-href="https://www.facebook.com/video.php?v={param}" data-width="500" data-allowfullscreen="true"></div>
Finally, I'd recommend switching your bbcode_video template (except for the FB edit you did above) to this:
https://vborg.vbsupport.ru/showthread.php?t=283594
Reply With Quote
  #10  
Old 08-24-2015, 05:09 AM
ximcix ximcix is offline
 
Join Date: Mar 2005
Location: NYC
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 tried embedding the URL above as
Code:
[video]https://www.facebook.com/JustForFunTvVideos/videos/883585621689227[/video]
and it just displayed the URL as a link.

Then I tried an excerpt from you code and used https://www.facebook.com/video.php?v=883585621689227
same result. But if I click the link, the video plays on facebook

after taking a break for a couple hours, I remembered that the old Facebook video URL format was actually https://www.facebook.com/video/video.php?v=
so I tried https://www.facebook.com/video/video.php?v=883585621689227 and it worked.

Now my issue is, if the average user wants to share a video on my forum, copies a url such as: https://www.facebook.com/JustForFunTvVideos/videos/883585621689227
they will just see the URL as a link on the page.


SUMMARY
All of the following links point to the same video and they all load on facebook.com, but only the one with "/video/video.php?v=" worked for me using the mod above:
https://www.facebook.com/JustForFunT...83585621689227
https://www.facebook.com/video.php?v=883585621689227
https://www.facebook.com/video/video...83585621689227
Reply With Quote
Reply

Thread Tools

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 11:09 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.04422 seconds
  • Memory Usage 2,321KB
  • Queries Executed 24 (?)
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
  • (7)bbcode_code
  • (2)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
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_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