Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
aMP3 - (mp3 attachment player) Details »»
aMP3 - (mp3 attachment player)
Version: 1.00, by Coders Shack Coders Shack is offline
Developer Last Online: Sep 2013 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.8 Rating:
Released: 10-30-2007 Last Update: Never Installs: 110
Uses Plugins
Additional Files  
No support by the author.

[hr]value[/hr]
. . . . . . . . Brought to you by

. . . http://www.Scriptasy.com
[hr]value[/hr]

Installation Time: < 5 mins
Product: 1
Files: 2
VB Version: 3.6.X


Description:
I ran across a request for the ability to play someones audio straight from the attachment bit, i had a few minutes to spare so i created it.

[Live Demo]

Installation Instructions:
  1. Install Product
  2. Place files in the correct folder (i created a mock file structure with the folders)
If you like then [Mark As Installed]

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 11-04-2007, 08:41 PM
DJ XtAzY DJ XtAzY is offline
 
Join Date: Feb 2005
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by XtAzY View Post
Very very cool!
I was wondering if this is possible. I was wondering if you can implement a feature where you can limit the amount of seconds the player can play. So let say an mp3 file is 3 minutes long and I want the player to play only the first X seconds (like 30 secs). Can this be possible?
Ok nevermind. I found out how to do this.
Reply With Quote
  #33  
Old 11-04-2007, 09:16 PM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by XtAzY View Post
Ok nevermind. I found out how to do this.
mind enlightening everyone else on how you accomplished this task?
Reply With Quote
  #34  
Old 11-05-2007, 03:42 AM
Booyakan Booyakan is offline
 
Join Date: Jan 2007
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there any way to make the flash player appear when using the [attach] command?

i kind of asked the same thing in an earlier post but i had edited it -didn't know if it was overlooked..sorry bout that..
Reply With Quote
  #35  
Old 11-05-2007, 04:27 AM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Booyakan View Post
is there any way to make the flash player appear when using the [attach] command?



i kind of asked the same thing in an earlier post but i had edited it -didn't know if it was overlooked..sorry bout that..
not sure what you mean exactly, its possible to do it in posts with a custom BBCODE.
Reply With Quote
  #36  
Old 11-05-2007, 02:11 PM
Booyakan Booyakan is offline
 
Join Date: Jan 2007
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Coders Shack View Post
not sure what you mean exactly, its possible to do it in posts with a custom BBCODE.
let's say i have uploaded an mp3 to the post. If i save the post the player will show up..awesome. works great.

now, lets say i am typing out a description of the song, then click on the paperclip and choose the song i uploaded. It inserts this code into the post - [attach] 14 [/attack]. This creates a link to download the song, but no flash player appears.
(where in this case, 14 is the attachment id)

This would be great if this attach code worked because you could place the player anywhere you want in your post, instead of just having them all listed normally as attached files. hope you understand, if not let me know...

also, i wouldn't know the custom bbcode u mentioned..
Reply With Quote
  #37  
Old 11-07-2007, 12:29 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, installed..... thanks ...

I'm a little confused.....

I have a large 35 meg mp3 file (speech) that I want users to be a able to click on and play. How do I get it to work? I don't see any new BBcode after adding this mod and when I try to add the mp3 file (it's too big anyway) using the attach files in a post, it says that it's not the correct type?

I'm not a member of the demo board, so I can't see the vBulletin post code that makes it work there.

Anyone help me our with a basic example?

Thanks..

Regards,
Badger
Reply With Quote
  #38  
Old 11-07-2007, 12:36 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BadgerDog View Post
Ok, installed..... thanks ...

I'm a little confused.....

I have a large 35 meg mp3 file (speech) that I want users to be a able to click on and play. How do I get it to work? I don't see any new BBcode after adding this mod and when I try to add the mp3 file (it's too big anyway) using the attach files in a post, it says that it's not the correct type?

I'm not a member of the demo board, so I can't see the vBulletin post code that makes it work there.

Anyone help me our with a basic example?

Thanks..

Regards,
Badger
Go to your Admin Control panel, and look at the Navigation menu on the left:

Attachments -> Attachment Manager -> Add New Extension

add mp3 and set "Maximum Filesize" to the size of your mp3 you want to upload.

This mod does not use BB code - it allows mp3 attachments to be played inline. After you make the above changes then upload your mp3 and it should play inline if you have this mod installed. If you want guests to be able to listen to it then you need to set registered/not logged in to allow download of attachments or they will not be able to hear the mp3
Reply With Quote
  #39  
Old 11-07-2007, 01:11 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yoyoyoyo View Post
This mod does not use BB code - it allows mp3 attachments to be played inline. After you make the above changes then upload your mp3 and it should play inline if you have this mod installed. If you want guests to be able to listen to it then you need to set registered/not logged in to allow download of attachments or they will not be able to hear the mp3
Thanks...

Added the mp3 code as per instructions. I tried to upload the 35 meg mp3 file as an attachment and it simply died after about 10 minutes.

It would be nice if we could use this mod to point to mp3 files stored directly, that are already stored on the server (not try to make them attachments), or point the mod to mp3 file links stored on a separate server (externally).

I'll have to look around for another option....

Un-installed....

Thanks again for the help... :up:

Regards,
Badger
Reply With Quote
  #40  
Old 11-07-2007, 05:14 PM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BadgerDog View Post
Thanks...

Added the mp3 code as per instructions. I tried to upload the 35 meg mp3 file as an attachment and it simply died after about 10 minutes.

It would be nice if we could use this mod to point to mp3 files stored directly, that are already stored on the server (not try to make them attachments), or point the mod to mp3 file links stored on a separate server (externally).

I'll have to look around for another option....

Un-installed....

Thanks again for the help... :up:

Regards,
Badger
this is the wrong addon for what your trying to do. You are looking for a MP3 player BBCODE.
Reply With Quote
  #41  
Old 11-07-2007, 06:39 PM
derfelix derfelix is offline
 
Join Date: Nov 2001
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is awsome..
just made it work in blogs..
if someone else is interested (and if I may)

here is the modification I applied..
in the product.xml find:
PHP Code:
if ($vbulletin->options['amp3_enabled']) { 
$vbulletin->templatecache['postbit_attachment'] = preg_replace('#<tr#''<tr style=\"vertical-align: top;\"',$vbulletin->templatecache['postbit_attachment']);

$vbulletin->templatecache['postbit_attachment'] = preg_replace('#\)</td>#'')" . ( ($attachment[attachmentextension] == "mp3")?("<div style=\'float: left;\'><script src=\'./clientscript/audio/audio-player.js\' language=\'JavaScript\'></script><object style=\'vertical-align: middle;\' id=\'./attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$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?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]\' name=\'FlashVars\'/><param value=\'high\' name=\'quality\'/><param value=\'false\' name=\'menu\'/><param value=\'transparent\' name=\'wmode\'/></object></div>"):("") ) . "</td>',$vbulletin->templatecache['postbit_attachment']);

replace with:
PHP Code:
if ($vbulletin->options['amp3_enabled'] AND ($vbulletin->userinfo['userid'] > 0) ) 

    if((
strlen($vbulletin->templatecache['blog_entry_attachment'])>1) OR (strlen($vbulletin->templatecache['postbit_attachment'])>1))
    {
        
$cachedtemp = (THIS_SCRIPT == 'blog') ?  $vbulletin->templatecache['blog_entry_attachment'] : $vbulletin->templatecache['postbit_attachment'];
        
$attach_file = (THIS_SCRIPT == 'blog') ?  'blog_attachment' 'attachment';
        
$cachedtemp preg_replace('#<tr#''<tr style=\"vertical-align: top;\"',$cachedtemp);

        
$cachedtemp preg_replace('#\)</td>#'')" . ( ($attachment[attachmentextension] == "mp3")?("<div style=\'float: left;\'><script src=\'./clientscript/audio/audio-player.js\' language=\'JavaScript\'></script><object style=\'vertical-align: middle;\' id=\'./attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$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=./'.$attach_file.'.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]\' name=\'FlashVars\'/><param value=\'high\' name=\'quality\'/><param value=\'true\' name=\'menu\'/><param value=\'transparent\' name=\'wmode\'/></object></div>"):("") ) . "</td>',$cachedtemp);

        if(
THIS_SCRIPT == 'blog')
        {
            
$vbulletin->templatecache['blog_entry_attachment'] = $cachedtemp;
        }
        else
        {
            
$vbulletin->templatecache['postbit_attachment'] = $cachedtemp;
        }
        unset(
$cachedtemp);
    }

Actually the only thing I did was to change the template to parse if we are in blogs.. from $vbulletin->templatecache['postbit_attachment'] to $vbulletin->templatecache['blog_entry_attachment']
if we are not in blogs it works as usual..


It now seems to work fine in vblogs AND showthread
and i'm happy
Felix

[EDIT]: Just corrected one bracket.. and a line that got lost in cut & paste AND added that the player only appears for logged in users.. (if you want all users to see the player.. remove AND ($vbulletin->userinfo['userid'] > 0) at the beginning..)
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 07:59 PM.


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.04858 seconds
  • Memory Usage 2,336KB
  • Queries Executed 25 (?)
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_php
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete