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

0 Members and 4 Guests 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 2.1]
« Reply #75 on: July 06, 2009, 12:09:49 PM »
just returned from small vacation...

Ya i understand when it comes on Large websites...

when a user chooses ( crop / Stretch ) a new file is created...

these are created on the Fly right ? so after few hours u can automatically delete them.. coz its not gonna use for other users... (let me know if im wrong)



I talked myself out of the user being able to select options like that due to the way the mod is put together, so
since the settings are global, it will only create the size that user is asking for with the crop/stretch settings that you set for all the images, Yes, it does create a image_resized_1024X768.jpg file in the big folder. You can delete them if you want but if another user requests the same size download then they will automatically receive the one already created, saving server CPU time, so I would not delete them unless space is an issue.
Buddy Duke
www.budduke.com

Offline varoon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #76 on: July 08, 2009, 12:12:09 PM »
Wow... Ver 3 is live !!!

updated the code and everything seems fine...

Thx... for the mod...

it would be even more good if user can select Crop / stretch

but there might be problem.. in current way of storing files.

coz.. when a user requested Crop and downloaded a file.. and if wants to select the same file and size.. the system does not generate again.. it gives the existing converted file...

so u have to generate download file each time for every user request...

Offline varoon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #77 on: July 10, 2009, 03:37:27 PM »
hi.

How do i Auto Hide the Large resolutions download links than the Original image size

Eg:

original size  : 800 x 600
Large size : 1024 x 768

here i want to hide the 1024  in the download option..

is it possible ???

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #78 on: July 10, 2009, 08:48:00 PM »
hi.

How do i Auto Hide the Large resolutions download links than the Original image size

Eg:

original size  : 800 x 600
Large size : 1024 x 768

here i want to hide the 1024  in the download option..

is it possible ???

I think this is what you are wanting?
http://www.4homepages.de/forum/index.php?topic=22741.msg137970#msg137970

you can just delete the arrays that you do not want people to be able to select.
This is a global settings so this will effect everyone and not just per user or per group.

If you are just wanting only sizes smaller the original then that setting will be in your admin panel, under categorie settings, you will see that as an option.

let me know if I mis understood your question
Buddy Duke
www.budduke.com

Offline lona_jasty

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #79 on: July 11, 2009, 05:57:04 AM »
Wow, Very happy to see v3.

Quote
* Added variables that you can now set crop settings to get actual size when resizing (New to ver 3.0)

Its great, if it will work perfectly.

Regards

Offline varoon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #80 on: July 13, 2009, 09:05:01 AM »
hi.

How do i Auto Hide the Large resolutions download links than the Original image size

Eg:

original size  : 800 x 600
Large size : 1024 x 768

here i want to hide the 1024  in the download option..

is it possible ???

I think this is what you are wanting?
http://www.4homepages.de/forum/index.php?topic=22741.msg137970#msg137970

you can just delete the arrays that you do not want people to be able to select.
This is a global settings so this will effect everyone and not just per user or per group.

If you are just wanting only sizes smaller the original then that setting will be in your admin panel, under categorie settings, you will see that as an option.

let me know if I mis understood your question

Not Actually... later i found myself.. u hav already DONE it  :)

"""Only allow smaller sizes then original to be selectable""" ( available at Add / Edit categories at admin panel)

Thx for that option...  :mrgreen:

Can u provide an option to Delete all Files Created in BIG Folders ????  :roll:
« Last Edit: July 13, 2009, 09:35:12 AM by varoon »

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #81 on: July 13, 2009, 02:45:24 PM »

Can u provide an option to Delete all Files Created in BIG Folders ????  :roll:

If you installed the mod correctly, there should be a plugin in your control panel that will clear out the resized files
Buddy Duke
www.budduke.com

Offline varoon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #82 on: July 13, 2009, 03:29:34 PM »

Can u provide an option to Delete all Files Created in BIG Folders ????  :roll:

If you installed the mod correctly, there should be a plugin in your control panel that will clear out the resized files

Cool....  :thumbup:

"""Clear Multi Download Cache"""" just Found...  :wink:

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #83 on: July 14, 2009, 10:44:38 AM »
this mod rokzzzz..... The greatest mod in the gallery :) congratzzzzz
I'm Back :)

Offline varoon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #84 on: July 15, 2009, 12:22:17 PM »
Hi i got a Error Message !

While i click New images i get error msg at top...  :(

url : /search.php?search_new_images=1

##########
Notice: Undefined variable: multi_download_options_string in /home/content/v/a/r/xxxx/html/xyz.com/includes/functions.php on line 398

Notice: Undefined index: download_width in /home/content/v/a/r/xxxx/html/xyz.com/includes/functions.php on line 528
##########

i just found that its something related to Images per page

coz when i increase the no. of images displayed. Errors also occurs many times... 

may i know y this occurs ?? did anyone else get the same error ?



Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #85 on: July 16, 2009, 12:40:25 AM »
Hi i got a Error Message !

While i click New images i get error msg at top...  :(

url : /search.php?search_new_images=1

##########
Notice: Undefined variable: multi_download_options_string in /home/content/v/a/r/xxxx/html/xyz.com/includes/functions.php on line 398

Notice: Undefined index: download_width in /home/content/v/a/r/xxxx/html/xyz.com/includes/functions.php on line 528
##########

i just found that its something related to Images per page

coz when i increase the no. of images displayed. Errors also occurs many times... 

may i know y this occurs ?? did anyone else get the same error ?




The first error looks like you did not remove the old mod before pasting the new one in. Look at the blue area of my first post. I am no longer using that string in the mod. I will look over the original code to see if I forgot something...

The second error was an oversight on my part.
This is what I think will fix the problem. Let me know if it works and I will modify my original post to include the change.

in your functions file...
look for
Code: [Select]
$max_width = $site_template->val_cache['download_width'];
if (ISSET($max_width)){
$max_height = $site_template->val_cache['download_height'];
}
else {

Replace with...
Code: [Select]
if (ISSET($site_template->val_cache['download_width'])){
$max_width = $site_template->val_cache['download_width'];
$max_height = $site_template->val_cache['download_height'];
}
else {

see what that does for you and let me know...
Buddy Duke
www.budduke.com

Offline varoon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #86 on: July 16, 2009, 09:03:39 AM »
The first error looks like you did not remove the old mod before pasting the new one in. Look at the blue area of my first post. I am no longer using that string in the mod. I will look over the original code to see if I forgot something...

The second error was an oversight on my part.
This is what I think will fix the problem. Let me know if it works and I will modify my original post to include the change.

in your functions file...
look for
Code: [Select]
$max_width = $site_template->val_cache['download_width'];
if (ISSET($max_width)){
$max_height = $site_template->val_cache['download_height'];
}
else {

Replace with...
Code: [Select]
if (ISSET($site_template->val_cache['download_width'])){
$max_width = $site_template->val_cache['download_width'];
$max_height = $site_template->val_cache['download_height'];
}
else {

see what that does for you and let me know...


i removed the code from my /includes/functions.php  

Code: [Select]
// MOD multi download

if (!check_permission("auth_download", $image_row['cat_id'])) {
$multi_download_options="&nbsp;&nbsp;<img src=\"".get_gallery_image("download_off.gif")."\" border=\"0\" alt=\"\" />";
$allow_download = 0;
clear_download_token($image_row['image_id']);
}
else{
$multi_download_options = $multi_download_options_string;
    $multi_download_options .= "</td><td><input type='submit' name='download' value='".$lang['download']."' class='button' />
                   </TD></TR></TABLE></TABLE><input type='hidden' name='action' value='resize' />
                    <input type='hidden' name='image_id' value='".$image_row['image_id']."' /></form>";
//
$allow_download = 1;
    set_download_token($image_row['image_id']);

}
$site_template->register_vars("multi_download_options", $multi_download_options);
// END MOD multi download

and the first Error disappear!

(let me know if this code is need for some other purpose)


and for the second error, i replaced as u said

Code: [Select]
if (ISSET($site_template->val_cache['download_width'])){
$max_width = $site_template->val_cache['download_width'];
$max_height = $site_template->val_cache['download_height'];
}
else {

and the second error also gone...  :D

Offline Marcovich

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • High Definition Wallpapers
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #87 on: July 20, 2009, 09:50:35 PM »
If i have installed imagemagick, i need to change something? :)
Thanks :)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #88 on: July 20, 2009, 11:24:32 PM »
If i have installed imagemagick, i need to change something? :)
Thanks :)
Nothing inside the Mod needs changing, only the main settings of the 4images to redirect to the imagemagick folder.
Buddy Duke
www.budduke.com

Offline varoon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #89 on: July 21, 2009, 11:04:55 AM »
what will happen if i have a zip or other than image files ?

will these Multi download option will be visible ? or just the default download option ?