• [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 434010 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 3.0]
« Reply #90 on: July 22, 2009, 12:49:40 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 ?

interesting, that never crossed my mind. I always place zips and movies in different category but I guess I can understand why someone would want them in the same category...
Yes, that is a bug you found... :o

Will have to look into it and see if I can fix it or not...

UPDATED: This problem fixed with version 3.1
« Last Edit: July 25, 2009, 04:59:12 PM by budduke »
Buddy Duke
www.budduke.com

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Re: [MOD] Multi Size Download of same image [ver 3.0]
« Reply #91 on: July 23, 2009, 04:34:07 PM »
hey,, i need some foolish modifcation :)

Admin can Upload Image in 3 ways - normal Quality , Midium Quality , High Quality

and the user must be able to download the 3 types above..and thier must be 3 different buttons to download them serperrtly..

pls..some 1 help me with this :) !
I'm Back :)

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 2.1]
« Reply #92 on: July 23, 2009, 04:50:44 PM »
It should still work, your uploaded files still go into the categories folder so if my mod does not see the file in the big folder then it uses the file in the normal category folder instead.

Okay the prob was caused of the safe_mode on settings. In "off" the original images will be saved also in the "big" folder.

NOW I'll take a look to this MOD  8)

The MOD works, but I get a server-error-log
Code: [Select]
[Fri Jul 24 00:29:03 2009] [error] [client x] PHP Notice: Use of undefined constant check_big_type - assumed 'check_big_type' in /srv/www/vhosts/rockbaer.de/httpdocs/daeof/includes/functions.php on line 2796, referer: http://www.4homepages.de/forum/index.php?topic=22741.90
On line 2796 my function it says
Code: [Select]
if (!function_exists(check_big_type)) { 
function check_big_type($file_name) {
global $config;
return (in_array(get_file_extension($file_name), $config['allowed_mediatypes_array'])) ? 1 : 0;
}
function check_remote_big($remote_media_file) {
global $config;
return (preg_match("#^(https?:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/.*?\.(".$config['allowed_mediatypes_match'].")$)#is", $remote_media_file)) ? 1 : 0;
}
function check_local_big($local_media_file) {
global $config;
return (preg_match("#^((\.)*\/.*?\.(".$config['allowed_mediatypes_match'].")$)#is", $local_media_file)) ? 1 : 0;
}
}

...so nothing special. Anybody knows where the problem is?
« Last Edit: July 24, 2009, 12:32:10 AM by Schnick und Schnack »

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 2.1]
« Reply #93 on: July 24, 2009, 01:02:12 AM »
The MOD works, but I get a server-error-log
Code: [Select]
[Fri Jul 24 00:29:03 2009] [error] [client x] PHP Notice: Use of undefined constant check_big_type - assumed 'check_big_type' in /srv/www/vhosts/rockbaer.de/httpdocs/daeof/includes/functions.php on line 2796, referer: http://www.4homepages.de/forum/index.php?topic=22741.90
On line 2796 my function it says
Code: [Select]
if (!function_exists(check_big_type)) { 
function check_big_type($file_name) {
global $config;
return (in_array(get_file_extension($file_name), $config['allowed_mediatypes_array'])) ? 1 : 0;
}
function check_remote_big($remote_media_file) {
global $config;
return (preg_match("#^(https?:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/.*?\.(".$config['allowed_mediatypes_match'].")$)#is", $remote_media_file)) ? 1 : 0;
}
function check_local_big($local_media_file) {
global $config;
return (preg_match("#^((\.)*\/.*?\.(".$config['allowed_mediatypes_match'].")$)#is", $local_media_file)) ? 1 : 0;
}
}

...so nothing special. Anybody knows where the problem is?

Another oversite on my part,

on line 2796 change it to read...
Code: [Select]
if (!function_exists('check_big_type')) {
I forgot the quotes  :oops:

I am about to post an update to the MOD in the next couple days, will add this to the list...
Buddy Duke
www.budduke.com

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 2.1]
« Reply #94 on: July 24, 2009, 01:13:01 AM »
Another oversite on my part,

