Ironvine Analytics Web Analytics, Data Analysis, Online Marketing, and Search Engine Information.

14Dec/06Off

Yahoo Publisher Network

I recently was accepted into the Yahoo Publisher Network beta program. I really like how they have it set up. One unique feature I really liked seeing was the ability to add an RSS feed ad to your WordPress or TypePad blog software.

I added this to my AjaxKnight blog today, but I haven't had much chance to test or play with it. I will be looking around for tips on how best to utilize this and letting everyone know what I find.

The interface is easy to use, not cluttered and the ad code creation section is dynamically updated with changes you make. I think the color selector needs work. I added a custom color but it is not displayed in the 'preview' box, but it does change in the code selection area.

You can find out more or apply yourself at the Yahoo Publisher Network.

Technorati Tags: , , , , , ,

16Nov/06Off

script.aculo.us Javascripts

There are some newer, free JScripts that can use to do some pretty spectacular effects for sites. Huddletogether.com has some great image viewing scripts, Lightbox JS & Lightbox JS v2.0, that have the look of flash, but are solely javascript. Scriptaculous also has some great effects to use for adding some slick effects to your sites.

Technorati Tags: , , , , , ,

15Nov/06Off

PHP: Includes

You can include a file easily within a .php web page.

[PHP][/PHP]

To learn more visit the php.net site.

Technorati Tags: , , , ,

Filed under: Code Samples Comments Off
13Oct/06Off

90 Ajax Tutorials Ordered by Topic

Here is a nice resource of AJAX Tutorials from Max Kiesler found on ajaxlessons.com.

Some of the tutorial topics include:
AJAX Activity Indicator Tutorial
AJAX Bookmarklets Tutorial
AJAX Chat Tutorials
AJAX Drag and Drop Tutorial
...and many more.

Filed under: Code Samples Comments Off
11Oct/06Off

Kirupa.com

