Thursday, November 8, 2007

5 Things: Make your site popular

Keyword research:
Keyword research is one of the most fundamental SEO activities. The process of finding the appropriate keywords for you site is called key word research. Investigation to discover what terms people search for, how often, and how many. To determine which queries your site is most relevant.

Example:
A financial institution might call its product an "auto loan," but you or I would probably use the term "car loan" when searching online. Maybe we'd search for "car loans" (plural) instead of "car loan" (singular).

The best keywords have the following qualities:

  • Strong relevance to your site: terms for which you have content to support.
  • Relatively high search volume: terms people are actually look for.
  • Relatively low competition: terms with a small number of search results.

Helpful Tools:

https://adwords.google.com/select/KeywordToolExternal

http://inventory.overture.com/d/searchinventory/suggestion/

HTML content:

  • Optimize your <title> tags on each page to contain 1 - 3 keywords.
  • Create unique Meta Tags for each page.
  • Use header tags appropriately (H1 > H2 > H3).
  • Use keywords liberally yet appropriately throughout each page.
  • Have unique content.
  • Have quality content.
  • Create a human sitemap.
  • Do not use inaccessible site navigation (JavaScript menus).
  • Minimized outbound links.
  • Kept your pages under 100K in siz.
  • Design the navigational structure of the site to channel PR to main pages (especially the homepage).

URLs:

    • Use Search Engine Friendly URLs (for dynamic sites)
    • Use keywords in your domain (http://www.keyword1.com/)
    • Use keywords in your URL (http://www.example.com/keyword2/keyword3.html)
    • Use dashes instead of underscores to separate words in your URLs (keyword2-keyword3.html)

Promotions:

  • Create a page that encourages webmasters to link to your site
    • Provide them the relevant HTML to create their link to you
    • Provide them with any images you may want them to use (although text links are better)

  • Submit your site to all major search engines
    • http://www.google.com/addurl.html (Use a https://www.google.com/webmasters/sitemaps/siteoverview?hl=en)
    • http://submit.search.yahoo.com/free/request (Use the page list option)
    • MSN (Finds your site via incoming links)
    • Ask (Finds your site via incoming links)

  • Continually update your website will quality, unique content
  • Continually seek free links preferably from sites in your genre

Avoid:

  • Make an all Flash website (without an HTML alternative)
  • Use JavaScript for navigation
  • Spam other websites for incoming links
  • Launch your site before it is done
  • Use duplicate content

Usable and accessible sites tend to be search engine friendly by their very nature. Be patient! High rankings don't happen overnight. In other words you have SEO in mind before you start your website. And only submit once you have a complete website.

Sunday, September 9, 2007

Single Table Multiple Category - Subcategory:

Some time it is needed to develop unlimited categories – subcategories. Usually we solve this problem by using TREE data structure. TREE is mainly used to represent data containing a hierarchical relationship between elements, records, family tree and table of contents. So TREE is the best structure to represent category-subcategory hierarchy.

TREE Structure:
A tree is a recursive structure that usually maps an ordered set of data from an internal definition to some data space. Tree parts are often named after their contemporaries in family trees; trees contain nodes known as parent, child, and sibling. Trees are made of nodes, which can contain both data to be stored and always link to further levels in the tree. Trees are often formed from a single node known as root; alternatively, trees may be built from a set of original nodes--this is known as a forest of trees


Representing TREE in a table:



Amazing DFS:
The general idea behind a depth first search beginning at a starting node A is follows. First we examine the starting node A. Then we examine each node N along a path P which begins at A. That is we process a neighbor of A, then neighbor of (neighbor of A) and so on. After coming to the “dead end” that is, to the end of path P, we backtrack on P until we continue along another path P. And so on.

Pre order Traversal:
The first depth-first traversal method we consider is called preorder traversal. Preorder traversal is defined recursively as follows. To do a preorder traversal of a general tree:

1. Visit the root first; and then

2. Do a preorder traversal each of the sub trees of the root one-by-one in the order given.



Algorithm (DFS):


dfs(graph G)
{
list L = empty
tree T = empty
choose a starting vertex x
search(x)
while(L is not empty)
{
remove edge (v, w) from beginning of L
if w not yet visited
{

add (v, w) to T
search(w)
}
}
}

search(vertex v)
{
visit v
for each edge (v, w)
add edge (v, w) to the beginning of L
}

Example Code (PHP - mysql):

<?php

function cats_tree($id = 0,$table)

{

static $categs = array ();

static $level = 0;

$level ++;

$sql = "SELECT category_id, category_name FROM ".$table." WHERE parent = ". $id ." ORDER BY sibling_order";

$result = mysql_query($sql);

while ($row_category = mysql_fetch_assoc($result))

{

$rs[] = $row_category;

}


if (isset($rs)) {

foreach ($rs as $row) {

$categs[$row['category_id']] = str_repeat('| ', $level -1) .'|__'. $row['category_name'];

cats_tree($row['category_id'],$table);

}

}

$level --;

return $categs;

}




$conn = mysql_connect("localhost", "USER", "PASS");
mysql_select_db("DB_NAME");


echo "<pre>";
print_r(cats_tree(0,"category"));
echo "</pre>";


?>

Output:

Tuesday, September 4, 2007

Sucker Tree Menu Generation

Web Programmer needed to generate menus as their template style. It is very interesting to generate customize menu. Now I am writing about a menu that CSS and DOM hybrid and based on UL and LI and Supports multiple levels of sub menu. The main theme is, it crawls inner levels of Menu and fixed it position. The menu is successfully tested in IE6, Firefox 1.5, Opera 9, and IE7.



Some Advanced CSS used here:

Nested span: These are used to generate round shape menu and colored hover.

Inherited Class: Some inherited classes for UL and LI to generate sucker tree menu.

Here you can download the sample and try yourself.



Saturday, May 26, 2007

JSON – PHP

JSON (JavaScript Object Notation) is universal data exchange format. JSON is part of ECMA Script Standards. eval() function that can parse this format .This is being popular with the success of AJAX. Another language XML is used for sharing (exchange) data in different platform. But JSON is easier to read than XML for programmer. JSON contain easier structure. JSON can easily map to object-oriented system.

What problem JSON can solve:

“I have a data-structure in one platform, I want to use it to another platform. “—We can use JSON to solve this problem. No need for parsing an XML document to extract the data-structure.

Understanding Literal Notation in JavaScript:

Array literals in JavaScript are composed of zero or more expressions with each expression representing an element of the array. The array elements are enclosed in square brackets ([]) and delimited by commas. Example:

var continents = ["Europe", "Asia", "Australia", "Antarctica", "North
America", "South America", "Africa"];
Compare this now to how you would create and initialize an array in JavaScript without
the literal notation:
var continents = new Array();
continents[0] = "Europe";
continents[1] = "Asia";

continents[2] = "Australia";
continents[3] = "Antarctica";
continents[4] = "North America";
continents[5] = "South America";
continents[6] = "Africa";
An object literal defines the members of an object and their values. The list of object members and values is
enclosed in curly braces ({}) and each member is delimited by a comma. Within each member, the name and value
are delimited by a colon (:).
Example:
var contact = {
"Name": "John Doe",

"PermissionToCall": true,

"PhoneNumbers": [

{

"Location": "Home",

"Number": "555-555-1234"

},

{

"Location": "Work",

"Number": "555-555-9999 Ext. 123"

}

]

};

Example JSON and PHP:

For your assistance,I attached here some sample code.
Those are free. After download you have to extract
download files and
after that run index.html………….