• [MOD] Multi Size Download of same image [ver 4.7] 5 0 5 1
Currently:  

Author Topic: [MOD] Multi Size Download of same image [ver 4.7]  (Read 431915 times)

0 Members and 1 Guest are viewing this topic.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #240 on: June 18, 2011, 11:50:10 PM »
On default Download Button it download 580X362 dimension which i resized.

With your mode on clicking Original Size it show 1920x1200, Which saved in big folder.

It link the real image from big folder but can not identify dimension.

Dimension identify from category (main) folder.
Yes, recheck the code you placed when you entered the turorial mod,
mainly this one...
http://www.4homepages.de/forum/index.php?topic=7499.msg33712#msg33712
Look over the download.php file insert, I think that is where your problem is...
No, looking over that mod again, I think it detect the other directoy in the functions.php file instead
Buddy Duke
www.budduke.com

Offline Nosferatu

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Project-Firepower
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #241 on: June 19, 2011, 02:37:49 AM »
OK Thank you!

On your gallery you have 7 pics above the picture, which mod do you use or how do it works that ?

thanks !

regards
jeff

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #242 on: June 19, 2011, 01:28:07 PM »
OK Thank you!

On your gallery you have 7 pics above the picture, which mod do you use or how do it works that ?

thanks !

regards
jeff

The one that I used is no longer available but this one looks like an updated version of it...
http://www.4homepages.de/forum/index.php?topic=7294.msg150916#msg150916
Buddy Duke
www.budduke.com

Offline kar76

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #243 on: June 19, 2011, 06:12:39 PM »
Hello budduke

// Download file block insert BEGIN
    switch( $image_type ) {
     case "media":
       if( $cat_id )
         $path = MEDIA_PATH."/".$cat_id;
      else
        $path = MEDIA_TEMP_PATH;
       break;
      case "big":
        $path = MEDIA_PATH."/".$cat_id."/big";
       break;
      case "download":
        $path = MEDIA_PATH."/".$cat_id."/download";
       break;
     default:
       if( $cat_id )
         $path = THUMB_PATH."/".$cat_id;
      else
        $path = THUMB_TEMP_PATH;
       break;
   }
   $path .= "/".$file_name;
// Download file block insert END


Problem is in this red line of this code. It pick image info from (/1) main folder but if i change it as $path = MEDIA_PATH."/".$cat_id."/big"; then it pick image from big folder (/1/big).

Isn't there anyway to separate image preview from image download block created by your mode.

I think if we separate both of them then we can pick image preview from main folder (then there will be no problem about size) and download image block from big folder.

I am not coder so i can not create it by my self.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #244 on: June 19, 2011, 07:59:27 PM »
The code is correct, you have something copied/placed incorrectly. If you are not getting the big file with the normal 4images download button then something is not inserted correctly.
if you look at the code you posted deeper (5 lines below the red one)
It looks for the "big" image in the case "big", if it does not detect it because of code above it, it pulls the image from the default "media" folder.
Did you install the links I posted above? They will give you the Big files that your database will look for if correctly configured (this is outside my mod)
Until you get the normal 4images download button to give you the big file, there is no way my mod will fix that error because it is outside the mod.
On default Download Button it download 580X362 dimension which i resized.
You default download button (not my mod) should not give you the resized 580X362 image. It should download the larger 1920X1200 image. When you fix that error somewhere then my mod will also be fixed because it can not look in the big folder if the normal 4images code does not see the folder.
Is this site the same one that you set me as a mobile 4images? I may have time to look through to see if I see anything.

UPDATE: I went through your files and found that if you use the updated info for the alternate directory (I was using the original) it completely messes up my code.
I installed a quick fix into your files, see how they do for you.

Any one following this thread and using the update code found here...
http://www.4homepages.de/forum/index.php?topic=7499.msg148451#msg148451
You will need to add this quick fix to get my code to work correctly till I think this through better.
at the top of my code that is inserted that begins with
Code: [Select]
// MOD multi download
$sql = "SELECT multi_download
        FROM ".CATEGORIES_TABLE."
        WHERE cat_id = ".$image_row['cat_id']." ";
$result = $site_db->query_firstrow($sql);
you need to place this code Before it.
Code: [Select]
      $big_file = MEDIA_PATH.(($image_row['cat_id'] != 0) ? "/".$image_row['cat_id'] : "")."/"."big"."/".$image_row['image_media_file'];
      $download_file = MEDIA_PATH.(($image_row['cat_id'] != 0) ? "/".$image_row['cat_id'] : "")."/"."download"."/".$image_row['image_media_file'];
       if (file_exists($big_file)){
        $bild = $big_file;
      }
       if (file_exists($download_file)){
        $bild = $download_file;
      }
      $src_download = (!file_exists($bild) && file_exists(preg_replace("/\/{2,}/", "/", get_document_root()."/".$bild))) ? preg_replace("/\/{2,}/", "/", get_document_root()."/".$bild) : $bild;
      if ($temp = @getimagesize($src_download, $bild)) {
        $download_width_height = " ".$temp[3];
        $download_width = (isset($temp[0]))? $temp[0]:"";
        $download_height = $temp[1];
      }
  $site_template->register_vars(array(
"download_width" => $download_width,
"download_height" => $download_height
));

A little sloppy work till I can look at things closer to see why they moved the width/ height info further down the code (after mine that needs it)
« Last Edit: June 19, 2011, 10:14:04 PM by budduke »
Buddy Duke
www.budduke.com

Offline Nosferatu

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Project-Firepower
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #245 on: June 20, 2011, 03:35:04 PM »
OK Thank you!

On your gallery you have 7 pics above the picture, which mod do you use or how do it works that ?

thanks !

regards
jeff

The one that I used is no longer available but this one looks like an updated version of it...
http://www.4homepages.de/forum/index.php?topic=7294.msg150916#msg150916

THANK YOU !!

Offline kar76

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #246 on: June 21, 2011, 03:30:20 PM »
Hello budduke  :D

This is Excellent Work. You get 10/10. This is what i want. Thanks for Everything.

And one more thing this fix show all dimensions from all sizes. If you have time see if you can change it to identify only size uploaded

image only. It will reduce web-space and  some non required dimensions. PM when you fix it.

Thanks

Offline raghunadhreddys

  • Newbie
  • *
  • Posts: 46
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #247 on: July 29, 2011, 08:38:27 PM »
After modifying the files,my site has goneeeeeeeeeeee.nothing found.waste moddddddddddd

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #248 on: July 30, 2011, 12:25:54 AM »
After modifying the files,my site has goneeeeeeeeeeee.nothing found.waste moddddddddddd

Are you sure that you followed the steps correctly? There are quite a few people using this mod without any issues...
If you zip and send me your modified files I will take a look to see what might be wrong...
Buddy Duke
www.budduke.com

Offline pkwebhost

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #249 on: August 21, 2011, 01:47:26 PM »
hi
i have setup all but it giving error

DB Error: Bad SQL Query: SELECT multi_download FROM 4images_categories WHERE cat_id = 3
Unknown column 'multi_download' in 'field list'

DB Error: Bad SQL Query: SELECT multi_download FROM 4images_categories WHERE cat_id = 3
Unknown column 'multi_download' in 'field list'

DB Error: Bad SQL Query: SELECT multi_download FROM 4images_categories WHERE cat_id = 3
Unknown column 'multi_download' in 'field list'
for live link
xxx: megafdxxx: /details. php?image_id=1

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #250 on: August 21, 2011, 07:58:03 PM »
@pkwebhost,
Did you run the install file that should have placed the multi_download column into your datqabase?
Buddy Duke
www.budduke.com

Offline ajaykumar9887

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #251 on: September 13, 2011, 04:28:12 PM »
its not working for me(i try fresh install on 4image 1.7.9......it show no error.....but multiple download option is not available..............

you can check my follwing url

xxx: xxx: studyparadisexxx: /wallpapers/img-beautiful-tropical-nature-dsc04685-6411. htm

if you can check i send my login details


reply me--------------i am waiting for it

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #252 on: September 13, 2011, 07:04:57 PM »
its not working for me(i try fresh install on 4image 1.7.9......it show no error.....but multiple download option is not available..............

you can check my follwing url

xxx: xxx: studyparadisexxx: /wallpapers/img-beautiful-tropical-nature-dsc04685-6411. htm

if you can check i send my login details


reply me--------------i am waiting for it

When you go to your admin panel, under edit categories, and edit the category that you want to use for multi-download. Is the option listed there to select?
Buddy Duke
www.budduke.com

Offline ajaykumar9887

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #253 on: September 20, 2011, 02:20:07 PM »
i got following error.....

Code: [Select]
Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home//public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

Warning: Division by zero in /home/studyajr/public_html/wallpapers/includes/functions.php on line 632

please suggest me solution
« Last Edit: September 20, 2011, 08:11:55 PM by Rembrandt »

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.4]
« Reply #254 on: September 21, 2011, 12:51:43 AM »
@ ajaykumar9887,

I have not seen that message for a few versions. I just tested my test site and do not see the division by zero.
If you are getting it then there may still be a bug floating around this mod I will need to work on..
the easy fix if to turn off the warning messages in php for now. the code will still function till I have time to look at it.
If you send me a zip file of your changed files I can look them over to see if anything is out of place.
Buddy Duke
www.budduke.com