The Color Wheel • PHP and such

Creating a Word Document with PHP, XML and XSLT

MAR
21
2012
9:58 am
Categories: PHP, XML | 1 Comments: View/Post Comment

This tutorial will explain how to create a word document in PHP from an existing .docx template. This is made possible by the way the new word doc style(.doc -> .docx) is an archive containing xml files which can be manipulated by PHP.

I recommend creating a new directory for this project.

First, we need to create our template. I made a new Word Document called 'FavoriteMusicList.docx'. I used the Title heading at the top saying 'Favorite Music List', then a bullet point in heading 1 for the band name, then more indented a numbered space for songs. The way your template l...

Read more...

On Browser Compatibility

FEB
29
2012
4:04 pm
Categories: PHP | 0 Comments: View/Post Comment

Anyone who works with web-design hates the process of ensuring that the site they've created has smooth cross-browser functionality.

My biggest tip would be to design as simplistic as you can- use tables instead of div's for organizing a site, as the float: CSS property doesn't show perfectly in every browser,

Avoid position: absolute at all costs, as it renders quite different across browsers,

Don't cut corners by using tags out of order to get the effect you want; for example <td><a></a></td> works in IE 7 to produce a box-like lin...

Read more...

CSS & Javascript Popup

FEB
29
2012
3:40 pm
Categories: Javascript, CSS, HTML | 0 Comments: View/Post Comment

The code for a CSS div popup is actually very simple, but every time I try I run into a snag, so hopefully leaving this here will help my future self and some of you.

Start out with creating the div and blanket:

Here we have an empty div for the blanket, and the popup div, which holds a bit of text and a javascript link to close it.

Now fo...

Read more...

Resources

FEB
29
2012
3:03 pm
Categories: News | 0 Comments: View/Post Comment

First of all, I'd like to explain this blog is meant to archive coding solutions which were difficult to come by, or which I came up with myself, both to refer back to them later, and to share with fellow coders.

I'll start off with some resources I used to make this blog:
Syntax highlighting: http://alexgorbatchev.com/SyntaxHighlighter/
PHP: php.net

Actually, that's it. The rest is hard-coded from scratch.
If you'd like to view the source code you can email me, see the CONTACT page.

-admin