JasonR let me know about a great resource for Flash, PHP, Photoshop and CSS tutorials [http://www.kirupa.com]. They include lots of video tutorials as well as code walkthroughs. They have a good selection of tasks that they walk you though.

27Sep/06Off

SEO: Optimize Around Flash or Dynamic Content

SEO Tip: Optimize Around Flash or Dynamic Content

Having a brand new visually stunning website these days seems to be the new trend. Designers want to show off their skill and promote a site to the pleasure of the audience. Fun or dynamic features make the site interesting and interactive. But what happens when you need traffic coming to see it?

A beautiful new site is not all there is to it. You have to have the foundation in place as well to support the web technology, search engines, and marketers who are the ones that really drive traffic to that new site of yours.

Flash is one of the primary methods of having a visually enhanced and interactive site. You can create some really cool effects and movies with it. Some other similar technologies include Flex, AJAX, and Javascript.

The problem with these lays in the fact that they leave little for search engines to see in the way of indexing content. All the text and link system is embedded into the flash movie or script content and relatively unaccessible by most search engines. (Google has been reported to be able to index some content in Flash, but I would not trust that too far.)

Before we start jumping into some coding examples and recommendations there are a couple things to consider and be aware of. There are a lot of "black hat" optimization techniques used by spammers and disreputable SEO firms that may get you to the top fast, but also run the risk of getting your website banned. All the examples here stay away from these techniques, or explain how to do the proper thing with the code.

NOSCRIPT Tags:
NOSCRIPT tags are basically a block of text or HTML code that is not displayed unless the user has a text only browser or has scripts turned off. Generally however this block of text is only seen by search engines. While not all engines rank this information it is good to have for those that do.

The thing to be careful of with the NOSCRIPT tag is that it is widely used by spammers for keyword stuffing. They will add large blocks of repetitive keywords to fool the search engines. What you should only do with the NOSCRIPT tag is add the information that is contained within your dynamic script or Flash file.

Example:
[html]

Dentist San Francisco, CA - California. Dr. Frank Grimaldi.

Dentistry, sleep dentistry, sedation dentistry, hospital dentistry.

Wake up to a healthy smile. Frank Grimaldi, DDS, Dentist. Providing state of the art treatments such as CEREC and immediate dental implants as well as superb comfort with sedation dentistry in San Francisco.


[/html]

The above is the headers and content that the user misses in the Flash and images. It is good to use the tags appropriately to get the maximum effect.

XML/RSS Data:
Another good way to link content in your site is though RSS feeds. You can embed a link to your RSS feed in the header of your site. This allows some of the new browsers like Firefox2 and IE7 to automatically give you the option to view or subscribe to a websites RSS feed.

Example:
[html]

[/html]

You should also provide a link in your actual HTML page to your RSS feed for those people with older browsers.

Filed under: Code Samples, SEO 1 Comment
27Sep/06Off

AJAX: Mozilla Dev Center: AJAX Getting Started

This article guides you through the AJAX basics and gives you two simple hands-on examples to get you started.

26Sep/06Off

PHP: Generate XML File From MySQL Records

How to generate a XML file from a MySQL database.

Create a database and name is db_toxml. Create a table in the database and name it tbl_mysqltoxml. Now create four fields in the table. The fields are as follows:

xml_tutorial_id: autoinc.
xml_tutorial_title: (varchar - 100)
xml_tutorial_link: (varchar - 250)
xml_tutorial_description: mediumtext

[php]

$dbh=mysql_connect ("localhost", "user", "password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("db_toxml");
$sql="SELECT * FROM tbl_mysqltoxml ORDER BY xml_tutorial_id DESC LIMIT 0,10";
$results = mysql_query($sql);
$number = mysql_num_rows($results);
$i=0;

while($i < $number){
$lesson = $lesson . "

" . mysql_result($results, $i, "xml_tutorial_link") . " " . mysql_result($results, $i, "xml_tutorial_description") . "
";
$i++;
}

$file = ('mysqlto.xml');
$fp = fopen($file, "w");
$write = fputs($fp, $news);
fclose($fp);
?>[/php]

Filed under: Code Samples Comments Off
26Sep/06Off

O’Reilly Code Search

This Code Search beta search engine released by O'Reilly searches through over 700 O'Reilly books which means there are over 123,000 examples and 2.6 million lines of code.

The search results page works quite well with the condensed view and the full view code options inline with the results.

The downside to the search capability is that you cannot search on topical results such as "ajax" unless it is labeled in the code itself, perhaps in the # comments # section.

14Sep/06Off

PHP: Forms with Image Verification & Security Validation

Forms with Image Verification
DOWNLOAD NECESSARY FORMS HERE (ZIP FILE) >

In an effort to make web forms more secure and prevent spam I have developed a PHP based comment form with image verification. It was designed to make it very easy to use, and no need to modify any cgi files! You can have as many form fields as you like.

There are some instructions that you will need to follow.

1. Forms must be labeled as a .php file
2. Place php code at top of filename.php file at line 1
3. Place form code within html in spot where you want the actual form fields to appear.

SPECIAL NOTE: Only one form will work per page.

4. Place “Thank You” code near top of page (preferrably below page title, just above the content on the page)
5. Change the URL
6. Change Subject
7. Update form fields if need be. Make sure all fields are labeled. – If everything is standard you shouldn’t need to change anything.
8. Place the following files at the same level as the form: arial.ttf, background1.jpg, background2.jpg, background3.jpg, background4.jpg, randomimg.php, sesamefrm.inc.php, filename.php (the form itself)

Optional settings:
To have the page redirected, remove the # and change the redirect URL
To have cc emails add to the php code: $cc='thecc@emailhere.com';

Line 1 of filename.php

[PHP]< ?php
# Instructions:
# Save this file as .php
# Include this ?php section at line 1 of the file
# The submit button must be named 'submit'
# The verification textbox name must be named 'txtNumber' and be accompanied by
# Form action must call this page and be set to POST

# To Email Address
$email='to@emailhere.com';

# Subject
$subject='Web Site Comment Form';

# From Name
$sender='From Your Website';

# From Email Address
$sender_email='webadmin@emailhere.com';

# URL (no www.)
$drurl = "primaryurl.com";

# To use a URL redirect after submission remove the below '#'
# $next_url='http://www.ironvine.com/blog';

###########DO NOT CHANGE THIS LINE############
include("sesamefrm.inc.php");
##############################################
?>[/PHP]

Thank You Code

[PHP] if ($errorMessage != '') {
?>
< p align="center">

< ?php
}
?>[/PHP]

Add the Verification
[html]

Verification Code (case sensitive):

[/html]

Filed under: Code Samples Comments Off
14Sep/06Off

HOWTO: Animated Live Search for WordPress

Very nice tutorial about adding a live search functionality to WordPress.

HOWTO: Animated Live Search

14Sep/06Off

HTML: Forms: State Select Drop-Down

[html]

[/html]

Filed under: Code Samples Comments Off