This is a plugin for WordPress. The Plugin makes it easy to have elements on your site in colors generated by the Colhour system. Basically it will let you input CSS rules from a option page in the WordPress Admin, and when the site is viewed later it will have the colors replaced by an ever updating Colhour-color.
There are a couple of input fields on the options page; one for each “length” of the spectrum (for it to start over again). I.e., if you want a div element with the id “header” to get its background colorized from Colhour and its Colhour cycle starting over every day (after 24 hours), you just enter the CSS rules in the “day” input field. The actual color-value should be replaced with `%colhour%´ so the plugin can insert the current color in its place.
I suggest not having any other CSS rules in the Colhour admin than the ones dealing with the colors you want replaced. I.e., strip out the fonts, border sizes etc and keep all that in your .css file where they belong (and can be cached).
The problem was that his theme never was cross browser compatible and worked more or less only in Safari. My first task was to re-code the theme from scratch to make it work in all modern browsers using valid XHTML and CSS with as clean and simple code as possible.
I also set all font sizes using em:s (instead of px or pt) to make the text resizable. It wasn’t too hard making it work (even in Microsoft Internet Explorer) thanks to somegreatresources. Sooner or later I’ll convert the positions, margins etc to em:s as well, but font sizes should be enough for now.
I also added AJAX comments and used effects from script.aculo.us. I’m using Prototype to add CSS classes to some elements and to wrap i.e. all <h3>‘s content in a <span> to achieve the look I wanted without any unnecessary markup. Since <input type="search" /> only is supported by Safari and I wanted to use it, I used a script (thanks Wolfgang Bartelme) that replaces the regular text input field with a search field for Safari only. This way the document will stay valid XHTML 1.1.
Next task was to make the theme more personal for my site. I’ve tried some different looks but couldn’t really decide how I wanted it and choose (for now at least) a slightly darker version of Peter’s theme. I think it looks good and is easy to use without making too much noise.
When I implanted the tagging I first looked at Ultimate Tag Warrior 3 but it seemed too advanced for my needs, so I decided to use the native category system in WordPress 2.0, that lets one add tags (categories) by just entering them in separated by comma in a text field (WP 1.x didn’t have this feature). The tag cloud is a modified and simplified version of Tag Cloud Plugin.
Update April 20, 2006
The theme is now released in a beta version. Some notes:
* You’ll need the [Post Updated Plugin](http://guff.szub.net/2005/02/22/post-updated) to get a page’s last modified date.
* My “lite” version of the [TagCloud plugin][tagcloud] can be [downloaded here][tagcloudlite].
I also found this great plugin for the admin area, [Cat2Tag](http://www.agkamai.org/cat2tag)The link seems to be broken, get it download it here for now for easier tagging of your content without using a separete database like [Ultimate Tag Warrior 3][utw] does. Cat2Tag just use WordPress’ own categories instead.
Update May 4, 2006
The [TagCloud plugin][tagcloudlite] is updated to use the [rel-tag](http://microformats.org/wiki/rel-tag) [microformat](http://microformats.org/about).
Update August 18, 2007
Since a lot of people ask me how to get the thumbnails to work, here is the instructions I usually email them:
— ✄ ——————
First, download a newer version of `posts-thumbnail.php` replace the current one (from the downloaded .zip file) with this one attached in this message.
———— ✄ ——
Btw is a new version of this theme under development and will make the thumbnail handling easier.
Update October 31, 2007
The link to the plugin “Cat2Tag” seems to be down (thanks Kris Aubuchon) so, for now at least, you can download it here.
I haven’t really looked into the new tagging system in WP 2.3 so perhaps this plugin isn’t necessary any more.
Pluxemburg is a record label I’m co-running with some friends. The site in its current form is almost two years old, but a lot of things have changed since it was first released. Since I just released some updates, I thought I’d write something about them and show how the CMS/administrative interface works.
Recent site updates
I won’t go through the whole site and tell you everything about it. Instead, go browse it by yourself.
The shop has been improved with a smarter cart that doesn’t forget your items if you by accident reload your browser or hit the back button. Validation is more clear and better looking in the same style as the improved (and AJAX powered) guestbook and newsletter subscription.
When the site launched almost two years ago, it fully supported Internet Explorer 5 (Mac), IE 5, 5.5 and 6 on PC and of course, old and new Firefox versions, Mozilla, Safari etc etc. It was a pain to fix the CSS especially for IE Mac and IE5, IE5.5 on Windows. Currently, I’ve dropped support for MacIE (it’is not even supported by Microsoft any more), IE5 and IE5.5 for Windows. I think the site should work more or less using outdated browsers, but it might not look exacly as intended.
CMS and site admin
The site is powered by an advanced CMS that helps us adding and editing news, products in the shop, guestbook spam and a lot of other things. When I first wrote it for this site, I had in mind to keep it so general I could, so it could be extended and used in other projects. Of course the administrative interface is password protected, but I’ve recorded two movies showing some parts of it. I’ll convert the movies to H.264 right after this is posted, so for now, the movies are pretty large in size. The movies are now in H.264 format and are 75% smaller (before: total 44.8 MB, now: 11.6 MB)
The first movie, shows a basic task such as adding some news items to specific part of the site and then view it. Pretty basic.
Website and CMS for swedish photographer’s agency I made together with Peter. We also did their graphic identity.
The frontend is optimized to be a fast, simple but effective way of browsing the photographers and their photos, check it out. The CMS makes it easy for the photographers to upload, edit and organize their photos and for the site editors to write news and edit information on the site. It’s a customized version of the administrative interface I coded for pluxemburg.com with added functionality such as image uploading and photo organization. I wanted to let the server handle the image resizing and creation of thumbnails as well, but found out that PHP’s image functions didn’t do as good work as expected. I tried all kind of different techniques but we ended up using Photoshop and manually make the thumbnails. Photoshop does a way better job and with this kind of client (working with photographs) we wanted as good quality as possible.
I’ve made a movie (QuickTime, 4.9 MB) showing how the admin interface works when uploading and reordering the photos, since it’s password protected. You’ll need QuickTime 7 to watch it.
Since the agency and the site was shut down some weeks ago, I’ve put up some screen shots to show how it was done. I might record a movie and/or a mirrored version for reference.
Since Google currently doesn’t offer any API to do other searches than pure web searches and we wanted to use Google Image Search, I had to do my own image fetching script. The script is a ruby script that will pull the images and info from Google Images and store them in a local index file. First, I used Net::HTTP but I found out that it had problem dealing with the swedish characters (used in swedish, ie åäö) so I changed the URL-fetching to use curl instead, witch also was slightly faster. The index is written from ruby using Marshal. It is scheduled to run twice a week using cron.
My first approach was to make one class that downloads and shows the image for the given keyword. Then create one instance for each word (konst and teknik), controlling the preloading and image-switching every 4th second (meaning; updating one of the images every second second). But I found out it was hard to make the updates smooth and exacly on time.
Instead I split the client side script into of two main classes, the Preloader class and the Switcher class. The Preloader triggers a request using AJAX to a server side ruby script that will return a new random image from the image index and then stores the info received from the server in a local array. After some delay the script will start over again with a new request for another image.
When the Preloader is done indexing some images then the Switcher will kick in and start showing them and switch every other second between the images for each word as long as there are images preloaded and ready to be shown. If the Preloader is out of preloaded images then the Switcher will pause and show a loader while the Preloader’s buffering.
We wanted the images to be vertical aligned by bottom but I couldn’t make it work with CSS only (nor with vertical-align, float or position). Instead, the script is switching between two <div>s (for each word, totally four divs) and when the “not active” div got a new image loaded into it, it will find its dimensions and set its margins automatically. The next time it’s time to switch image (for this word) this div will be shown instead, the other one becomes invisible and get the next image loaded.
The script should work fine in Safari, Firefox, Camino etc (even WinIE6). It needs some code cleaning (mostly OO-issues; currently I’m referencing the instances from the class, which I think is a bit ugly) but I’m releasing it anyway.