Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 11:43 am EST

Geeklog Forums

Image Thumbnails in posts


Bob

Anonymous
Hi,

When posting images, I've figured out how to increase the max size etc. but how do i get geeklog to generate small thumbnails which are 'clickable' to the larger, original images? - this is featured onto the geeklog demo site - how do i do it Smile

Cheers my dears!

Bob
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
From config.php:
Text Formatted Code
// When set to 1, Geeklog will keep the original, unscaled images and make
// the smaller image link to the unscaled image.
$_CONF['keep_unscaled_image']   = 0; // 1 = keep original images
 

bye, Dirk
 Quote

Bob

Anonymous
Hi Dirk,

Thanks for your reply.

Yes, I already noticed that setting.

$_CONF['keep_unscaled_image'] = 1; // 1 = keep original images

// Story image settings
$_CONF['max_image_width'] = 1600; // In pixels
$_CONF['max_image_height'] = 1200; // In pixels
$_CONF['max_image_size'] = 10048576; // 1048576 = 1MB

// User photo settings
$_CONF['max_photo_width'] = 128; // In pixels
$_CONF['max_photo_height'] = 128; // In pixels
$_CONF['max_photo_size'] = 65536; // 65536 = 64KB

With the config as above, it will just post the fullsize image into the story, rather than linking it. If i reduce the max_image_height/width/size, say to 160x160 it will not allow me to upload anything larger.

Please advise,

Thanks,

Bob
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You have to configure Geeklog to actually use one of the supported packages to scale the images:
Text Formatted Code
// If you set $_CONF['image_lib'] below, you must supply a path for the library
// you will use.  Setting this also assumes that if a photo is uploaded that is
// too big either by the image sizes below or by overriding them using the    
// upload object then the library you choose will attempt to resize the image.
// Leaving this value empty disables this feature                              
$_CONF['image_lib'] = ''; // can be one of 'netpbm', 'imagemagick', 'gdlib'
 

Also see the settings below that one.

bye, Dirk
 Quote

Bob

Anonymous
Hi, Thanks for your response.

Ok, so now i just get an error - cannot be resized.
Checking the error log shows:

Tue Apr 26 15:22:16 2005 - Debug: Attempting to resize with this command (netpbm): /home/rob/netpbm/jpegtopnm '/home/rob/public_html/images/articles/3.jpg' | /home/rob/netpbm/pnmscale -xsize=92 -ysize=120 | /home/drob/netpbm/pnmtojpeg > /home/rob/public_html/images/articles/tmp.jpg
Tue Apr 26 15:22:16 2005 - Error: Image, 3.jpg had trouble being resized:


Netpbm is in that location (was working fine with 'Gallery' previously) but I updated it just to be on the safe side.

Any ideas?

Thanks again,

B
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Do you have "pnmtojpeg" in your NetPBM directory?

For some background, see this thread.

bye, Dirk
 Quote

Status: offline

ajzz

Forum User
Regular Poster
Registered: 01/19/05
Posts: 113
Dont know if this answers the question but its related:

If your thumbnail size was set to something else earlier and you just changed it, Geeklog does not change posts retroactively. Only new posts after you change the setting will be affected. So its not impossible to end up with different behavior for articles posted at different times.

See this thread and feature request.

Cheers,

Ajay
 Quote

Status: offline

dermotti

Forum User
Newbie
Registered: 07/11/05
Posts: 1
This did not work for me.

// Story image settings
$_CONF['max_image_width'] = 1600; // In pixels
$_CONF['max_image_height'] = 1200; // In pixels
$_CONF['max_image_size'] = 10048576; // 1048576 = 1MB

And this did work for me (added single quotes)

// Story image settings
$_CONF['max_image_width'] = '1600'; // In pixels
$_CONF['max_image_height'] = '1200'; // In pixels
$_CONF['max_image_size'] = 10048576; // 1048576 = 1MB
 Quote

All times are EST. The time is now 11:43 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content