Author Topic: And again a MP3 topic (unusual problem)  (Read 9919 times)

0 Members and 1 Guest are viewing this topic.

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
And again a MP3 topic (unusual problem)
« on: February 18, 2006, 07:51:53 PM »
Hello,

so, i'am not having trouble when i upload an mp3, it works fine. The problem is, i use other webspace for my MP3's to save traffic. But when i upload a MP3 with a remote link it gives me "choose a picture" . So next thing i tried is to put the link into the image box (next to "browse") , but that dont work of course.

Ive read the FAQ about this, and searched the forum, but i didnt found an answer for remote mp3 files

please advise

georgi

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: And again a MP3 topic (unusual problem)
« Reply #1 on: February 18, 2006, 08:44:07 PM »
and what about other file types? have you tryed "upload" remote images?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: And again a MP3 topic (unusual problem)
« Reply #2 on: February 18, 2006, 08:50:31 PM »
yes, i tried, remote image files work, thats the reason why i'am a little bit confused about that ;)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: And again a MP3 topic (unusual problem)
« Reply #3 on: February 18, 2006, 08:58:23 PM »
thats the reason why i'am a little bit confused about that ;)
Dont feel alone, I'm with you on that one - I'm confused too :lol:
Please post a link to the file (you can alter the domain name if you wish ;))
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: And again a MP3 topic (unusual problem)
« Reply #4 on: February 19, 2006, 01:45:03 AM »
It doesnt matter where the file is, its always the same. Maybe its becaus the file is using spaces? And when i paste it into the field, the spaces are converted to "%20" - maybe thats making the error?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: And again a MP3 topic (unusual problem)
« Reply #5 on: February 19, 2006, 02:00:43 AM »
It doesnt matter where the file is, its always the same. Maybe its becaus the file is using spaces?
Doubtfull
And when i paste it into the field, the spaces are converted to "%20" - maybe thats making the error?
Probably.
That's why I asked you to show the url. For example the url must end with .mp3 extension, there are some othe factors can cause this...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: And again a MP3 topic (unusual problem)
« Reply #6 on: February 19, 2006, 02:11:33 AM »
Oh, i didnt know there is someone here so late ;)

So here are the links i've tried:

http://***.234.236.193/lenorr/Hey%20DJ/Basement%20jaxx%20-%20Oh%20my%20gosh.mp3
http://***.234.236.193/lenorr/Hey%20DJ/Bob%20Sinclar%20-%20You%20Could%20Be%20My%20Lover.mp3
http://***.234.236.193/lenorr/Hey%20DJ/Tiesto%20-%20Heroes.mp3

(i past them this way, to show you how they look like in the field for the remote file)

I've tried more links, but i think thats enough. So, did i understand you that you think that the spaces are the problem ?

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: And again a MP3 topic (unusual problem)
« Reply #7 on: February 19, 2006, 02:15:10 AM »
I think the problem is more,
that you are give no url, but ips.

I had once the same behavior on localtestmachine.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: And again a MP3 topic (unusual problem)
« Reply #8 on: February 19, 2006, 02:24:23 AM »
Yes, you were right about the IP. I tried a link without IP and it works, BUT: When i click on download, nothing happens  :roll:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: And again a MP3 topic (unusual problem)
« Reply #9 on: February 19, 2006, 02:37:18 AM »
See, I've told you knowing the url could help trace the problem ;)

In includes/functions.php find:
Code: [Select]
 if (!preg_match("/^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+/i", $url)) {
Replace with:
Code: [Select]
 if (!preg_match("/^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(:[A-Z0-9][A-Z0-9_-]*)?@)?(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?(\/)?/i", $url)){
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: And again a MP3 topic (unusual problem)
« Reply #10 on: February 19, 2006, 02:58:27 AM »
great , it works !
Just two last questions:

- If i click on the thumbnail, the song plays automaticly - how can i stop that?
- the mp3-thumb is shown in the new-images, toplist etc. How can i exclude mp3-files to be shown anywhere on the site, except in this category?

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: And again a MP3 topic (unusual problem)
« Reply #11 on: February 19, 2006, 04:20:33 AM »
ups, a problem: When i click on "download" most files will not start downloading, IE shows "page not found", FF shows no error.

Strange thing is that on that file:
Code: [Select]
http://free.****.bg/wintersoul/On%20an%20Island.mp3
the dialogbox "save as..." appear

but on this one is the error:

Code: [Select]
http://katinoto.kafence.com/MP3/HOUSE/freakallweek/vinyls/Grace-Not_Over_Yet__Jakob_Carrison_Rmx-Onesided_Promo_Vinyl-2006-MTC/01_grace-not_over_yet__jakob_carrison_rmx.mp3

is it because of the long URL?

Please advise,

thanks
Georgi

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: And again a MP3 topic (unusual problem)
« Reply #12 on: February 19, 2006, 04:52:26 AM »
ok, i found the error: ive just changet

Code: [Select]
$remote_url = 0;  to
Code: [Select]
$remote_url = 1; in my download.php

So, how do i exclude the music folder, so that the files in there are not shown ANYWHERE except in this category?
I just found a way to exclude it from "random_image" , but nothing else.

Another important question for me is, when i add about 1000 remote MP3-files, will that slow down my whole gallery? I recognice that the folder, witch contains mp3's is being opened very slow - the normal folders are opened fast. Can that really be? If yes, dont answer to my first question, then i'd rather dont use remote mp3s ;)

Thaks for your help,

Georgi
« Last Edit: February 19, 2006, 05:08:59 AM by trez »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: And again a MP3 topic (unusual problem)
« Reply #13 on: February 19, 2006, 06:28:40 AM »
Any remote media WILL slow down significaly 4images, its not optimized for that...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: And again a MP3 topic (unusual problem)
« Reply #14 on: February 19, 2006, 12:49:30 PM »
Thanks, sounds like we need a new MOD, i put a request in the right forum - thanks for the help.

Georgi