PDA

View Full Version : Playing Flash and Media Files Inline


Moya
03-16-2005, 10:00 PM
Is it possible? Is there any security issue? I am thinking of releasing this hack, but I am not sure about the demands and security issue on this.

History:

Originally, I have window media files played directly (inline) in phpbb. When I moved to vb, I tried to seek help from vb.com to modify their attachment system without success. I understand that Vb's attachment system for security purpose. Therefore, I have to find other means to achieve what I want. I come up with this hack when my board is at its infancy stage. It probably still is infancy because, it is used as a test and fun board when I am at work :D.


Requirement:

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


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.

Enut with the blah blah ?? :D

Open your functions_showthread.php

Find


function construct_postbit($post, $maintemplatename = 'postbit', $alternate = '')
{


Add under


// flash attachment
global $flashid,$flashfilename,$flashextension,$flashfile nameandlocation,$flashfilesize;

// wma attachment
global $wmaid,$wmafilename,$wmaextension,$wmafilenameandl ocation,$wmafilesize;
// wmv attachment
global $wmvid,$wmvfilename,$wmvextension,$wmvfilenameandl ocation,$wmvfilesize;
// mp3 attachment
global $mp3id,$mp3filename,$mp3extension,$mp3filenameandl ocation,$mp3filesize;
//default media tag
$media_controller= "$vboptions[bburl]/attachment.php?attachmentid=";




Find


$attachment['filename'] = fetch_censored_text(htmlspecialchars_uni($attachme nt['filename']));
$attachment['attachmentextension'] = strtolower(file_extension($attachment['filename']));
$attachment['filesize'] = vb_number_format($attachment['filesize'], 1, true);



Add Under


//flash attachment
$flashfilename=$attachment['filename'];
$flashextension=$attachment['attachmentextension'];
$flashfilesize=$attachment['filesize'];
$flashid=$post['userid'];
$flashfilenameandlocation=$media_controller . $attachmentid ;
//wma attachment
$wmaid=$post['userid'];
$wmafilename=$attachment['filename'];
$wmaextension=$attachment['attachmentextension'];
$wmafilenameandlocation=$media_controller . $attachmentid ;
$wmafilesize=$attachment['filesize'];
//wmv attachment
$wmvid=$post['userid'];
$wmvfilename=$attachment['filename'];
$wmvextension=$attachment['attachmentextension'];
$wmvfilenameandlocation=$media_controller . $attachmentid ;
$wmvfilesize=$attachment['filesize'];
//wmv attachment
$mp3id=$post['userid'];
$mp3filename=$attachment['filename'];
$mp3extension=$attachment['attachmentextension'];
$mp3filenameandlocation=$media_controller . $attachmentid ;
$mp3filesize=$attachment['filesize'];



Find



eval('$post[\'imageattachmentlinks\'] .= "' . fetch_template('postbit_attachment') . '";');
$show['imageattachmentlink'] = true;
}
break;




Add Under



case 'swf':
eval('$post[\'flashattachments\'] .= "' . fetch_template('postbit_attachmentflash') . '";');
$show['flashattachment'] = true;
break;

case 'wma':
eval('$post[\'wmaattachments\'] .= "' . fetch_template('postbit_attachmentwma') . '";');
$show['wmaattachment'] = true;
break;

case 'wmv':
eval('$post[\'wmvattachments\'] .= "' . fetch_template('postbit_attachmentwmv') . '";');
$show['wmvattachment'] = true;
break;

case 'mp3':
eval('$post[\'mp3attachments\'] .= "' . fetch_template('postbit_attachmentmp3') . '";');
$show['mp3attachment'] = true;
break;




GLOBAL Phrases:

Var: attach_wmv
Text: Window Media Video

Var: attach_mp3
Text: MPEG-1 layer 3 Audio Encoding :

Var: attached_flash
Text: Attached Flash File:

Var :attach_wma
Text : Window Media Audio :

Templates:

