• Different download options / Verschiedene Download Möglichkeiten 5 0 5 1
Currently:  

Author Topic: Different download options / Verschiedene Download Möglichkeiten  (Read 169504 times)

0 Members and 1 Guest are viewing this topic.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #90 on: January 09, 2008, 05:59:25 PM »
You no follow instruction correct. I no say for change this: $additional_download_sizes = array(72, 150, 300); (is first line from jan - page 1 in topic). ;)
My instruction is start with: $register_array = array();

Please add array in first line again ...
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

jojomart

  • Guest
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #91 on: January 09, 2008, 06:09:23 PM »
I did it, but it is no better - still only one download - plus now my 1024 button is not there with your code

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #92 on: January 09, 2008, 06:17:28 PM »
Quote
plus now my 1024 button is not there with your code

And ... you see lightbox image in page ? ... Is no empty ... ?
And not there ... what is not there ... ? Not there gone ? Not there replace ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

jojomart

  • Guest
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #93 on: January 09, 2008, 06:24:22 PM »
Nope it's not empty - I changed it back to the old functions.php because what you gave me was also messing up the details.php pages - they couldn't download the 1024 anymore.

Here is screenshot:



Edit: Sorry missed second question - yeah it showed a greyed out copy of the regular download button

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #94 on: January 09, 2008, 06:25:51 PM »
I see screenshot of 1024 with old code but where is screenshot of 1024 with new code ?

Quote
Edit: Sorry missed second question - yeah it showed a greyed out copy of the regular download button

Ah ! ok ... what is button image name of download button use for 1024 ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

jojomart

  • Guest
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #95 on: January 09, 2008, 06:29:56 PM »
I called it download_1024.gif and download_off_1024.gif

But I had to make a few changes even to Jan's code to make it work where unregistered can only download 800x600 and registered can download all sizes

This is the code I had to use to make both download types work:

Code: [Select]
$additional_download_sizes = array(1024);
$register_array = array();
foreach ($additional_download_sizes as $size) {
    ereg("(.+)\.(.+)", get_basefile(stripslashes(trim($image_row['image_media_file']))), $regs);
    $file = ((is_local_file($image_row['image_media_file'])) ? dirname($image_row['image_media_file'])."/" : MEDIA_PATH."/".$image_row['cat_id']."/").$size."/".$regs[1].".".$regs[2];
  if (!check_permission("auth_download_$size", $image_row['cat_id'])) {

       $register_array['download_button_'.$size] = "<img src=\"".get_gallery_image("download_off_$size.gif")."\" border=\"0\" alt=\"\" />";
      $register_array['download_zip_button_'.$size] = (function_exists("gzcompress") && function_exists("crc32")) ? "<img src=\"".get_gallery_image("download_zip_off_$size.gif")."\" border=\"0\" alt=\"\" />" : "";

    }
    else {
      $register_array['download_button_'.$size] = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id']."&amp;size=".$size)."\"".$target."><img src=\"".get_gallery_image("download_$size.gif")."\" border=\"0\" alt=\"\" /></a>";
      $register_array['download_zip_button_'.$size] = (function_exists("gzcompress") && function_exists("crc32")) ? "<a href=\"".$site_sess->url(ROOT_PATH."download.php?action=zip&amp;".URL_IMAGE_ID."=".$image_row['image_id']."&amp;size=".$size)."\"><img src=\"".get_gallery_image("download_zip_$size.gif")."\" border=\"0\" alt=\"\" /></a>" : "";

}

  }
  $site_template->register_vars($register_array);

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #96 on: January 09, 2008, 06:36:11 PM »
Ok, I edit topic. Try now. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

jojomart

  • Guest
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #97 on: January 09, 2008, 07:37:18 PM »
Ok, I edit topic. Try now. ;)

I don't understand - what does "I edit topic. Try now." mean?

Edit:  Ok, you changed the code - I tried it, but no luck - and it greyed out the 1024 button as well

 sorry
« Last Edit: January 09, 2008, 07:49:30 PM by jojomart »

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #98 on: January 09, 2008, 08:11:01 PM »
Quote
Ok, you changed the code - I tried it, but no luck - and it greyed out the 1024 button as well

You try with name: download_1024.gif, download_off_1024.gif, download_zip_1024.gif and download_zip_off_1024.gif ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

jojomart

  • Guest
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #99 on: January 09, 2008, 08:40:53 PM »
Quote
Ok, you changed the code - I tried it, but no luck - and it greyed out the 1024 button as well

You try with name: download_1024.gif, download_off_1024.gif, download_zip_1024.gif and download_zip_off_1024.gif ?

What I used in the lightbox.html file is

{download_zip_button}<br>{download_zip_button_1024}

I used the download_zip.gif button which enables users to download either the 800x600 images or the widescreen images
and I used the download_zip_1024.gif button for users who want to download the size of 1024 x 768


Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #100 on: January 10, 2008, 02:15:13 AM »
Quote
I used the download_zip.gif button which enables users to download either the 800x600 images or the widescreen images
and I used the download_zip_1024.gif button for users who want to download the size of 1024 x 768

Ok so after add last code I post, what is do if use {download_zip_button} and {download_zip_button_1024} ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

jojomart

  • Guest
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #101 on: January 10, 2008, 03:06:12 AM »
Quote
I used the download_zip.gif button which enables users to download either the 800x600 images or the widescreen images
and I used the download_zip_1024.gif button for users who want to download the size of 1024 x 768

Ok so after add last code I post, what is do if use {download_zip_button} and {download_zip_button_1024} ?

Nothing changed - it still only downloaded the zip file with one image inside.

I'm thinking maybe I should just make a new button called Favorites and leave it at that - they won't be able to download everything at once, but at least it gives them a place to store the ones they like, and then they can choose from the lightbox page to download whichever ones they want one at a time.

EDIT: I thought I should let you know what Mods I have installed:

Different Download Options Mod (with changes for two different downloads - user and non user)
Different cat Templates Mod (use a different details.html for the 1440 x 900 images in Widescreen category)
Calendar Mod
Notify Sender on received e-Card Mod
Batch Copy Move Edit Mod
Statistics Mod
Category Image Mod
Search Engine Friendly Mod
Let Visitors Choose How To Sort Mod
Image Rate Form Mod
Random Image Mod
Check for Duplicate Images Mod

« Last Edit: January 10, 2008, 03:23:28 AM by jojomart »

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #102 on: January 10, 2008, 03:55:45 AM »
Quote
Nothing changed - it still only downloaded the zip file with one image inside.

Sorry ... I no can help more for this ... I no think is something with MOD you install for download 1 image ... if use $user_info['lightbox_image_ids'] with $size , is possible but is first time I code this ...  :|
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

jojomart

  • Guest
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #103 on: January 10, 2008, 04:55:09 AM »
It's ok - thanks for taking so much time on it!

Joanne

jojomart

  • Guest
Re: Different download options / Verschiedene Download Möglichkeiten
« Reply #104 on: January 14, 2008, 03:56:06 PM »
Hi all,

I've had to move to a new server with my hosting, and it has the latest php software. Now this mod doesn't work for me anymore  :cry:

I don't suppose there is someone here who can figure out what needs to be changed in the code to make it work, is there?

Thanks,

Joanne