• [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 433084 times)

0 Members and 1 Guest are viewing this topic.

Offline satine88

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 4.1]
« Reply #150 on: May 17, 2010, 07:49:02 PM »
Thanks you budduke :) !

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Multi Size Download of same image [ver 4.1]
« Reply #151 on: June 02, 2010, 09:14:17 PM »
Hi budduke,
                              After a long time I tried to put this MOD in my gallery and made all the changes in my test gallery. After doing the changes, I tried to resize one wide screen (1280x800) image and one normal (1600x1200) image to a lower size image and the output size came up like below..

1280x800 resized :
Resize option selected actual resized image
1024x7681024x640
800x600800x500
1280x7201152x720

1600x1200 size image ;
Resize option selected actual resized image
800x600800x600
1024x7681024x768
1280x8001066x800
1400x10501400x1050

After seeing this, I thought, it would be great if we only resize the a widescreen image to other small wide-screen format image and normal (4:3) resolution image to other smaller size images.

So, now the questions are ..

1. Is it possible to make the changes in the code, to display only different widescreen resolutions on the screen, if the image is actually a widescreen image and  display only normal resolution options, if the image is a normal resolution image ?

2. Right now if we are selecting to open the resize image in a new window then the address bar looks like

www.yourdomain.com/download.php?action=resize&image_id=4609&multi_download_select=8  

Is it possible to make some changes ( may be in .htaccess or some other file ) so that the url will be like ..

www.yourdomain.com/r-image-name-image_id-1280x800.htm   ?

1280x800 will be different for different size images...



Any help on this is appreciated... !! :)


Thanks,
batu544

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.1]
« Reply #152 on: June 03, 2010, 12:57:08 AM »
@ batu544,

This Mod sure has taken a life of its own. Everyone has come up with some pretty neat additions to it, this one also...

let me answer the 2 question first, I do not know anything about .htaccess files, my provider does not support them so I have not looked into them. Hopefully someone else can help you there. The only thing that they may have a hard time would be knowing the multi_down_select=8 is equal to 1280X800. good luck on that one.

the other request, yes, it should be possible. I can make it do a formula on the image to gets its ratio and only display sizes that fall into the same ratio. The only downside to that would be if you/or a user uploaded an image that was 1280X799 instead of 1280X800 then none of the selections would match. The sizes would have to be an exact ratio match.

Another way that I may be able to do would be to allow only certain groups to be available depending on the category they are in.
In other words, you would have a wide screen category and only be able to use sizes in group3 and another category for group1 and then those options would be the only ones available. I may be able to make it so you can choose more then one group per category, like group2 and 3 for a category.

My question would be, would it be better to do this image by image or by category?

I have some other things on my plate but will play with the mod some more to see what I can do,

I added a poll to this thread if everyone can choose which way they would prefer it to work...
Buddy Duke
www.budduke.com

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Multi Size Download of same image [ver 4.1]
« Reply #153 on: June 03, 2010, 06:01:25 AM »
Hi budduke,
                   Its great to know that its doable :) . I think image ratio approach will be a good option. May be following ratio details will help you..

Code: [Select]
"wide" => "1.6",
"normal" => "1.33",
"iphone" => "0.67",
"normal5.4" => "1.25",
"HD" => "1.78",
"multi4.3" => "2.67",
"multi16.5" => "3.2",
"other" => "0"

Thanks,
batu544

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.2]
« Reply #154 on: June 06, 2010, 09:59:22 PM »
@batu544,

Have just updated it to version 4.2 which includes what you were asking for...
Let me know how it works.
You will see that you only have to replace 2 inserts with the updated ones..
Buddy Duke
www.budduke.com

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Multi Size Download of same image [ver 4.2]
« Reply #155 on: June 09, 2010, 09:57:38 PM »
budduke,
                 I just implemented this MOD in my website.. and it works fine also..

Thank you for this mod.. :)


batu544

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Multi Size Download of same image [ver 4.2]
« Reply #156 on: June 11, 2010, 05:55:21 PM »
Hi,
    A small issue, I noticed in my website..  When I am selecting the Original size Its not opening in the new window..  :(


Could you please let me know what needs to be changed for this ?

Thanks,
batu544

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.2]
« Reply #157 on: June 12, 2010, 04:21:26 PM »
Hi,
    A small issue, I noticed in my website..  When I am selecting the Original size Its not opening in the new window..  :(


Could you please let me know what needs to be changed for this ?

Thanks,
batu544


I little oversight on my part...
I have changed my original post to include this change but if you already have the mod installed...

in your includes\functions.php file...

find
Code: [Select]
$multi_download_options .= "<a href='".ROOT_PATH."download.php?action=resize&amp;image_id=".$image_row['image_id']."&amp;multi_download_select=".$var."'>".$lang['original_size']."</a>";replace with
Code: [Select]
$multi_download_options .= "<a href='".ROOT_PATH."download.php?action=resize&amp;image_id=".$image_row['image_id']."&amp;multi_download_select=".$var."'".$multi_download_var['target'].">".$lang['original_size']."</a>";
find
Code: [Select]
$multi_download_options .= "<a href='".ROOT_PATH."download.php?action=resize&amp;image_id=".$image_row['image_id']."&amp;multi_download_select=".$var."'><img src='".get_gallery_image("original_size.".$multi_download_var['button'])."' ";replace[/b[ with
Code: [Select]
$multi_download_options .= "<a href='".ROOT_PATH."download.php?action=resize&amp;image_id=".$image_row['image_id']."&amp;multi_download_select=".$var."'".$multi_download_var['target']."><img src='".get_gallery_image("original_size.".$multi_download_var['button'])."' ";
Buddy Duke
www.budduke.com

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Multi Size Download of same image [ver 4.2]
« Reply #158 on: June 12, 2010, 08:38:54 PM »
Thanks budduke.. now everything is okay.. :)

Just a thought.. if it can be possible..


Now, while selecting to open the resized image ... its only opening the image in a new window..  It will be better if we can make a template for this... so that may be we can add little header, title, keyword and description tags for better SEO..

Thanks,
batu544

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.2]
« Reply #159 on: June 14, 2010, 03:02:09 PM »
Thanks budduke.. now everything is okay.. :)

