PDA

View Full Version : Show Thread Enhancements - Playing Attached Media Files Inline


eXtremeTim
09-15-2006, 10:00 PM
What this hack does::

This hack allows your users to upload media files via your board file management and play the media fields within their post.. It is adivisable to have one inline per post.


Foreword:

This hack might not work on all system due to different configuration, platform, and such. I will try to help you all as much as I can.

This hack will use your board attachment system to run mp3, wma, wmv, flash files. It is a bit server intensive. So be warned

Security Risk:

It has been known that flash files can be used to exploit and compromise certain securities on user computer. You might want to verify your flash attachment before enable flash playing inline on your forum.

Files To edit: 0
Queries to run: 0
Uses Product: Yes
Template Edits: 1


Open postbit_attachment and add to very top


<tr>
<td width=450 colspan="2">

<if condition="$show[realattachment]">
<fieldset class="fieldset">
<legend>$vbphrase[attach_real] $realfilename</legend>

<div style="padding:$stylevar[formspacer]px">
$post[realattachments]
</div>
</fieldset>

</if>


<if condition="$show[movattachment]">
<fieldset class="fieldset">
<legend>$vbphrase[attach_mov] $movfilename</legend>

<div style="padding:$stylevar[formspacer]px">
$post[movattachments]
</div>
</fieldset>

</if>

<if condition="$show[flashattachment]">
<fieldset class="fieldset">
<legend>$vbphrase[attached_flash] $flashfilename </legend>

<div style="padding:$stylevar[formspacer]px">
$post[flashattachments]
</div>
</fieldset>

</if>

<if condition="$show[pdfattachment]">
<fieldset class="fieldset">
<legend>$vbphrase[attach_pdf] $pdffilename</legend>

<div style="padding:$stylevar[formspacer]px">
$post[pdfattachments]
</div>
</fieldset>

</if>

<if condition="$show[aviattachment]">
<fieldset class="fieldset">
<legend>$vbphrase[attach_avi] $avifilename</legend>

<div style="padding:$stylevar[formspacer]px">
$post[aviattachments]
</div>
</fieldset>

</if>

<if condition="$show[mpgattachment]">
<fieldset class="fieldset">
<legend>$vbphrase[attach_pdf] $mpgfilename</legend>

<div style="padding:$stylevar[formspacer]px">
$post[mpgattachments]
</div>
</fieldset>

</if>
<if condition="$show[mpegattachment]">
<fieldset class="fieldset">
<legend>$vbphrase[attach_pdf] $mepgfilename</legend>

<div style="padding:$stylevar[formspacer]px">
$post[mepgattachments]
</div>
</fieldset>

</if>



<if condition="$show[wmaattachment]">
<fieldset class="fieldset">
<legend>$vbphrase[attach_wma] $wmafilename</legend>

<div style="padding:$stylevar[formspacer]px">
$post[wmaattachments]
</div>
</fieldset>

</if>

<if condition="$show[wmvattachment]">
<fieldset class="fieldset">
<legend>$vbphrase[attach_wmv] $wmvfilename</legend>

<div style="padding:$stylevar[formspacer]px">
$post[wmvattachments]



</div>
</fieldset>

</if>

<if condition="$show[mp3attachment]">
<fieldset class="fieldset">
<legend>

$vbphrase[attach_mp3] $mp3filename</legend>

<div style="padding:$stylevar[formspacer]px">
$post[mp3attachments]

</div>
</fieldset>

</if>


</td>
</tr>


Demo:
https://vborg.vbsupport.ru/attachment.php?attachmentid=24797
https://vborg.vbsupport.ru/attachment.php?attachmentid=24798
https://vborg.vbsupport.ru/attachment.php?attachmentid=24799
https://vborg.vbsupport.ru/attachment.php?attachmentid=24800


Attachment Content Types:

WMA ? Content-type: audio/x-ms-wma
WMV ? Content-type: video/x-ms-wmv
MP3 ? Content-type: audio/x-mp3
SWF ? Content-type: application/x-shockwave-flash
AVI ? Content-type: video/x-ms-avi
MOV ? Content-type: video/quicktime
MP4 ? Content-type: video/quicktime
MPEG ? Content-type: video/mpeg
MPG ? Content-type: video/mpeg
RAM ? Content-type: audio/x-pn-realaudio
RM ? Content-type: audio/x-pn-realaudio
SWC ? Content-type: application/x-shockwave-flash




NOTE: This hack use your board attachment.php to play those specified media files. Therefore, you will have to set up user right to download attachement in under forum permissions.

Playing inline attachments under firefox has proven to be problemsome since I noticed firefox does not pass the cookie info in for the inline video playing. So if you want attachments to play inline in firefox you must set it so that guests can view attachements. (I am currently looking for fixes to this if possible)


This is a clean up and rerelease of this hack: https://vborg.vbsupport.ru/showthread.php?t=99871

If you have that hack installed just install the product file and you will be good. If you have her one before that then follow her template reverses from that thread.

I tried to contact the author but they havent been on the site in well over a month. Pms and emails were unresponded to. I will remove this hack if the hack author requests.


Whats fixed:

Fixed the problem with attachments being shown multiple times when more then one of the same file type was uploaded in a single post.
Cached all the templates used by this hack.

Barakat
09-16-2006, 10:40 AM
yesterday i install Moya hack ... anyway i will install this instead ..

Gizmo5h1t3
09-16-2006, 11:14 AM
adapted this for meself for 3.5...and it works fine.

thanks.

Snake
09-16-2006, 11:24 AM
Yeah works fine on 3.6. Thanks!

eXtremeTim
09-16-2006, 05:42 PM
Please click install.

Die2Night
09-16-2006, 11:37 PM
Is there anyway to change the video play back size so that its bigger?

Living in music
09-16-2006, 11:41 PM
I'd like it ! Thanks to poster.

eXtremeTim, r u Moya ? :D

eXtremeTim
09-17-2006, 05:35 AM
No i stated in earlier i could not get in touch with moya and was releasing for now at least so people could benifit from a fully working version.

cunder
09-19-2006, 07:14 AM
play inline in firefox you must set it so that guests can view attachements. (I am currently looking for fixes to this if possible)

I hope that you find it fast:)

paldo
09-19-2006, 05:53 PM
nice thank you :) installed

cunder
09-27-2006, 11:00 AM
play inline in firefox you must set it so that guests can view attachements. (I am currently looking for fixes to this if possible)

I hope that you find it fast:)

[Bumb]:confused:

InTeNsE-HuMoR
09-27-2006, 05:13 PM
Hi, Can someone tell me where I might find the "postbit_attachment" file? I can't find it anywhere in my vb directory. Also, does this mod work with 3.6.1? Thanks.

scan-pa
09-28-2006, 03:25 AM
Hi, Can someone tell me where I might find the "postbit_attachment" file? I can't find it anywhere in my vb directory. Also, does this mod work with 3.6.1? Thanks.

"postbit_attachment" is a template not a file, access your adminCP and click on the Styles and Templates menu.

InTeNsE-HuMoR
09-28-2006, 05:12 AM
"postbit_attachment" is a template not a file, access your adminCP and click on the Styles and Templates menu.

Ok, thank-you for your help! :)

iran.gs
09-29-2006, 06:41 PM
Installed and added the codes how ever i tried to use it i dont see those extra obtions what am i doing wrong ?

curriertech
09-30-2006, 02:09 PM
This caused pretty big issues with pdf attachments also displaying inline on my forum. Any idea why? I didn't change anything from the default install.

scan-pa
10-01-2006, 03:23 AM
Installed and added the codes how ever i tried to use it i dont see those extra obtions what am i doing wrong ?

You still need to add the new types of attachments to the Attachments manager in the adminCP area.

Log into your adminCP area, scroll doen the left navbar and expand the Attachments menu, you should then see the following:

Attachment Manager
Attachment Permissions
Search
Moderate Attachments
Attachment Statistics
Attachment Storage Type


Click on Attachment Manager

At the bottom of this Click on Add New Extention.

next you need to add the following one at a time with whatever size upload you wish to allow.

New Attachment Content Types:

WMA
WMV
MP3
SWF
AVI
MOV
MP4
MPEG
MPG
RAM
RM
SWC

Hope that helps.

scan-pa
10-01-2006, 03:26 AM
This caused pretty big issues with pdf attachments also displaying inline on my forum. Any idea why? I didn't change anything from the default install.

Go into Attachment Manager and click edit on the PDF line. Change open in new browser to YES.

InTeNsE-HuMoR
10-01-2006, 10:45 AM
Is there any way to control what size the attachments are? Like if I upload a flash game in swf file format at 640x640 it comes out smaller when added to the post?

curriertech
10-01-2006, 01:18 PM
Go into Attachment Manager and click edit on the PDF line. Change open in new browser to YES.
It still shows the whole document inline.

iran.gs
10-02-2006, 08:56 PM
You still need to add the new types of attachments to the Attachments manager in the adminCP area.

Log into your adminCP area, scroll doen the left navbar and expand the Attachments menu, you should then see the following:

Attachment Manager
Attachment Permissions
Search
Moderate Attachments
Attachment Statistics
Attachment Storage Type


Click on Attachment Manager

At the bottom of this Click on Add New Extention.

next you need to add the following one at a time with whatever size upload you wish to allow.

New Attachment Content Types:

WMA
WMV
MP3
SWF
AVI
MOV
MP4
MPEG
MPG
RAM
RM
SWC

Hope that helps.


Excelent job thanks buddy for the info it works now :rolleyes:

smoknz28
10-02-2006, 09:02 PM
Is there a hack out there that will enable users to link online video files (stored on another server) to their posts and enable others to play them within the post?

I'm running vB 3.6.1

Thanks,
Mark

GraphicPlanet
10-03-2006, 10:31 AM
i installed allready
But i dont know how is working and how i have to actvie
plz somebody help me

AMD_Warrior
10-08-2006, 01:28 AM
I need help..


http://djze.com/test-2-t30.html?p=72#post72

look it keeps loading but never plays...WHY?

ninjamaster
10-08-2006, 10:11 AM
thanks for this 1 :)

AMD_Warrior
10-08-2006, 04:38 PM
Tim this is still nto wroking for me

i cant play mp3 files

http://djze.com/showthread.php/mp3_test-41/index.html?p=100#post100

scan-pa
10-08-2006, 06:11 PM
Tim this is still nto wroking for me

i cant play mp3 files

http://djze.com/showthread.php/mp3_test-41/index.html?p=100#post100

That link works. The song played for me.

after the site loads, give it a few seconds then click the play button..

cunder
10-09-2006, 09:29 AM
is this problem already has been solved or not:surprised:

So if you want attachments to play inline in firefox you must set it so that guests can view attachements. (I am currently looking for fixes to this if possible)

Greek76
10-10-2006, 10:52 PM
This mod works as is?
Do I need to add a media player to my forum?
Also is it possible to let only certain users upload media files?
Is it possible to post a link in a specific forum and let those users who wish to listen be able to listen to it if its obviously operating?

Thanks

basskiller
10-15-2006, 02:49 AM
I keep getting "Upload of file failed. "

installed : product media inline v1.1.xml
Modified Posbit attachment template

added mp3 extensiion
upped the file size to mp3 - 14.35 MB
The file I tried to upload is only 6mb

anyone have a clue?? LOL

after doing a little investigating I found this PHP Maximum Upload Size 2.00 MB on my main admincp
I believe this is where my problem lies
anyone know how to change this?

eXtremeTim
10-17-2006, 12:40 PM
The php maximum upload size is controlled in your php.ini so your server admin or host will have to update it for you.

