Archive for the 'Web Development' Category

Search and Replace Wildcard Characters in Dreamweaver

Wednesday, April 9th, 2008

Search and Replace Wildcard Characters in Dreamweaver

Dreamweaver has a powerful search/replace ability which includes ‘regular expressions’. This allows you to scan and replace particular html without affecting data.

Here’s an example of how useful this is:

Let’s say you are harvesting content from Wikipedia and putting it on your own website. Though I don’t endorse that activity, it is allowed according to the GDFL and a lot of people do it. So, here’s a way to make it easy.

Let’s say you find a huge table full of data that you wish to use on your own website. Since Wikipedia has tons of links and junk in the code, you want to strip it all out. One way is to copy and paste into Excel, then save as a .csv or .txt file, thus stripping out the extra invisible formatting html code that was previously a part of it. Then, close and re-open the .csv or .txt into Excel, then copy and paste into Dreamweaver (or your HTML editor). While this works, Excel still seems to copy over some html formatting, such as <td height="17" … on every field of the table, which is annoying.

You can do a find/replace in Dreamweaver for height=”17” and leave the replace field blank. That would solve that problem, however, Wikipedia often uses footnotes which add [1] [2] [3] etc in superscript, such as the example below. The question is how do we delete these brackets from our copied table, but preserve the data. Good news- we can do that with Dreamweaver, using regular expressions.

Change from this:
<td height="17">Batman Begins[1][2]</td>
<td height="17">Superman</td>
<td height="17">Army of Darkness[3]</td>

Into this:
<td>Batman Begins</td>
<td>Superman</td>
<td>Army of Darkness</td>

If you had a huge table full of this with 100+ rows with 50 or more footnotes, it would take a long time to manually remove all of the brackets by hand. Here’s a way to automate it in Dreamweaver:

(Make sure you are searching the ‘source code‘ and that the ‘Use regular expression’ box is checked)

