Reply to Re: My readdir and display images snippet - Thanks

Your name:

Reply:


Posted by Confused but working on it on 09/16/07 05:45

On 2007-09-14 19:30:34 -0700, "Rik Wasmus" <luiheidsgoeroe@hotmail.com> said:
>>>>
>>>> echo "<img src='images/$file' class=\"pad1em\">";
>
> Hmm, are you sure about the class name? I'd say that on a new layout wit h
> the same HTML 'pad1em' could end up making very little sense. A golden
> rule of css is that a classname should reflect what something is, not ho w
> it is _displayed. A more suitable name could be something like
> 'imagepreview' or the like.
>
>>
>
> Oh yeah.
> (Just make sure the file is a proper image directly after an upload.
> Examining extention or mime-type is no good. I'm quite happy to us
> getimagesize() for this purpose, as it would return false if it couldn't
> interpret a file as an image.)
>
> And to display only files _ending_ in jp(e)g, I'd use
> preg_match('/\.jpe?g$/i',$string);
> --
> Rik Wasmus

Rik,

Thanks for responding. In this case the class name is what it is.
..pad1em{padding: 1em;}

Was just messing with some spacing and will rename if I add some pretty
decorations. Any suggestions for this class?

thx..ron

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация