Author Topic: How can I bypass the download.php and just have a direct link via D'load Butto  (Read 7987 times)

0 Members and 1 Guest are viewing this topic.

Offline dgandy

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Sims Fashion Barn
I have the licensed version 1.7.4. My website is located here

I hope I can explain this well enough.

Any one can download the zip files from my site...it is a free site. The zip files contain a 3D game package file and the image is a picture of this package file.
I would like to know how I can set it up so when they click on the download button, it will link directly to the zip folder instead of going through the process of download.php.

When uploading files, I always provide a url link to the zip file. The image is of the object in the zip file.

Here is an example of a file I uploaded:

Image - dgandyJeanShorts051707_blue.jpg

Thumbnail - created from image

Link to download URL - /downloads/data/media/2/dgandyJeanShorts051707_blue.zip

When the download button is clicked, I would like it to just link to the file located in /downloads/data/media/2/dgandyJeanShorts051707_blue.zip instead of going through the download.php process.

In German, I hope....

Ich habe die genehmigte Version 1.7.4. Meine Web site wird hier lokalisiert Ich hoffe, daß ich diesen Brunnen genug erklären kann. Irgendein kann die Zip Dateien von meinem Aufstellungsort downloaden..., das es ein freier Aufstellungsort ist. Die Zip Dateien enthalten eine Paketakte des Spiels 3D und das Bild ist eine Abbildung dieser Paketakte. Ich möchte können, ich es aufstellen kann so, wenn sie an die Downloadtaste klicken, es verbinde direkt mit dem Reißverschlußheft, anstatt, den Prozeß von download.php durchzulaufen. Wenn ich Akten hochlade, stelle ich immer eine URL Verbindung zur Zip Datei zur Verfügung. Das Bild ist vom Gegenstand in der Zip Datei. Ist hier ein Beispiel einer Akte, die ich hochlud: Bild - dgandyJeanShorts051707_blue.jpg Thumbnail - verursacht vom Bild Verbindung, zum von von URL zu downloaden -

Wenn die Downloadtaste angeklickt wird, möchte ich, daß es gerade mit der Akte verbindet, die in /downloads/data/media/2/dgandyJeanShorts051707_blue.zip gelegen ist, anstatt, den download.php Prozeß durchzulaufen.
« Last Edit: June 21, 2007, 08:27:08 AM by dgandy »
If it's been done before, you can do it too! If it's never been done before, you can be the first!

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
You can build up the link manually:

Code: [Select]
<a href="data/media/{cat_id}/{image_file_name}">Download</a>
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline dgandy

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Sims Fashion Barn
Thank you, Jan. The only problem is that

1. The zip folder does  not hold the image file so if I lead to the {image_file_name}, it will be wrong
and

2. If I manually link in the details portion of the image description, I will lose the ability to be able to track the download count, won't I?


Danke, Jan..
Das einzige Problem ist das

1. Das Reißverschlußheft hält nicht die Bildakte so, wenn ich zu führe {image_file_name}, es ist falsch und

2. Wenn ich manuell im Detailteil der Bildbeschreibung verbinde, verliere ich die Fähigkeit, in der Lage zuSEIN, den Downloadzählimpuls, nicht werde ich?
If it's been done before, you can do it too! If it's never been done before, you can be the first!

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Ah, sorry. I dind't read your post correctly. Ok, thats not possible. For both functions (counting downloads, offering zip files), the download must be processed through download.php. donwload.php tracks the downloads and creates the zip files on the fly.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline dgandy

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Sims Fashion Barn
Forgive me if this is a stupid question. I know nothing about php but, am trying to learn.

In Functions, if I change
$download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";

to
$download_button = "<a href=\"".$site_sess->url(ROOT_PATH."image_download_url".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";

Would that point to the download url that I entered instead of the download.php?

I'm trying to find a way to change it without having to manually change each one since I have a lot of downloads.
If it's been done before, you can do it too! If it's never been done before, you can be the first!

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Thats not fully correct. But, if you would change that, it would have the same result as i my posting above. That would directly link to the file stored on the server without couting the downloads and without the possibility to offer zip-downloads..
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search