PDA

View Full Version : Show Thread Enhancements - Play FLV/MP4 Attachments!


Frosty
05-19-2011, 10:00 PM
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:

<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:
2322

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?attachmentid=2322&stc=1&d=1302358811

Part that you need is "2322"

Simply wrap it in:

2322

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


https://vborg.vbsupport.ru/external/2011/05/26.jpg (http://i.imgur.com/td0qU.png)

Enjoy! :)

8thos
05-21-2011, 01:13 AM
Installed!

8thos
05-21-2011, 01:14 AM
5 Stars

Mod of the Month

Krusty1231
05-21-2011, 08:44 AM
My mistake.

Works great - thanks.

I added a small graphic for the button to make adding the code easier for myself!

Frosty
05-21-2011, 09:27 AM
@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.

8thos
05-21-2011, 01:13 PM
Does it play .3gp videos?

TEMPESTADE
05-21-2011, 01:35 PM
many tanks bro work goooooooooood

COL NIL SATIS
05-21-2011, 01:46 PM
Going to install this now tup1

preemz10314
05-21-2011, 07:19 PM
So will it work for all video files? I know jwplayer plays alot of stuff... this is interesting..

Frosty
05-22-2011, 05:56 AM
@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.

CRDeveloper
05-22-2011, 09:09 PM
lol i've seen that video before, very good hahaha

https://vborg.vbsupport.ru/external/2011/05/26.jpg

zorcocuq
07-07-2011, 12:05 PM
thank you

Taurus1
07-14-2011, 01:41 PM
I tried it, but it does not work for me. I just keep getting the "Something went wrong, video can"t load. Refresh the page" error.

Please help.

Frosty
07-15-2011, 09:37 AM
@Taurus
Can you please post your settings here?

If you've uploaded all files, and if you've changed the path to your url in the configuration, there should be absolutely no problem.

Taurus1
07-15-2011, 12:20 PM
@Taurus
Can you please post your settings here?

If you've uploaded all files, and if you've changed the path to your url in the configuration, there should be absolutely no problem.

I sent you a PM of my bbcode settings. Thanks for looking into it for me.

preemz10314
07-31-2011, 12:02 AM
I get an attachment to big error trying to upload a 10mb file. I edited my max_upload and max_post size limits in WHM still get a to big error? am i missing something?

Frosty
08-01-2011, 07:05 PM
Have you increased the attachment size in the Attachment Manager? It's located in the Control Panel of your forum.

andyv72
08-03-2011, 02:40 AM
VB 4.1.5. not work

Der folgende HTML-Code ist nicht korrekt formatiert. Alle Attribute sollten in Anf?hrungszeichen gesetzt sein.

The following HTML-code is not formatted correctly. All attributes should be enclosed in quotes.

<script type="text/javascript" src="http://www.domain.de/player/swfobject.js"></script> <div id="player_{param}" align="center">Something went wrong, video can"t load. Refresh the page.</div> <script type="text/javascript"> var so = new SWFObject("http://www.domain.de/player/player.swf","jsplayer_{param}","720","480","6","#000000"); so.addParam("allowfullscreen","true"); so.addParam("allowscriptaccess","always"); so.addParam("wmode","opaque"); so.addVariable("file","http://www.domain.de/attachment.php?attachmentid={param}"); so.addVariable("width","720"); so.addVariable("height","480"); so.addVariable("javascriptid","jsplayer_{param}"); so.addVariable("enablejs","true"); so.addVariable("type","video"); so.addParam("allownetworking","all"); so.addVariable("controlbar","bottom"); so.addVariable("showdigits","true"); so.addVariable("showstop","true"); so.addVariable("stretching","uniform"); so.addVariable("smoothing","true"); so.addVariable("autostart","false"); so.write("player_{param}"); </script>

maherl
09-04-2011, 11:13 AM
I get an attachment to big error trying to upload a 10mb file. I edited my max_upload and max_post size limits in WHM still get a to big error? am i missing something?

Hi Frosty, I am also receiving errors when trying to upload MP4 files larger than 10Mb. I have set the size of attachments in Attachment Manager as mentioned, but I am unfamiliar with WHM - what is this?

Are there any other settings that also need to be adjusted to get this working above 10Mb?

If I need to change max_upload and max_post size parameters also, could you explain how this is achieved?

Thanks in advance.

10 Gauge
10-04-2011, 05:36 PM
This is not working for me, I just got "Loading the player..." and the player never loads.

vBarsiv
02-12-2013, 02:44 AM
Thanks you. Good hack ;)

Netjummer
02-22-2013, 05:32 PM
hello i get this

Loading the player...

Version 4.1.10

keyla31
05-22-2013, 04:07 PM
same thing says loading player and thats it :(

benjaminbih
09-18-2013, 03:34 PM
same thing here,

does anobody had a solution for ,,Loading player"

meaters
10-16-2013, 03:33 PM
Same here I am stuck with "Loading player"