on line 2796 change it to read...
Code: [Select]
if (!function_exists('check_big_type')) {
I forgot the quotes  :oops:

I am about to post an update to the MOD in the next couple days, will add this to the list...


Thx, that has fixed it  8)


I've found another server-error
Code: [Select]
[Fri Jul 24 22:57:42 2009] [error] [client x] PHP Notice: Undefined index: download_width in /srv/www/vhosts/de/httpdocs/daeof/includes/functions.php on line 726, referer: /member.php?action=showprofile&user_id=19
in my functions.php in line 726 it says
Code: [Select]
$max_width = $site_template->val_cache['download_width'];
if (ISSET($max_width)){
$max_height = $site_template->val_cache['download_height'];
}
else {
$max_width = $site_template->val_cache['width'];
$max_height = $site_template->val_cache['height'];
}


Update: Already fixed here. Thx budduke!
« Last Edit: July 25, 2009, 12:17:03 AM by Schnick und Schnack »

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #95 on: July 25, 2009, 05:00:32 PM »
Both programming mistakes and showing normal download button if not an image are included with version 3.1 of this mod...
Buddy Duke
www.budduke.com

Offline varoon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #96 on: July 28, 2009, 03:42:39 PM »
what happen when i upload a Animated Gif ?

will that too get converted to smaller image and still animated ???

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #97 on: July 28, 2009, 06:00:04 PM »
what happen when i upload a Animated Gif ?

will that too get converted to smaller image and still animated ???

When you upload an animated gif and tell 4images to create a thumnail for it. Is the thumbnail animated?
This mod does the same resizing that is used to create thumbnails...

So if the thumnails are animated then the resized gifs should be animated.
If not then for the animated gifs you will have to upload your own resized images to place in the big folder for those files.

UPDATED:
Doing more research into animated gifs, no this will not resize them correctly,
the best thing I can tell you to do would be to take gif out of the selection area of the mod so it will just get the normal download button instead...
But this would be for ALL gifs and not just animated ones.
in the details.php file look for this line in my insert...
Code: [Select]
if(!strpos(",jpg,jpeg,JPG,JPEG,png,gif",pathinfo($image_row['image_media_file'], PATHINFO_EXTENSION))){
Remove the ,gif from that line and you should be good...

Sorry, that is the best I can do...
« Last Edit: July 29, 2009, 02:15:15 AM by budduke »
Buddy Duke
www.budduke.com

Offline varoon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #98 on: July 29, 2009, 09:30:41 AM »
what happen when i upload a Animated Gif ?

will that too get converted to smaller image and still animated ???

When you upload an animated gif and tell 4images to create a thumnail for it. Is the thumbnail animated?
This mod does the same resizing that is used to create thumbnails...

So if the thumnails are animated then the resized gifs should be animated.
If not then for the animated gifs you will have to upload your own resized images to place in the big folder for those files.

UPDATED:
Doing more research into animated gifs, no this will not resize them correctly,
the best thing I can tell you to do would be to take gif out of the selection area of the mod so it will just get the normal download button instead...
But this would be for ALL gifs and not just animated ones.
in the details.php file look for this line in my insert...
Code: [Select]
if(!strpos(",jpg,jpeg,JPG,JPEG,png,gif",pathinfo($image_row['image_media_file'], PATHINFO_EXTENSION))){
Remove the ,gif from that line and you should be good...

Sorry, that is the best I can do...

Thx man... not a prob...

i will keep them in a separate folder and not going to enable multi download option...  :)

today came across some Cropping scripts

http://www.hotscripts.com/blog/javascript-image-cropping-scripts/

can these be implemented ???

i personally like the Kroppr but its Paid and the UvumiTools Crop its free!

Eg:
when i click on a download button.. say 800 x 600...
in the preview image show the selected cropping region... let width and height be fixed only u can select region and Download....

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #99 on: July 30, 2009, 12:19:45 AM »
Thx man... not a prob...

i will keep them in a separate folder and not going to enable multi download option...  :)

