May 08 2009

SEO Warning for DEVELOPERS & WEBMASTERS

Avoiding Top SEO Mistakes

Following are the 9 Biggest SEO Mistakes which Web Designers & Web Developers should avoid.

Splash Page

I’ve seen this mistake many times where people put up just a big banner image and a link “Click here to enter” on their homepage. The worst case — the “enter” link is embedded in the Flash object, which makes it impossible for the spiders to follow the link.

This is fine if you don’t care about what a search engine knows about your site; otherwise, you’re making a BIG mistake. Your homepage is probably your website’s highest ranking page and gets crawled frequently by web spiders. Your internal pages will not appear in the search engine index without the proper linking structure to internal pages for the spider to follow.

Your homepage should include (at minimum) target keywords and links to important pages.

Read more …

Mar 13 2009

PHP configuration inside httpd.conf

How to set PHP error notice hidden in httpd.conf (vhost):

<VirtualHost *:80>
  ...
  php_flag display_startup_errors off
  php_flag display_errors off
  php_flag html_errors off
  ...
</VirtualHost>

How to set individual php.ini in httpd.conf (vhost):

<VirtualHost *:80>
  ...
  PHPIniDir '/path/to/php/conf/php-foo.ini'
  ...
</VirtualHost>

How to set individual PHPError.log in httpd.conf (vhost):

<VirtualHost *:80>
  ...
  php_flag  log_errors on
  php_value error_log  /path/to/site/PHPerror.log
  ...
</VirtualHost>

Complete Information

Feb 19 2009

HTML Color Codes (Charts)

Major hexadecimal color codes

Color Color Code Color Color Code
Red #FF0000 White #FFFFFF
Turquoise #00FFFF Light Grey #C0C0C0
Light Blue #0000FF Dark Grey #808080
Dark Blue #0000A0 Black #000000
Light Purple #FF0080 Orange #FF8040
Dark Purple #800080 Brown #804000
Yellow #FFFF00 Burgundy #800000
Pastel Green #00FF00 Forest Green #808000
Pink #FF00FF Grass Green #408080

Color code chart

Read more …

Feb 06 2009

CSS Underscore Hack

Original Post


Update:
note that this article is from 2003. The CSS hack described is outdated and (maybe) shouldn’t be used.

I learned another CSS hack today – the underscore hack. You can read all about it in detail, but in essence it’s very simple.

Browsers are supposed to simply ignore CSS properties that they don’t understand. This much should be obvious. However, IE/Win does its usual trick of trying too hard to cope with user error and will read and process any valid CSS property with an underscore tacked on to the front. All other browsers will ignore the mystery property. Example:

p{
   color: black;
   _color: blue;
}

All browsers save IE/Win will display the paragraph text as black – IE/Win displays it as blue. It reads the _color property and allows it to replace the one that came before.

I discovered this technique whilst looking for a solution to IE’s lack of support for min-height to specify the minimum height of an object. Decent browsers like Mozilla support this property, but IE doesn’t. Thanks to another IE bug (one that results in overflow being treated strangely), it’s possible to set a minimum height for both IE and proper browsers in a fashion such as this:

div#content{
    height: auto;
    min-height: 400px;
    _height: 400px;
}

Not a new technique, but new to me, and helped me out of a layout problem. Be sure to read Simon’s discussion of the pros and cons. With the appropriate care, it’s a useful tool to add to your hack list.

Drew McLellan

Nov 13 2008

Nasty TinyMCE Error

There is a nasty tinyMCE error in Firefox that made my life a living hell.

First it was hard to track when it happened. Mostly when using tinyMCE in tabbed displays. I thought the two JavaScript libraries did not “support” each other. or maybe some weird variable they use together.

the error was visible in firebug (or error console):

uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsISelection.getRangeAt]” nsresult: “0×80070057 (NS_ERROR_ILLEGAL_VALUE)” location: “JS frame :: http://xxx/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js :: anonymous :: line 6465″ data: no]

Then it happened also in a script that made the editor invisible and then back visible.

And it dawed me .. TinyMCE has some unexplained problem on submit when turning visible. you have to click on it first (give him focus), then it’s ok.

So i added in submit button (admin side – Joomla programmers know what i mean):

if (tinyMCE) tinyMCE.execCommand(’mceFocus’, false,’mailbody’);

as the first line. and all was fine…

Hope it helps other

Source