Go to your Postbit template

Find


$post[imageattachments]
</div>
</fieldset>
</if>




Add Under



<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[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>




Go to your board admin and add the templates under postbits.


The included templates file uses the existing templates on my board. Feel free to modified.


If you need help drop a line here or at www.aotrangmongmo.com

nexialys
03-16-2005, 11:30 PM
bad forum, read the upper ones, you'll find the Modification Requests forum...

Moya
03-16-2005, 11:41 PM
I know this is not the forum for it, but I want to see if the hack is demanded. :D :D

spence2
03-17-2005, 12:31 AM
I think your best way to judge demand is to place your hack in beta.

yukayumi
03-17-2005, 12:31 AM
Fine for me,waiting for your release....thanks.

Amavisca
03-17-2005, 12:40 AM
what do u mean by Playing Flash and Media Files Inline ??

Moya
03-17-2005, 01:21 AM
what do u mean by Playing Flash and Media Files Inline ??


When you attach window media files, real media, wmv, flash in vb, most likely they are not played within your posts. They will be in attachment for download.

nyunyu
03-17-2005, 01:47 AM
that would be like streaming the media right?

it would be great i think...

Lizard King
03-17-2005, 03:00 AM
You can do it pretty easy with bbcode

Moya
03-17-2005, 05:41 AM
^Update^

bold
03-17-2005, 05:52 AM
thanks

sabret00the
03-17-2005, 11:17 AM
while i'm not sure about media files, flash files are a huge secruity risk i would suggest you note that in your initial post

montda
03-17-2005, 11:28 AM
can i make it avelable to any usergroups i want?
it well be great :)
thx alot

Johnny
03-17-2005, 11:48 AM
i dont get whats the difference from using just bbcodes for both instead of hacking the files

Deaths
03-17-2005, 11:52 AM
Nice hack, wrong forum.

Show thread modifications would be more appropriate.

Mla7a6
03-17-2005, 01:09 PM
Hi..
It looks like a nice hack IF it will allow you to play ONLY media files (different formats: mp3, wav, wmv, au, rm, mov..etc.) because it is well known and tried before the security risk arising from playing flash files stored on your domain.. unless we can find a solution like to be able to store attachments on a different domain -or sub domain- and then try to call it from VB..
I am not a coder.. but I thaught 'll share my idea..

Moya
03-17-2005, 02:40 PM
can i make it avelable to any usergroups i want?
it well be great :)
thx alot


This hack uses attachment system on vb. You can set the permission there.

Moya
03-17-2005, 02:42 PM
Hi..
It looks like a nice hack IF it will allow you to play ONLY media files (different formats: mp3, wav, wmv, au, rm, mov..etc.) because it is well known and tried before the security risk arising from playing flash files stored on your domain.. unless we can find a solution like to be able to store attachments on a different domain -or sub domain- and then try to call it from VB..
I am not a coder.. but I thaught 'll share my idea..

Flash files are cached to member's computer. If you don't want flash files being played on your board, then disable that section.

Moya
03-17-2005, 02:49 PM
i dont get whats the difference from using just bbcodes for both instead of hacking the files


With bbcode:

You have to upload the files on your forum thru certain means like ftp, or the like.

Then you have to use bbcode for the link

With this one:

You use the vb built in attachment system.

Johnny
03-17-2005, 02:58 PM
With bbcode:

You have to upload the files on your forum thru certain means like ftp, or the like.

Then you have to use bbcode for the link

With this one:

You use the vb built in attachment system.

you dont have to upload the files threw ftp to use the bbcode for a video or flash file you can just upload it threw the attachment system and link the attachment in the bbcode. i know it works that way on my board. :ermm:

Moya
03-17-2005, 03:50 PM
you dont have to upload the files threw ftp to use the bbcode for a video or flash file you can just upload it threw the attachment system and link the attachment in the bbcode. i know it works that way on my board. :ermm:


Does every member have access to your ftp?

