Media Library Images - force width of thumbnail?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
judebert wrote:Is there a way to include a checkbox on an admin menu item?
Nah, that would look ugly.

The menu item needs to be reprogrammed so that it does not lead to a javascript reload like now, but to a submenu just like "import" does for example...

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Ah! That I might be able to do. I could also include the "long execution time" text.
Judebert
---
Website | Wishlist | PayPal
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Okay, it's done. It's been in the 1.4 version for a week or two, and last night I merged it over to the 1.3 nightlies. Should be available by tomorrow (24 hours).

The new thumbnail code provides thumbnail constraints through a new configuration option. Under the "Appearance" options, near the existing thumbnail width, you'll find a new dropdown for the thumbnail constraint dimension. By default, this is the largest dimension, which is how Serendipity works now. However, you can now constrain thumbnails specifically by their width or height.

There are also additional options when you choose to rebuild your thumbnails. You can keep the existing thumbs, rebuild all the existing thumbs, or rebuild only the thumbs that are the incorrect size for the current configuration.

Only thumbnail resizing code is affected; everything is backward-compatible for code using existing Serendipity image functions. The imageselectorplus plugin was modified to detect and compensate for the new thumbnail code. (It was the only plugin to use the thumbnail functions, and it's obsolete, but I updated it anyway.)

The core language files requires new constants to deal with these new options. As an ignorant American, I speak only English and a smidgen of Spanish, so I updated all the files with English text. Any help with translation is gratefully welcomed.
Judebert
---
Website | Wishlist | PayPal
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Oh, yes: images with captions have an explicit width in one of their enclosing <div>s. Even if you used the "serendipity_admin_imageselctor.php?serendipity[image]=ID" format for the image, the <div> width will already be constrained.

The end effect: when you change the thumbnail size or constraint, the thumbnail does not necessarily change size in existing entries. The entries need to be edited and the thumbnails reinserted to change the <div>.

Which leads me to an interesting solution. We already have a plugin for including attributes of another entry, using the BBCode-like format [s9y-include-entry]. Perhaps we should modify our image code to use [s9y-mdb:ID:align:caption], and dynamically generate the enclosing containers.

Garvin, is that a possibility, or a long-term coding project?
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

I'm sorry but I just removed support for this on the 1.3 maint branch. A 1.3.1 poin trelease will be out somewhen next week, and I would like the new code being tested in a 1.4 beta version first. Hope you don't mind.
Which leads me to an interesting solution. We already have a plugin for including attributes of another entry, using the BBCode-like format [s9y-include-entry]. Perhaps we should modify our image code to use [s9y-mdb:ID:align:caption], and dynamically generate the enclosing containers.
This has been on the wishlist for some time. A few years past I coded such a plugin, but it was not properly committed to CVS and got lost. Since then I never found the motivatin to re-create this plugin again.

It would be great if there's a functionality that can insert such tags for s9y which will then get replaced. It would be suited well inside the imageselectorplus plugin, I think. People should though also have the possibility if they want to disable using such markup and have the usual <img> insertion, simply because of performance reasons.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Garvin - I tested Judebert's code under 1.3.1 branch quite a bit before he ever committed it. I encountered no problems, and I personally need it in 1.3. Can you allow it to remain in 1.3.1, which then provides a much wider test audience should anything unexpected arise with it? I really do not want to shift gears to 1.4 yet.
=Don=
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Don: my changes were r2230; Garvin removed them in r2231. So if you fetch r2230 from SVN, you'll get all the revisions.
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

No, I'm sorry, I do not want to have this in 1.3.1 yet, I cannot rely on a single usage scenario testing this.

This is a huge change impacting one core feature that virtually every blogger uses, and this is not the material for maintenance branch patch releases.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply