Home   |   TWP Auctions   |   Contact ...
The Website Professionals
Real world webmaster resources.
TWP Auctions - the free eBay script RSS feed Twitter

Tips, tricks & tools

Search and replace line breaks using Notepad++

Do you need to insert or replace line breaks into a document? A really BIG document? I did. I needed to manually create multiple sitemaps for a site with 250,000 pages, based on a 20MB csv file. I needed to remove the junk, and replace each line break with the required tags for each url in the sitemap. After realizing that Dreamweaver 8′s search and replace function was going to take all day to complete (it’s good, but not fast), I decided to find a better way. That better way is using Notepad++.

Simply select the extended search mode in the search and replace window, and then use \n or \r in the search or replace field. It’s an incredibly simple and elegant way to do it. And the best thing is, Notepad++ breezed through my 20MB csv file in seconds, and I had my monstrous sitemaps done in about 10 minutes.

OSX on VirtualBox

OSX on VirtualBox

If you want to run OSX on a Windows install of VirtualBox, you need to do 2 things.

The main reason that I installed VirtualBox in the first place was to test a few different Linux distributions before setting up a dual boot Windows/Linux system. After realizing that I could happily run Linux as a virtual OS under Windows 7 instead of dual booting, I started messing around with the idea of running OSX inside my Windows 7 machine. After hitting several deadends, I discovered that the later versions of VirtualBox SIMPLY DO NOT work with OSX unless you have Mac hardware. So after restricting myself to VirtualBox 3.2.10-66523, I finally managed to get OSX running from within Windows 7 on an Intel PC. And it works really really well. Do it. It’s fun.

Run Dreamweaver 8 on Windows 7

Macromedia Dreamweaver 8 on Windows 7

My favourite code editor is Macromedia (not Adobe!) Dreamweaver 8 – it has coloured syntax highlighting, FTP, code hints, and an incredibly powerful search function (I especially like the ability to perform a search and replace on an entire local directory). I’ve recently switched to Windows 7 64 bit on my main desktop, and have found a simple solution to stop the random crashes that occur with Dreamweaver 8 on Windows 7.

  1. Get the 8.0.2 update from Adobe here. <<< Link updated!
  2. Unzip it, preferably to somewhere that you can navigate to easily via a command prompt.
  3. Type “cmd” (without quotes) into the Start Menu search bar, do NOT press enter, then right click on the cmd.exe icon and select “Run as administrator”.
  4. Navigate to the directory where you extracted the update, and type this:
    msiexec /update patchpackage.msp
  5. Press enter, and follow the update prompts.
  6. You are now running Macromedia Dreamweaver 8.0.2, hopefully without the random crashes.

jQuery slideshow

jQuery slideshow

Jonathan Snook has written an elegant little jQuery slideshow (20 lines!) with nothing more than a simple fading transition. It allows you to specify the static ‘wait’ time and also the transition speed, and that’s about it. Which is exactly what some of us are looking for. Get it here.

Export a favicon from Photoshop

Export a favicon from Photoshop

1. Download the ICO (Windows Icon) plugin, and extract it to your \Plug-Ins\File Formats directory.
2. Design your 16×16 icon (or resize something larger), and select “save as”.
3. Select the ICO format, and save your file as favicon.ico.
4. Upload your new favicon.ico to the root directory of your website.
5. Add this code inside the <head></head> section of your pages:

<link rel="shortcut icon" href="http://www.yourdomain.com/favicon.ico" />

Not only is this a nicer method than using those online favicon creators, but it also works for making favicons with transparent backgrounds.

Disable WordPress feeds

Disable WordPress feeds

Need to disable the WordPress RSS feed? It’s easy. Just paste this into your wp-content/themes/*theme-name*/functions.php file. If you don’t have a function.php file, create one.

<?
function fb_disable_feed() {wp_die( __(‘No feed available, please visit our <a href="’.get_bloginfo(‘url’) .’">homepage</a>!’) );}
add_action(‘do_feed’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rdf’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rss’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rss2′, ‘fb_disable_feed’, 1);
add_action(‘do_feed_atom’, ‘fb_disable_feed’, 1);
?>

« Previous page
Featured webmaster products for June 2013:

Copyright © 2013 The Website Professionals - All rights reserved
Privacy policy