Welcome to my very first contribution to PHPClasses.ORG...
Many thanks to those of you who have contributed to this site - on many occasions, I have found your scripts helpful and hopefully, you find the following useful as well.
The purpose of this class is to combine some CSS tricks, scripting, and some PHP magic into an OOP class that accomplishes the task of adding images into text blocks where the text flows around the image. This can easily be accomplished with CSS and PHP - what I needed to do was to not only embed the thumnail but to make it expandable, to reflow the text and to do this without having to reload the page... It needed to be clean code, fast, and flexible and be able to accomodate more than one image (which mean unique and dynamic DIV ID tags).
I needed to have some control over where the image was located. This text is after the image 'marker' and will run around the image.. text before the call to the image_display function within the class will stay above it. Text after the call will flow around it... see the CSS file to control the flow around the image...
boximage_R is the container for the right floating images.
boximage_L is the container for the left floating images.
NOTICE: Due to a way the script handles the image, the filename of the image must have at least one letter as its first character - not a number.
There are two calls made - one to lookup the information about the image and to set the size of the thumbnail.
The other is to display the image:
This class is designed to allow the easy insertion of one or more thumbnails into a page. Once moused over, the larger image appears, inline as an object on the page. This can be changed to a mouse click - see the file 'class_photoinclude' - change the 'onmouseover' to 'onmouseclick' - why a mouse over? Well, figured that people wouldn't naturally know to click the thumbnail image and that it would expand.
This page relies heavily on CSS and a little JS script trick to show and hide DIV tags by ID -
The real trick is that it allows you to dynamically embed images into a page, in the body of text as a thumbnail.
This is designed to be extremely flexible -
You can specify file path, file name and type - plus request a float left or right, AND set the size of each thumbnail.
The need for this class arose from a site that required placement of many images onto a page with a lot of text content and for some content - the thumbnail - to be shown but after an event for new content to replace it... a show hide function.
The LICENSE for this class is for FREE USE on the understanding that if you find this useful that you email me to email@example.com with comments, and provide a link to where you were able to implement it into your sites.
Hope that you find this useful and again thanks to other contributors for sharing.
Creative Digital Design Ltd.
CLASS DEMO: LINK
SEPT 10, 2004