RE: [PHP] thumbnails and captions?
| From: | Jason Sheets | Date: | Tue, 27 Apr 2004 01:07:20 +0000 |
| Subject: | RE: [PHP] thumbnails and captions? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184715@lists.php.net to get a copy of this message | ||
I generally use normal HTML to do the caption under the graphic, and I use
JavaScript to capture the onClick Event to change the image.src value.
You can see a live example at:
http://www.capitolbuildingco.com/plan_details.php?id=6
Using JavaScript means you can preload the images if necessary so the site
looks very fast and if you don't preload means the browser loads just the
image, making it faster than loading an entirely new page.
You could also do this with PHP but you would have to use hyperlinks with a
set value that would generate the page with the specified image at the size
that you wanted. In this case I prefer client side Javascript.
You could also embed the caption in the image, I prefer to use text with CSS
because it is smaller, looks better and is more adaptable (you change the
.css file instead of regenerating all the images when the client decides the
text is too big or small).
The above site doesn't sound like it is exactly what you want to do as I use
a master image and change its SRC on the click but it could easily be
adapted to change the thumbnail's src instead.
I usually use 100px to 150px wide thumbnails depending on the layout.
Jason
-----Original Message-----
From: Andy B [mailto:aborka1@wmis.net]
Sent: Monday, April 26, 2004 4:59 AM
To: php-general@lists.php.net
Subject: [PHP] thumbnails and captions?
hi...
how would somebody create a thumbnail that has a caption under it and then
when clicked on shows a larger size of the same graphic but still shows the
caption under it?? havent quite figured that one out yet...
thumbnail specs:
total size with graphic, whitespace border on all 4 sides and caption at the
bottom cant exceed 150px wide and 160.332px tall. thumbnail graphic must be
clickable to make image larger (includes caption).
enlarged image specs:
height: 385px, width: 385px (no more than that to prevent pixelations). the
enlarged graphic must be in its own window and include the caption that was
on the original page. the enlarged image must have a link somewhere to allow
the window to be closed and returns the viewer to the original page that
image was on.
page specs:
800 wide and 600 tall 20 images a page no less (40 a page if possible but
not required).
clients preferred graphic/image format: jpg
anyways does anybody know how to go about this sort of thing?? or is it sort
of unpractical to have thumbnails that small and have captions under them??
(sorry for my stupidness on images but when you cant see them it hurts)...
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php