Find:
<td height="17">([^<]*)\[[^"]*</td>

Replace:
<td>$1</td>

Result:
Dreamweaver will instantly strip out all the junk from your code and replace it with the core code while preserving your data. In this case, the wildcard variable will preserve anything between <td height="17"> and </td>.

Explanation:
The find is the prefix of the tags, then the wildcard variable that’s stored: ([^<]*) then, I wanted to remove the brackets, so I put one in, but since we’re using expressions, it has to be ‘escaped’ to tell it we literally mean the bracket, so I put this \ before the [ then I added a non-stored wildcard variable (the other junk I want removed), so I added: [^"]* then the close tag </td>. Then the replace is the simple $1 variable between the tags which recalls the stored variable. Very cool!

Another challenge:
Let’s say you want to copy a huge list of links from Wikipedia and change them to our own links on our own website. Here’s an example:

Change from this:
href="/wiki/Army-of-Darkness">
href="/wiki/Raiders-of-the-Lost-Ark">
href="/wiki/Pulp-Fiction">

Into this:
href="http://www.domain.com/Army-of-Darkness.php">
href="http://www.domain.com//Raiders-of-the-Lost-Ark.php">
href="http://www.domain.com/Pulp-Fiction.php">

In Dreamweaver, select Find/Replace…

1. Check ‘use regular expression’
2. Do Find for:
href="/wiki/([^<]*)">
4. Replace:
href="http://www.domain.com/$1.php">
5. It preserves the variable inside

Without the regular expression, you could have done Find/Replace for the first part, but when you wanted to add the .php to the end, you’d be stuck. How else would you do it?

Pretty incredible, huh? You can automate the changing of links or anything on an entire website with thousands of links and pages in just seconds. All using the stored wildcard variable.

([^<]*) is stored (use $1 to retreive in replace)
[^"]* is unstored

You can also do Find/Replace to recall multiple variables at once, like this:

If multiple wildcards:
([^<]*) ([^<]*) ([^<]*)
Use:
$1 $2 $3

A tool like this can give you the power to harvest public domain or free content, manipulate data and repurpose it for your own site.

20 Useful Webmaster Tools

Sunday, March 30th, 2008

As a webmaster, there are a variety of tools used to track and monitor progress, links, rankings, and overall health of your website. The following 20 ‘tools’ are either URLs or actions you may take to gain valuable insight into the condition of your website.

1. Google Sitemaps
Want to increase website traffic? Add more pages to Google with sitemaps. Use the power of database-driven content to generate and submit thousands of dynamically optimized pages. Use an htaccess mod rewrites to clean up URLs and make SEO friendly. So, URLs such as this www.domain.com?keyword=title can become www.domain.com/title/ and be included as a separate page in Google’s index. One the power is harnessed, you can potentially have as many unique URLs as your database entries.

2. Google Analytics
Google analytics is your friend. The great benefits of this service outweighs any privacy or confidentiality concerns. Track accurate visitors, their clickpaths, goals, the ROI from Google AdWords, and more.

3. Nameboy.com – choosing domain names

4. Good Keywords – putting the keyword search tools all in one place.

5. Competitive analysis: compete.com / alexa.com

6. Check # of pages in your site: type into Google or Yahoo: site:www.domain.com

7. Check # of links to your site: type into Google or Yahoo: link:www.domain.com

8. Test value of text links:
http://www.seochat.com/seo-tools/link-price/

9. Compare links to your content with other websites. http://www.text-link-ads.com/blog_juice/

10. Useful all-in-one views for a website and domain: http://whois.domaintools.com

11. Yahoo Site Explorer - http://siteexplorer.search.yahoo.com/

12. Bulk PR checker: Copy and paste URLs from an expired domain list into this box. An easy way to see if it’s worth buying domains or not, or quickly checking the value of your own, in bulk
http://www.seochat.com/seo-tools/pagerank-lookup/

13. Website grader - assigns a grade to your website, based on several criteria.
http://www.websitegrader.com

14. See what websites share your IP address (and how many) (and find an IP address for any domain): http://www.seologs.com/ip-domains.html You want to check and make sure you’re not associated with bad IP addresses (used for spam sites, porn, etc). Why this is useful:
a. It can also see if your host is giving you a good deal or not. If too many websites hosted, you may reconsider hosts.
b. If you ever have problems with your website (speed of page loading, etc), you can check the speed of the other sites sharing the same IP (since they are likely on the same server), and determine if it’s your site or the server itself.

15. HTML/XML validator: http://validator.w3.org/

16. CSS validator: http://jigsaw.w3.org/css-validator/

17. Check Google listing position:
http://www.iwebtool.com/search_engine_position

18. Keyword suggestion tool:
http://freekeywords.wordtracker.com/
http://www.keyworddiscovery.com/search.html

19. Website server speed tests: http://www.selfseo.com/website_speed_test.php
http://www.iwebtool.com/speed_test

20. Keep track of RSS subscribers and share feeds: http://www.feedburner.com/

Mastering Social Media Marketing

Saturday, March 29th, 2008

To become a competent web marketer is to dip a foot into each of the numerous social media networking pools. I will tell you exactly which these are right now:

  1. Facebook.com
  2. Myspace.com
  3. Linkedin.com
  4. Digg.com
  5. Twitter.com
  6. Meetup.com

Besides the social media, you will also find benefit in involvement with:

  1. Craigstlist.org
  2. Evite.com
  3. Stumbleupon.com
  4. del.icio.us

To be successful in the popular online social media networks, you must be involved in the websites above. Create a profile on each. Interlink them. Build your network by adding friends and connections. One way to add glue to your overall social media marketing mix is to have a blog. Ideally, host a blog on your own server, such as WordPress, which is free. You can then add content, and syndicate it using the help of FeedBurner.com, and you can get an idea of how many subscribers and contacts you have.

Post to your blog regularly and get Google and other blog search engines to scan your site. When you start posting regularly, you’ll be surprised how fast Google will spider your blog. It’s hungry for fresh content!

After you post to your blog, add your postings to Digg and other user submitted news sites. You may also want to twitter your blog postings. After time, you will have ‘followers’ on twitter- just more contacts established for future web marketing.

It does take work to build up subscribers, friends, and contacts, but it is a worthwhile effort if you intend to do business online. Good luck!

Best Way to Develop a Website

Friday, March 28th, 2008

I have been fortunate to have developed multiple websites from scratch. I have found some things useful and others not. One of the most important aspects of a successful site is planning. Here is the planning process I have used.

  1. Research
    1. Take notes on your initial unbiased impression of the client’s current website (if one exists)
    2. Get input from the people who have used the current website- what do they like/dislike. What problems does it have?
    3. Do competitive research. How does this site compare to the others- what parts is it strong or weak in compared to the competition?
    4. Do keyword research. How does the current website rank in Google/Yahoo/MSN. What pages bring the most traffic? Can this be improved even more? Is there ‘low hanging fruit’ to capitalize on (in respect to optimizing and building content)?
    5. How is the current traffic and web stats? What is the behavior of the current visitors- do they bounce immediately away from the site, or are they reading multiple pages of content
  2. Make a schedule- based on your research, how long do you expect to complete the website. Estimate with an extra ‘cushion’ of time to compensate for unexpected problems or delays. Also, you may ‘break down’ your schedule into component parts- such as this outline.
  3. Make initial design ideas
    • Sketch designs on paper
    • Close your eyes and visualize yourself visiting a new website with a fresh and innovative design- what does it look like? What elements would make it impressive and stand out? Try to capture this through your mind’s eye and sketch it out on paper.
    • Make at least 10 designs- and make them all very different. Keep it general and don’t get stuck on a particular design solution yet.
    • Pick the top 3 designs and then make more design variations from each of those 3 versions- perhaps at least 3 of each. 3×3=9. Then, of the nine versions, choose the top three.
    • Now, get outside input. Ask others which of the 3 sketches they like, and what suggestions they have.
  4. Make the top 3 designs in Photoshop - make each very different.
  5. Show others the designs- get feedback- make revisions and redesign in Photoshop.
  6. Now, try to find html templates that best match your design structure. Ideally, you want to choose a core template that is css based, W3C compliant, and ready for SEO. If you can’t find a suitable template, then it’s time to design one yourself. It’s very important to start with a strong core template that is error free and organized perfectly.
  7. Once your template is done, it’s time to design multiple pages.
  8. Complete all of your pages, make sure it validates, make sure it is still SEO friendly, and start marketing the heck out of it.
  9. Good luck!

Google: to protect and serve

Monday, March 24th, 2008

I just discovered that Google filters and blocks sites it thinks contains viruses or malware. That’s nice of them.

Here’s an example:
http://www.google.com/interstitial?url=http://www.hypnodude.com/

This is supposed to be Ron Stubb’s website, which worked a few weeks ago, but now appears to be removed from Google’s index. Despite the block, the listings may still remain in a top organic search ranking.

The only information Google provides is, ‘this site may harm your computer’.

How does it know? Are users contacting Google, or does Googles web crawler scan for virus code patterns?

Best and Worst Domain Registrars

Sunday, March 16th, 2008

The best domain registrars:

  1. Omnis - affordable and reliable. $7.95 for .com domain names. Cheap web hosting too. Nice, intuitive control panel for domain management. They have good customer service and they won’t blow you off.
  2. Go Daddy - an ok price at $9.99 for .com domains, but they aggressively market other crap to you like a used car salesman. As long as you ignore all their spammy ads, you’ll be fine. Their control panel is ok.

The worst domain registrars:

  1. iPower - They boast cheap registration - $6.85 for .com domains, along with cheap hosting, but they have the worst customer service in the history of American business. How so? First, they say they have a ‘live chat’ on their site, powered by liveperson. It is NOT live chat. Their network is continually down and no one is ever around to chat. If they do not give you a ‘network unavailable’ error, it will show you this:

    We appreciate your patience. All operators are currently assisting other customers. Please continue to hold and we’ll be with you as quickly as possible.

    They will retain your credit card information and will charge it even if you cancel your account. Each domain will be billed separately as multiple charges on your card, making it so you cannot charge back the card, without closing your entire credit card account.

    Their control panel interface is horrendous, where they purposefully made it next to impossible to cancel your account. In my experience, I chose to ‘not renew’ my domains and cancelled the account, yet, they still charged my card. If you email support, you will get a different person each time, and will only use generic responses that doesn’t address the question. No one takes ownership of the problem to help you, so you will never get anywhere. Avoid iPower at all costs. The fact that they’re $1-$2 cheaper than others means nothing after you experience the nighmare I experienced with them.

  2. Dreamhost - $9.95 registration for .com domains. This company also is resistant to ‘not auto-renewing’ closing your account. They may ignore emails to ‘not renew’ a domain and go ahead and charge your card for another year. It’s fraudulent either way you look at it.

20 Useful Webmaster Tools

Thursday, March 13th, 2008

As a webmaster, there are a variety of tools used to track and monitor progress, links, rankings, and overall health of your website. The following 20 ‘tools’ are either URLs or actions you may take to gain valuable insight into the condition of your website.

1. Google Sitemaps
Want to increase website traffic? Add more pages to Google with sitemaps. Use the power of database-driven content to generate and submit thousands of dynamically optimized pages. Use an htaccess mod rewrites to clean up URLs and make SEO friendly. So, URLs such as this www.domain.com?keyword=title can become www.domain.com/title/ and be included as a separate page in Google’s index. One the power is harnessed, you can potentially have as many unique URLs as your database entries.
2. Google Analytics
Google analytics is your friend. The great benefits of this service outweighs any privacy or confidentiality concerns. Track accurate visitors, their clickpaths, goals, the ROI from Google AdWords, and more.
3. Nameboy.com – choosing domain names
4. Good Keywords – putting the keyword search tools all in one place.
5. Competitive analysis: compete.com / alexa.com
6. Check # of pages in your site: type into Google or Yahoo: site:www.domain.com
7. Check # of links to your site: type into Google or Yahoo: link:www.domain.com
8. Test value of text links: http://www.text-link-ads.com/link_calculator.php -
9. Compare links to your content with other websites. http://www.text-link-ads.com/blog_juice/ -
10. Useful all-in-one views for a website and domain: http://whois.domaintools.com -
11. Yahoo Site Explorer - http://siteexplorer.search.yahoo.com/
12. Bulk PR checker: Copy and paste URLs from an expired domain list into this box. An easy way to see if it’s worth buying domains or not, or quickly checking the value of your own, in bulk - http://www.seochat.com/seo-tools/pagerank-lookup/
13. Website grader - assigns a grade to your website, based on several criteria. http://www.websitegrader.com
14. See what websites share your IP address (and how many) (and find an IP address for any domain): http://www.seologs.com/ip-domains.html You want to check and make sure you’re not associated with bad IP addresses (used for spam sites, porn, etc). Why this is useful
a. It can also see if your host is giving you a good deal or not. If too many websites hosted, you may reconsider hosts.
b. If you ever have problems with your website (speed of page loading, etc), you can check the speed of the other sites sharing the same IP (since they are likely on the same server), and determine if it’s your site or the server itself.
15. HTML/XML validator: http://validator.w3.org/
16. CSS validator: http://jigsaw.w3.org/css-validator/
17. Check Google listing position: http://www.iwebtool.com/search_engine_position
18. Keyword suggestion tool: http://freekeywords.wordtracker.com/
http://www.keyworddiscovery.com/search.html

19. Website server speed tests: http://www.selfseo.com/website_speed_test.php http://www.iwebtool.com/speed_test
20. Keep track of RSS subscribers and share feeds: http://www.feedburner.com/