vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - aMP3 - (mp3 attachment player) (https://vborg.vbsupport.ru/showthread.php?t=161567)

Coders Shack 10-30-2007 10:00 PM

aMP3 - (mp3 attachment player)
 
[hr]value[/hr]
. . . . . . . . Brought to you by
https://vborg.vbsupport.ru/
. . . 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]

Coders Shack 10-30-2007 11:14 PM

reserved because i feel like it :D

DJ XtAzY 10-30-2007 11:50 PM

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?

gwerzal 10-30-2007 11:55 PM

Very cool mod.

Just need to find a use for it.

Coders Shack 10-30-2007 11:58 PM

Quote:

Originally Posted by XtAzY (Post 1372381)
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?

not sure about that, i just piggy backed on a public open source flash player. (this mod literately took me 7 minutes)

yahoooh 10-31-2007 12:12 AM

i look for wma player , so i upload atachement and then there is an option to play wma

it is perfect if u support multible extension ,

iogames 10-31-2007 12:15 AM

Quote:

Originally Posted by Coders Shack (Post 1372385)
not sure about that, i just piggy backed on a public open source flash player. (this mod literately took me 7 minutes)

I will wait for the next version then... :D

DJ XtAzY 10-31-2007 12:15 AM

Quote:

Originally Posted by Coders Shack (Post 1372385)
not sure about that, i just piggy backed on a public open source flash player. (this mod literately took me 7 minutes)

Dam.. it would have been cool if it's possible cuz then we could have finally have a player that play mp3s in demo mode, useful for music site selling music, etc =]

Is it possible to have an option to only be enabled in specific forums?

Coders Shack 10-31-2007 12:22 AM

Quote:

Originally Posted by XtAzY (Post 1372404)
Dam.. it would have been cool if it's possible cuz then we could have finally have a player that play mp3s in demo mode, useful for music site selling music, etc =]

Is it possible to have an option to only be enabled in specific forums?

it would be possible to enable it to specific forums, depends on how many people like this mod.

bigcurt 10-31-2007 03:31 AM

Don't need it but definitely sexy. Thanks for your submission.

Analogpoint 10-31-2007 03:38 AM

Was this your inspiration? :D https://vborg.vbsupport.ru/showpost....88&postcount=4

BTW, I visited the live demo site and couldn't get any of the mp3s to play. :(

Coders Shack 10-31-2007 04:10 AM

Quote:

Originally Posted by Analogpoint (Post 1372505)
Was this your inspiration? :D https://vborg.vbsupport.ru/showpost....88&postcount=4

BTW, I visited the live demo site and couldn't get any of the mp3s to play. :(

Yea that was the inspiration, tried to find it but i guess i lost it lol.

Also my sites attachments are set to member only so if i update this product i will be:

+ hiding the player if attachment download is set to member only or user group specific
+ ability to use it only in specified forums rather than globally

jasculs 10-31-2007 04:12 AM

For an updated version can you make it possible to play the mp3 inline and to also give the options to download it like the screen shot in the post that Analogpoint posted.

yoyoyoyo 10-31-2007 04:50 AM

Quote:

Originally Posted by Analogpoint (Post 1372505)
BTW, I visited the live demo site and couldn't get any of the mp3s to play. :(

I think you have to be a member and logged in to listen to it

bazzup 10-31-2007 07:27 PM

mate this is awsome we provide ringtones so this is just perfect try before you download

I will mark as installed but hold back on installing to see how it develops, I sure hope it does.

regards

Khalid-B 10-31-2007 07:50 PM

hello,
i installed this hack but nothing change with my forum .
its just show attached file and when i click at this link its give me a download option as normal with attached files.
Thanks

mhammed 10-31-2007 08:47 PM

Imagine that you have 1000 visitors who like to listen from your site
It would block your server.
It would be interesting to limit the use to certain group

Analogpoint 10-31-2007 09:54 PM

Quote:

Originally Posted by mhammed (Post 1373018)
Imagine that you have 1000 visitors who like to listen from your site
It would block your server.
It would be interesting to limit the use to certain group

It wouldn't "block" your server any more than someone downloading the attachments.

mhammed 10-31-2007 11:36 PM

Quote:

Originally Posted by Analogpoint (Post 1373059)
It wouldn't "block" your server any more than someone downloading the attachments.