Salvar
10-18-2006, 10:16 PM
Well I get an MSQL database error and I can not see what there my browser is also crashing.

Can it be that my MSQL packet is too small?

1.00 MB packet size?

IT Dept
10-27-2006, 03:17 AM
I've inserted your code in
postbit_attachment, added new extensions in Attachments Manager, increase Max Filesize but I still can't upload file in Manage Attachments.

Can you tell me how to solve this error?

Thanks in advanced.

eXtremeTim
10-27-2006, 03:28 AM
I wouldnt recommend using mysql storage for attachments esp when using this hack since this hack has a tendancy to deal with larger attachments, also everybody you also need to factor in your php max upload size becuase no matter what vb is set at if the php max upload size is less then the size of your file your file wont be uploaded.

IT Dept
10-27-2006, 05:33 AM
PHP Max Post Size : 8.00 MB
PHP Maximum Upload Size : 2.00 MB
My MP3 file : 4.00 MB
Max Filesize for this extension: 20.00 MB

I still can not upload, plz help me!

iran.gs
10-27-2006, 01:25 PM
Installed how ever if u can supply bottons for them would be great and also my attachment now is so wide, when pops up for uploads

iran.gs
10-27-2006, 01:26 PM
yes me too large size i get error but small file works fine

PossumX
12-02-2006, 08:50 PM
I got this hack to install and work for uploads, however, when I attempt to play the inline WMV file, nothing happens. The Media Player is displayed, with controls, yet when play is hit....nothing.

Any ideas?

It is also fouling up the post display (signature outside of the postbit)

Clicked UNINSTALL .... never mind

khaleegi
01-09-2007, 05:24 PM
Hello

Thanks for this mod, i was looking for such on.
I did the installation easily, but the real player files not played

Any suggestions?

Regards

cfspinner
01-09-2007, 09:49 PM
Installed and clicked install. Works perfect so far :) It would be nice if it could be turned on or off based on the forum or if the user had the ability to choose if they want to display inline or as attachment.

cfspinner
01-09-2007, 10:00 PM
Ooo...one more thing...can it be modded to autostart media files?

cfspinner
01-12-2007, 10:42 PM
Getting complaints that file won't play. You say have to grant view attachment permissions to guests...I don't see where.

cfspinner
01-13-2007, 11:11 AM
Finding that if the media file is cached on my computer, it plays fine. I delete my cache, and the media file will not play. Download the file and play it to get it cached, then go back to the site and hit play and it plays fine. Something is definitely wrong. Also if you happen to scroll while the media file is playing, the video doesn't scroll with the player, it stays in its original position for a second, then moves back into the player.

Moya
01-19-2007, 01:15 AM
I'd like it ! Thanks to poster.

eXtremeTim, r u Moya ? :D
:D:D:D:D

Extrem Tim

It is OK with me. Thanks for converting this hack to new system. I was out of the country on a business trip :):)

blazingpc
01-20-2007, 02:06 PM
I'm really liking this idea\hack but have just 1 question before install.
I see no screens of the AdminCP layout and want to know if this can be set up in just 1 specific forum?, instead of accross the board.
The reason being I'm wanting to create a "video how to" section for my users to post vids in.

khaleegi
01-21-2007, 12:17 PM
I'm really liking this idea\hack but have just 1 question before install.
I see no screens of the AdminCP layout and want to know if this can be set up in just 1 specific forum?, instead of accross the board.
The reason being I'm wanting to create a "video how to" section for my users to post vids in.

Hello

No there is no CP for this Mod

marcsmith73
02-06-2007, 01:45 PM
reserved

citroenar
02-08-2007, 01:58 PM
It still shows the whole document inline.


I have to remove this from postbit_attachment:

<if condition="$show[pdfattachment]">
<fieldset class="fieldset">
<legend>$vbphrase[attach_pdf] $pdffilename</legend>

<div style="padding:$stylevar[formspacer]px">
$post[pdfattachments]
</div>
</fieldset>

</if>

junaid
02-12-2007, 04:59 AM
I have installed and work pefect,
But I want add video downlaoded % always to show in player
I am running 3.6.4
Demo : http://www.mvdig.com/forum.php (need to register to view attachement)

Ntfu2
02-12-2007, 01:45 PM
I've fixed so one template so they play in firefox just fine.

replace the postbit_attachmentwmv with this one if your having problems :)


<br>
<center>
<table border="0" align="center" width="400" cellspacing="0" cellpadding="0" height="350">
<tr>
<td class="thead" width="100%" height="25">
<center>
<font color="#FFFFFF">
WMV Attachment
</font>
</center>
</td>
</tr>
<tr><td>
<OBJECT id='mediaPlayer' width="400" height="300"
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
<param name='fileName' value="$wmvfilenameandlocation">
<param name='animationatStart' value='true'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value="false">
<param name='showControls' value="true">
<param name='loop' value="false">
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
bgcolor='darkblue' showcontrols="true" showtracker='-1'
showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285"
src="$wmvfilenameandlocation" autostart="false" designtimesp='5311' loop="false">
</EMBED>
</OBJECT>
</td></tr>
<!-- ...end embedded WindowsMedia file -->
<!-- begin link to launch external media player... -->
<tr><td align='center'>
<a href="$wmvfilenameandlocation" style='font-size: 85%;' target='_blank'>Click Here To Download this Movie</a>
<!-- ...end link to launch external media player... -->
</td></tr>
<tr>
<td class="thead" width="100%" height="25">
<center>
<font color="#6600FF">
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a> ($attachment[filesize], <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase>)
</font>
</center>
</td>
</tr>

</table>
</center>
<br>

jahshaka
04-11-2007, 09:33 AM
this is awesome, works for me however i would like it to play the files in a pop-up window vs incline - how hard would this be to do?

so basically if they click on the video attachment, it would pop up your player in its own page...

eXtremeTim
04-15-2007, 03:43 AM
Thanks for this fix. I will test it out and see about updating the hack. Including a few new features. ;)

MissKalunji
04-19-2007, 06:48 PM
I've fixed so one template so they play in firefox just fine.

replace the postbit_attachmentwmv with this one if your having problems :)


<br>
<center>
<table border="0" align="center" width="400" cellspacing="0" cellpadding="0" height="350">
<tr>
<td class="thead" width="100%" height="25">
<center>
<font color="#FFFFFF">
WMV Attachment
</font>
</center>
</td>
</tr>
<tr><td>
<OBJECT id='mediaPlayer' width="400" height="300"
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
<param name='fileName' value="$wmvfilenameandlocation">
<param name='animationatStart' value='true'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value="false">
<param name='showControls' value="true">
<param name='loop' value="false">
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
bgcolor='darkblue' showcontrols="true" showtracker='-1'
showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285"
src="$wmvfilenameandlocation" autostart="false" designtimesp='5311' loop="false">
</EMBED>
</OBJECT>
</td></tr>
<!-- ...end embedded WindowsMedia file -->
<!-- begin link to launch external media player... -->
<tr><td align='center'>
<a href="$wmvfilenameandlocation" style='font-size: 85%;' target='_blank'>Click Here To Download this Movie</a>
<!-- ...end link to launch external media player... -->
</td></tr>
<tr>
<td class="thead" width="100%" height="25">
<center>
<font color="#6600FF">
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a> ($attachment[filesize], <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase>)
</font>
</center>
</td>
</tr>

</table>
</center>
<br>



Nop that didn't work

eXtremeTim
04-20-2007, 04:00 AM
Im currently researching on this problem to see whats going on so we can get it fixed. :)

MissKalunji
04-20-2007, 01:15 PM
Oh ok my bad :) Cool

odie3
04-21-2007, 03:39 PM
Nice, installed. Any chance on graphics for the new Mime Types?

