Author Topic: Not using image but zip. Auto thumb not working  (Read 9985 times)

0 Members and 1 Guest are viewing this topic.

Offline tommyboy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Not using image but zip. Auto thumb not working
« on: October 26, 2008, 09:49:39 AM »
Hi! I want to use this gallery but i have some issues i need to fix before i can use it.
I have spent hours on searching here and google.  :oops:

1. I dont use images in the gallery. I want to use one ZIP-file and one thumbnail.
When i turn "Auto-create thumbnail" to yes it has ofcourse no effect since it is createn from the "image" field. And in this case its a ZIP.
I have to use the thumbnail field and need this auto-scaling feature to the thumbnail field. Is it possible? I have seen the "scale on upload" plugin but thats also just for images?

2. Since i only use ZIP and thumbnails i dont get any feature that allows me to upload a second bigger image to use in the details page. How can i get a bigger image in the details page? I found a fix for changing the image to thumbnail here in this forum. But the thumbnail is to small.

One solution could be to add one more upload-field?

Hope somebody here can help or guide me to tutorials or plugins to use. Thank you!

Cheers
Thomas
« Last Edit: October 26, 2008, 10:01:54 AM by tommyboy »

Offline tommyboy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Not using image but zip. Auto thumb not working
« Reply #1 on: October 26, 2008, 10:15:50 PM »
Resize thumbnail-uploads dont work. If i upload an image in 500x500 the final thumbs stays the same size.
I have the same problem as this guy. It must be a fix for this somewhere? anybody?
http://www.4homepages.de/forum/index.php?topic=17581.0

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: Not using image but zip. Auto thumb not working
« Reply #2 on: October 27, 2008, 03:49:46 AM »
Hello and welcome to 4images forum.

If you upload images as administrator, the images will not be resized, because administrators have no restrictions. You'll need run image resizer in ACP (Admin Control Panel)
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 tommyboy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Not using image but zip. Auto thumb not working
« Reply #3 on: October 27, 2008, 09:19:43 AM »
Hi, thank you.
Yes i know that. I have read that a million times here haha. ;) But this is the case even if i am logged in as another user. It does not resize. Should it?
I have installed and tested the resize on upload mod also but it does nothing for the thumbnail. Do you have any tips?

edit: added image to explain better. :)
« Last Edit: October 27, 2008, 10:48:10 AM by tommyboy »

Offline tommyboy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Not using image but zip. Auto thumb not working
« Reply #4 on: November 03, 2008, 03:28:05 PM »
I want to:

* upload 1 zip
* upload 1 image (auto thumbnail)

Is this not possible or do i have to install it again? Anybody?


same prob as these guys:
http://www.4homepages.de/forum/index.php?topic=17673.0


« Last Edit: November 03, 2008, 04:10:39 PM by tommyboy »

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: Not using image but zip. Auto thumb not working
« Reply #5 on: November 03, 2008, 03:57:22 PM »
Ok, here is a quickie for you:
1) Install [Mod] Auto image resize on upload
Make sure it's working.

2) BELOW the code in Step 1 insert this:
Code: [Select]
      if ($config['auto_image'] && !$uploaderror)
      {
        if ($direct_upload)
        {
          $src = THUMB_PATH."/".$cat_id."/".$new_thumb_name;
        }
        else
        {
          $src = THUMB_TEMP_PATH."/".$new_thumb_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_thumb_width'] || $image_info[1] > $config['max_thumb_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_thumb_width'], 1, $config['max_thumb_height']))
              {
                $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name;
                $uploaderror = 1;
              }
            }
          }
        }
      }

3) BELOW the code in Step 2 insert this:
Code: [Select]
    $this->auto_image['thumb'] = $config['auto_image'];

4) In the settings set thumbnail width/height to the size you want them to be resized to. Also make sure that max filesize is big enough for large images.
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 tommyboy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Not using image but zip. Auto thumb not working
« Reply #6 on: November 03, 2008, 04:11:42 PM »
That was quick!  :D Thank you! I will test this now.  :)

Offline tommyboy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Not using image but zip. Auto thumb not working
« Reply #7 on: November 03, 2008, 08:25:23 PM »
Your quickie did it!! :D Thank you mister!  :wink:
Can this code also create a bigger image from "Max. image width in pixel" automaticly? For the bigger image in the details page. ;) But this works now. Great work!
« Last Edit: November 03, 2008, 08:45:48 PM by tommyboy »

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: Not using image but zip. Auto thumb not working
« Reply #8 on: November 04, 2008, 12:28:07 AM »
I'm sorry, I didn't understand your question...the original mod is for auto resize image on upload and it uses max. image width setting.
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 tommyboy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Not using image but zip. Auto thumb not working
« Reply #9 on: November 04, 2008, 10:02:20 AM »
Sorry i will try again, when you upload

* zip in the image field
* image in the thumbnail field

the image scales down to a thumbnail, ok -great!. But you dont get the image in bigger sizes(for detail page).
Is it possible to also make(auto) a bigger image out of the same image that is uploaded in the thumbnail field? So it saves out 2 images, 1 thumbnail(60x60) 1 image(400x400) from the thumbnail field. The bigger image is for the details page. Do you understand what i am trying to do?



Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Not using image but zip. Auto thumb not working
« Reply #10 on: November 04, 2008, 10:39:37 AM »
... so try this ...
... [TUT] One Image - Three sizes : http://www.4homepages.de/forum/index.php?topic=20496.0 ...
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 tommyboy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Not using image but zip. Auto thumb not working
« Reply #11 on: November 04, 2008, 04:58:11 PM »
ok but isnt that for the image field? If it can be used for the thumbs field its fantastic!  :)

Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: Not using image but zip. Auto thumb not working
« Reply #12 on: November 04, 2008, 06:58:27 PM »
I think the only solution at the moment add your zip files as download url
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline tommyboy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Not using image but zip. Auto thumb not working
« Reply #13 on: November 04, 2008, 09:53:11 PM »
ok! I can live with only thumbnail. Its great! Thank you for help guys!  :wink:

Offline tommyboy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Not using image but zip. Auto thumb not working
« Reply #14 on: November 18, 2008, 12:34:54 PM »
What file do i have to edit to make phpthumb work on thumbs? scale down thumbs..
I have tried to modify "thumbnail_bit.html" but it dont work.  :?
 
« Last Edit: November 18, 2008, 11:26:41 PM by tommyboy »