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

Reply
 
Thread Tools
Play FLV/MP4 Attachments! Details »»
Play FLV/MP4 Attachments!
Version: 1.1, by Frosty Frosty is offline
Developer Last Online: Dec 2011 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.x.x Rating:
Released: 05-19-2011 Last Update: Never Installs: 18
Re-useable Code Additional Files Translations  
No support by the author.

First of all, you will need to create a new BB Code:

Login to your Administration Panel, find "Custom BB Codes" in the sidebar, click it. And click add new BB Code:

Title: attachvideo
BB Code Tag Name: attachvideo
Replacement:
HTML Code:
<script type="text/javascript" src="http://yoursite.com/flashplayer/jwplayer.js"></script>
<div id='mediaspace_{param}'>Loading the player...</div>
<script type='text/javascript'>
jwplayer('mediaspace_$attachment[attachmentid]').setup({
'flashplayer': 'http://yoursite.com/flashplayer/player.swf',
'file': 'http://yoursite.com/attachment.php?attachmentid={param}',
'controlbar': 'bottom',
'width': '720',
'height': '480',
'type': 'video',
'provider': 'video'
});
</script>
Replace "yoursite.com" with the domain of your site.

It will give you this message:
"The following BB Code replacement may not be properly formed. All HTML attributes should be enclosed within double quotes. "

Click "Continue", since the BB Code will work without any problems...

Example:
[attachvideo]2322[/attachvideo]

Description:
With this BB Code you will be able to embed multiple videos that are uploaded as attachments.

Use {option}: No.

Remove Tag If Empty: Yes.

Disable BB Code Within This BB Code: Yes.
Disable Smilies Within This BB Code: Yes.


Save it...

Now, how to take out the attachment ID from the link?

Let's say that you uploaded some .flv file, when you hover over it, you'll see something similar to this:
http://yourdomain.com/attachment.php...1&d=1302358811

Part that you need is "2322"

Simply wrap it in:

[attachvideo]2322[/attachvideo]

You need JW Player for this, download it here:

http://www.longtailvideo.com/players/jw-flv-player/

Create a new folder in your public_html called "flashplayer", upload these files in it:
- jwplayer.js
- player.swf
- swfobject.js
- yt.swf




Enjoy!

Download Now

File Type: zip player.zip (284.4 KB, 277 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-21-2011, 01:13 AM
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Location: Pensacola, FL
Posts: 772
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed!
Reply With Quote
  #3  
Old 05-21-2011, 01:14 AM
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Location: Pensacola, FL
Posts: 772
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

5 Stars

Mod of the Month
Reply With Quote
  #4  
Old 05-21-2011, 08:44 AM
Krusty1231's Avatar
Krusty1231 Krusty1231 is offline
 
Join Date: Jul 2010
Location: Canada
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My mistake.

Works great - thanks.

I added a small graphic for the button to make adding the code easier for myself!
Reply With Quote
  #5  
Old 05-21-2011, 09:27 AM
Frosty Frosty is offline
 
Join Date: Apr 2011
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Octavius & Krusty
I'm glad you guys like it!

Adding the BB Code in the Editor is certainly a good option if you're using the vBulletin's Attachment system a lot.

If anyone needs help with getting it running on your forum, or modifying it feel free to reply here or to PM me.
Reply With Quote
  #6  
Old 05-21-2011, 01:13 PM
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Location: Pensacola, FL
Posts: 772
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does it play .3gp videos?
Reply With Quote
  #7  
Old 05-21-2011, 01:35 PM
TEMPESTADE TEMPESTADE is offline
 
Join Date: Dec 2010
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

many tanks bro work goooooooooood
Reply With Quote
  #8  
Old 05-21-2011, 01:46 PM
COL NIL SATIS COL NIL SATIS is offline
 
Join Date: Aug 2009
Location: Liverpool UK
Posts: 802
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Going to install this now tup1
Reply With Quote
  #9  
Old 05-21-2011, 07:19 PM
preemz10314 preemz10314 is offline
 
Join Date: Oct 2010
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So will it work for all video files? I know jwplayer plays alot of stuff... this is interesting..
Reply With Quote
  #10  
Old 05-22-2011, 05:56 AM
Frosty Frosty is offline
 
Join Date: Apr 2011
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@preemz10314
Video Formats: H.264 (.mp4, .mov, .f4v), FLV (.flv), 3GPP (.3gp, .3g2)

It can play all those formats, you just need them enabled in your Attachments option, to be recognized by the vBulletin's Attachment System.
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 06:35 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.10166 seconds
  • Memory Usage 2,304KB
  • 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
  • (1)bbcode_html
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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