• [Mod] Auto image resize on upload v2.0.1 (2010-12-18) 4 0 5 1
Currently:  

Author Topic: [Mod] Auto image resize on upload v2.0.1 (2010-12-18)  (Read 588348 times)

0 Members and 1 Guest are viewing this topic.

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
T_STRING...
« Reply #90 on: May 09, 2005, 11:25:39 PM »
zeig doch mal 5 Zeilen vor und 5 Zeilen nach 606 in member.php

oder du kannst noch einmal Schritt für Schritt die Änderungen durchgehen, die V@no vorschreibt und nachsehen, ob du nicht irgend etwas vergessen hast...  :|
MAяTRIX


Offline Tarzan

  • Pre-Newbie
  • Posts: 6
    • View Profile
    • www.Lustdschungel.de - DerFreizeitpark für Erwachsene...
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #91 on: May 10, 2005, 06:26:22 AM »
hier mal die komplette Änderung der member php. Hoffe ja, dass die Fehlermeldungen bei den anderen geänderten dateien nicht witergehen...

Schonmal vielen Dank für eure Hilfe...


          if (create_thumbnail($src, $dest, $quality, $dimension, $resize_type)) {
            $new_thumb_name = $new_name;
          }
        }
      }
    }

//--------------------------------------------
//--------- Auto Image Resizing --------------
//--------------------------------------------
                  if ($config['auto_image'] && !$uploaderror) {
                     if ($direct_upload) {
                     $src = MEDIA_PATH."/".$cat_id."/".$new_name;
                  }
                  else {
                        $src = MEDIA_TEMP_PATH."/".$new_name;
                  }
                  $do_resize = 0;
     if ($image_info = @getimagesize($src)) {
                       if ($image_info[2] == 1 || $image_info[2] == 2 || $image_info[2] == 3) {
                    $do_resize = 1;
                    }
        }
        if ($do_resize) {
           if (!function_exists(init_convert_options)) {
              require(ROOT_PATH.'includes/image_utils.php');
              }
           if ($image_info[0] > $config['max_image_width'] || $image_info[1] > $config['max_image_height']) {
                $convert_options = init_convert_options();
                if (!$convert_options['convert_error']) {
                  $quality = (intval($config['auto_image_quality']) && intval($config['auto_image_quality']) <= 100) ? intval($config['auto_image_quality']) : 100;
                 if (!resize_image($src, $quality, $config['max_image_width'], 1, $config['max_image_height'])) {
                    $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name;
                          $uploaderror = 1;
                   }
                    }
                }
            }
//-------------------------------------------

    if (!$uploaderror) {
      $additional_field_sql = "";
      $additional_value_sql = "";
      if (!empty($additional_image_fields)) {
        $table = ($direct_upload) ? IMAGES_TABLE : IMAGES_TEMP_TABLE;
        $table_fields = $site_db->get_table_fields($table);




LG
Tarzan

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #92 on: May 10, 2005, 09:48:45 AM »
tja, und wie erkenne ich Zeile 606? ;)
MAяTRIX


Offline Tarzan

  • Pre-Newbie
  • Posts: 6
    • View Profile
    • www.Lustdschungel.de - DerFreizeitpark für Erwachsene...
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #93 on: May 10, 2005, 10:59:34 AM »
Hallo matrix,

dies ist im Skript die Zeile 606. :lol:

 if ($config['auto_image'] && !$uploaderror) {



Vielen Dank schonmal für Deine Mühe.

Ich hoffe Du kannst mir weiter helfen.

Gruß

Tarzan

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #94 on: May 10, 2005, 06:57:38 PM »
Der von Dir gezeigte Code ist voll in Ordnung.

Das einzige, was ich dir raten kann, ist noch einmal Schritt für Schritt die Modifikation durchzugehen...

Bzw. Back-ups aufspielen und den Mod noch einmal zu versuchen...
MAяTRIX


Offline alphaed

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #95 on: July 14, 2005, 08:48:16 PM »
Sorry for my question, but i can`t save setiings in my control panel (Auto-resize image and Auto-resize image quality). After submit (Auto-resize image = yes, Auto-resize image quality = 100) it became again Auto-resize image = no, Auto-resize image quality = .

Help me please.
Thanks

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] Auto image resize on upload. (updated 19/09/04)
« Reply #96 on: July 15, 2005, 12:02:20 AM »
I'm sertain on 99% that you didnt do (properly) Step 5.
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 Marquis2000

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #97 on: July 28, 2005, 01:55:48 PM »
Also ich habe folgendes Problem, der Mod funktioniert sehr gut ausser das ich wenn ich ein kleineres Bild (kleiner als die im CP definierte Größe)hochladen möchte wird es automatisch auf die definierte Größe hoch scaliert!! Wie kann ich das verhindern, ist das ein Fehler in der Matrix lol ne im Code ???

Grüße Marquis

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #98 on: July 28, 2005, 06:21:52 PM »
Sollte es eigentlich nicht machen - da der Code ja nachschaut, ob das Bild Grösser ist, als "max width" oder "max height" und erst dann runterskalliert...

Schau doch bitte noch einmal jeden Schrit an - ob du den Code auch richtig und an der richtigen Stelle hast  8)

MAяTRIX


Offline Marquis2000

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #99 on: July 29, 2005, 01:33:42 PM »
Nee geht trotzdem nicht, dachte liegt daran das ich den MOD Annote Watermark installt habe und habe Schritt 7 im Code verändert aber geht trotz alle dem nicht ;(

Offline Marquis2000

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #100 on: August 03, 2005, 06:33:21 PM »
i have install the galerie fresh and this mod works but not if the image smaler then as in the ACP selected. If the Image smaler then auto-resize higher to the selected value in the ACP.  The Script checked generally if image smaler then specified value then not resize!!! Wats wrong?? sorry for my english  :oops:

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] Auto image resize on upload. (updated 19/09/04)
« Reply #101 on: August 04, 2005, 12:58:13 AM »
that is supposed to, because if you try to enlarge an image u'd end up with a ugly, pixelated, abstract picture.
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 karimun

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://www.at6pm.com
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #102 on: August 11, 2005, 11:13:00 AM »
Hi all,
Does this MOD work for ({remote_media_file}) input field? In this case the image doesn´t get resized at my site.

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] Auto image resize on upload. (updated 19/09/04)
« Reply #103 on: August 11, 2005, 02:00:24 PM »
no, it doesnt
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 karimun

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://www.at6pm.com
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #104 on: August 11, 2005, 05:22:29 PM »
Means, that I have to permanently remove the {remote_media_file} input option, otherwise I nevertheless need to go on a regular basis through all the new posted images to resize them from the ACP.
Or, maybe .. somebody .. writes an additional hack?
Much appreciated.