Griffin Interactive

Making your site search engine frendly

September 25, 2003
Misc

Here is an article at scribbling.net that looks at ways to aid googlebot's ability to find your website.


More CSS tricks

Standards

Try out these rollovers, 3 column alignment and rounded corners all implemented using CSS.


Creating a photo album with Movable Type

September 19, 2003
Misc

Movable Type does not come with the functionality to upload batches of images, however there are a number of tips and hacks available to create a Photo-Log type gallery.

The remit for my image gallery is:
  • Upload images in a batch
  • Resize images into thumbnails
  • Searchable
  • Set access rights to certain albums
  • Template driven
  • XML representation
Not much to ask, but the most important I guess is the batch upload, I dont want to spend ages uploading a file at a time.

Backup MySQL database

September 17, 2003
Misc

Ive logged this one for future reference, its a little batch file used to automate the mysqldump command. It uses the 7-zip utility to compress the sql files http://www.7-zip.org.

If you want to do this in 'nix simply write a BASH script using the tar tool to compress the sql files, and add the script to your cron list.

#!/bin/sh
mysqldump -uroot -ppwd --opt db1 > /sqldata/db1.sql
mysqldump -uroot -ppwd --opt db2 > /sqldata/db2.sql

cd /sqldata/
tar -zcvf sqldata.tgz *.sql


rem -----------------------------------------------------------
rem backup.bat - No Zip File
rem Filename: C:\DATABASE-2003-09-23-1100.sql
rem -----------------------------------------------------------
@ECHO OFF

FOR /F "TOKENS=2-4 DELIMS=/ " %%A in ('Date /T') DO SET DV=%%C-%%A-%%B
FOR /F "TOKENS=5-6 DELIMS=:. " %%D IN ('ECHO.^|TIME') DO SET TV=%%D%%E

SET SAVPATH=C:\
SET FILENAME=DATABASE-%DV%-%TV%.sql

C:\MySQL\bin\mysqldump.exe --quote-names --opt -uuser -ppassword database > %SAVPATH%%FILENAME%

rem -----------------------------------------------------------
rem backup.bat - Zips SQLFile(s) using 7zip
rem Filename: C:\SQL-2003-09-23-1100.zip
rem -----------------------------------------------------------
@ECHO OFF
FOR /F "TOKENS=2-4 DELIMS=/ " %%A in ('Date /T') DO SET DV=%%C-%%A-%%B
FOR /F "TOKENS=5-6 DELIMS=:. " %%D IN ('ECHO.^|TIME') DO SET TV=%%D%%E

SET SAVPATH=C:\
SET FILENAME=SQL-%DV%-%TV%.zip

C:\MySQL\bin\mysqldump.exe --quote-names --opt -uuser -ppassword database > database.sql
C:\MySQL\bin\mysqldump.exe --quote-names --opt -uuser -ppassword database > database.sql
C:\MySQL\bin\mysqldump.exe --quote-names --opt -uuser -ppassword database > database.sql

IF EXIST %SAVPATH%%FILENAME% (
del %SAVPATH%%FILENAME%
C:\Progra~1\7-ZIP\7zn a -tzip %SAVPATH%%FILENAME% -mx *.sql
) ELSE (
C:\Progra~1\7-ZIP\7zn a -tzip %SAVPATH%%FILENAME% -mx *.sql
)

DEL *.sql


CSS image rollovers

September 01, 2003
Standards

Petr Stanicek's innovative article 'Fast rollovers, no preload needed' demonstrates how we can speed up CSS image rollovers using one image instead of three separate images to define state (normal, hover, active / visited).

The principle uses the one image and positions it differently depending upon the state of the button. This actually speeds up the rollover and removes the requirement for preloading.


Float misbehaviour

Standards

Eric Meyer shows us how to stop our floats from misbehaving in this article called "Containing Floats".

The article explains how we can prevent float elements from floating outside their parent element.


SOS Math

Misc

Just discovered a Math site which would have saved me hours of headaches during those Math lessons on subjects such as Advanced calculus, series and Homogeneous Linear Equations.

Its a bit late now but I will use this as a reference if I ever have to solve a fast fourier transform anytime soon.


Colour

Misc

Here are some very good online colour tools.
Ideal for chosing that all important colour scheme for your next web site design.