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

0 Members and 2 Guests are viewing this topic.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #105 on: August 18, 2009, 08:50:28 PM »
Quote from: budduke
* You only need to upload one size of the file and the server will do the rest for you (I am lazy)
  all the other mods I saw wanted you to create all the different sizes before you uploaded them.
  This mod will create the resized images at the time the user is asking for them.

... not quite right ... ;)
... [TUT] One Image - Three Sizes ... created all the images versions ( 3 pieces ) during the upload process ...
... btw. ... superb MOD ... your Multi Size Download of same image ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline edonai

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #106 on: August 23, 2009, 03:21:38 AM »
Hello budduke,

Can you help me? Your mod work like a charm when i select dropdown in global.php
But if i want to select text link or image link, the resize no longer works and when I click on the link, I download the orignal image.

Thanks for your help

Edonai

Offline dizizi

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #107 on: August 23, 2009, 06:30:35 AM »
Mod is working well :D! but can you tell me how much memory this mod will use when resize image? I use free host so i want to know that  :(
« Last Edit: August 24, 2009, 08:19:58 AM by dizizi »

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #108 on: August 23, 2009, 04:23:06 PM »
@edoni,
It should work, You may look over all the inserts to make sure you put them in the correct area.

Can you give link to your site so I can see what is happening?

@dizizi,
I would think it uses the same amount of memory as it would if it was creating thumbnails or any other resizing command that you do on the site.
One nice thing is that it only does it once for each size, after that, if it sees the file already created then it does not re-create it.
I know that did not exactly answer your question but I do not know how to monitor mem usage as a script runs,  :( sorry
Buddy Duke
www.budduke.com

Offline dizizi

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #109 on: August 24, 2009, 08:15:07 AM »
If i use too much memory, my admin will close my site! I think i must contact them about this script  :(

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #110 on: August 25, 2009, 12:17:53 AM »
If i use too much memory, my admin will close my site! I think i must contact them about this script  :(

I am assuming that when you say memory you mean cpu server processing load...
If you feel that it may be a problem, you could go ahead and create your different size files for each size on your local computer and name them correctly so they fall into that filename_resized_whateversize.jpg, allot of work for you to do locally, and then just upload all those resized images to the big folder of those categories and then the server will not have to process anything. It would just have to pick the correct image for the user to download.
That is the best workaround I can think to give you, if you are up to the task...
Buddy Duke
www.budduke.com

Offline edonai

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #111 on: August 25, 2009, 09:08:06 PM »
Hello budduke,

Can you help me? Your mod work like a charm when i select dropdown in global.php
But if i want to select text link or image link, the resize no longer works and when I click on the link, I download the orignal image.

Thanks for your help

Edonai

problem solved by budduke, a big thanks to him

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #112 on: September 17, 2009, 12:16:13 AM »
IN NEED OF HELP!
A user is having problems with my mod and I have looked over the code and do not see anything that I may have overlooked to cause the problem and was hoping that someone that understands the hotlinking token could chime in...

They are claiming that 50% of the time when their users are selecting one of the different sizes of an image they are recieving the "hotlinking not allowed" message. My understanding is that if they just select the original over and over it is fine but it happens when they select a different size in the list.

I looked over where my mod is doing the set_download_token and I thought I put everything in the correct spot.
I can not duplicate this problem on my test server and am not sure how to troubleshoot it from here...

Thanks for any help anyone can give,
Buddy Duke
Buddy Duke
www.budduke.com

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #113 on: September 17, 2009, 03:44:59 AM »
Can I see that user's gallery? With exact step-by-step how to reproduce
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #114 on: September 17, 2009, 09:12:17 PM »
Thanks V@no,
It is not on my server but someone elses...
Here is the link that is giving him all the trouble. It is doing everytime I click on any of the different sizes, even original. So something is messed up
http://backgroundscity.co.cc/hilary_duff_332/hilary-duff-%2828%29-30602.htm
Buddy Duke
www.budduke.com

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #115 on: September 18, 2009, 04:25:45 AM »
The download links are pointed to a different domain - that is the problem. Cookies can not be shared between domains, that creates new session when clicked on download link.
If you open the same page, but with "correct" domain (http://www.backgroundscity.net/hilary_duff_332/hilary-duff-(28)-30602.htm) then downloads working fine.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #116 on: September 18, 2009, 12:11:23 PM »
Thanks again V@no,
I kept looking over that link and I knew it did not look right but it just didn't sink in till I read your reply
Buddy Duke
www.budduke.com

Offline varoon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #117 on: November 20, 2009, 01:27:39 PM »
The current Thumb creation does center crop only or left or right or resize to fit...

but im looking for resize and then crop to fit....

can u add a new option (5) resize and crop to fit..

i found some code which does exact wat i need..

PHP+GD Output

http://911-need-code-help.blogspot.com/2009/04/crop-to-fit-image-using-aspphp.html

can this be implemented ?  :?:

or im wrong somewhere ??  :?

Offline goblue7

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #118 on: November 22, 2009, 12:33:08 AM »
First of all thank you for writing an excellent mod.  The basis of my entire website depends on this mod and I appreciate you taking the time to write it.

Hopefully someone will be able to help me.

I implemented the entire modification as per instructions.  I received an error and did it all over again from the beginning to make sure it was not an error in the way I placed the code and order of installs, etc...

In short, it is not working for me...

Getting the error :

Warning: Invalid argument supplied for foreach() in /home...............admin/categories.php on line 67

I have checked this over many times and am certain I have the code changes for that page correct.  Anyone have any ideas?

I thank you very much for your time in reading this and appreciate any help you may have to offer.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Multi Size Download of same image [ver 3.1]
« Reply #119 on: November 22, 2009, 10:40:32 PM »
@Varoon,
Not sure what you are asking...
this is in the code...
Code: [Select]
/* what crop will do is resize image larger then size that is asked for unless it detects it will resize without and extra space.
then it will crop off the extra area to give you the actual size asked for (loosing part of your image)
0= do not crop
1= crop equally on both sides
2= crop top or left side
3= crop bottom or right side
4= resize and stretch to fit requested size (no crop)
*/
What is currently does is reduce the image to whichever comes first (width/height) without adding any extra space before it does the crop. That is the only way I can think of it actually working correctly. Is this what you were thinking or can you give me more details on what you would like?

@goblue7,
Not sure why it is not working for you, Can you post a zip file containing all the files you changed so I can look them over?
Mainly these file should be in the zip file and also if you have added other mods before this one, if you could list them for me so I have an idea of how they are all interacting?
details.php
download.php
global.php
admin/categories.php
includes/constants.php
includes/functions.php
lang/english/admin.php
lang/english/main.php

I have allot going on with the holidays but will try to look it over for you...
Buddy Duke
www.budduke.com