today came across some Cropping scripts

http://www.hotscripts.com/blog/javascript-image-cropping-scripts/

can these be implemented ???

i personally like the Kroppr but its Paid and the UvumiTools Crop its free!

Eg:
when i click on a download button.. say 800 x 600...
in the preview image show the selected cropping region... let width and height be fixed only u can select region and Download....


That is funny because I looked at those scripts when I first started working on this mod...
The problem is that no 2 images would ever be the same. You could not save the files in any naming convention that would make them different from each other.
That is why I never went down that road. I would assume that you could save them in the temp folder each time the user asks for them. Not sure of load on server.

I may look into it down the road but too much going on for me to take the time right now...
Buddy Duke
www.budduke.com

Offline lapas

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #100 on: August 07, 2009, 06:46:44 PM »
MOD is great, but in details.html image is very big size (some image size 1mb), the page slow downloading.
How make aditional thumb it was be great

http://www.4homepages.de/forum/index.php?topic=7700.0
this MOD and other impossible to establish for this mod, whether there are ways to solve this problem ?

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #101 on: August 07, 2009, 07:32:27 PM »
MOD is great, but in details.html image is very big size (some image size 1mb), the page slow downloading.
How make aditional thumb it was be great

http://www.4homepages.de/forum/index.php?topic=7700.0
this MOD and other impossible to establish for this mod, whether there are ways to solve this problem ?

this thread should take care of your problem...
http://www.4homepages.de/forum/index.php?topic=20496.0
Buddy Duke
www.budduke.com

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #102 on: August 11, 2009, 07:09:47 AM »
Code: [Select]
Notice: Undefined variable: multi_download_options_string in /home/g2gayan/public_html/Gallery/includes/functions.php on line 398

Notice: Undefined index: download_width in /home/g2gayan/public_html/Gallery/includes/functions.php on line 528

Notice: Undefined variable: multi_download_options_string in /home/g2gayan/public_html/Gallery/includes/functions.php on line 398

Notice: Undefined index: download_width in /home/g2gayan/public_html/Gallery/includes/functions.php on line 528

Get the Following Error When using the Search Function :( Please Help meee :(

Here - I Have Attached My Functions.php Over Here

Code: [Select]
REMOVED
[EDIT by V@no]
if the code you are trying to show has more then 100 lines, attach it as a .txt or .zip file to your reply
[/EDIT]
« Last Edit: August 11, 2009, 07:22:00 AM by V@no »
I'm Back :)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #103 on: August 11, 2009, 12:12:28 PM »
Code: [Select]
Notice: Undefined variable: multi_download_options_string in /home/g2gayan/public_html/Gallery/includes/functions.php on line 398

Notice: Undefined index: download_width in /home/g2gayan/public_html/Gallery/includes/functions.php on line 528

Notice: Undefined variable: multi_download_options_string in /home/g2gayan/public_html/Gallery/includes/functions.php on line 398

Notice: Undefined index: download_width in /home/g2gayan/public_html/Gallery/includes/functions.php on line 528

Get the Following Error When using the Search Function :( Please Help meee :(


please read the entire post to see if anyone else was having the same issues...
this issue was resolved with version 3.1 of this mod. Make sure you remove the old mod before adding the new and you should be good.
see this reply in this topic...
http://www.4homepages.de/forum/index.php?topic=22741.msg138676#msg138676
Buddy Duke
www.budduke.com

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #104 on: August 11, 2009, 06:51:12 PM »
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

I Removed the above code from functions.php in order to remove my error "Notice: Undefined variable: multi_download_options_string in /home/g2gayan/public_html/Gallery/includes/functions.php on line 398"

Will It Do Any Harm To The Mode ?  :?:
I'm Back :)