
Client: Margaret Mace Home and School Association
URL: http://mmhsa.org/
W3C-valid PHP, XHTML, CSS site using Wordpress content management with a custom theme.
Margaret Mace Home and School Association (We donated this website to the school.)
There are many reasons we use PHP to serve images on sites including: resizing, watermarking, skewing, server-caching, etc. This will cover the basics of serving and resizing an image with PHP. This technique will work with JPG, JPEG, GIF & PNG image types. We’ll cover more advanced image manipulation techniques in later posts.
The first line of code calls the functions.phtml (more…)
Lets define some PHP functions we’ll be calling on for our PHP image tutorial series. We define all these functions in a file named functions.phtml and call it in our PHP code through a PHP include_once(), this way we don’t bother with the functions in our PHP image code.
This first function allows us to determine if the requested image file is an image is_image() (more…)
When we create a new site’s CSS, we start with a CSS Reset to level the playing field between browsers. The problem, not all browsers treat the margin, padding, line height, font size, styling, text decoration, etc. the same, a CSS Reset helps us to “reset” these within each browser. The CSS Reset technique is nothing new so we’ll let you read up on it’s history.
Here is the reset that we use as our basic CSS building blocks: (more…)
We wanted to create stylish text images for our page and post headings, but we didn’t want to create them in advance, we wanted them on the fly. This is a tutorial on how we accomplished this using PHP.
You’ll need PHP (PHP: Hypertext Preprocessor) the open source dynamic language the code in our example is written. We won’t elaborate, the internet is full of information reguarding PHP. (more…)