Version: 1.00, by ericgtr
Developer Last Online: Feb 2022
Category: Show Thread Enhancements -
Version: 4.0.3
Rating:
Released: 04-16-2010
Last Update: 05-17-2010
Installs: 88
Template Edits
Re-useable Code
No support by the author.
This is a simple modification that will embed an "attached" MP3 player so the file can be played inline. It uses a simple flash player from Google. There are many MP3 player mods but none that I could find that would actually play an attached file and in my community this was a the most missed feature since the upgraded to 4.x.
Unzip and then upload the attached audio_player.swf to your server, then modify the path where it says http://www.YOURSITE.com accordingly.
Open up postbit_attachment and add this at the very bottom:
HTML Code:
<!-- Embed Player --><vb:if condition="$show['member']"><embed type="application/x-shockwave-flash" src="http://www.YOURSITE.com/audio-player.swf?audioUrl=attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&d={vb:raw attachment.dateline}" width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" /></vb:if><BR /><vb:if condition="$show['guest']"><a href="/register.php">Register for free</a> today to download files or play them directly in our embedded media player
</vb:if><!-- /Embed Player -->
I have added a register option for guests, if you have attachments viewable by guests though feel free to strip that out of this code.
Since you are familiar with them, which do you recommend? Thanks!
Here's one way to search them out, from the top of any page type in player in the search, then choose 4.0 mods then titles only.
Quote:
Originally Posted by junaid
I have many attachment types like zip, tar etc
Is it possible to set player view only MP3 attachment type?
Unfortunately this simple modification cannot. The actual file type isn't defined in the output so I cannot base a condition off of it. I am sure it can be done but it would require some coding changes and quite a bit more development than I have time for.
I installed it, works fine but only for files of up to 1MB in size. Anything above that gives me an error.
How do you explain this?
I would check your attachment settings to make sure you are allowing file sizes above that. Are files above 1 MB allowed? This modification simply plays what is attached, for example on my site there are many songs that are 5 or 6 MB that work just fine with it.
I would check your attachment settings to make sure you are allowing file sizes above that. Are files above 1 MB allowed? This modification simply plays what is attached, for example on my site there are many songs that are 5 or 6 MB that work just fine with it.
Well, that is the funny part....I set unlimited size.
Could be issue with hosting server, already contacted them. My theory is that parameter
written in php.ini file at their end have to be changed by entering different value. All of this is part of apache configuration. Just guessing....
Well, that is the funny part....I set unlimited size.
Could be issue with hosting server, already contacted them. My theory is that parameter
written in php.ini file at their end have to be changed by entering different value. All of this is part of apache configuration. Just guessing....
Appreciate your reply Eric, thanks.
It's hosted on Google by default, did you move it to your own server?