4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 01, 2014, 10:10:49 AM

Login with username, password and session length
Search:     Advanced search
Check the new Tutorial subforum with helpfull guides and tutorials for modifications and tweaks.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support) (Moderators: mawenzi, Rembrandt)
| | |-+  [Mod] Auto image resize on upload v2.0.1 (2010-12-18)
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: «« « 1 ... 21 22 23 24 [25] 26 27 28 29 ... 33 » »» Print
Current Topic Rating: ****
Author Topic: [Mod] Auto image resize on upload v2.0.1 (2010-12-18)  (Read 335947 times)
Nicky
Administrator
4images Guru
*****
Offline Offline

Posts: 3191

Thank You
-Given: 23
-Receive: 51


View Profile
« Reply #360 on: November 30, 2008, 11:23:32 AM »

hi and welcome to the 4images forum,

post is still valid Wink

try this download link: http://www.4homepages.de/forum/index.php?action=dlattach;topic=7700.0;attach=874 (attached in the 1st post too) due V@no's site do not exist anymore
Logged

cheers
Nicky
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 ...

nicky.net 4 4images | Facebook Covers
Signature stolen from mawenzi
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 554

mmm PHP...


View Profile WWW
« Reply #361 on: November 30, 2008, 06:26:03 PM »

Wrong download link removed.
Logged

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)
webtrade
Pre-Newbie

Offline Offline

Posts: 9

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #362 on: December 01, 2008, 06:59:25 AM »

Thanks Nicky. Much appreciated! Very Happy
Logged
jaromir
Newbie
*
Offline Offline

Posts: 19

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #363 on: December 05, 2008, 12:34:29 AM »

can be deleted!!
« Last Edit: December 05, 2008, 12:47:50 AM by jaromir » Logged
mawenzi
Moderator
4images Guru
*****
Offline Offline

Posts: 4500

Thank You
-Given: 36
-Receive: 119


View Profile
« Reply #364 on: December 05, 2008, 12:46:39 AM »

@jaromir

... this MOD resized images during the upload process via upload-form ...
... I think you tested auto resize via ACP, this MOD is not for the ACP ...
Logged

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) ...
webtrade
Pre-Newbie

Offline Offline

Posts: 9

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #365 on: December 30, 2008, 04:42:28 AM »

Just when you thought there wouldn't be another one of those cries for help - "I've applied the mod but it's not working for regular users! Only admin!"

Hope someone can please assist. I've applied the mod a number of times in different installation directories (and studied the tutorial and read previous posts) but I stil have probs when users other than admin try and upload. Looking at previous posts it seems like step 2.2 is big culprit. This is an extract from my upload.php file:

function check_image_size() {
    $this->image_size = @getimagesize($this->upload_file);
    $ok = 1;
    if ($this->image_size[0] > $this->max_width[$this->image_type]) {
      $ok = 0;
      $this->set_error($this->lang['invalid_image_width']);
    }

    if ($this->image_size[1] > $this->max_height[$this->image_type]) {
      $ok = 0;
      $this->set_error($this->lang['invalid_image_height']);
    }
   
    if ($this->auto_image[$this->image_type]) {
         $ok = 1;
      }
   
    return $ok;

Does it look OK? Any tips would be greatly appreciated!

Cheers
Logged
webtrade
Pre-Newbie

Offline Offline

Posts: 9

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #366 on: December 30, 2008, 04:53:06 AM »

Hi,

I should have mentioned that the error only occurs when regular users try to upload images larger than what I have specified (500px x 500px, 1mb). And that I have the settings activated in CPanel - Auto resize - yes; GD Bib.. selected) The message is:

Error uploading image file:
image.jpg: Image size invalid
image.jpg: Image width invalid
image.jpg: Image heigth invalid

Thanks!
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 554

mmm PHP...


View Profile WWW
« Reply #367 on: December 30, 2008, 07:37:03 AM »

This is probably one my first mods I made...
At the moment I don't have chance to check this myself, but try this:
remove changes in step 2.2

find:
1
    $this->image_size = @getimagesize($this->upload_file);
Insert below:

1
2
3
      if ($this->auto_image[$this->image_type]) {
         return 1; //auto image is on, don't need check for anything else.
      }
Logged

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)
webtrade
Pre-Newbie

Offline Offline

Posts: 9

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #368 on: December 30, 2008, 09:49:40 AM »

Thanks for responding V@no. Much appreciated. I applied your suggestion but still have a prob, although the error message is now reduced to a one liner:

Error uploading image file:
image.jpg: Image size invalid

This scenario sounds familiar. I remember it from a previous post. I'll go back and have a read.

Cheers
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 554

mmm PHP...


View Profile WWW
« Reply #369 on: December 30, 2008, 03:35:45 PM »

That error is expected if you set "Max. image size in KB" in the settings to a too low number. Set it higher and that should fix it.
Logged

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)
webtrade
Pre-Newbie

Offline Offline

Posts: 9

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #370 on: December 31, 2008, 07:39:36 AM »

Thanks V@no! You're a legend! It works! I increased it to 2048kb and it's all good now.
Happy new year!  Very Happy


Logged
Blesi
Full Member
***
Offline Offline

Posts: 104

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #371 on: January 07, 2009, 03:43:49 PM »

Ein paar Beiträge zuvor hat schon einmal jemand gefragt, ob es möglich ist, wenn ich ein Bild lösche, dass dieses zugehörige auch im BIG Ordner gelöscht wird. Leider bleibt bisher immer das Bild im BIG Ordner noch stehen. Mit der Zeit wenn mehrere Bilder kommen, wird das sicher sehr unübersichtlich. Kann jemand helfen?

Can anybody help? When i delete a picture, the original picture will not be deletet in the BIG folder.

Gruß Christian
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 554

mmm PHP...


View Profile WWW
« Reply #372 on: January 07, 2009, 04:13:50 PM »

It shouldn't happened...did you check if images in big folder are CHMOD 777?

[EDIT]
just checked on my local server and it deleted files in big folder as well.
« Last Edit: January 07, 2009, 04:34:22 PM by V@no » Logged

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)
Lucifix
Hero Member
*****
Offline Offline

Posts: 710

Thank You
-Given: 8
-Receive: 15


View Profile WWW
« Reply #373 on: January 21, 2009, 02:44:40 PM »

Wow too big topic to search all pages, but I doubt that anyone else has done that.

What I would like....

If has user upload bigger image then maximum size (lets say max width/height: 1920x1020px), image is resized to those limits (1920x1020px) and it's uploaded to folder /big. Second resized image (based on 2nd limitation values: 900x900px) is being uploaded to original folder.

Has anyone already done that?
Logged

meier
Jr. Member
**
Offline Offline

Posts: 58

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #374 on: January 25, 2009, 01:00:47 PM »

Hallo, bei mir funktioniert der Mod nicht. Das Bild bleibt wie es ist. Bei Schritt2.2  hab ich auch diesen anderen code versucht.
Dazu scheint scheint das jetzt nicht mehr gleich angezeigt zu werden. Direkt upload ist eingestellt, aber ich muss erst auf Bild suchen gehen damit es angezeigt wird.
Logged
Pages: «« « 1 ... 21 22 23 24 [25] 26 27 28 29 ... 33 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.13 seconds with 21 queries.
Post your comments here