phpBBHacks.com - Music Online (Download) Fix
Bad Boy Blog, an unofficial Diddy and Bad Boy fan blog
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Add Us:     MySpace     Facebook     StumbleUpon
Username:    Password:
Remember Me?    
Music Online (Download) Fix
BlinkList
del.icio.us
Furl
linkaGoGo
reddit
Simpy
Mister Wong
Yahoo! My Web

Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Hack Development
 See a User Guidelines violation? Please contact us.
Author Message

votinh
New User

Joined: 23 May 2005
Posts: 10

PostPosted: May 25th 2005, 8:54 pm    Post subject: Music Online (Download) Fix Reply with quote

file music_download.php

Are you using the MUSIC DOWNLOAD hack (allow you to have a link for members to download your music)??? I have a problem with the Firefox browser that user try to download music and it WONT play (downloaded in wrong format). Firefox browser forgot to give the file an extension name and Windows didnt recognized the file. Music Download hacks work fine in Internet Explorer browser. if you have the same problem, here is how to fix:

open music_download.php

FIND

Quote:
header("Content-Disposition: attachment; filename=\"$song_title - $song_singer\"");
readfile(MUSIC_UPLOAD_PATH . $thissong['song_filename']);


REPLACE WITH

Quote:
header("Content-Disposition: attachment; filename=\"$song_title - $song_singer$song_filetype\"");
readfile(MUSIC_UPLOAD_PATH . $thissong['song_filename']);



FIND

Quote:
header("Content-Disposition: attachment; filename=\"$song_title - $song_singer\"");
readfile($thissong['song_url']);


REPLACE WITH

Quote:
header("Content-Disposition: attachment; filename=\"$song_title - $song_singer$song_filetype\"");
readfile($thissong['song_url']);



Now this fix the error on my Firefox users
Back to top
View user's profile Send private message

candysmall
Well Known User

Joined: 16 Sep 2004
Posts: 218

PostPosted: October 12th 2006, 12:08 am    Post subject: Reply with quote

I tried this and it doesn't work... my page just reloads when I click the download link.
_________________
Candy A Lowd
Back to top
View user's profile Send private message Visit poster's website

mikehobo
New User

Joined: 07 Nov 2006
Posts: 16

PostPosted: February 27th 2007, 10:52 pm    Post subject: Reply with quote

Well, there was an update included in the most recent version.

Code:
################################################################
## Title:      Edit Download Add-on
## Author:      Cf Manager < cf_manager@yahoo.com > (Son Thai)
## Support:      http://cfmanager.net.tf
##         http://cfmanager.gate2vn.net
##
## Description:      If you are using Music Download Add-on v1.0.1, you must edit it
##         after upgrade to MOM 2.0.6.
##
## Installation Level:   Easy
## Installation Time:   5 minutes
## Files To Edit:   1
##         music_download.php
##
## Included Files:   n/a
##
################################################################
## Author Notes:
##    Full support for this MOD can be obtained at: http://cfmanager.net.tf
##    This MOD was tested with the following databases: MySQL
##   Do not remove my copyright notice!
################################################################
## This MOD is released under the GPL License.
################################################################
## Before UPGRADING, You Should Back Up All Files and your DB
################################################################
#
#-----[ OPEN ]--------------------------------------------------
#
music_download.php

#
#-----[ FIND ]--------------------------------------------------
#
if ( $thissong['song_url'] == '' )
{
   $song_filetype = substr($thissong['song_filename'], strlen($thissong['song_filename']) - 4, 4);
   $song_filename = $thissong['song_filename'];
}
else
{
   $song_filetype_url = substr($thissong['song_url'], strlen($thissong['song_url']) - 4, 4);
   $song_url = $thissong['song_url'];
}

#
#-----[ REPLACE BY ]--------------------------------------------
#
if ( $thissong['song_url'] == '' )
{
   $song_filetype = substr($thissong['song_filename'], strlen($thissong['song_filename']) - 3, 3);
   $song_filename = $thissong['song_filename'];
}
else
{
   $song_filetype_url = substr($thissong['song_url'], strlen($thissong['song_url']) - 3, 3);
   $song_url = $thissong['song_url'];
}

#
#-----[ FIND ]--------------------------------------------------
#
      case '.mp3':
         header('Content-type: audio/mp3');
         break;
      case '.wav':
         header('Content-type: audio/wav');
         break;
      case '.wma':
         header('Content-type: audio/x-ms-wma');
         break;
      default:
         die('The filename data in the DBs was corrupted');
   }
   header("Content-Disposition: attachment; filename=\"$song_title - $song_singer\"");
   readfile(MUSIC_UPLOAD_PATH  . $thissong['song_filename']);
   }
else
   {
   switch ( $song_filetype_url )
   {
      case '.mp3':
         header('Content-type: audio/mp3');
         break;
      case '.wav':
         header('Content-type: audio/wav');
         break;
      case '.wma':
         header('Content-type: audio/x-ms-wma');
         break;

#
#-----[ REPLACE BY ]--------------------------------------------
#
      case 'mp3':
         header('Content-type: audio/mp3');
         break;
      case 'wav':
         header('Content-type: audio/wav');
         break;
      case 'wma':
         header('Content-type: audio/x-ms-wma');
         break;
      case 'wmv':
         header('Content-type: video/x-ms-wmv');
         break;
      case 'peg':
         header('Content-type: video/mpeg');
         break;
      case 'avi':
         header('Content-type: video/x-msvideo');
         break;
      case 'swf':
         header('Content-type: application/x-shockwave-flash');
         break;
      case '.au':
         header('Content-type: audio/basic');
         break;
      case 'mid':
         header('Content-type: audio/mid');
         break;
      case '.qt':
         header('Content-type: video/quicktime');
         break;
      case 'ram':
         header('Content-type: audio/x-pn-realaudio');
         break;
      case '.rm':
         header('Content-type: application/vnd.rn-realmedia');
         break;
      default:
         die('The filename data in the DBs was corrupted');
   }
   header("Content-Disposition: attachment; filename=\"$song_title - $song_singer\"");
   readfile(MUSIC_UPLOAD_PATH  . $thissong['song_filename']);
   }
else
   {
   switch ( $song_filetype_url )
   {
      case 'mp3':
         header('Content-type: audio/mp3');
         break;
      case 'wav':
         header('Content-type: audio/wav');
         break;
      case 'wma':
         header('Content-type: audio/x-ms-wma');
         break;
      case 'wmv':
         header('Content-type: video/x-ms-wmv');
         break;
      case 'peg':
         header('Content-type: video/mpeg');
         break;
      case 'avi':
         header('Content-type: video/x-msvideo');
         break;
      case 'swf':
         header('Content-type: application/x-shockwave-flash');
         break;
      case '.au':
         header('Content-type: audio/basic');
         break;
      case 'mid':
         header('Content-type: audio/mid');
         break;
      case '.qt':
         header('Content-type: video/quicktime');
         break;
      case 'ram':
         header('Content-type: audio/x-pn-realaudio');
         break;
      case '.rm':
         header('Content-type: application/vnd.rn-realmedia');
         break;

################################################################
################################################################
#
#-----[ HAVE FUN! ALL MY USERS ]--------------------------------
#
# EoM
Back to top
View user's profile Send private message

garugc
New User

Joined: 13 Dec 2006
Posts: 11
Location: Germany

PostPosted: October 25th 2007, 3:48 am    Post subject: Reply with quote

I´m sorry, but that doesn´t work.

I´ve done this fix, and the downloaded files have no fileextension (like before the fix)

any other ideas?
Back to top
View user's profile Send private message Visit poster's website

Lady Di
New User

Joined: 23 Sep 2006
Posts: 4

PostPosted: March 9th 2008, 9:28 am    Post subject: Reply with quote

Still no solution for this in 2008 (sighs)
Back to top
View user's profile Send private message

~HG~
Dedicated User

Joined: 08 Nov 2003
Posts: 3232
Location: Australia

PostPosted: March 11th 2008, 12:43 pm    Post subject: Reply with quote

Do you not need Active X controls to download music and or video's?

Hence the reason you cant download using Firefox without an active X plug in.
_________________
~HG~

|| rodneyangell.com || My Hacks || Tutorial - Stopping Spam Bots
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Hack Development All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB.it - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil

Network: iFroggy Network Blog - iFroggy Hosting - SportsForums.net - KarateForums.com - YanksBlog.com - PhotoshopForums.com - DeveloperCube - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - DrGregHouse.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Staff - User Guidelines >

Copyright © 2001-2009. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. Hosted by 100MegsWebHosting. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.