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

0 Members and 6 Guests are viewing this topic.

Offline Washi

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #105 on: August 17, 2005, 02:58:22 AM »
V@no, another great mod. I just have a question that might be really stupid. LOL

Does this work if you upload files by FTP? Or just when you upload files from the control panel?


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 #106 on: August 17, 2005, 03:56:00 AM »
This mod doesnt support ACP uploaded images and for FTP uploaded images use "Check and Go" or "Check new images in ALL categories" mods ;)
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 Fireball22

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #107 on: September 24, 2005, 10:56:22 AM »
Ich habe mit dem Bild resizer ein Problem.
Bei mir sollte ja nur die Anzeige der Bilder verkleinert werden, so dass mein Layout davon nicht in Mitleit gezogen wird.
Die Bilder sollen bei einem klick auf diese dann in einem Pop-Up in voller größe erscheinen.

Wie macht man das?

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #108 on: September 24, 2005, 11:03:21 AM »
Ich würde es lieber in englisch versuchen... (o:

Und auch solltest Du hier nur Probleme mit dem Mod posten und nicht allgemeine Fragen.

Lies Dir mal ein paar Beiträge im Forum durch, hier gibt es viele die genau das was Du möchtest umgesetzt haben.

big image popup sollte deine suchbegriffe hierfür sein.

Schaue sonst auch noch mal hier vorbei:
http://www.4homepages.de/forum/index.php?topic=3236.0

Ich glaube eine fertige Lösung gibt es nicht wirklich und daher muss Du wohl die Mods kombinieren oder anpassen.

Offline Fireball22

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: [Mod] Auto image resize on upload.
« Reply #109 on: October 01, 2005, 07:49:37 PM »
Quote from: stb
2) default display resized image, but make smthn. like button "hi res" to view an original

On my site I use this MOD.
And this mod automaticaly copy original file to /big/ folder if the image is being resized (/big/ folder also automaticaly created if its not exist).
Just need use in Step 1. this code:
Code: [Select]
//--------------------------------------------
//--------- Auto Image Resizing --------------
//--------------------------------------------
                  if ($config['auto_image'] && !$uploaderror) {
                     $src_copy = MEDIA_PATH."/".$cat_id."/big";
                     if ($direct_upload) {
                        $src = MEDIA_PATH."/".$cat_id."/".$new_name;
                        $src_copy = MEDIA_PATH."/".$cat_id."/big";
                    }
                    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');
                        }
                        $convert_options = init_convert_options();
         if (!$convert_options['convert_error']) {
if ($image_info[0] > $config['max_image_width'] || $image_info[1] > $config['max_image_height']) {
$result = true;
 if (!@is_dir($src_copy)) {
   $oldumask = umask(0);
   $result = mkdir($src_copy);
   umask($oldumask);
   if (!@is_dir($src_copy) || !$result) {
     $result = mkdir($src_copy, 0755);

   }
 }
if ($result == true){
copy($src, $src_copy."/".$new_name);
}
                     $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)) {
                        $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name;
                           $uploaderror = 1;
                        }
                    }
                  }else{
                  $do_resize = 0;
                  }
                       }
                     }
                  }
//-------------------------------------------

P.S. it works on my windows system, dont know about any others :roll:


In welche Datei muss ich diesen Code einbauen?

In which file i have to include this code?


Fireball22

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #110 on: October 01, 2005, 08:11:42 PM »
watch the first Posting...

I think this is the Part for the member.php

Offline Fireball22

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #111 on: October 01, 2005, 08:24:32 PM »
OK!

thanks!

Fireball22

Offline Fireball22

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #112 on: October 06, 2005, 05:41:39 PM »
Hallo,
ich bekomme beim Uploaden nach der Installation von Auto-Image-Resize folgende Meldung:


Ich habe folgendes in der member.php statt das vorgesehene eingefügt:
http://www.4homepages.de/forum/index.php?topic=9847.msg47731#msg47731

Was ist das Problem?

English:

After the installtion of the Auto-Image-Resize I get this error-message:

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /srv/www/htdocs/web1/html/extras/upload/includes/upload.php on line 96

Fatal error: Cannot instantiate non-existent class: upload in /srv/www/htdocs/web1/html/extras/upload/member.php on line 546

In the member.php I used this code:
http://www.4homepages.de/forum/index.php?topic=9847.msg47731#msg47731

Where is the problem?

Thank you for the answer!

Vielen Dank für die Antwort im Voraus!

Fireball22

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 #113 on: October 07, 2005, 12:34:54 AM »
made a misstake in Step 2.x
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 Fireball22

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #114 on: October 07, 2005, 02:50:31 PM »
OK, thank you!
I will check this.

Fireball22

Offline Fireball22

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #115 on: October 07, 2005, 03:08:31 PM »
OK, the upload.php is now running correctly.

But now I have the follow problem:
When the pictures uploded, then nothing change, the size of the image is the same!

And where I can change the size of the auto. rezised image?

Thank you!

Fireball22


Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #116 on: October 07, 2005, 04:43:42 PM »
Quote
Step 6
Go to Admin Control Panel -> settings. Under Upload settings u should find new options.

The Size for the Image you will allso find there... (o:

Offline Fireball22

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #117 on: October 07, 2005, 05:40:07 PM »
No, there isn't the option for the image-size.
Here a screenshot:
http://www.michael-kaps.s-westerhold.de/extras/upload/data/media/14/screen.jpg

But why don't run the image-resize on the screen? See my last post.

Fireball22

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #118 on: October 07, 2005, 07:13:42 PM »
You must use the "Maximale Breite der Bilder in Pixel" and "Maximale Höhe der Bilder in Pixel" as Limit...

Offline Fireball22

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #119 on: October 07, 2005, 07:34:49 PM »
Thats only the size of the image, that users can upload!
But the image must be resize an than on click to the smal image, on the popup is the image in original size.

How can I do it?

Sorry for the bad English...  :roll:

Fireball22