Webmastery
Free advanced text editor with syntax highlighting
When we're working on our code - whether it's HTML, PHP, CSS, we use a text editor a lot. The standard notepad text editor that comes with windows can be used if there is nothing else available, but there are much better advanced text editors available. One excellent example of this is Notepad++, which has syntax highlighting, ability to have multiple documents open in Notepad++ tabs, and many other handy features.
Simple secure website contact form PHP script
This is a small php script to create a basic website contact form, which is secure and simple to setup. It's fully themeable with CSS, so you can easily make it look like the rest of your site.
How to center a DIV horizontally with CSS
When we're working on our websites we'll often want to horizontally center a DIV containing some text/images, or both.
How to style a shiny search box with CSS
This is something I've been meaning to do for a while, and it turns out its pretty simple to use CSS to style your search box to look however you'd like.
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 (including IE6, IE7, IE8) 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!