Lizard King
03-17-2005, 05:19 PM
Does every member have access to your ftp?
I think he already explained that. He is using the vbulletin attachment system.

joe go
03-20-2005, 05:00 PM
hi, i have a problem!
with upload comes the error:

Ungueltige SQL-Abfrage:
INSERT INTO attachment
(userid, dateline, filename, filedata, filesize, visible, filehash, posthash, thumbnail, thumbnail_dateline, thumbnail_filesize)
VALUES
(1, 1111344033, 'bomb.wmv',
'0&?u?f???\0?\0b?l: \0\0\0\0\0\0\0\0\03&?u?f???\0?\0b?lF\0\0\0\0\0\0\0\0\0\0\0\0\0\0 f\0u\0n\0-\0v\0i\0d\0e\0o\0.\0n\0e\0t\0\0\0\0\0\0\0\0\0?ܫ?G ????\0? Seh\0\0\0\0\0\0\0w^U,h?@??+0?\'B|?\0\0\0\0\00?x R????\0\0\0\0\0\0???\0\0\0\0 x\0\0\0\0?\0\0\0\0\0\0\0\0\0?\0\0?\0\0B?\0? ?_.????\0? Se?\0\0\0\0\0\0?ӫ?????\0? Se\0?\0\0?FC|???K?)9>?A\\?!\0\0\0\0\0\0\0\0d\0e\0\0\0]??&?E?G?_eR?\Z\0\0\0\0\0\0\0???ů[wH?g??D?Lʌ\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0I\0s\0V\0B\0R\0\0\0\0\0\0\0\04\0\0\0 \0\0\0D\0e\0v\0i\0c\0e\0C\0o\0n\0f\0o\0r\0m\0a\0n\ 0c\0e\0T\0e\0m\0p\0l\0a\0t\0e\0\0\0L\02\0\0\0\0\0 \0 \0\0\0\0\0I\0s\0V\0B\0R\0\0\0\0\0\0\0\04\0\0\0 \0\0\0D\0e\0v\0i\0c\0e\0C\0o\0n\0f\0o\0r\0m\0a\0n\ 0c\0e\0T\0e\0m\0p\0l\0a\0t\0e\0\0\0@\0\0\0\0\0\0. \0\0\0\0\0W\0M\0/\0W\0M\0A\0D\0R\0C\0P\0e\0a\0k\0R\0e\0f\0e\0r\0e\0 n\0c\0e\0\0\0\Z7\0\0\0\0\04\0\0\0\0\0W\0M\0/\0W\0M\0A\0D\0R\0C\0A\0v\0e\0r\0a\0g\0e\0R\0e\0f\0 e\0r\0e\0n\0c\0e\0\0\0?\n\0\0\0\0\0\0\0\0\0\0N \0u\0m\0b\0e\0r\0O\0f\0F\0r??

mysql error: Got a packet bigger than 'max_allowed_packet'

mysql error number: 1153

Moya
03-21-2005, 03:43 AM
I think you have a server restriction on allowable upload filesize. I think the standard is 2MB. You should ask your host to increase the upload filesize.

joe go
03-21-2005, 11:18 AM
my php.ini

upload_max_filesize = 5M

and the file is 3 mb

Marco van Herwaarden
03-21-2005, 12:22 PM
This is not a php error, but a mysql error.

Check your mysql configuration file for 'max_allowed_packet'.

joe go
03-21-2005, 12:52 PM
max_allowed_packet = 1M

No comment LOL :nervous:



Ok is good :)

a 1 problem .....

i push play and nothing happens :ermm:

http://www.your-topic.de/vbulletin/showthread.php?t=23&page=2&pp=10

Moya
03-21-2005, 04:15 PM
For some reason your $vboptions[bburl] doesn't display your forum path.

Replace this


//default media tag
$media_controller= "$vboptions[bburl]/attachment.php?attachmentid=";



with this


//default media tag
$media_controller= "http://www.your-topic.de/vbulletin/attachment.php?attachmentid=";

