October 18, 2007

CSS Builder - Brand New Meta Titan Tool

Filed under: CSS — Matt @ 10:55 pm

You’ve seen it done in programs like Adobe Dreamweaver, but believe it or not, there aren’t a whole lot of decent CSS generators in the flavor of my new tool (that I could find with a thorough Google search at least).

The Meta Titan CSS Builder provides a human readable interface for generating your selector (class/id/tag) code with valid syntax on the fly. Fill out the form, press build, copy the code, paste it into your stylesheet. I believe it will improve your productivity, especially if you’re a beginner / intermediate user and haven’t memorized all of the property names and appropriate values.

Give it a try, and a bookmark - click here!

This is the product of about 1 weeks worth of casual coding. I’m planning a version 2 that cleans up the interface a bit, and I’ll be taking suggestions on what I can approve.

October 16, 2007

How to Check Link Popularity in Google & Yahoo With PHP

Filed under: PHP, SEO — Matt @ 4:31 pm

Everyone knows that the best traffic you can get is organic, meaning people who come to your site naturally with genuine interest. Search engines like Google & Yahoo are notorious for placing a high value on the amount of websites that are linking to you. While their algorithms haven’t been completely unraveled yet, SEO specialists have a pretty good idea of how to make your site rank higher, and it usually starts with link building (assuming you have quality content first of course!).

The amount of links your site has indexed in Google & Yahoo can change often, so checking can be an arduous task. Luckily there are a ton of tools out there for this, but you’re not here for that, are you? You’re here because you want the code to run your own service, or maybe you want your own local copy of it, or maybe you just want to see how it works. The script below will check your backlinks in Google and Yahoo, as well as your Alexa rating. Feel free to modify and redistribute (non-commercially) as you see fit.

Live Demo | View Source Online

<?php
// Setting the URL variable
$link = $_GET['url'];

// Google Backlinks
function fetch_google($uri) {
$uri = trim(eregi_replace('http://', '', $uri)); $uri = trim(eregi_replace('http', '', $uri));
$url = 'http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=link:'.$uri;
$v = file_get_contents($url);
preg_match('/of about \<b\>(.*?)\<\/b\>/si',$v,$r);
return ($r[1]) ? $r[1] : '0';
}

// Yahoo Inlinks
function fetch_yahoo($uri) {
$uri = trim(eregi_replace('http://', '', $uri)); $uri = trim(eregi_replace('http', '', $uri));
$url = 'http://siteexplorer.search.yahoo.com/search?p=http://'.$uri.'&bwm=i&bwmf=s&bwmo=&fr2=seo-rd-se';
$v = file_get_contents($url);
preg_match('/of about \<strong\>(.*?) \<\/strong\>/si',$v,$r);
return ($r[1]) ? $r[1] : '0';
}

// Alexa Rating
function fetch_alexa($uri){
$uri = trim(eregi_replace('http://', '', $uri)); $uri = trim(eregi_replace('http', '', $uri));
$url = 'http://data.alexa.com/data?cli=10&dat=snbamz&url=' . urlencode($uri);
$v = file_get_contents($url);
preg_match('/\<popularity url\="(.*?)" TEXT\="([0-9]+)"\/\>/si', $v, $r);
return ($r[2]) ? $r[2] : '0';
}

// Page Header
echo "<h2>Search Engine Popularity</h2>";

// Display Links and Information
if (isset($link)) {
echo "<strong>URL:</strong> " . $link . "<br />";
echo "<strong>Google Backlinks:</strong> " . fetch_google($link) . "<br />";
echo "<strong>Yahoo Backlinks:</strong> " . fetch_yahoo($link) . "<br />";
echo "<strong>Alexa Rating:</strong> " . fetch_alexa($link) . "<br />";
}

// Search Form
echo "<br />
<form action=\"linkcheck.php\" method=\"get\">
<input type=\"text\" name=\"url\" />
<input type=\"submit\" />
</form>";

?>

Complete List of HTML Tags

Filed under: HTML — Matt @ 11:07 am

A complete reference of every HTML tag available, good for any web developer - new or experienced. Several tags that have been deprecated have been omitted from the list. Click on each tag for more information and sample usages. This took about 4 hours, I hope you find it useful :)
(more…)

October 14, 2007

Collection of Small Icons for Web Development

Filed under: Web Design — Matt @ 10:35 pm

Whether you’re making an application or a web design, it’s useful to have a collection of high quality icons handy. Your users will appreciate the professional touch and ease of navigation that they bring. Over the years I’ve collected a ton of sets, I spent a couple hours digging through them all and compiling this. All downloads are hosted on my server in their original unaltered archives and include a mirror to the author’s website if applicable, this is a proactive measure in case their sites ever disappear.
(more…)

Startup Kit for Making Websites from Scratch

Filed under: CSS, HTML, PHP — Matt @ 5:42 pm

If you’re somewhat new to making websites, or if you’re like me and find yourself making new websites on a regular basis, whether it’s for work or something else, you might find this useful. I find it a chore to constantly make the same files when making a new website, so I’ve put together a basic startup kit that contains all the files/folders I usually need to get going with the development. Here’s what’s included:

index.php > With doctype & appropriate head tags defined.
robots.txt > With major search engines allowed by default, cgi-bin disallowed.
style/global.css > With a couple basic preset classes.
style/index.html > Blank file to disable directory browsing.
images/spacer.gif > 1×1 pixel transparent gif.
images/index.html > Blank file to disable directory browsing.

Download: http://www.metatitan.com/files/sitestartup.zip

Extract the zip and use these files as a starting point when making websites. There isn’t instruction included with these files, if you know what you’re doing you’ll know what to do with them. If not, I’ll probably have a guide for this eventually.

How to Make CSS-Based Image Rollovers

Filed under: CSS — Matt @ 7:10 am

So you want to make rollovers and not have to deal with messy javascript? Good choice, CSS can do this for you. We’re going to show the top 50% of an image, and when you put your mouse over it, we’ll change to the bottom 50%. This is better than traditional rollovers in that we’re not calling a 2nd external image every time someone rolls over it.

You’ll need to make an image with twice the height of the original and have the rollover on the bottom half. Here’s the image I’ll work with in this example:

Once you have your rollover ready, we’ll start by pasting the following into your CSS stylesheet. Our image above is 200×100 pixels so we’ll define those dimensions below, except 1/2 the height, so 50px. Change the background image URL to where you uploaded it on your webserver.

.button1 { width: 200px; height: 50px; }
.button1 a { display: block; width: 200px; height: 50px; background: url(http://www.metatitan.com/images/rollover-example.gif) no-repeat top left;}
.button1 a:hover { background-position: bottom left;}

Save your stylesheet and insert the following code wherever you want your rollover to appear in your document.

<div class=”button1″><a href=”http://www.google.com/”></a></div>

You can implement the basic concept a number of different ways than described above, try it out and see what works best for your project. Our final product will look and function like:

October 13, 2007

How to Make PNGs Transparent in IE Using CSS

Filed under: CSS, Web Design — Matt @ 7:47 pm

You’ve just made an awesome PNG image with alpha transparency, it looks great in FireFox, but your excitement receives a swift kick in the butt when you test it out in Internet Explorer. Don’t worry, there’s a very easy way to make IE 5.5+ obey your transparency needs. All the guides out there can be really overwhelming, so I’ll make this as quick and painless as possible so you can get on with your day.

First let’s grab the fix by Angus Turnbull and a blank “spacer.gif” image, you’ll need to right click / save as and upload these files somewhere on your web server:
http://www.metatitan.com/files/iepng.htc
http://www.metatitan.com/images/spacer.gif

Open the iepng.htc file and near the top edit the path to spacer.gif to where you uploaded it on your web server. Now add this into your CSS stylesheet and change #yourclass to the class you’re working with, and the URL to where you uploaded it.

img, #yourclass { behavior: url(http://www.yoursite.com/path/to/iepng.htc); }

Now we can have transparent pngs like so:

<div id=”yourclass”><img src=”mypng.png” width=”100″ height=”50″ /></div>

This can make backgrounds defined in “#yourclass” transparent as well. You can mess around it, and define the behavior in a different way if that works better for your project, it’s quite flexible and easy to work with.

October 12, 2007

How to Use Quick Mask in Photoshop, the Quick Way

Filed under: Photoshop — Matt @ 3:27 pm

Quick Mask is a tool in Adobe Photoshop that allows you to easily isolate an area of the layer you’re working on. This translates to being able to take a man out of 1 picture so that you can place him in different picture, among other nifty things. Like most Photoshop tools, there’s 1 way to do it, and then there’s 100 other ways. In this tutorial I’ll be teaching you the method that I use on a regular basis to quickly use the… quick… mask.

Here’s the image we’ll work with.

Quick Mask Tutorial Picture 1

Our goal here will be to extract Construction Man and the paper he’s holding and place him on a new image. Let’s start by firing up Photoshop, opening this image, and switching to Quick Mask Mode. This can be done by pressing “Q” on your keyboard or clicking the following button on your Tools window (Window > Tools if you don’t have this open).

Quick Mask Tutorial Picture 2

Now select the “Paint Bucket Tool”, and fill in your entire picture, it doesn’t matter what color. If you are in quick mask mode, you’ll see a red overlay appear on your picture.

Quick Mask Tutorial Picture 3

Select the “Polygonal Lasso Tool” and its sub-option “Add to Selection” (the depressed options are shown below). Zoom in real close so you have a precise environment to work in, and begin selecting an area of the man’s lag with the P.Lasso tool. Once you have a nice chunk, press your delete key and you’ll see the red overlay disappear and the colors of his pants will appear. The beauty of the lasso tool is you can cut him out piece by piece at your own pace, give it a few tries, it shouldn’t take long to master this tool.

Quick Mask Tutorial Picture 4

Your image should look like the following once you have fully cut out Construction Man using the P.Lasso tool. If you’ve made a mistake, you can choose the brush tool to fill in the red overlay.

Quick Mask Tutorial Picture 5

Now let’s exit Quick Mask Mode (Press “Q” or click the button again). You should now have the entire man selected, press “CTRL+C” and “CTRL+V”, this will paste the extracted Construction Man on a new layer by himself, leaving the original picture intact below it. You can now move Construction Man wherever he pleases, like so:

Quick Mask Tutorial Picture 6

Have fun with it! It’s a really useful tool for any graphic designer.

« Previous PageNext Page »