Author Topic: download name  (Read 5694 times)

0 Members and 1 Guest are viewing this topic.

Offline edu

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
download name
« on: June 22, 2005, 10:20:51 PM »
it would be possible to set the same name to all  .zip archives ?
for example: archive.zip

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: download name
« Reply #1 on: June 23, 2005, 12:55:06 AM »
yes, it would, but then most of the browsers with default settings will not download second file, they would think its the same file as the first one and use one from the cache.
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 edu

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: download name
« Reply #2 on: June 23, 2005, 08:55:49 AM »
yes, it would, but then most of the browsers with default settings will not download second file, they would think its the same file as the first one and use one from the cache.

Interesting, I wasn´t knowing this.  :roll:




Then I would like to change image_name.zip for image_id.zip, thanks in advance. :wink:

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: download name
« Reply #3 on: June 23, 2005, 01:23:38 PM »
Try this: (not tested)
in download.php find 4 lines that start with:
Code: [Select]
$file['file_path'] =below each line insert:
Code: [Select]
    $file['file_name'] = $image_id.(($size) ? "_".$size : "").".".$file_extension;
Then find:
Code: [Select]
      $file['file_name'] = get_file_name($file['file_name']).".zip";Replace it with:
Code: [Select]
      $file['file_name'] = $image_id.".zip";
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 edu

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: download name
« Reply #4 on: June 23, 2005, 02:25:05 PM »
This works perfect  :lol:

Thanks V@no !!!!!

Offline marod0er

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: download name
« Reply #5 on: June 24, 2005, 08:40:55 PM »
Vano to the rescue!!!
Greetz: Lasse