joe go
03-21-2005, 04:54 PM
Big THX :)

must that automatically or can be that manually???

Moya
03-21-2005, 05:37 PM
On my board $vboptions[bburl] is automatically filled, but on your board it is not. So you will have to do it manually.

JohnBee
04-03-2005, 08:25 AM
I am a little confused about the last part....

are you saying to created templates for each section?
or including each file type into the postbit template?

I installed this hack but when I upload a swf attachment nothing happens.

DjJoschimo
04-05-2005, 07:16 PM
me too :ermm:

mmdmk
04-10-2005, 03:37 PM
works not by me. I had installed the hack, but the forum displaying 'blank' attachments.

can you examine your hack?

Moya
05-01-2005, 06:37 PM
I am a little confused about the last part....

are you saying to created templates for each section?
or including each file type into the postbit template?

I installed this hack but when I upload a swf attachment nothing happens.


Hi John You will have to create new templates for each media. I have inclued them in the attached files

Moya
05-01-2005, 06:38 PM
works not by me. I had installed the hack, but the forum displaying 'blank' attachments.

can you examine your hack?


mmdmk and DjJoschimo

Is it possible for me to take a look at an example link?

Thanks

nickrabbit
05-03-2005, 06:30 PM
This might solve some issues, or maybe not... I noticed in your hack that you make reference to "'postbit_attachmentflash". I looked in my postbit templates, and couldn't find one called 'postbit_attachmentflash', but did find one called 'postbit_attachmentswf'. I changed the code to refernce that template instead, and then it worked!

Now, that being said, I have one more question. You think we could alter it somehow to diplay in the correct height/width? Perhaps if you set the height/width in the name of the file somehow (ie 125x300.swf) and then extract that height/ width and display as part of the postbit_attachmentswf template? Dunno... I'm not that familar with PHP, so this is jsut a guess...

nickrabbit
05-03-2005, 09:03 PM
In case anyone is interested, I figured out a way to do the above working off of the really great code above-- just for flash though. I'm just going to go ahead and post all the code I found to work for me. I'm not a PHP queen, so some of this is guessed-- feel free to make suggestions on the messiness. Follow the placement instructions as above.

When in place, you should be able to attach any swf and have it embedded at the correct width X height as long as the file begins with the format w_h.swf or wxh.swf or wXh.swf. i.e., something like this:

120_300_myfile.swf
130x400.swf
140X500_thisRocks.swf

**** VERY SERIOUS SECURITY RISKS HERE. REALLY. SERIOSLY. IF you don't care if someone uses this to hack your board and blow it up, then you can use it. heh heh.

Here's the code.

functions_showthread.php:

find
function construct_postbit($post, $maintemplatename = 'postbit', $alternate = '')
{

Add under

// flash attachment hack
global $flashid,$flashfilename,$flashextension,$flashfile nameandlocation,$flashfilesize,$flashfiledimen,$fl ashheight,$flashwidth;

Find
$attachment['filename'] = fetch_censored_text(htmlspecialchars_uni($attachme nt['filename']));
$attachment['attachmentextension'] = strtolower(file_extension($attachment['filename']));
$attachment['filesize'] = vb_number_format($attachment['filesize'], 1, true);


Add under:

//flash attachment hack
$flashid=$post['userid'];
$flashfilename=$attachment['filename'];
$flashextension=$attachment['attachmentextension'];
$flashfilesize=$attachment['filesize'];
$flashfiledimen=$attachment['filename'];
list($flashwidth, $flashheight) = split('[_xX.]',$flashfiledimen);
$flashfilenameandlocation=$media_controller . $attachmentid ;

Find

eval('$post[\'imageattachmentlinks\'] .= "' . fetch_template('postbit_attachment') . '";');
$show['imageattachmentlink'] = true;
}
break;

Add under:
//flash attachment hack
case 'swf':
eval('$post[\'flashattachments\'] .= "' . fetch_template('postbit_attachmentswf') . '";');
$show['flashattachment'] = true;
break;

GLOBAL Phrases:

Var: attached_flash
Text: Attached Flash File:

Templates:

Go to your Postbit template (edit templates)

Find

$post[imageattachments]
</div>
</fieldset>
</if>

Add under

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

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

</if>

Finally, also under postbit_templates you should have something called postbit_attachmentswf. IF you don't have it, create it with this code:

<br>
<smallfont>
Attachment Reference: = $attachmentid<br>
(Post Reference: = $post[postid])<br>
<embed src="attachment.php?attachmentid=$attachmentid" width="$flashwidth" height="$flashheight" type=application/x-shockwave-flash></embed><br><br>
</smallfont>

ericgtr
05-22-2005, 04:11 PM
Stitch, I have decided to take some time and work with this, it's a great mod and I have it tweaked they way I need it. The only thing prevent me from putting into production is the fact that it preloads the file (wmv or mp3) and that is a killer when you have an attachment in ever post on the page.

I set it not to autoplay but I need a paramater of some kind that prevents it from preloading until the play button is pushed.

Moya
05-27-2005, 04:00 PM
Stitch, I have decided to take some time and work with this, it's a great mod and I have it tweaked they way I need it. The only thing prevent me from putting into production is the fact that it preloads the file (wmv or mp3) and that is a killer when you have an attachment in ever post on the page.

I set it not to autoplay but I need a paramater of some kind that prevents it from preloading until the play button is pushed.


Hi Eric

I think the preloading or buffering is set locally under window media setup. I don't think we can control it though

Osiris2k
05-30-2005, 03:35 AM
so is this safe to use then? which forums have it? just so i can check em out before installing!

this is a great idea btw.

Moya
05-31-2005, 03:48 PM
There is a risk in playing flash files directly. For flash files, you will have to consider this. Other than that, it is safe to play WMA, MP3 inline

You can check out this link

http://www.aotrangmongmo.com/forum/showthread.php?p=20222#post20222

I setup this forum for guest to post and test out other feature without having to register

Thanks

Osiris2k
05-31-2005, 10:16 PM
There is a risk in playing flash files directly. For flash files, you will have to consider this. Other than that, it is safe to play WMA, MP3 inline

You can check out this link

http://www.aotrangmongmo.com/forum/showthread.php?p=20222#post20222

I setup this forum for guest to post and test out other feature without having to register

Thanks

it doesnt play the file? the screen just stays black?

Quacked
05-31-2005, 11:20 PM
I tried doing it, looks ok but the vids don't actually play, test here http://www.quacked.com/chat/showthread.php?p=1#post1

Moya
05-31-2005, 11:30 PM
I tried doing it, looks ok but the vids don't actually play, test here http://www.quacked.com/chat/showthread.php?p=1#post1


Here is the fix

https://vborg.vbsupport.ru/showpost.php?p=628831&postcount=28

Quacked
05-31-2005, 11:51 PM
Which file do I need to edit to change those?

Thanks alot.

Osiris2k
06-01-2005, 12:21 AM
ok I installed this hack but now no attachements show at all...be it *.wmv or even ??? HELP!!!

Moya
06-01-2005, 12:26 AM
Which file do I need to edit to change those?

Thanks alot.


You need to edit functions_showthread.php

I assume you already edit that file.

Find

$media_controller= "$vboptions[bburl]/attachment.php?attachmentid=";

Replace with

$media_controller= "http://www.yourdomain.com/forum/attachment.php?attachmentid=";

Quacked
06-01-2005, 12:30 AM
Worked great, brilliant hack! :nervous:

Osiris2k
06-01-2005, 12:32 AM
You need to edit functions_showthread.php

I assume you already edit that file.

Find

$media_controller= "$vboptions[bburl]/attachment.php?attachmentid=";

Replace with

$media_controller= "http://www.yourdomain.com/forum/attachment.php?attachmentid=";

