So far it’s really just proof of concept, and its code is a little limited but could very easily and quickly be improved, depending on what information you actually wanted to share. The reason I’ve put the date in for now is because it’s the simplest way to show the principle involved here. The date comes from the php function of the same name in this case I used:
date("D jS M - G:i");
What I’m trying to show here is that information available on the server side: databases, xml feeds, _POST and _GET requests, anything; can quite easily be transposed into a graphic without the need for java or anything that is blocked on wordpress.com. The sky is the limit!
The image src (if you look at the code) is actually:
<img src="http://bendavis.me/mintpromo/button.php" alt="Linux Mint Button" width="181" height="60" â„>
If you visit ../button.php you will see the png. For now I’ve also added basic functionality to change the statement (the “Taste Mint” bit) to whatever you want. Just bear in mind the picture’s only 181px across and the logo takes up 50px or so of that.
So, if you add “?alt=Your Text” to the end of the above link, the button will change accordingly. Note just for clarity the entire url will then look like:
So, if you were type something like this into your browser:
You’d get a modified graphic just so.
Obviously, no programmer worth his salt would allow the user so much scope for editing your scripts in a working public version of this, it’s just to illustrate my point.
To further polish this, I’d use my .htaccess file to make an actual img url, something like promo-button.png so it appeared to the casual user that it really was just an image. The next step I think.
Thanks to facade47 on the forums for the font and reverend_nerd for his great button.
What do you think?