This is the web log of Tim Bennett, web designer. He also runs Texelate, offering the best web design Leeds, Yorkshire has to offer

Tim Bennett's Blog

SQL to delete all post revisions in WordPress

April 16th, 2009

If you want to trim down your WordPress database here’s a MySQL query you can use to do so.

DELETE FROM wp_posts WHERE post_type = ‘revision’

If it doesn’t work, check your table name.

Crackling sounds with Compiz and Ubuntu

April 16th, 2009

I don’t think I’ve ever had a smooth Ubuntu upgrade – and upgrading from Gutsy to Hardy was no exception. I found that when Compiz was running and I was playing music in VLC, especially with visualisations on,  the sound popped and cracked. I’m no Linux expert but I found that if you force the system and VLC to use ALSA (mine was defaulting to Pulse Audio) it fixes it.

To set the OS to ALSA go to System > Preferences > Sound. In the first four dropdowns choose ALSA.

screenshot-sound-preferences

Then open VLC and go to Settings > Preferences and check the Advanced Options box. Expand the Audio section on the left and choose Output modules and then choose ALSA audio output.

And now the sounds works perfectly again.

Real time alerts when people visit your site with PHP

April 1st, 2009

I thought I’d post this code I use on some of my sites. Basically when someone finds your site from another site it emails you and tells you where they came from. I know stats software is much more powerful but this is quite nice as it’s in real time.

if( !empty( $_SERVER[ "HTTP_REFERER" ] ) && substr_count( $_SERVER[ "HTTP_REFERER" ], “www.yourdomain” ) == 0 ) {

    $subject = “Someone has found YOUR WEBSITE NAME HERE”;

    $m = $_SERVER[ "HTTP_REFERER" ] . “\n” . $_SERVER[ "REQUEST_URI" ] . “\n”;

    $m .= “\n\nMessage sent on ” . date( “H:i:s, d/m/Y” );

    $headers = “From: Your website name <contact@yourdomain.com> Reply-To: Your website name <contact@yourdomain.com>n”;

    $to = “youremail@yourdomain.com”;

    mail( $to, $subject, $m, $headers );

}

Although I’ve spent a lot of time reading the mails during the working day it gives you a good idea of how and when people find your site.

Web design Leeds

March 19th, 2009

I’ve just done a bit of SEO and here are some shameless links to get them indexed by the search engines.

 

http://twitter.com/WebDesign_Leeds

http://www.myspace.com/web_design_leeds

http://webdesigninleeds.wordpress.com/

http://webdesigninleeds.blogspot.com/

http://delicious.com/leedswebdesign

http://www.squidoo.com/Web-design-in-Leeds

 

It’s not like the site isn’t plastered with adverts for my web design company in Leeds but that’s basically what I’m plugging with this post and all these other social networking links.

So if you need any of the following services:

  1. Web design
  2. Web development
  3. Web updates
  4. Web outsourcing
  5. eCommerce
  6. Content management systems
  7. Internet marketing
  8. Online media and games

Then give my site a visit and get a free quote. I promise you it is quick and very easy.

Etched metal text in Photoshop

March 10th, 2009

 

Note: This tutorial is written for Photoshop CS on a Windows XP platform and assumes you have a basic knowledge of Photoshop. However, this technique will work on most versions of Photoshop or similar graphics package.

In this tutorial we will create a metal panel from scratch (with no imported graphics) and create the effect of etched metal text like this:

etchedmetal_finished

1. Create a new canvas 250 x 100 with background colour #353535.

2. We’ll start by making the base of the metal plate; select the Rounded Rectangle Tool and set the radius to 10px. Draw the base of the metal like this:

etchedmetal_2

3. Apply a Stroke layer style like this:

etchedmetal_3

4. We need the metal plate to look like it has rounded edges – apply a Bevel and Emboss layer style like this:

etchedmetal_4

5. Apply an Outer Glow layer style like this:

etchedmetal_5

6.Right-click the Layer 1 layer and choose Rasterize Layer.

7.Double click the Layer 1 label and rename the layer to Base. Your Base layer should like like this:

etchedmetal_7

8. Ctrl + click the Base layer to select the layer transparency. Choose Filter > Noise > Add Noise and Amount to 10% and Distribution to Uniform; ensure Monochromatic is checked.

etchedmetal_9

9. Choose Filter > Blur > Motion Blur; set Angle to 0 degrees and Distance to 10 pixels. It will look like this:

etchedmetal_10

10. Choose Filter > Sharpen > Sharpen. Click Ctrl + F – this will apply the effect again.

11. Duplicate layer Base and rename it Worn. Right-click the Worn layer and choose Clear Layer Style. Ctrl-click layer Base to select the layer transparency. Choose #353535 for the foreground layer and white (#FFFFFF) as the background layer. Then choose Filter > Render > Clouds. It will look like this:

etchedmetal_11

12. Choose Image > Adjustments > Brightness/Contrast and set the Contrast to 50. Leave the Brightness as it is; your image should like this:

etchedmetal_12

13. Choose Filter > Mosaic > Pixelate and set the Square size to 3 and you’ll end up with this:

etchedmetal_13

14. Change the Blending Mode of the Worn layer to Overlay and set the Opacity to 60%:

etchedmetal_14

15. Choose Filter > Add Noise > Noise and set Amount to 10%, Distribution to Uniform and ensure Monochromatic is checked:

etchedmetal_15

16. Choose Image > Adjustments > Brightness/Contrast and set the Contrast to 35. It should look like this:

etchedmetal_16

17 .Now it’s time to write the etch the text! Choose the Horizontal Text Tool, set the font to Arial Black and size to 18 pt and the text colour to #353535. Select Center Align and type DR QUINCY so your canvas looks like this:

etchedmetal_17

18. Now apply these Stroke settings to the text layer:

etchedmetal_18

19. Your etched metal text is finished and should look like this:

etchedmetal_19

This tutorial works well with any “bold” font. If you don’t have Arial Black or you feel like experimenting try some other “bold” fonts.

Do you need a website or web-related service?
I run an award-winning web design studio.