I did that and still nothiung. It doesnt even show a windows media player window or anything. not even a red X ??? HELP Please

oh and about my above post jpgs and such work but swf or wmv or any other movie files dont

Moya
06-01-2005, 08:58 PM
I did that and still nothiung. It doesnt even show a windows media player window or anything. not even a red X ??? HELP Please

oh and about my above post jpgs and such work but swf or wmv or any other movie files dont

Can you give a link to take a look at?

Osiris2k
06-01-2005, 10:07 PM
here ya go

this is the thread I tried to make the post in

Moya
06-01-2005, 10:45 PM
Did you add the templates??

Osiris2k
06-01-2005, 10:49 PM
yes...here's a jpg.

Moya
06-01-2005, 11:00 PM
Hmmm it seems that the variables are not fetched to your browser. I think you have to take a look at your codes addition again.

Moya
06-01-2005, 11:58 PM
Update: You are using legacy style. I update the postbit_legacy for you already. They should works now

Have fun

Osiris2k
06-02-2005, 12:25 AM
Hi Eric

I think the preloading or buffering is set locally under window media setup. I don't think we can control it though

there must be some way...

I noticed that if you put more than one file into a thread only one plays...maybe that can be used? or if the mplayer clicks the stop button automatically everytime the vid loads.

mmdmk
06-05-2005, 12:17 PM
Hi Stitch,
i must update postbit_legacy, too. otherwise i had a blank screen.
They should works perfectly now.

Please, can you add a inline player for .mpg and .mpeg files?

Greetz mmdmk ;)

turksengel
08-15-2005, 11:56 AM
i love this hack but i use 350 could you do on 350 Rc 2

ben_erhan
08-21-2005, 09:56 AM
Dear friends,

I instaled this hack but ı cant see any attached file.
mp3,swf,wma there is not any file inside the post.But when ı click the manage the attachments button,ı can see the files.
What is the problem?
I checked lots of times but it is same.I changed postbit legacy but there is not any changing.
I am waitng your help.

tuanluu
09-06-2005, 01:01 AM
I install your hack but it seen not working any idea why? can u help me please??

www.luuhoanggallery.com/forums ---> my links

Moya
09-08-2005, 07:36 PM
Ben,

Can I take a look at your working link?

tuanluu,

Can you show me the link please?

turksengel

I will work on this for a vb3.5 once my sever is back online

It is fried. It might take awhile for me to get it up and running.

Thanks

tuanluu
09-09-2005, 03:26 AM
what link are u talking about?
the link to my site??
www.luuhoanggallery.com/forums

Moya
09-09-2005, 05:33 AM
I register and check out a couple music thread. They all work. Show me the one that doesn't work. I will look into it for you .

tuanluu
09-10-2005, 09:23 AM
the one that are show on my page are vbcode that I added b4 that I try to add your hack it does not thanks for your help....is your site back on yet?

Moya
09-11-2005, 01:40 AM
Hi Tuan

I tried to upload a test file in mp3 but you have a 2mb limitation on your server.

I tried to upload a wma. This file type is not allowed.

Can you look into this for me!

Thanks

tuanluu
09-11-2005, 08:00 AM
Okay I will try :)

tuanluu
09-11-2005, 08:07 AM
Okay I just add wma extension and allow up to 9 mb :) everything should be fine now right

Moya
09-11-2005, 10:03 PM
Okay I just add wma extension and allow up to 9 mb :) everything should be fine now right


Uhmmmm this is what I get


File Too Large. Exceeds PHP's limit of 2.00 MB.



You will need to increase the upload limitation in the php.ini on your server.

On the second thought, can you give me admin access to your files and forum admin pannel

Borgs8472
09-11-2005, 11:29 PM
I'd use this hack if it was only avalible to admins/mods. (because I want my members to have other attachments still)

tuanluu
09-12-2005, 05:17 AM
okay I will promote u to be admin okay :)