eXtremeTim
04-23-2007, 09:29 AM
I have graphics somewhere that I was using on my site let me see if I can find them and ill post them for you. :)

odie3
04-23-2007, 01:38 PM
cool, thanks!

TopKing
04-24-2007, 10:54 AM
Its a cook hack :)

What about playing .3gp files.... (mobiles video Files)
can it be integrated with this hack???

snoop1979
04-30-2007, 08:31 PM
works perfect thanks, and very simple i love that

snoop1979
05-01-2007, 09:35 PM
ok now i have one little problem, sometimes says loading, then ready, but won't play, but in other computer does play, the file can be downloaded fine, this is weird cuz some files (a few) play fine for me but not for a friend in another location, what can i do?

Lahoria
05-17-2007, 07:34 PM
any one got small icon for these media files ?

Lahoria
05-17-2007, 09:53 PM
when I try to upload files fize about 3 mg , I get error, !!!!!!!!! I have edited filesize allowed to 20 mb ... any help ?

error :

Internet Explorer cannot display the webpage

Most likely causes:
You are not connected to the Internet.
The website is encountering problems.
There might be a typing error in the address.

What you can try:
Diagnose Connection Problems

More information

eXtremeTim
05-17-2007, 10:21 PM
That wouldnt have anything to do with this hack that would more then likely be a problem with your server configuration.

E.Blackadder
05-19-2007, 09:46 AM
any chance of adding .flv files to the supported list?

cheers

eXtremeTim
05-19-2007, 06:31 PM
Anybody got an flv player thats free that I can include with this hack?

E.Blackadder
05-19-2007, 10:57 PM
yep...

here:
http://dw.com.com/redir?pid=10505954&merid=6277687&mfgid=6277687&ltype=dl_dlnow&lop=link&edId=3&siteId=4&oId=3040-2139_4-10505954&ontId=2139_4&destUrl=http://www.download.com%2F3001-2139_4-10505954.html

here:
http://www.jeroenwijering.com/upload/flash_flv_player.zip

here:
http://www.videolan.org/mirror.php?file=vlc/0.8.6b/win32/vlc-0.8.6b-win32.exe


The last one seems more proffesional...

but there again.. what do i know...lol


thanks for helping..

csavern
06-06-2007, 10:44 PM
now when i go to attach file i get a big long list of little boxes with red a red x in them and says undefined
could someone tell me how to fix this problem

csavern
06-07-2007, 10:23 AM
and i am running 3.6.7 PL1
if someone could tell me how to uninstall and put it back to the way it use to be i would be thankful
if cant find a way to fix it
to take a look at it you can go here
www.rotormadness.com

csavern
06-28-2007, 01:53 AM
Bump

csavern
06-28-2007, 04:33 PM
Or Could someone tell me what template to revert to get all them cats of defined off there
Defined is located under the paper clip it got a drop down menu and about defined there about 50 times

m1thr0s
07-03-2007, 02:05 PM
I notice that flash (swf) files don't display properly if you choose the browser to play them. I am guessing that this is because the browser has no way to set the html parameters for the swf file so they come out full screen in a new window and just generally look awful.

is the solution to this to find a stand-alone swf file player?

jGas
07-20-2007, 06:46 PM
sorry but...i can't make it works with firefox!

from usergroups i select unregistred and make that they can download attachments..and still don't works!

than i edit the forums permissions of the unregistred..and it still doesn't works!

can you help me? thanks!


EDIT: now it works! :D

Aeolian
07-29-2007, 12:51 PM
Is it possible to keep the mod ON only for a specific forum?

Thanks

jGas
08-02-2007, 06:13 PM
for me it works but for a lot of users of my forum it doesn't...why?

is there nobody that can help me?

thanks.

snoop1979
08-03-2007, 05:29 PM
we need and update for this exelent hack, need firefox and other browsers fix

royal666
08-13-2007, 05:51 PM
Thanks for this excellent hack, but is there any update a working version of it, please would be appreciated..:)