Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2005-04-02 18:06:21

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Admin plugin: glx_admin_image_resize

Let me clarify my comment about IDs.

Because I couldn’t see the html for the forms, I had to sift through the javascript and use trial and error to style elements. There’s probably an easy way to do this (dom inspector?) that I don’t know about, but it would be really useful is to be able to see the html that the Javascript produces and have a few distinct IDs for the elements so that it’s easy to apply the styles on a per element basis.

And of course I’d be willing to pass on any new css.

Oh, and regarding the cropping function. Perhaps a good trade-off for simplicity’s sake would be the ability to simply specify which corner anchors the crop (like photoshop). That option might be simpler to implement than a full-blown interactive crop feature.

Just my 2c. Thanks again

Offline

#50 2005-04-04 11:12:00

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: Admin plugin: glx_admin_image_resize

New version 0.5b

  • Cookie that saves the latest length for thumb and large image, from an idea by graumeister
  • Checkbox that makes it possible to resize image on upload with latest stored value.
  • Image opts now appears on thumbnail insert and image replace, thanks ZiQ
  • Support for image rotate for php 4.3.0 or lower, thanks Tobias Einarsson
  • GD version check, function from MDP Automatic Resize and Thumbnail for textpattern by Caged

Johan Nilsson

Offline

#51 2005-04-04 11:22:29

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: Admin plugin: glx_admin_image_resize

yes the DOM inspector in firefox is very handy to see what is going on, but the two main classes that is added right now is <code>resize</code> that is set du a div that wrappes all things related to the resize stuff, and the other one is <code>rotate</code> that wrappes everything that is related to the rotate stuff.

The inputs looks something like this
<code>
<p>
<label for=“largeSize” class=“block”>Largesize (px)</label>
<input name=“largeSize” id=“largeSize” value=“500” class=“edit” />
</p>
</code>

Any suggestion how all this elements should be outputed, and how they will styled? i kinda just put them there without any big thoughts. Anyone willing to do a html mockup of this? :)


Johan Nilsson

Offline

#52 2005-04-04 12:47:41

Matt
Member
Registered: 2004-02-28
Posts: 92
Website

Re: Admin plugin: glx_admin_image_resize

Wow. Thanks, Johan!

This is incredibly cool, especially the persistent size settings.
I just resized all my images and their thumbnails with just a few clicks.

A must-have plugin.

Offline

#53 2005-04-04 14:22:18

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: Admin plugin: glx_admin_image_resize

I’ve got a problem with the new version. When I hit “Save” the image is not saved and the edit page gets reloaded.

Offline

#54 2005-04-04 14:58:41

heikki74
Member
From: Finland
Registered: 2004-08-17
Posts: 100

Re: Admin plugin: glx_admin_image_resize

I think mine isn’t working right.. When i upload image, it resizes it correctly and the thumbnail is created. But after that when I choose ‘square thumbnail’ and press ‘resize’ the resulting thumbnail looks like cropped part from the bigger image’s top left corner (?). Pixel dimensions are correct and the scale is a little smaller than in bigger image. Something weird going on..

Offline

#55 2005-04-04 15:18:55

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: Admin plugin: glx_admin_image_resize

andreas you must hit the resize or rotate button or else the image wont change.

heikki74 that is infact the way it is intended to work, its not the perfect solution i know.


Johan Nilsson

Offline

#56 2005-04-04 15:25:47

heikki74
Member
From: Finland
Registered: 2004-08-17
Posts: 100

Re: Admin plugin: glx_admin_image_resize

Ah, I see. I was just about to check through the code to see how it works and where the problem lies..
Btw, is there some particular reason why the original image name is stored to the database? I think it is not used anywhere.

Offline

#57 2005-04-04 15:31:53

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: Admin plugin: glx_admin_image_resize

if you figure out some better square function please tell me :)

The filename in the database doesnt have any “filename purposes” it just to set a name to the image.

Last edited by osei (2005-04-04 15:33:47)


Johan Nilsson

Offline

#58 2005-04-04 15:52:32

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: Admin plugin: glx_admin_image_resize

Michael_art I think i know why you get that problem now, check with your phpinfo() if gd is compiled with JPG support. It must be enabled.


Johan Nilsson

Offline

#59 2005-04-04 17:30:52

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Admin plugin: glx_admin_image_resize

Hi osei,

I styled the form, using the DOM inspector (see inline css). Firefox only for now.

I think it makes the space usage a little better (everyone has their opinion, to be sure).

One problem: You’ll notice that the update buttons that sit by the replace image and upload thumbnail have been styled too. For that reason it’d be nice to have IDs on the resize and rotate buttons, so they can be targeted directly and exclusively.

Is this doable?

Update: I got it working now. See the fix described here

Last edited by mrdale (2005-04-25 16:55:13)

Offline

#60 2005-04-24 17:12:03

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: Admin plugin: glx_admin_image_resize

Johan – Great plugin! Its been very helpful.

I’m noticing one problem now though. I’m trying to update an image that I had previously uploaded. I select the image from the list and when I attempt to upload a new version the image is deleted from the database. Am I doing something wrong? I’m using version 0.5. Thanks.

Offline

Board footer

Powered by FluxBB