Moya
09-12-2005, 03:37 PM
Borgs8472,

You still have the control over what is moderated or not.

Hi Tuan,

I looked into your board and uploaded a wma song. It works for your board

tuanluu
09-12-2005, 03:40 PM
thanks

tuanluu
09-13-2005, 02:15 PM
<param name="URL" value="$wmafilenameandlocation"> ------original, but it did not play

I try this and it work

<param name="URL" value="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]">

is the right way to fix it??

Davidinh
09-13-2005, 04:07 PM
some update the intruction
if your board using postbit legacy then modify it instead of postbit template
do exactly the same
open postbit legacy then find:
$post[imageattachments]
</div>
</fieldset>
</if>

add below it
<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[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>

have fun

and thanks for your hack stitch i learn a lot vbb code from your hack
keep going man

Moya
09-17-2005, 06:10 AM
Dear friends,

I instaled this hack but ı cant see any attached file.
mp3,swf,wma there is not any file inside the post.But when ı click the manage the attachments button,ı can see the files.
What is the problem?
I checked lots of times but it is same.I changed postbit legacy but there is not any changing.
I am waitng your help.


Can I take a look at your site?

Ski-Whiz
10-12-2005, 06:22 AM
Is there any way to make this player via a buffer? It waits until it's done downloading before it plays. Not a big deal, but I'm using it with 14 meg files. :D

Moya
10-18-2005, 10:57 PM
Is there any way to make this player via a buffer? It waits until it's done downloading before it plays. Not a big deal, but I'm using it with 14 meg files. :D
Set the AutoStart = 0

Ski-Whiz
10-19-2005, 12:00 AM
Set the AutoStart = 0


Well, the file does play, but it waits until it's done downloading. I was hoping something was able to set it, so it would download and play at the same time..

When I hit play, it doesn't play until the file is done downloading it seems. So on a 14meg file, it takes a minute to play...

Maria F.
11-30-2005, 01:23 AM
Hi,

Great hack, but...works not by me. I had installed the hack, but the forum displaying 'black' WMV display window.

Please, I need help.
TIA

Ski-Whiz
03-06-2006, 01:05 AM
Any plans on porting this to 3.5.x?? Great hack, and nothing for 3.5 and playing attachments...

Ski-Whiz
03-08-2006, 06:14 PM
Nevermind.. Not sure how the search missed it, but I see it for 3.5... :D

Floris
03-12-2006, 10:05 AM
Nevermind.. Not sure how the search missed it, but I see it for 3.5... :D
I don't link me up scotty

Lionel
05-17-2006, 05:40 PM
for security concerns, in 3.07 in includes/functions_file.php i created a front end error page
nopermissionswf
you don't have permissions to upload flash files and after

if (!$attachtypes["$extension"] OR !$attachtypes["$extension"]['enabled'])
{
// invalid extension
eval('$error = "' . fetch_phrase('attachbadtype', PHRASETYPEID_ERROR) . '";');
$errors[] = array(
'filename' => $attachment_name,
'error' => $error
);
return false;

I placed (replace 4,1 with your userid allowed)

if ($extension=='swf'){
if (!in_array($bbuserinfo[userid], array(4,1))){
// invalid extension
eval('$error = "' . fetch_phrase('nopermissionswf', PHRASETYPEID_ERROR) . '";');
$errors[] = array(
'filename' => $attachment_name,
'error' => $error
);
return false;
}
}

That allows only certain users to upload flash files.

Thanks for a great hack. Example of usage (http://www.haitiwebs.com/haitianforums/showthread.php?t=28518)

Andromeda2875
06-14-2006, 07:31 PM
Any reason why we can not just do the same thing with html allowed using dynasrc?

konstance
07-12-2006, 05:32 PM
I am only getting the thumbnail image of flash files. I am not getting any other file displayed.
Can I upload 3 video files in a single post?

darkie79
09-16-2006, 12:03 PM
Has anyone confirmed this to work with 3.61?