[Phpwm] unsigning a numeric variable

Phil Beynon phil at infolinkelectronics.co.uk
Fri May 5 10:59:43 BST 2006


> On 5/5/06, Phil Beynon <phil at infolinkelectronics.co.uk> wrote:
> > But since these
> > are pixel widths for a mogrify resize, as part of a system manager for
> > resizing previously uploaded pics that might be needing tweaking a bit,
> > entering a negative pixel value rates as 'bad' and causes execution
> > silliness. :-)
>
> What happens with zero?
>
> Cheers,
>
> --
> Jon Ramsey

I need to flag two types of error message to the user, the first is designed
to let them know that they can't put a pixel subtraction number in the
field, in that if they want to reduce by say 10 pixels by putting -10 in
then it won't let them. Then the actual number they put in gets run through
a bandpass filter which is predefined in the site config file for upper and
lower limits of image sizing. This will also flag up an error if the max/min
sizes are exceeded.

The idea being whilst zero would be bad, having them resize a pic to
1,000,000 wide / high would be worse as apart from the storage aspect it
would nail the server for an awfully long time!


Regards,

Phil Beynon
Sales director

** http://www.diygear.com THE Online DIY Toolstore For DIY & Business
** Infolink Electronic Systems Ltd. http://www.infolinkelectronics.co.uk
** Professional Web Design & Cobalt Hosting Solutions
** Contact: Sales at infolinkelectronics.co.uk
** Tel / Fax 0121 458 4894 (office) 0121 441 3558 (home) 07801 548464
(mobile)





More information about the Phpwm mailing list