Of course if you tolerate that guests download in their way
But: this is not the case

And if you ban a member ; It not prevent the use of your site

Coders Shack 11-01-2007 01:50 AM

Quote:

Originally Posted by nosherwan9 (Post 1372986)
hello,
i installed this hack but nothing change with my forum .
its just show attached file and when i click at this link its give me a download option as normal with attached files.
Thanks

do you have a custom attachment template?
Quote:

Originally Posted by mhammed (Post 1373105)
Of course if you tolerate that guests download in their way
But: this is not the case

And if you ban a member ; It not prevent the use of your site

dude its just like downloading the file when some one plays it, i haven't changed how the attachments work in any way.

Roflstilzchen 11-01-2007 10:15 AM

G.R.E.A.T.!!!

support for rm and other sound formats would be cool :)

mhammed 11-01-2007 12:30 PM

Quote:

Originally Posted by Coders Shack (Post 1373157)
dude its just like downloading the file when some one plays it, i haven't changed how the attachments work in any way.

What I wanted to say; Is that the drive is visible and usable by all.
Guest; Banned ...
It would be best to limit its use to members; and certain group

JohnBee 11-01-2007 01:27 PM

Very slick MOD.

I would love to see this show a custom icon(soundbit) in the forumdisplay instead of the default paperclip though.
Another cool thing would be if the use could keep surfing the site and keep the music going :p

Thanks for this.

yoyoyoyo 11-02-2007 03:08 AM

Quote:

Originally Posted by JohnBee (Post 1373448)
Another cool thing would be if the use could keep surfing the site and keep the music going :p

https://vborg.vbsupport.ru/showthread.php?t=137296

steveninstl 11-02-2007 04:32 PM

did I miss something? what folders do you put the javascript and player in? I did not see a file structure or instructions for that.

This will be a GREAT mod if I can get it installed on my forum!

Booyakan 11-02-2007 04:40 PM

EDIT.......... works great!!!

two things.. if i use the attach code, the player doesnt show up - any fix?

1)example...[ATTACH]example[/ATTACH] blah blah description of song here.

in this example the mp3 is still downloadable, but the player doesnt appear in the post..

2) can we please have a volume control on the player?

once again, thanks!

mystic10 11-02-2007 10:04 PM

i have it installed but i am lost can u please give some screen shots it helps me as i dont see any diffence

brandondrury 11-02-2007 10:09 PM

Thanks a TON for this mod! I was about to drop some money on a script that didn't feel right (Jamroom) just to have this kind of functionality.

Brandon

slmoney 11-02-2007 10:29 PM

INSTALLED...and I might say AWESOME. My forum hosts mobile phone ringtones..and this mod helps the user decide if the tone is what they want...this is so freakin awesome!

alboking 11-04-2007 02:35 PM

I need some help ? :P can we get thies to work on vBadvanced CMPS v3.0 RC1 : Like when u post a Attached Files : and get to show it on the Vb Cmps ! and play that file ?...

DJ XtAzY 11-04-2007 08:41 PM

Quote:

Originally Posted by XtAzY (Post 1372381)
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.

Coders Shack 11-04-2007 09:16 PM

Quote:

Originally Posted by XtAzY (Post 1375833)
Ok nevermind. I found out how to do this.

mind enlightening everyone else on how you accomplished this task?

Booyakan 11-05-2007 03:42 AM

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

Coders Shack 11-05-2007 04:27 AM

Quote:

Originally Posted by Booyakan (Post 1376009)
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.

Booyakan 11-05-2007 02:11 PM

Quote:

Originally Posted by Coders Shack (Post 1376031)
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..

BadgerDog 11-07-2007 12:29 PM

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

yoyoyoyo 11-07-2007 12:36 PM

Quote:

Originally Posted by BadgerDog (Post 1377695)
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

BadgerDog 11-07-2007 01:11 PM

Quote:

Originally Posted by yoyoyoyo (Post 1377699)
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

Coders Shack 11-07-2007 05:14 PM

Quote:

Originally Posted by BadgerDog (Post 1377716)
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.

derfelix 11-07-2007 06:39 PM

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 :rolleyes:
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..)


All times are GMT. The time now is 05:19 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.01410 seconds
  • Memory Usage 1,867KB
  • 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
  • (2)bbcode_php_printable
  • (19)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