Webmastery
Test your website in other browsers online
As we all know, not all browsers are created equal. Some refuse to play nice, or follow the standards of the internet, and instead mangle our websites beyond all recognition.
In order to test out what our site looks like in each of the different browsers, we need to either keep a room full of PCs, Macs, Linux boxes etc, with all the different browsers on them for testing purposes - or we can use the variety of online browser testing websites.
Browsershots is probably the most fully featured one, but there is usually a bit of a wait for screenshots to be processed, and sometimes (unless you hit the Extend button a few times), some of your screenshot requests will expire:
http://browsershots.org/
Another handy one for testing the IE range (up to IE7 at time of writing this), is the netrenderer:
http://ipinfo.info/netrenderer/index.php
Enjoy, and may your websites be free from browser anguish!
Get Google maps and PNGfix working together
Its often what happens when building websites which feature a range of different components, that some won't play nice with others.
How to generate Drupal pages from CSV
This is probably common knowledge to those of you who are very familiar with Drupals variety of modules, but its new to me, so I'm posting about it!
How to customize Drupal forms
After trying to figure out how to customize node input forms for Drupal for a while by using form_alter, I eventually stumbled across the formfilter module.
The formfilter module appears to be perfect for what I needed. Its a simplified point and click interface visible to admins only, which allows virtually any form field to be hidden.
Obviously when creating a website aimed at a less techy user audience, we're wanting to keep it simple. First impressions of the formfilter module for this seem to be pretty good.
How to block a bad bot or spider
Whenever we put our websites online, we open the doors for any and all spiders and bots to start trawling our content. Most of the time this is not too much of a bother, as long as they don't get stuck in broken loops which can burn up bandwidth, or slow down servers.
In theory we're able to use robots.txt rules to tell spiders what they're allowed to look at, and what they're not welcome to... of course plenty of spiders completely ignore robots.txt and do whatever the creator has instructed them to do... whether it's something shady, or even simply gathering data and/or files for a privately run search engine.
This is where other useful tools such as htaccess and modrewrite come in. A lot of spiders do actually include an identifying "useragent", and so by adding the following lines to our htaccess file we can deny access to a list of these "bad bots".
In this case we're blocking a couple of spambots and a media file crawler called asterias, which is associated with Singingfish - an mp3 search engine. Singingfish has the totally idiotic habit of crawling websites looking for mp3 files, and then immediately downloading every single one they find. Nice.
# Turn on mod_rewrite
RewriteEngine On
# Expandable bot list (Note: no OR on the last one)
RewriteCond %{HTTP_USER_AGENT} asterias [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Exabot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nicebot [NC]
RewriteRule .* - [F]
Its a good idea to double check that only the correct useragents are being blocked, and you haven't accidentally banned every visitor and search engine under the sun!
Here's a handy HTTP request viewer which can be used to do just that.
100 Web 2.0 generators
I'm pretty sure everyone involved with the interweb can find some useful generators amongst this list of 100!
Audio Playlists on Drupal 5
I'm trying to setup working playlists of audio nodes on one of my websites running Drupal 5. The playlist module has been abandoned, and replacement components are being worked on at the moment - playlists and other such features are now going to be subcomponents of the audio module, as small contrib modules.
I'll post a guide once I have it working, but for the meantime these are some of the important pages:
Audio Module
http://drupal.org/project/audio
Migrating playlist module to audio contrib modules
http://drupal.org/node/113750
Unsure whether these have become part of core module yet, but they are patches to enable different mp3 players:
http://drupal.org/node/102912
I'll post more as I get to it.
Excellent Animated Javascript Sliding DIV
This is an excellent tutorial (with complete download JS code) that allows us to create a hidden DIV of whatever we'd like (for example a help section) on our webpage, which slides into view when the trigger link is clicked. It can then be closed with a click on a secondary trigger link.
It looks very stylish and smoothly animated in both Firefox2+ and IE6+ (I haven't tested any other browsers with it yet).
The Animated Javascript Sliding DIV tutorial is here.
There is also a single link toggle modification to the script here
Very nice little script, and super simple to use.
Drupal Forum Topic List Customization
For a new project I have been working on, I wanted to alter the default Drupal forum topic list, so that instead of displaying the following columns:
TOPIC - REPLIES - CREATED - LAST REPLY
I wanted it to simply display:
TOPIC - REPLIES
I soon found out that I would need to customize Drupal forum at the theme level, by creating a forum_topic_list.tpl.php file in my theme directory, and adding a snippet of code to template.php, which was also in my theme directory.
For those wondering how to do this, here goes.
Free Vector Clipart and Icons
Everybody loves free stuff, and webmasters are no exception. Here are some collections of free snazzy vector clipart and icons:
