vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - Embedded MP3 Attachment Player (https://vborg.vbsupport.ru/showthread.php?t=240671)

ericgtr 04-16-2010 10:00 PM

Embedded MP3 Attachment Player
 
1 Attachment(s)
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}&amp;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.

WassoufTunClub 04-17-2010 07:26 PM

Nice thnx

Juggernaut 04-17-2010 08:33 PM

Tagged :D

sulasno 04-18-2010 12:27 AM

tagged and thanks

kmohamed 04-18-2010 01:47 AM

it looks great

please send a live demo
thanx

ericgtr 04-18-2010 03:19 AM

Quote:

Originally Posted by kmohamed (Post 2022943)
it looks great

please send a live demo
thanx

Here's a link to my site but you'll have to register to see it play live http://www.guitarblast.com/ Otherwise please see the screenshot for exactly what it looks like, it plays the MP3 in the attachment as shown.

junaid 04-18-2010 04:10 AM

very nice is it possible to get player and keep our web-server
cos it may be fast loading

goran424 04-18-2010 07:53 AM

Finally!!!

Rated, Installed, Nominated!

Thanks.

sulasno 04-18-2010 10:11 AM

Do I upload a mp3 to the forum or will posting a link triggers the player ?

COL NIL SATIS 04-18-2010 12:51 PM

where does this show mate???? i have put the code in but nothing is showing??? any ideas

ericgtr 04-18-2010 05:40 PM

Quote:

Originally Posted by junaid (Post 2022975)
very nice is it possible to get player and keep our web-server
cos it may be fast loading

I haven't tried but my guess is you can probably take grab the player from http://www.google.com/reader/ui/3247...dio-player.swf then upload it to your server and use it that way. I can't guarantee that it will work but I don't see why it wouldn't. Of course, being Google I think it's probably going to have a better up-time percentage than most sites. ;)

Quote:

Originally Posted by sulasno (Post 2023088)
Do I upload a mp3 to the forum or will posting a link triggers the player ?

Quote:

Originally Posted by COL NIL SATIS (Post 2023154)
where does this show mate???? i have put the code in but nothing is showing??? any ideas

Once the MP3 is uploaded it will show in the post below where the attachment is normally shown. Make sure the code is applied to the template(s) you are using.

AURFSCAN 04-18-2010 07:06 PM

im trying to make it work with this https://vborg.vbsupport.ru/showthread.php?t=161567

AURFSCAN 04-18-2010 07:12 PM

1 Attachment(s)
Quote:

Originally Posted by ericgtr (Post 2023307)
I haven't tried but my guess is you can probably take grab the player from http://www.google.com/reader/ui/3247...dio-player.swf then upload it to your server and use it that way. I can't guarantee that it will work but I don't see why it wouldn't. Of course, being Google I think it's probably going to have a better up-time percentage than most sites. ;)




Once the MP3 is uploaded it will show in the post below where the attachment is normally shown. Make sure the code is applied to the template(s) you are using.

uploading google player to server and adjusting code to link to it does work :)




Code:


<!-- Embed Player -->
<vb:if condition="$show['member']">
<embed type="application/x-shockwave-flash" src="/location of player on your server/audio-player.swf?audioUrl=attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&amp;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 -->


ericgtr 04-19-2010 04:50 PM

Quote:

Originally Posted by AURFSCAN (Post 2023355)
im trying to make it work with this https://vborg.vbsupport.ru/showthread.php?t=161567

This mod does the same thing, not sure what you mean work "with" it. It's a replacement.

AURFSCAN 04-19-2010 05:50 PM

google player is nice, the other one is nicer.. thats all

ericgtr 04-19-2010 06:18 PM

Quote:

Originally Posted by AURFSCAN (Post 2023916)
google player is nice, the other one is nicer.. thats all

Agreed, I was hoping he would update it for 4.0, otherwise I wouldn't have created this one.

junaid 04-19-2010 06:45 PM

I have issue this code
MP3 player is display all format of attachments like zip, rar
what is the solutions i am using vbseo

junaid 04-19-2010 06:58 PM

I disable vbseo and check this player view all type of attachments
It nice this only view MP3 or supported format extensions audios only

pls update code

NashChristian 04-20-2010 07:13 AM

Will this work with playing mp3's hosted on other sites, or must they be local on the vb site's personal server?

ericgtr 04-20-2010 01:51 PM

Quote:

Originally Posted by junaid (Post 2023965)
I disable vbseo and check this player view all type of attachments
It nice this only view MP3 or supported format extensions audios only

pls update code

I do not see a way around this, if your site has other attachment types (aside from images) this will show with it unfortunately.

Quote:

Originally Posted by NashChristian (Post 2024199)
Will this work with playing mp3's hosted on other sites, or must they be local on the vb site's personal server?

No it won't, but there are several mods available for 4.0 that will do this for you though.

NashChristian 04-20-2010 05:24 PM

Quote:

Originally Posted by ericgtr (Post 2024350)
No it won't, but there are several mods available for 4.0 that will do this for you though.

Since you are familiar with them, which do you recommend? Thanks!

junaid 04-20-2010 06:33 PM

I have many attachment types like zip, tar etc
Is it possible to set player view only MP3 attachment type?

ericgtr 04-20-2010 06:48 PM

Quote:

Originally Posted by NashChristian (Post 2024433)
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 (Post 2024468)
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.

goran424 04-21-2010 07:18 AM

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?

ericgtr 04-21-2010 01:40 PM

Quote:

Originally Posted by goran424 (Post 2024748)
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.

goran424 04-21-2010 02:18 PM

Quote:

Originally Posted by ericgtr (Post 2024912)
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....

Appreciate your reply Eric, thanks.

ericgtr 04-21-2010 02:26 PM

Quote:

Originally Posted by goran424 (Post 2024938)
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?

Cobro 04-21-2010 09:23 PM

Nice man installed

AURFSCAN 04-22-2010 09:09 PM

1 Attachment(s)
Originally Posted by junaid

I have many attachment types like zip, tar etc
Is it possible to set player view only MP3 attachment type?


to have the player only visible for mp3.

Code:



<!-- Embed Player -->

<vb:if condition="$attachment[attachmentextension] == mp3">

<embed type="application/x-shockwave-flash" src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&amp;d={vb:raw attachment.dateline}" width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" />
</vb:if>

<!-- /Embed Player -->


goran424 04-22-2010 10:04 PM

Quote:

Originally Posted by ericgtr (Post 2024942)
It's hosted on Google by default, did you move it to your own server?

I'm not sure what I did but spoke to people who host my site and they fixed something at their end. It works perfect now.

Thanks for great product Eric, members gonna love it!

Gamertype 04-23-2010 12:29 AM

Is there a way to limit what usergroups can upload mp3's as attachments?

ericgtr 04-23-2010 01:10 AM

Quote:

Originally Posted by Gamertype (Post 2025673)
Is there a way to limit what usergroups can upload mp3's as attachments?

Sure, Admin CP > Attachments > Attachment Permissions.

Orakk 04-23-2010 07:07 AM

Quote:

Originally Posted by AURFSCAN (Post 2025595)
Originally Posted by junaid

I have many attachment types like zip, tar etc
Is it possible to set player view only MP3 attachment type?


to have the player only visible for mp3.

Code:



<!-- Embed Player -->

<vb:if condition="$attachment[attachmentextension] == mp3">

<embed type="application/x-shockwave-flash" src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&amp;d={vb:raw attachment.dateline}" width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" />
</vb:if>

<!-- /Embed Player -->


Thank you muchly, worked a treat. :up:

junaid 04-23-2010 10:13 AM

Quote:

Originally Posted by AURFSCAN (Post 2025595)
Originally Posted by junaid

I have many attachment types like zip, tar etc
Is it possible to set player view only MP3 attachment type?


to have the player only visible for mp3.

Code:



<!-- Embed Player -->

<vb:if condition="$attachment[attachmentextension] == mp3">

<embed type="application/x-shockwave-flash" src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&amp;d={vb:raw attachment.dateline}" width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" />
</vb:if>

<!-- /Embed Player -->


Thank you very much
it work fine

Orakk 04-23-2010 12:04 PM

To get this to work in IE code below is working for us.

Code:

<!-- Embed Player -->
<vb:if condition="$attachment[attachmentextension] == mp3">
  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"  align="middle" height="27" width="400">
    <param name="quality" value="best">
    <param name="allowScriptAccess" value="never">
    <param name="wmode" value="window">
    <param name="movie"  value="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=attachment.php?{vb:raw  session.sessionurl}attachmentid={vb:raw  attachment.attachmentid}&amp;d={vb:raw attachment.dateline}"  flashvars="playerMode=embedded" />
  <embed type="application/x-shockwave-flash"  src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=attachment.php?{vb:raw  session.sessionurl}attachmentid={vb:raw  attachment.attachmentid}&amp;d={vb:raw attachment.dateline}"  width="400" height="27" allowscriptaccess="never" quality="best"  bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" />
  </object>
</vb:if>
<!-- /Embed Player -->


syrus.xl 04-23-2010 01:55 PM

You have an error in your coding. The wmode parameter should be set to transparent, not window. Otherwise, any DHTML menus will drop behind the mp3 player.

Quote:

Originally Posted by Orakk (Post 2025915)
To get this to work in IE code below is working for us.

Code:

<!-- Embed Player -->
<vb:if condition="$attachment[attachmentextension] == mp3">
  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"  align="middle" height="27" width="400">
    <param name="quality" value="best">
    <param name="allowScriptAccess" value="never">
    <param name="wmode" value="window">
    <param name="movie"  value="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=attachment.php?{vb:raw  session.sessionurl}attachmentid={vb:raw  attachment.attachmentid}&amp;d={vb:raw attachment.dateline}"  flashvars="playerMode=embedded" />
  <embed type="application/x-shockwave-flash"  src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=attachment.php?{vb:raw  session.sessionurl}attachmentid={vb:raw  attachment.attachmentid}&amp;d={vb:raw attachment.dateline}"  width="400" height="27" allowscriptaccess="never" quality="best"  bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" />
  </object>
</vb:if>
<!-- /Embed Player -->



Gamertype 04-27-2010 05:37 PM

Quote:

Originally Posted by ericgtr (Post 2025691)
Sure, Admin CP > Attachments > Attachment Permissions.

I have my mods/admins set to a 50MB upload and VB keeps failing? Any reason why?

goran424 04-27-2010 06:26 PM

Quote:

Originally Posted by Gamertype (Post 2028211)
I have my mods/admins set to a 50MB upload and VB keeps failing? Any reason why?

Same reason as me as mentioned at previous page of this thread.

After contacting server host and telling them about the problem, they fixed it at their end. I suggest you try the same.

Here is the live demo, works perfect now:

http://ghostriders-thailand.com/foru...ts&p=69#post69

Orakk 04-28-2010 12:40 AM

Quote:

Originally Posted by syrus.xl (Post 2025971)
You have an error in your coding. The wmode parameter should be set to transparent, not window. Otherwise, any DHTML menus will drop behind the mp3 player.

Thank you, will fix.

Cheers. :up:

mactelesis 04-29-2010 01:06 PM

Where is "postbit_attachment" located?


All times are GMT. The time now is 04:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01559 seconds
  • Memory Usage 1,849KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)bbcode_html_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete