Archive for September, 2003

Comment Spam Killer

Wednesday, September 24th, 2003

Jay Allen recently posted another alternative to trying to rid the world (or at least your blog) of comment spam.

CSS Links

Wednesday, September 24th, 2003

A few very helpful CSS links.

Rounding Tab Corners

Containing Floats

Stylesheets Tutorial

CSS Based Design

Making the Absolute, Relative, demystifying floats

PHP Email Address Encoding Function

Wednesday, September 24th, 2003

I’ve developed another email address encoding function in PHP. This works on a similar principle to the well-known HiveWare javascript encoder, but doesn’t require javascript to be enabled on the client. Instead, this PHP function just needs to be included in your web page, and then where it is called it will write out an encoded version of your mailto link. The CDT; has reported that encoded email addresses have been effective in preventing spambots from finding addresses on your web site. The function is provided and described on my web site: PHP Email address encoder.

advertisement
Your concerns about business email need to include your business email hosting plan. Your provider should include a user friendly business email interface along with toll free support for your business email. Don’t forget to consider your business email hosting server’s bandwidth, either.
advertisement

RSS Templates - get ‘em while they’re hot!

Wednesday, September 24th, 2003

One thing I’ve found myself having to dig for are the links to the actual templates for RSS feeds… so here we go.

Here’s Christine’s scripty post about why you need an RSS feed and what it is. (NOW!) ;-)
This is Dive Into Mark’s basic template (When you click that link, it looks all funky in the browser, you have to view source to see the code you need… So I just posted it below…) (Dive into Mark’s full post here)

Here’s Jennifer’s template (which is my favorite because it’s full post, and comments!)

I know people have other templates out there, so here’s your chance to post them. (If you’re posting the actual template in the comments - which would be GREAT - so I don’t have to hunt for them, or bang my head against the wall when you rename all your pages and I can’t find your templates any more) - just don’t forget to use the “decoder” link to change all the < to &lt; and > to &gt;
(more…)

PHP: Anatomy of a file upload

Wednesday, September 24th, 2003

All details are on the PHP site (but just the highlights because I seem to need it a lot):

$_FILES['userfile']['name']
The original name of the file on the client machine.

$_FILES['userfile']['type']
The mime type of the file, if the browser provided this information. An example would be “image/gif”.

$_FILES['userfile']['size']
The size, in bytes, of the uploaded file.

$_FILES['userfile']['tmp_name']

The temporary filename of the file in which the uploaded file was stored on the server.

$_FILES['userfile']['error']
The error code associated with this file upload. ['error'] was added in PHP 4.2.0

Main and secondary categories in MT (with a little help from PHP)

Saturday, September 20th, 2003

The point of this script-snippet is so you can set up two hierarchies of categories. So there’s a main category, and a few “sub-categories” below it. An example of this is on Christine’s Pixelog site, on her album page.

This differs from the way MT has “Primary” and “Secondary” categories in that in mine, the sub-categories for a main category, can only be a sub category of that one main category - not any other main category. Here’s another example: Ohnozone.net . In the sidebar, scroll down to the “categories”, You’ll see there’s a main category “Appearances”, and there’s sub categories beneath it. “Interviews & Articles” and “TV”
(more…)

Basic MySQL connection and query with PHP

Wednesday, September 17th, 2003

I use this almost on a daily basis, and yet I can’t commit it to memory. So I don’t have to go searching for it each time I need to write it…

$databaseName = “YOURDATABASENAME“;
$dbconnection = mysql_connect(”localhost”, “DATABASE-USERNAME“, “DATABASE-PASSWORD“) or
die (’I can?t connect to the database.’);
mysql_select_db($databaseName,$dbconnection);
$value = “SOMEVALUE“;
$query = sprintf(”SELECT FIELDNAME from TABLENAME where FIELDNAME=’%s’;”, $value);
$result = mysql_query($query);
$totalNum = mysql_num_rows($result);
while ($row = mysql_fetch_array($result)) {
echo $row['FIELDNAME'];
}
////////OR//////
for ($i =0; $i < $totalNum; $i++) {
$row = mysql_fetch_array($result);
echo $row['FIELDNAME'];
}

PHP and CSS tutorials (and more) from Macromedia

Monday, September 15th, 2003

Stopped by the Macromedia site today (btw - they redesigned for the launch of their MX 4000 versions of their products) and found that they have a number of pretty cool tutorials for PHP, CSS (here specifically for dreamweaver) just to name a few. (look on the side in “topic centers”)

Here’s one for how to create a persistent shopping cart
Here’s a bunch on CSS in Dreamweaver … including one on creating tableless layouts using CSS in Dreamweaver

Drag and drop Live Journal into MT

Friday, September 12th, 2003

Recently I decided to stop using Live Journal and decided to move all my writing, comments, and links to my own website. Previously, I had just linked to my journal at the LJ site, but I needed a way to convert my old LJ content to MT.
(more…)

Color Scheme

Friday, September 12th, 2003

Another cool color tool/palette generator: Color Scheme

[found by Carla, then Melissa]