Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-11 03:46:00

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

default width and height in "create thumbnail" (phpmyadmin)

Just wondering how to enter a default
in this case 40px for width and height, with “crop” checked
under the “create thumbnail” line in the images tab?

I was able to add “photo” as a default to the alt field, but I can’t get the w and h fields to hold anything?

Any ideas?

Matthew


Offline

#2 2005-12-11 22:35:41

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: default width and height in "create thumbnail" (phpmyadmin)

I’ve patched ../textpattern/include/txp_image.php to observe preferences for default thumbnail crop, width and height. These preferences can either be set on the admin > preferences screen or immediately while generating a thumbnail. The whole patch consists of about 20 lines of PHP and is based on the latest version from the svn repository.

You can execute the included SQL script to add english or german labels for the additional user interface elements. Besides that, there is no other phpMyAdmin knowledge required.

You can grab the patch here, if you want to.

//w&

Last edited by wet (2005-12-11 22:39:22)

Offline

#3 2005-12-12 00:02:58

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: default width and height in "create thumbnail" (phpmyadmin)

Have you submited this patch wet (I don’t recall it on the mailing list). It would be quite a nice addition to the core :)

Offline

#4 2005-12-12 00:58:21

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: default width and height in "create thumbnail" (phpmyadmin)

Wet, Jeremie,
I don’t understand why the width and height defaults need a patch/hack, but the default for the alt field (for instance) does not, and can simply be adjusted in phpmyadmin?

Just curious. I am still a bit wary of working with patches/hacks too much as it (as I understand it) require a lot of work to keep up with.

????

Thanks,

Matthew


Offline

#5 2005-12-12 05:19:14

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: default width and height in "create thumbnail" (phpmyadmin)

> Jeremie wrote:

Have you submited this patch wet (I don’t recall it on the mailing list). It would be quite a nice addition to the core :)

Yes, I have done so back in July 2005. You may remember that the whole thumbnail generator thing was born out of a patch I submitted then. Obeying preference settings was already included there, but deliberately removed from the official distribution package by the core devs.

//w&

Last edited by wet (2005-12-12 05:19:35)

Offline

#6 2005-12-12 05:35:41

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: default width and height in "create thumbnail" (phpmyadmin)

> ma_smith wrote:

I am still a bit wary of working with patches/hacks too much as it (as I understand it) require a lot of work to keep up with.

From my experience, this is a non-issue. I have used this patch from 1.0rc4 on, upgraded now and then through SVN and never had to do any manual housekeeping. SVN is very reliable for patches like that which simply consist of some added lines. It will probably not survive a huge redesign of the core code, of course, but I wouldn’t do without until then. It is such a significant time-saver on image-heavy sites.

Offline

#7 2006-01-07 08:05:32

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: default width and height in "create thumbnail" (phpmyadmin)

Default thumbnail width and height are available.

Last edited by wet (2006-01-07 20:05:53)

Offline

#8 2006-01-07 13:41:21

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: default width and height in "create thumbnail" (phpmyadmin)

Wet,
Thanks for this. At one time I had added a default for the “alt” text through phpmyadmin and had expected to be able to do that here as well, but obviously wasn’t. Thanks for this patch. I will add it, and it looks as though it might get added next go around?

I had trouble doing the default “alt” text through phpmyadmin this time around, is there any reason why it would no longer work in these latest revisions?

I am ammending the bit in txp_image / alt / and setting it to varchar(255) – utf8 (unicode) ci – and making (photo) the default (without the parenthesis).

I do this so that it will still validate despite a customer or someone part of a community site will not forget to put it there.

Any ideas?

Matthew


Offline

#9 2006-01-07 20:19:28

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: default width and height in "create thumbnail" (phpmyadmin)

> ma_smith wrote:

Thanks for this.

Zem is the one to thank.

and it looks as though it might get added next go around?

FAQ.

I had trouble doing the default “alt” text through phpmyadmin this time around, is there any reason why it would no longer work in these latest revisions?

No, sorry.

Offline

Board footer

Powered by FluxBB