The ClipArt Network PHP Script — For Fellow Illustrators and ClipArt Directories

illustration clip art of 3d mouse with orange man standing on it<br />

I whipped this code together today…it seems to work pretty well.

This function was made for any clip art illustrators/clipart directories who may want to share a network together. It uses the information from Gravatar.com to create a nicely SEO’d row of links to people in your network.

While it was created for Illustrators and RF sites, there is nothing preventing you from using this code for any other link-network purpose.

Simply follow the directions commented in the code and copy/paste it into your page, preferably in the footer.

[php]
/*

See http://en.gravatar.com/site/implement/profiles/php/

This creates a network listing using http://gravatar.com/ ‘s
services. Gravatar stores quite a few bits of information which
can be used to build a comprehensive and attractive network
menu. If a webmaster updates their gravatar account, then the
changes will reflect in your network menu that this script generates.

NOTE: Be sure to fill out your gravatar account as completely as possible
to maximize SEO benefits and marketing.

#1. Create an account on gravatar.com. Fill in as much as you can.
#2. Be sure the site you wish to network with has done the same.
#3. Place the email addresses associated with the sites you are
networking with (the ones they used on gravatar) into the array below.
#4. Include this script anywhere on the page you wish to show the network.
#5. Place the below CSS into your website’s style sheet.
#6. See how your looking on your friend’s and your network. If anything
the HTML is incomplete (like links, alt tags, or hcard info, then you didn’t
fill in your gravatar account enough.

— STYLES —

.clip-art-network img {
padding: 2px;
margin-left: 3px;
margin-right: 3px;
margin-top: 2px;
border-style: solid;
border-color: #CCC;
border-width: 1px;
}
.clip-art-network img:hover {
margin-right: auto;
margin-left: auto;
text-align:center;
border-color: #06F;
}
.clip-art-network a:link {
display: block;
margin-right: auto;
margin-left: auto;
text-align:center;
}
.clip-art-network a:link span {
}
.clipart-website li {
margin: 0;
padding: 0;
display: inline;
float: left;
height: auto;
width: 60px;
font-size: 10px;
}
*/

//this function is called to generate the clipart network menu.

function v_card_network($v_emails, $v_css_class){

echo ‘<ul class="clipart-website clip-art-network">';

foreach ($v_emails as $email){

$str = file_get_contents( ‘http://www.gravatar.com/’ . md5(strtolower(trim($email))) . ‘.php’ );

$profile = unserialize( $str );

if ( is_array( $profile ) && isset( $profile[‘entry’] ) )

echo ‘<li id="hcard-‘ . str_replace(‘ ‘, ‘-‘, $profile[‘entry’][0][‘name’][‘formatted’]) . ‘" class="vcard">
<a class="’ . $v_css_class . ‘ " title="’ . $profile[‘entry’][0][‘urls’][0][‘title’] . ‘" href="’ . $profile[‘entry’][0][‘urls’][0][‘value’] . ‘">
<img class="’ . $v_css_class . ‘" alt="’ . $profile[‘entry’][0][‘aboutMe’]. ‘" src="’ . $profile[‘entry’][0][‘thumbnailUrl’] . ‘?s=35" /></a>
<span><a class="org" title="’ . $profile[‘entry’][0][‘name’][‘formatted’] . ‘" href="’ . $profile[‘entry’][0][‘profileUrl’] . ‘">&raquo; contact</a></span>
</li>’ . "n";

}
echo ‘</ul>';

}

//to expand your network, simply add comma separated emails into the array below, as shown.
$v_emails = array(‘leo@clipartillustration.com’, ‘service@illustrationsof.com’, ‘service@clipartof.com’,);

//class you wish to include in the URL generation, in case you wish to style it…

$v_css_class = ”;

//call the above function to generate network menu.

v_card_network($v_emails, $v_css_class)

[/php]