Just a thought.. if it can be possible..


Now, while selecting to open the resized image ... its only opening the image in a new window..  It will be better if we can make a template for this... so that may be we can add little header, title, keyword and description tags for better SEO..

Thanks,
batu544


My thought is that when a user clicks on the download button, they should get the image they are asking for and not more pages with ads and information, they just want the file.
So my answer would be no. If you are set on making another page, you can add to the echo command from the insert in the download.php file. that will echo all the sruff you want to display on that popup. but no, my mod stops there.
Buddy Duke
www.budduke.com

Offline SilverShadow

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • SilverShadow Gallery
Re: [MOD] Multi Size Download of same image [ver 4.2]
« Reply #160 on: June 21, 2010, 05:15:48 PM »
Nothing to say but Hats Off :) Really highly appreciated.

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Multi Size Download of same image [ver 4.2]
« Reply #161 on: June 23, 2010, 06:49:03 PM »
Hi budduke,
                   Found a bug..  After installing this mod.. if I am not using the multi download option for category and using the normal download button.. then instead of downloading the image.. the image just opens in the same window....


it would be great if you find a fix for this.. !!

Thanks,

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 4.2]
« Reply #162 on: June 24, 2010, 01:23:07 AM »
Found a bug..  After installing this mod.. if I am not using the multi download option for category and using the normal download button.. then instead of downloading the image.. the image just opens in the same window....

In your download.php file
find
Code: [Select]
//MOD multi download for popup window
if ($multi_download_var['target']<>""){
echo "<img src='".$file['file_path']."'/>";
}
else{
        send_file($file['file_name'], $file['file_path']);
    }
//END MOD multi download for popup window

Replace with...
Code: [Select]
//MOD multi download for popup window
if (($multi_download_var['target']<>"") && $size){
echo "<img src='".$file['file_path']."'/>";
}
else{
send_file($file['file_name'], $file['file_path']);
}
//END MOD multi download for popup window

I also noticed that it does the same thing when you select original image...
this should fix this problem...
in your includes/functions.php file...
find
Code: [Select]
$multi_download_options .= "<a href='".ROOT_PATH."download.php?action=resize&amp;image_id=".$image_row['image_id']."&amp;multi_download_select=".$var."'>".$lang['original_size']."</a>";replace with...
Code: [Select]
$multi_download_options .= "<a href='".ROOT_PATH."download.php?action=resize&amp;image_id=".$image_row['image_id']."&amp;multi_download_select=".$var."' ".$multi_download_var['target'].">".$lang['original_size']."</a>";
find
Code: [Select]
$multi_download_options .= "<a href='".ROOT_PATH."download.php?action=resize&amp;image_id=".$image_row['image_id']."&amp;multi_download_select=".$var."'><img src='".get_gallery_image("original_size.".$multi_download_var['button'])."' ";replace with...
Code: [Select]
$multi_download_options .= "<a href='".ROOT_PATH."download.php?action=resize&amp;image_id=".$image_row['image_id']."&amp;multi_download_select=".$var."' ".$multi_download_var['target']."><img src='".get_gallery_image("original_size.".$multi_download_var['button'])."' ";
Let me know if that fixes it and I will update my original post...
Buddy Duke
www.budduke.com

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Multi Size Download of same image [ver 4.2]
« Reply #163 on: June 24, 2010, 04:49:18 AM »
budduck -
                Download.php changes worked for me.. I have not applied the function.php because for me everything looks okay.. ( original size also works fine because I already have applied some fix which was posted earlier ) ..


Thanks,
batu544

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Multi Size Download of same image [ver 4.2]
« Reply #164 on: July 02, 2010, 01:59:23 PM »
Hi Budduck.. !!
                         I am back again with a request .. :) 

Now, If I am accessing the download url directly .. then its showing me an error message "Hotlinking is not allowed", Can it be possible to stop this error message and display the actual image what user has requested.. ??


Thanks
batu544