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
  #12  
Old 04-18-2010, 05: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 junaid View Post
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 View Post
Do I upload a mp3 to the forum or will posting a link triggers the player ?
Quote:
Originally Posted by COL NIL SATIS View Post
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.
Reply With Quote
  #13  
Old 04-18-2010, 07:06 PM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im trying to make it work with this https://vborg.vbsupport.ru/showthread.php?t=161567
Reply With Quote
  #14  
Old 04-18-2010, 07:12 PM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgtr View Post
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 -->
Attached Files
File Type: zip audio-player.zip (68.2 KB, 78 views)
Reply With Quote
  #15  
Old 04-19-2010, 04:50 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 AURFSCAN View Post
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.
Reply With Quote
  #16  
Old 04-19-2010, 05:50 PM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

google player is nice, the other one is nicer.. thats all
Reply With Quote
  #17  
Old 04-19-2010, 06:18 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 AURFSCAN View Post
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.
Reply With Quote
  #18  
Old 04-19-2010, 06:45 PM
junaid junaid is offline
 
Join Date: Oct 2005
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have issue this code
MP3 player is display all format of attachments like zip, rar
what is the solutions i am using vbseo
Reply With Quote
  #19  
Old 04-19-2010, 06:58 PM
junaid junaid is offline
 
Join Date: Oct 2005
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #20  
Old 04-20-2010, 07:13 AM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this work with playing mp3's hosted on other sites, or must they be local on the vb site's personal server?
Reply With Quote
  #21  
Old 04-20-2010, 01:51 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 junaid View Post
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 View Post
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.
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 09:33 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.05823 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
  • (8)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
  • (3)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