Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Embedded MP3 Attachment Player Details »»
Embedded MP3 Attachment Player
Version: 1.00, by ericgtr ericgtr is offline
Developer Last Online: Feb 2022 Show Printable Version Email this Page

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}&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.

Download Now

File Type: txt mp3_player.txt (1.1 KB, 637 views)
File Type: zip audio_player.zip (68.2 KB, 749 views)

Screenshots

File Type: jpg mp3_player.jpg (106.6 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
andro140, gagan007

Comments
  #22  
Old 04-20-2010, 05:24 PM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgtr View Post
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!
Reply With Quote
  #23  
Old 04-20-2010, 06:33 PM
junaid junaid is offline
 
Join Date: Oct 2005
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have many attachment types like zip, tar etc
Is it possible to set player view only MP3 attachment type?
Reply With Quote
  #24  
Old 04-20-2010, 06:48 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NashChristian View Post
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 View Post
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.
Reply With Quote
  #25  
Old 04-21-2010, 07:18 AM
goran424's Avatar
goran424 goran424 is offline
 
Join Date: Feb 2010
Location: Thailand
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #26  
Old 04-21-2010, 01:40 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by goran424 View Post
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.
Reply With Quote
  #27  
Old 04-21-2010, 02:18 PM
goran424's Avatar
goran424 goran424 is offline
 
Join Date: Feb 2010
Location: Thailand
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgtr View Post
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.
Reply With Quote
  #28  
Old 04-21-2010, 02:26 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by goran424 View Post
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?
Reply With Quote
  #29  
Old 04-21-2010, 09:23 PM
Cobro Cobro is offline
 
Join Date: Oct 2006
Location: cellar
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice man installed
Reply With Quote
  #30  
Old 04-22-2010, 09:09 PM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 -->
Attached Images
File Type: jpg mp3zip.jpg (13.2 KB, 0 views)
Reply With Quote
  #31  
Old 04-22-2010, 10:04 PM
goran424's Avatar
goran424 goran424 is offline
 
Join Date: Feb 2010
Location: Thailand
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgtr View Post
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!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14252 seconds
  • Memory Usage 2,349KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_html
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete