Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

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
  #52  
Old 07-02-2010, 05:09 AM
Pashaali Pashaali is offline
 
Join Date: Jun 2010
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

everything is done but when im click on play batten song not play , how i fix it . my hosting supported mp3 file http://www.desifunbox.com/thread12.html
Reply With Quote
  #53  
Old 07-03-2010, 06:01 AM
SGoogle SGoogle is offline
 
Join Date: Jul 2010
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tag and Thank you Very Much
Reply With Quote
  #54  
Old 07-03-2010, 06:24 AM
DAMINK DAMINK is offline
 
Join Date: Jun 2010
Location: Melbourne Australia
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got me stumped at the second. I added the code to postbit attachment and edited it to reflect my urland uploaded the attached file to root of my server. I have allowed for .mp3 to be allowed as attachments. I have uploaded a couple and no luck. It just comes up as a link.

url is http://www.ftw.net.au/showthread.php...an-test-thread!
Small word of warning. Its an over 18 site i guess. Content can get a bit racey so dont look around just stick to thread at hand
Reply With Quote
  #55  
Old 07-03-2010, 06:27 AM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You dont upload file to server, you attach file in post
Reply With Quote
  #56  
Old 07-03-2010, 06:35 AM
DAMINK DAMINK is offline
 
Join Date: Jun 2010
Location: Melbourne Australia
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did attach file to post.
That is the result.

I also uploaded the .swf player my server to play it from there.
Thats the file i pointed at in the postbit hack.
Reply With Quote
  #57  
Old 07-03-2010, 07:47 AM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

get rid of everthing you did to install this and use this https://vborg.vbsupport.ru/showthread.php?t=242738

If you still want to use this google one , post the code that you put in your postbit attach template
Reply With Quote
  #58  
Old 07-03-2010, 08:10 AM
DAMINK DAMINK is offline
 
Join Date: Jun 2010
Location: Melbourne Australia
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tried that AURFSCAN and still the same result.
I must be missing something.
I see in that thread you got it going well.
SO just edit specific themes postbit attachement adding the supplied code then upload the player and javascript. Should be a no brainer. Yet its not working for some reason.
I will persist however. This is somethin i really need.
Reply With Quote
  #59  
Old 07-04-2010, 02:27 AM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yep thats it, might be the links in your code are not pointing correctly to the player files ??

post the code your using
Reply With Quote
  #60  
Old 07-04-2010, 02:35 AM
DAMINK DAMINK is offline
 
Join Date: Jun 2010
Location: Melbourne Australia
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Certainly mate.
In postbit / postbit_attachment above existing code i placed this.

Code:
<!-- Embed Player -->

<script src="./clientscript/audio/audio-player.js" language="JavaScript"></script>

<object style="vertical-align: middle;" id="./attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&amp;d={vb:raw attachment.dateline}" width="290" height="24" data="./clientscript/audio/player.swf" type="application/x-shockwave-flash">
<param value="./clientscript/audio/player.swf" name="movie"/>

<param value="playerID=1&soundFile=./attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&amp;d={vb:raw attachment.dateline}" name="FlashVars"/><param value="high" name="quality"/>

<param value="false" name="menu"/>
<param value="transparent" name="wmode"/>
</object>

<!-- /Embed Player -->
However that i believe is the code from the link you refferenced?
Cant remember now to be honest. Damn stomach infection is running wild in my house currenly.
Reply With Quote
  #61  
Old 07-04-2010, 03:37 AM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

place it below ???

Code:
<li>
	<img class="inlineimg" src="{vb:stylevar imgdir_attach}/{vb:raw attachment.attachmentextension}.gif" alt="{vb:rawphrase file_type_x, {vb:raw attachment.attachmentextension}}" />
	<a href="attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&amp;d={vb:raw attachment.dateline}"<vb:if condition="$show['newwindow']"> target="_blank"</vb:if>>{vb:raw attachment.filename}</a> 
({vb:raw attachment.filesize}<vb:if condition="$show['views']">, {vb:rawphrase x_views, {vb:raw attachment.counter}}</vb:if>)
</li>

<br />

<!-- Embed Player -->
<vb:if condition="$show['member']">
<vb:if condition="$attachment[attachmentextension] == mp3">
<script src="./clientscript/audio/audio-player.js" language="JavaScript"></script>

<script src="./clientscript/audio/audio-player.js" language="JavaScript"></script>

<object style="vertical-align: middle;" id="./attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&amp;d={vb:raw attachment.dateline}" width="290" height="24" data="./clientscript/audio/player.swf" type="application/x-shockwave-flash">
<param value="./clientscript/audio/player.swf" name="movie"/>

<param value="playerID=1&soundFile=./attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&amp;d={vb:raw attachment.dateline}" name="FlashVars"/><param value="high" name="quality"/>

<param value="false" name="menu"/>
<param value="transparent" name="wmode"/>
</object>
</vb:if></vb:if>

<!-- /Embed Player -->
Reply With Quote
Reply


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 02:34 AM.


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.04578 seconds
  • Memory Usage 2,341KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_html
  • (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
  • (3)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