<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Nvmindmedia</title>
	<atom:link href="http://nvmindmedia.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nvmindmedia.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Wed, 08 Apr 2009 00:51:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nvmindmedia.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Nvmindmedia</title>
		<link>http://nvmindmedia.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nvmindmedia.wordpress.com/osd.xml" title="Nvmindmedia" />
	<atom:link rel='hub' href='http://nvmindmedia.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Everything You Need to Get Started With MySQL</title>
		<link>http://nvmindmedia.wordpress.com/2009/04/08/everything-you-need-to-get-started-with-mysql/</link>
		<comments>http://nvmindmedia.wordpress.com/2009/04/08/everything-you-need-to-get-started-with-mysql/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 00:33:57 +0000</pubDate>
		<dc:creator>nashio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nvmindmedia.wordpress.com/?p=20</guid>
		<description><![CDATA[Developing web applications using a static data store where data must be updated, stored and manipulated frequently can be a cumbersome task. However this article will introduce you to the world of relational databases allowing you to maximise your data&#8217;s potential. Introduction With the constant expansion of web applications and user driven web sites it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=20&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="text">
<p>Developing web applications using a static data store where data must be updated, stored and manipulated frequently can be a cumbersome task. However this article will introduce you to the world of relational databases allowing you to maximise your data&#8217;s potential.</p>
<h3>Introduction</h3>
<p>With the constant expansion of web applications and user driven web sites it becomes a necessity to have a way to store data in an organised fashion which can be retrieved and manipulated on the fly; something which is impossible with static content. In order to achieve this, a database must be used! A database in its simplest form is the collecting of data in an organised fashion whether it is using a filing cabinet or a computerised database. Integrating a database into your web site or web application allows you to store and retrieve data using specific commands. For this article we will be using a relational database management system package called MySQL. This is open-source software available under the GNU general public licence which of course makes it free of charge! The MySQL web site can be found at <a href="http://www.mysql.com/">http://www.mysql.com/</a> any word that you see underlined in this article indicates a MySQL function you can find full documentation on these functions on the MySQL web site.<br />
<strong>TIP:</strong> To search the MySQL web site for a function, simply append the function name to the MySQL URL. E.G. <a href="http://www.mysql.com/SELECT">http://www.mysql.com/SELECT</a> this example would search for select.   I have produced a modified version of <a href="http://www.squarefree.com/">Jesse Ruderman</a>&#8216;s Google search bookmarklet in order to search the MySQL 5.1 documentation. To use this simply highlight the underlined word then press the bookmarklet to be taken to the search results. Alternatively launch the bookmarklet with nothing highlighted to be given a prompt box asking you to enter what you wish to search. <strong>Bookmarklet:</strong> <a href="//www.mysql.com/search?site=refman-51&amp;q=&quot;%20+%20escape(q).replace(/%20/g,%20&quot;+&quot;);%20void%200">MySQL SEARCH</a></p>
<h3>Understanding a database</h3>
<p>In order to store data in a database firstly a database must be created. This database can then store many tables (imagine a filing cabinet storing many files); each table must have defined columns, and of these columns are created to store specific data (imagine a data entry form). It is possible to limit what can be inputted into these such as numeric data or character limits for example. Once data has been entered into the database it will be stored in an appropriate table, the table will then consist of rows and columns much like a spreadsheet as data is saved and displayed in a tabular form. MySQL can manage multiple databases which can contain multiple tables. Access levels can be granted to different users to provide or revoke specific privileges. MySQL uses commands/functions based on SQL (structured query language). This allows us to use keywords to specify what data we wish to return. MySQL then implements some additional features to enhance the functionality available. Keywords are generally easy to understand and often relate to an English word or phrase (E.G. <span style="text-decoration:underline;">SELECT</span>, <span style="text-decoration:underline;">UPDATE</span>, <span style="text-decoration:underline;">WHERE</span>).</p>
<h3>Getting Started</h3>
<p>In this installment we will cover:</p>
<ul>
<li>Installing MySQL on your local machine(windows)</li>
<li>Configuring your local MySQL installation(windows)</li>
<li>Connecting to your local database</li>
<li>Connecting to a remote database</li>
<li>Entering and formatting queries</li>
<li>Formatting and logging results</li>
<li>Backing up a database</li>
<li>Restoring a database</li>
</ul>
<p>In order to use MySQL it is necessary for us to have it installed whether it be on our local system or on a remote web host. However in order to connect to either we must firstly have an interface to use.<br />
Today we will be using the essentials package which is available on the MySQL web site at <a href="http://dev.mysql.com/downloads/">http://dev.mysql.com/downloads/</a>. At the time of writing the current stable version is 5.1 and I will be discussing how to install it on the windows operating system. Firstly locate the software which you require, I will be using the 64 bit windows version but you may choose otherwise depending on your system architecture. For this article I have chosen to use the essentials package as it includes all the features needed. You can compare the differences between the windows versions at <a href="http://dev.mysql.com/doc/refman/5.1/en/windows-choosing-package.html">http://dev.mysql.com/doc/refman/5.1/en/windows-choosing-package.html</a>.</p>
<h3>Installing MySQL on your local machine</h3>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/1.jpg" border="0" alt="" /></div>
<p>Once you have downloaded the appropriate installation executable, launch it and you will be prompted with the above window. As you can see I am installing version 5.1.30. Press Next to progress onto the next screen.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/2.jpg" border="0" alt="" /></div>
<p>I have chosen to keep with the typical installation, however feel free to choose what components you want to install. You will need the MySQL server and data files if you are working on your local machine; however if you have a remote database available to you that you wish to use you can choose not to install these features. <strong>You will need the MySQL command line shell as this is the application that we will be using.</strong> Again if you are not using a local database you can skip the Command line utilities and server instance configuration. This article will not cover using C with MySQL however if you are developing using C you may choose to install this. Press Next to progress onto the next screen.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/3.jpg" border="0" alt="" /></div>
<p>You will be then asked to confirm your choices, press Install if you are happy otherwise press Back to make any changes.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/4.jpg" border="0" alt="" /></div>
<p>Your installation will start, at this point you may get an interruption from an anti virus or Windows Vista User Account Control, it will state that a program is asking to be installed or access specific files. This will be signed by MySQL AB; this is the company which operates and maintains MySQL which you can read about at <a href="http://www.mysql.com/about/">http://www.mysql.com/about/</a>.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/5.jpg" border="0" alt="" /></div>
<p>Once installed, make sure you have the Configure the MySQL Server now (if installed) ticked and press finish. Congratulations, you have successfully installed MySQL Server/components. Next the MySQL server Instance Configuration Wizard should load. However if it doesn&#8217;t launch don&#8217;t worry, you can access it in the MySQL programs folder (if installed).</p>
<h3>Configuring your local MySQL installation</h3>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/6.jpg" border="0" alt="" /></div>
<p>We are now going to configure your installation (if you installed the server), press Next to progress onto the next screen.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/7.jpg" border="0" alt="" /></div>
<p>You now have the option of using a standard configuration; however I will be using a detailed configuration which will allow me to customise different aspects of my installation.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/8.jpg" border="0" alt="" /></div>
<p>I have chosen this as a developer machine; however you may choose which option you prefer. The developer machine will allow full usage however it will prevent too many resources being used. Press Next to progress onto the next screen.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/9.jpg" border="0" alt="" /></div>
<p>As this installation is intended for development purposes and not for a specific project, I chose a multifunctional database which allows use the InnoDB and MyISAM storage engine. You can read more about storage engines at <a href="http://dev.mysql.com/doc/refman/5.1/en/storage-engines.html">http://dev.mysql.com/doc/refman/5.1/en/storage-engines.html</a>. Press Next to progress onto the next screen.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/10.jpg" border="0" alt="" /></div>
<p>You must now select where you want to store the InnoDB datafile, depending on storage space you have available you may wish to change this if you have a larger capacity or faster drive available. Press Next to progress onto the next screen.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/11.jpg" border="0" alt="" /></div>
<p>You must now set up the amount of concurrent connections that you are going to have connecting to your database at any one time. Choosing DSS allows up to 100 connections but assumes an average of 20 concurrent connections. OLTP allows up to 500 concurrent connections. However for our developer machine we are often only going to be making a single connection; therefore I set the manual setting to 5. Press Next to progress onto the next screen.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/12.jpg" border="0" alt="" /></div>
<p>You now are given the choice to customise TCP/IP settings. I have un-ticked the checkbox in order to disable this. By disabling this it prevents remote connections to the database. You can then set the server mode, I left this box ticked (you can read more about server modes in detail at <a href="http://dev.mysql.com/doc/refman/5.1/en/server-sql-mode.html">http://dev.mysql.com/doc/refman/5.1/en/server-sql-mode.html</a>). Press Next to progress onto the next screen.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/13.jpg" border="0" alt="" /></div>
<p>We now need to select what character set/encoding we are going to be using. I chose UTF8 as it allows different languages to be inputted (international readers). Press Next to progress onto the next screen.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/14.jpg" border="0" alt="" /></div>
<p>You now need to decide if you want to run the server as a service, you can customise the service name by the drop down box. By installing MySQL as a service by default the server will be started automatically and will restart in even of failure. I recommend using the setting above. You also get the option to include the MySQL Bin files in the windows path. This allows us to call MySQL directly from the command line, I also recommend doing this. Press Next to progress onto the next screen.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/15.jpg" border="0" alt="" /></div>
<p>You now have to provide a password for the root account. This is the &#8216;master&#8217; account with full privileges (the account username will be &#8216;root&#8217;); I do not recommend leaving this blank! The choice to enable access from root machines is un-ticked by default; I kept it this way as I had disabled TCP/IP settings but it also proves a higher security risk potential if details fall into the wrong hands. I also disabled the choice to enable an anonymous account as this database is intended for personal use. Press Next to progress onto the next screen.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/16.jpg" border="0" alt="" /></div>
<p>Your installation configuration is now ready to be applied, press execute to start the process.<br />
You should then receive a successful configuration message. Once completed, press finish to exit this wizard. Your have now successfully completed the configuration.<br />
If you are installing MySQL on a different operating system or if you wish to refer back to the official documentation it can be found at <a href="http://dev.mysql.com/doc/refman/5.1/en/installing.html">http://dev.mysql.com/doc/refman/5.1/en/installing.html</a>.</p>
<h3>Connecting to your local database</h3>
<p>Now that you have the server installed we can now connect to it!<br />
I am going to be using the Windows CLI (command line interface) to initialise the connection, but you may use the MySQL CLI found in the MySQL programs folder. Firstly open a command prompt by opening the run dialog box found on the start menu and then type CMD and press [ENTER]; upon which you will be displayed a window similar to the one below.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/17.jpg" border="0" alt="" /></div>
<p>The first command that we are going to type is going to connect to the server with our user name and password.<br />
There are several ways of connecting to the server all of which do the same task. The MySQL connection command uses the following syntax:</p>
<div class="dp-highlighter">
<ol class="dp-xml">
<li class="alt"><span><span>mysql [host] [port] [username] [password] [database] </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;">mysql [host] [port] [username] [password] [database]</pre>
<p>Each of these arguments can be passed to the mysql command as follows:</p>
<ul>
<li>&#8211;host=host or -hhost</li>
<li>&#8211;port=port or -P</li>
<li>&#8211;username=username or -uusername</li>
<li>&#8211;password=password or -ppassword</li>
<li>database is given simply as a string (E.G. db_name)</li>
</ul>
<p><strong>Note:</strong> By supplying the full password string like this it will be visible on screen, if you prefer you can simply supply the -p or -password command with no password to be presented with a hidden password entry prompt. We also don&#8217;t need a command terminator as we are typing into the Windows CLI at the moment not MySQL.</p>
<p>So as we wish to connect to our local computer so we can eliminate the host argument (see connecting to a remote host later in this article). We want to log in as our root account to give us full privileges, so we are going to need our username and password; as we currently haven&#8217;t got any databases set up we will not supply the database argument either. I will be connecting to the &#8220;root&#8221; user account on my local machine with the password of &#8220;secret&#8221; using the following command:</p>
<div class="dp-highlighter">
<ol class="dp-sql">
<li class="alt"><span><span>mysql -uroot -psecret </span></span></li>
</ol>
</div>
<pre class="sql" style="display:none;">mysql -uroot -psecret</pre>
<p>This connects to MySQL using the root user with a password of secret. The following commands will achieve the same result.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">view plain</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">print</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">?</a></div>
</div>
<ol class="dp-sql">
<li class="alt"><span><span>mysql </span><span class="comment">&#8211;username=root &#8211;password=secret</span><span> </span></span></li>
</ol>
</div>
<pre class="sql" style="display:none;">mysql --username=root --password=secret</pre>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">view plain</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">print</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">?</a></div>
</div>
<ol class="dp-sql">
<li class="alt"><span><span>mysql -uroot </span><span class="comment">&#8211;password=secret</span><span> </span></span></li>
</ol>
</div>
<pre class="sql" style="display:none;">mysql -uroot --password=secret</pre>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">view plain</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">print</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">?</a></div>
</div>
<ol class="dp-sql">
<li class="alt"><span><span>mysql </span><span class="comment">&#8211;username=root -psecret</span><span> </span></span></li>
</ol>
</div>
<pre class="sql" style="display:none;">mysql --username=root -psecret</pre>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/18.jpg" border="0" alt="" /></div>
<p><strong> The user account &#8216;root&#8217; is the master MySQL account which was created during the installation; this is the same user that you should be connecting as. However please note that it is not recommended to leave a root account turned on a web installation, please refer to user accounts and privileges at the MySQL web site for further information.</strong>(<a href="http://dev.mysql.com/doc/refman/5.1/en/adding-users.html">http://dev.mysql.com/doc/refman/5.1/en/adding-users.html</a>)</p>
<h3>Connecting to a remote database</h3>
<p>(skip this if you are connecting to a local database) In order to connect to your remote database, often supplied by a hosting provider, you must know the IP address or host name of your database (and possibly the port number if it has been changed the default is 3306). You would connect to this as you would a local database just replacing the host and port arguments depending on your hosting configuration.</p>
<h3>Disconnecting</h3>
<p>To disconnect from the MySQL session send the QUIT (or \q)command.</p>
<div class="dp-highlighter">
<ol class="dp-sql">
<li class="alt"><span><span>QUIT </span></span></li>
</ol>
</div>
<pre class="sql" style="display:none;">QUIT</pre>
<h3>Formatting queries and results</h3>
<p>Now that we are connected (after receiving &#8220;Welcome to the MySQL monitor.&#8221; message) we are ready to send our commands however there are a few other points to note.</p>
<p>MySQL allows use of whitespace without affecting the commands entered. This comes in handy in making our queries as readable as possible (see the image below). Both of these queries produce the same result, however the second one is significantly easier to read.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/19.jpg" border="0" alt="" /></div>
<p><strong>Note:</strong> This query will not work as we do not have a database set up this is for demo purposes only!<br />
You can see the code I used below, both of the queries entered are identical however by pressing [ENTER] the CLI allows us to continue the command on a separate line. MySQL has implemented a feature to cancel an input if your command spans multiple lines, simply issue the clear command &#8220;\c&#8221;.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">view plain</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">print</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">?</a></div>
</div>
<ol class="dp-sql">
<li class="alt"><span><span class="keyword">SELECT</span><span> fld_1longlonglong, fld_2longlonglong, fld_3longlonglong, fld_4longlonglong, fld_5longlonglong, fld_6longlonglong, fld_7longlonglong </span><span class="keyword">FROM</span><span> tbl_name </span><span class="keyword">WHERE</span><span> fld_1longlonglong = `datavalue`; </span></span></li>
</ol>
</div>
<pre class="sql" style="display:none;">SELECT fld_1longlonglong, fld_2longlonglong, fld_3longlonglong, fld_4longlonglong, fld_5longlonglong, fld_6longlonglong, fld_7longlonglong FROM tbl_name WHERE fld_1longlonglong = `datavalue`;</pre>
<p>This however also means that a special command must be sent to indicate that it is then end of the command. We can use either of the following:</p>
<ul>
<li>;</li>
<li>\g</li>
<li>\G</li>
</ul>
<p>The first two terminators are identical, however the third one when used within a query that returns data shows the result in a vertical table rather than horizontal. This is great to bear in mind if we are returning information from a table which has many columns as it may become unreadable.</p>
<h3>Restoring a Database</h3>
<p>Next we will be importing a SQL file, this is the same process that you would do if you were restoring a database backup. This file simply has all the commands necessary to make a duplicate of the database at the given backup time. Ideally we would make our own database, however making a database can be a complex subject including relationships, naming conventions, storage engines and field settings which is beyond the scope of this article.</p>
<p>We are going to be using a pre-prepared database available at <a href="http://dev.mysql.com/doc/#sampledb">http://dev.mysql.com/doc/#sampledb</a> scroll down until you see the example databases and you want to go ahead and download the <strong>world</strong> database  (world.sql).</p>
<p>Once connected to MySQL we are going to restore the world database as it is a backup of a previous database. This file is simply a list of MySQL commands which will be run to make the new database. This SQL file only contains table data and does not store database information, therefore we must first create a database to store the tables in (refer to the analogy at the start of the article). <strong>Note:</strong> To save the length of this article I will be placing multiple commands in the code snippets, you can separate these commands or issue them together lookout for the command terminators shown previously in this article. Also be aware that <em>MySQL functions are not case sensitive</em> so SELECT is the same as select and SeLEcT. I personally capitalise MySQL functions in order to make my queries as easy to read as possible, as queries get longer and more complex this becomes a valuable feature alongside whitespace.<br />
To make the database we are going to issue the <span style="text-decoration:underline;">CREATE DATABASE</span> command, once created we are then going to <span style="text-decoration:underline;">USE</span> the database.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">view plain</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">print</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">?</a></div>
</div>
<ol class="dp-sql">
<li class="alt"><span><span class="keyword">CREATE</span><span> </span><span class="keyword">DATABASE</span><span> db_world; USE db_world; </span></span></li>
</ol>
</div>
<pre class="sql" style="display:none;">CREATE DATABASE db_world; USE db_world;</pre>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/20.jpg" border="0" alt="" /></div>
<p>Time to import the backup, there are many ways of doing this, its known as batch processing (<a href="http://dev.mysql.com/doc/refman/5.0/en/batch-commands.html">http://dev.mysql.com/doc/refman/5.0/en/batch-commands.html</a>). Since we are connected to MySQL already we are going to use the <span style="text-decoration:underline;">SOURCE</span> command followed by our file name. I have extracted the &#8220;world.sql&#8221; file from the zip folder and placed it on my C: drive root you will need to know the absolute path to your source file. If you only provide your file name MySQL will look for source in the folder you launched your command prompt from (C:\USERS\USERNAME on vista C:\Documents and Settings\Username on XP). You cannot browse to a different directory while using the MySQL interface so make sure you supply the appropriate absolute path. After issuing this command the CLI window will issue each of the commands within the SQL file, once completed you will be returned to the mysql&gt; prompt.</p>
<div class="dp-highlighter">
<ol class="dp-sql">
<li class="alt"><span><span>SOURCE C:\world.sql; </span></span></li>
</ol>
</div>
<pre class="sql" style="display:none;">SOURCE C:\world.sql;</pre>
<p>No you have a fully functional database at your disposal. However we do not yet know what it contains! Let&#8217;s do a little bit of diving around; we are going to use the following commands:</p>
<ul>
<li>SHOW TABLES; &#8211; this shows the tables in the current database.</li>
<li>DESCRIBE tbl_name; &#8211; this shows what fields exist in the specified table.</li>
</ul>
<div class="dp-highlighter">
<ol class="dp-sql">
<li class="alt"><span><span>SHOW TABLES; </span></span></li>
</ol>
</div>
<pre class="sql" style="display:none;">SHOW TABLES;</pre>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/21.jpg" border="0" alt="" /></div>
<p>After issuing the command we now know that the database contains three tables: &#8220;city&#8221;,&#8221;country&#8221; and &#8220;countrylanguage&#8221;. Next we are going to find out what fields these tables store. You want to issue the DESCRIBE tbl_name for each of the tables.After issuing the DESCRIBE command for the country table you will see below that it returned a unreadable mess, to solve this simply use the \G terminator instead of ;.</p>
<div class="dp-highlighter">
<ol class="dp-sql">
<li class="alt"><span><span>DESCRIBE city; </span></span></li>
<li><span>DESCRIBE country; </span></li>
<li class="alt"><span>DESCRIBE country \G </span></li>
<li><span>DESCRIBE countrylanguage; </span></li>
</ol>
</div>
<pre class="sql" style="display:none;">DESCRIBE city;
DESCRIBE country;
DESCRIBE country \G
DESCRIBE countrylanguage;</pre>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/22.jpg" border="0" alt="" /></div>
<p>Now we have all the information that we need in order to manipulate the tables as we wish, we have the database username, password, database name, table names and field names if you are developing in a different language such as PHP this is the information you would require to return data to your system (see <a href="http://php.net/mysql">http://php.net/mysql</a>).</p>
<h3>Logging results</h3>
<p>We can choose to log output of the MySQL interface; we do this by sending the \T filename.txt command. In order to stop logging we issue the \t command. The below example saves a file called log.txt to the root directory of the E: hard drive. On my machine this is a spare hard drive, please note you must have permission to access this drive; you will be unable to write to your windows installation drive root on Windows Vista without launching MySQL from an elevated command prompt.</p>
<div class="dp-highlighter">
<ol class="dp-sql">
<li class="alt"><span><span>\T E:\log.txt </span></span></li>
<li><span>SHOW TABLES; </span></li>
<li class="alt"><span>\t </span></li>
</ol>
</div>
<pre class="sql" style="display:none;">\T E:\log.txt
SHOW TABLES;
\t</pre>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/23.jpg" border="0" alt="" /></div>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">view plain</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">print</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">?</a></div>
</div>
<ol class="dp-sql">
<li class="alt"><span><span>E:\log.txt contents: </span></span></li>
<li><span>mysql&gt; SHOW TABLES; </span></li>
<li class="alt"><span>+<span class="comment">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+</span><span> </span></span></li>
<li><span>| Tables_in_db_world | </span></li>
<li class="alt"><span>+<span class="comment">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+</span><span> </span></span></li>
<li><span>| city               | </span></li>
<li class="alt"><span>| country            | </span></li>
<li><span>| countrylanguage    | </span></li>
<li class="alt"><span>+<span class="comment">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+</span><span> </span></span></li>
<li><span>3 <span class="keyword">rows</span><span> </span><span class="op">in</span><span> </span><span class="keyword">set</span><span> (0.00 sec) </span></span></li>
<li class="alt"><span> </span></li>
<li><span>mysql&gt; \t </span></li>
</ol>
</div>
<pre class="sql" style="display:none;">E:\log.txt contents:
mysql&gt; SHOW TABLES;
+--------------------+
| Tables_in_db_world |
+--------------------+
| city               |
| country            |
| countrylanguage    |
+--------------------+
3 rows in set (0.00 sec)

mysql&gt; \t</pre>
<h3>Backing up a database</h3>
<p>The MySQL monitor comes with an extension called mysqldump; as you might expect dumps the necessary information from the database to be able to make an exact replica. The mysqldump command uses the following syntax:</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">view plain</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">print</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span>mysqldump [username] [password] [database name] </span><span class="tag">&gt;</span><span> [dump file] </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;">mysqldump [username] [password] [database name] &gt; [dump file]</pre>
<p>To launch this you should be disconnected from the MySQL session.<br />
The following code logs into the MySQL session with the root user account with the password secret, it then dumps the table db_world to the file db_worldbak.sql.</p>
<div class="dp-highlighter">
<ol class="dp-sql">
<li class="alt"><span><span>mysqldump -uroot -psecret db_world &gt; db_worldbak.sql </span></span></li>
</ol>
</div>
<pre class="sql" style="display:none;">mysqldump -uroot -psecret db_world &gt; db_worldbak.sql</pre>
<h3>Conclusion</h3>
<p>After reading this article, I hope you have gained a firm understanding of how to interface with mysql on a command line level. Something which can prove useful as commands can be sent directly to the MySQL database rather than via another scripting language. Please do not stop here, <a href="http://dev.mysql.com/doc/">http://dev.mysql.com/doc/</a> really is a great resource and in no time you will be making you own database. Below I have written some basic queries to search the world database and some examples for you to try. Lets see if you can understand them, if not again you know where the documentation is located.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">view plain</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">print</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">?</a></div>
</div>
<ol class="dp-sql">
<li class="alt"><span><span class="keyword">SELECT</span><span> </span><span class="keyword">Name</span><span>, Population </span></span></li>
<li><span><span class="keyword">FROM</span><span> city </span></span></li>
<li class="alt"><span><span class="keyword">WHERE</span><span> CountryCode=</span><span class="string">&#8216;GBR&#8217;</span><span> </span></span></li>
<li><span><span class="keyword">ORDER</span><span> </span><span class="keyword">BY</span><span> Population </span><span class="keyword">ASC</span><span> </span></span></li>
<li class="alt"><span>LIMIT 0,5\G </span></li>
</ol>
</div>
<pre class="sql" style="display:none;">SELECT Name, Population
FROM city
WHERE CountryCode='GBR'
ORDER BY Population ASC
LIMIT 0,5\G</pre>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/24.jpg" border="0" alt="" /></div>
<p>In English this query <span style="text-decoration:underline;">SELECTS</span> and returns the Name and Population <span style="text-decoration:underline;">FROM</span> the table city <span style="text-decoration:underline;">WHERE</span> the country code is GBR, the results are then filtered using <span style="text-decoration:underline;">ORDER BY</span> Population <span style="text-decoration:underline;">ASC</span> (ascending population) and is then <span style="text-decoration:underline;">LIMIT</span>ed to return the first 5 results.<strong> This query shows the name and population of the least 5 populated cities in Great Britain.</strong></p>
<p><em>And one more for the road</em>…</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">view plain</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">print</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">?</a></div>
</div>
<ol class="dp-sql">
<li class="alt"><span><span class="keyword">SELECT</span><span> </span></span></li>
<li><span>CONCAT(city.<span class="keyword">Name</span><span>,</span><span class="string">&#8216; speak the &#8217;</span><span>, countrylanguage.Language, </span><span class="string">&#8216; language&#8217;</span><span>)</span><span class="keyword">AS</span><span> Detail, </span></span></li>
<li class="alt"><span>city.Population </span></li>
<li><span><span class="keyword">FROM</span><span> city, countrylanguage </span></span></li>
<li class="alt"><span><span class="keyword">WHERE</span><span> city.CountryCode = countrylanguage.CountryCode </span></span></li>
<li><span><span class="op">AND</span><span> city.countryCode = </span><span class="string">&#8216;GBR&#8217;</span><span> </span></span></li>
<li class="alt"><span><span class="op">AND</span><span> countrylanguage.Language = </span><span class="string">&#8216;English&#8217;</span><span> </span></span></li>
<li><span><span class="keyword">ORDER</span><span> </span><span class="keyword">BY</span><span> city.Population </span><span class="keyword">ASC</span><span> </span></span></li>
<li class="alt"><span>LIMIT 5,5 \G </span></li>
</ol>
</div>
<pre class="sql" style="display:none;">SELECT
CONCAT(city.Name,' speak the ', countrylanguage.Language, ' language')AS Detail,
city.Population
FROM city, countrylanguage
WHERE city.CountryCode = countrylanguage.CountryCode
AND city.countryCode = 'GBR'
AND countrylanguage.Language = 'English'
ORDER BY city.Population ASC
LIMIT 5,5 \G</pre>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/212_mysql/img/25.jpg" border="0" alt="" /></div>
<p>In English this query <span style="text-decoration:underline;">SELECT</span>s data, it <span style="text-decoration:underline;">CONCAT</span>enates Name from the city table and Language from the countrylanguage table and displays the results <span style="text-decoration:underline;">AS</span> Detail the query also <span style="text-decoration:underline;">SELECT</span>s Population from the city table. Again this query <span style="text-decoration:underline;">SELECT</span>s its data <span style="text-decoration:underline;">FROM</span> the city table and the countrylanguage table, this returns data where the city&#8217;s country code is the same as the country code of the country language. The data is filtered to display countries <span style="text-decoration:underline;">WHERE</span> there country code is GBR <span style="text-decoration:underline;">AND</span> the Language is English, this is then <span style="text-decoration:underline;">ORDER</span>ed <span style="text-decoration:underline;">BY</span> increasing population, and results are <span style="text-decoration:underline;">LIMIT</span>ed to show the results from 6 to 10. This query is known as an <span style="text-decoration:underline;">INNER JOIN</span>, as two tables are linked together within the query. <strong>This query will display the 6th to the 10th least populated cites with the GBR country code which speak English.</strong><br />
How did I know what data to write those queries for you ask! By running the following SELECT query it uses the wild card character to select all the fields and return all of the data in the specified table. From the result of the query I got an understanding of what was included and I made some scenarios which I wanted to query.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">view plain</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">print</a><a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/#">?</a></div>
</div>
<ol class="dp-sql">
<li class="alt"><span><span class="keyword">SELECT</span><span> * </span><span class="keyword">FROM</span><span> tbl_name; </span></span></li>
</ol>
</div>
<pre class="sql" style="display:none;">SELECT * FROM tbl_name;</pre>
<p>Here are a few functions which you may want to look at in more detail to get started:</p>
<ul>
<li><span style="text-decoration:underline;">SELECT</span></li>
<li><span style="text-decoration:underline;">FROM</span></li>
<li><span style="text-decoration:underline;">WHERE</span></li>
<li><span style="text-decoration:underline;">LIMIT</span></li>
<li><span style="text-decoration:underline;">ORDER BY</span></li>
<li><span style="text-decoration:underline;">AND</span></li>
<li><span style="text-decoration:underline;">OR</span></li>
<li><span style="text-decoration:underline;">CONCAT</span></li>
<li><span style="text-decoration:underline;">SHOW DATABASES</span></li>
<li><span style="text-decoration:underline;">USE</span></li>
<li><span style="text-decoration:underline;">CREATE</span></li>
<li><span style="text-decoration:underline;">SHOW TABLES</span></li>
<li><span style="text-decoration:underline;">DESCRIBE</span></li>
<li><span style="text-decoration:underline;">UPDATE</span></li>
</ul>
<p>Lookout for a follow up tutorial on retrieving and manipulating data. Feel free to ask any questions in the comments and I will do my best to answer them. Make sure you start a question with #Q so I can find them!</p>
<p>Source <a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/" target="_blank">Nettuts</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nvmindmedia.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nvmindmedia.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nvmindmedia.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nvmindmedia.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nvmindmedia.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nvmindmedia.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nvmindmedia.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nvmindmedia.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nvmindmedia.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nvmindmedia.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nvmindmedia.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nvmindmedia.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nvmindmedia.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nvmindmedia.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=20&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nvmindmedia.wordpress.com/2009/04/08/everything-you-need-to-get-started-with-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5fca6c6715ab8a9be9cc6de97a647a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nvmindmedia</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/1.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/2.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/3.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/4.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/5.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/6.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/7.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/8.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/9.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/10.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/11.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/12.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/13.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/14.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/15.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/16.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/17.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/18.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/19.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/20.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/21.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/22.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/23.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/24.jpg" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/212_mysql/img/25.jpg" medium="image" />
	</item>
		<item>
		<title>10 Rare HTML Tags You Really Should Know</title>
		<link>http://nvmindmedia.wordpress.com/2009/04/08/10-rare-html-tags-you-really-should-know/</link>
		<comments>http://nvmindmedia.wordpress.com/2009/04/08/10-rare-html-tags-you-really-should-know/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 00:30:51 +0000</pubDate>
		<dc:creator>nashio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nvmindmedia.wordpress.com/?p=18</guid>
		<description><![CDATA[Web developers these days are often expected to know and work in multiple languages. As a result, it&#8217;s tricky to learn everything a language has to offer and easy to find yourself not utilizing the full potential of some more specialized but very useful tags. Unfortunately we haven&#8217;t been tapping into the full potential of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=18&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Web developers these days are often expected to know and work in multiple languages. As a result, it&#8217;s tricky to learn everything a language has to offer and easy to find yourself not utilizing the full potential of some more specialized but very useful tags.</p>
<p>Unfortunately we haven&#8217;t been tapping into the full potential of these more obscure HTML tags as of late. But it&#8217;s never too late to get back into the game and start writing code that taps into the power of some under-used tags.</p>
<p>Here are ten of some of the most underused and misunderstood tags in HTML. While they might be less familiar, they&#8217;re still quite useful in certain situations.</p>
<h3>1. &lt;cite&gt;</h3>
<p>All of us will be familiar with the &lt;blockquote&gt; tag, but did you know about &lt;blockquote&gt;&#8217;s little brother &lt;cite&gt;? &lt;cite&gt; allows you to define the text inside of the element as a reference. Typically the browser will render the text inside of the &lt;cite&gt; tag in italics, but this can be changed with a touch of CSS.</p>
<p>The &lt;cite&gt; tag is really useful for citing bibliographic and other site references. Here&#8217;s an example of how to use the cite tag in a paragraph:</p>
<p>David Allen&#8217;s breakthrough organization book <em><cite>Getting Things Done</cite></em> has taken the web by storm.</p>
<h3>2. &lt;optgroup&gt;</h3>
<p>The &lt;optgroup&gt; tag is a great way to add a little definition between groups of options inside a select box. If you needed to group movie listings by time, for example, then it would look like this:</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">view plain</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">copy to clipboard</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">print</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">label</span><span> </span><span class="attribute">for</span><span>=</span><span class="attribute-value">&#8220;showtimes&#8221;</span><span class="tag">&gt;</span><span>Showtimes</span><span class="tag">&lt;/</span><span class="tag-name">label</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;</span><span class="tag-name">select</span><span> </span><span class="attribute">id</span><span>=</span><span class="attribute-value">&#8220;showtimes&#8221;</span><span> </span><span class="attribute">name</span><span>=</span><span class="attribute-value">&#8220;showtimes&#8221;</span><span class="tag">&gt;</span><span> </span><span class="tag">&lt;</span><span class="tag-name">optgroup</span><span> </span><span class="attribute">label</span><span>=</span><span class="attribute-value">&#8220;1PM&#8221;</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">optgroup</span><span class="tag">&gt;</span><span> </span><span class="tag">&lt;</span><span class="tag-name">option</span><span> </span><span class="attribute">value</span><span>=</span><span class="attribute-value">&#8220;titanic&#8221;</span><span class="tag">&gt;</span><span>Twister</span><span class="tag">&lt;/</span><span class="tag-name">option</span><span class="tag">&gt;</span><span> </span><span class="tag">&lt;</span><span class="tag-name">option</span><span> </span><span class="attribute">value</span><span>=</span><span class="attribute-value">&#8220;nd&#8221;</span><span class="tag">&gt;</span><span>Napoleon Dynamite</span><span class="tag">&lt;/</span><span class="tag-name">option</span><span class="tag">&gt;</span><span> </span><span class="tag">&lt;</span><span class="tag-name">option</span><span> </span><span class="attribute">value</span><span>=</span><span class="attribute-value">&#8220;wab&#8221;</span><span class="tag">&gt;</span><span>What About Bob?</span><span class="tag">&lt;/</span><span class="tag-name">option</span><span class="tag">&gt;</span><span> </span><span class="tag">&lt;</span><span class="tag-name">optgroup</span><span> </span><span class="attribute">label</span><span>=</span><span class="attribute-value">&#8220;2PM&#8221;</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">optgroup</span><span class="tag">&gt;</span><span> </span><span class="tag">&lt;</span><span class="tag-name">option</span><span> </span><span class="attribute">value</span><span>=</span><span class="attribute-value">&#8220;bkrw&#8221;</span><span class="tag">&gt;</span><span>Be Kind Rewind</span><span class="tag">&lt;/</span><span class="tag-name">option</span><span class="tag">&gt;</span><span> </span><span class="tag">&lt;</span><span class="tag-name">option</span><span> </span><span class="attribute">value</span><span>=</span><span class="attribute-value">&#8220;stf&#8221;</span><span class="tag">&gt;</span><span>Stranger Than Fiction</span><span class="tag">&lt;/</span><span class="tag-name">option</span><span class="tag">&gt;</span><span> </span><span class="tag">&lt;/</span><span class="tag-name">select</span><span class="tag">&gt;</span><span> </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;">Showtimes
  Twister Napoleon Dynamite What About Bob?  Be Kind Rewind Stranger Than Fiction </pre>
<p><strong>Live demo:</strong></p>
<p>Showtimes   Twister Napoleon Dynamite What About Bob?   Be Kind Rewind Stranger Than Fiction  </p>
<p>This allows the select list to visually separate the movie listings.</p>
<h3>3. &lt;acronym&gt;</h3>
<p>The &lt;acronym&gt; tag is a way to define or further explain a group of words. When you hover over text that has the &lt;acronym&gt; tag used, a box appears below with the text from the title tag. For example:</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">view plain</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">copy to clipboard</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">print</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span>The microblogging site </span><span class="tag">&lt;</span><span class="tag-name">acronym</span><span> </span><span class="attribute">title</span><span>=</span><span class="attribute-value">&#8220;Founded in 2006&#8243;</span><span class="tag">&gt;</span><span> Twitter</span><span class="tag">&lt;/</span><span class="tag-name">acronym</span><span class="tag">&gt;</span><span> has recently struggled with downtimes. </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;">The microblogging site <acronym title="Founded in 2006"> Twitter</acronym> has recently struggled with downtimes.</pre>
<p><strong>Live demo:</strong></p>
<p><acronym title="Search Engine Optimization">SEO</acronym> is full of trickery and magic.</p>
<h3>4. &lt;address&gt;</h3>
<p>The &lt;address&gt; tag is quite an obscure little tag, but that doesn&#8217;t mean it isn&#8217;t useful! As the name implies, &lt;address&gt; allows you to semantically markup addresses in HTML. The nifty little tag will also italicize all of the data within the brackets, though the style can easily be changed through simple CSS.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">view plain</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">copy to clipboard</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">print</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">address</span><span class="tag">&gt;</span><span>Glen Stansberry </span></span></li>
<li><span>1234 Web Dev Lane </span></li>
<li class="alt"><span>Anywhere, USA </span></li>
<li><span><span class="tag">&lt;/</span><span class="tag-name">address</span><span class="tag">&gt;</span><span> </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;">
<address>Glen Stansberry
1234 Web Dev Lane
Anywhere, USA
</address>
</pre>
<h3>5. &lt;ins&gt; and &lt;del&gt;</h3>
<p>If you&#8217;re wanting to display editing revisions with with markup, &lt;ins&gt; and &lt;del&gt; are just the ticket. Like the name implies, &lt;ins&gt; highlights what&#8217;s been added to the document with an underline, and &lt;del&gt; shows what&#8217;s been taken out with a strikethrough.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">view plain</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">copy to clipboard</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">print</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span>John </span><span class="tag">&lt;</span><span class="tag-name">del</span><span class="tag">&gt;</span><span>likes</span><span class="tag">&lt;/</span><span class="tag-name">del</span><span class="tag">&gt;</span><span> </span><span class="tag">&lt;</span><span class="tag-name">ins</span><span class="tag">&gt;</span><span>LOVES</span><span class="tag">&lt;/</span><span class="tag-name">ins</span><span class="tag">&gt;</span><span> his new iPod. </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;">John <del>likes</del> <ins>LOVES</ins> his new iPod.</pre>
<p><strong>Live demo:</strong></p>
<p>John <del>likes</del> <ins>LOVES</ins> his new iPod.</p>
<h3>6. &lt;label&gt;</h3>
<p>Form elements seem the easiest to forget when marking up a document. Of the form elements, one of the most forgotten is the &lt;label&gt; tag. Not only is it a quick way to note the label&#8217;s text, the &lt;label&gt; tag can also pass a &#8220;for&#8221; attribute to specify which element is to be given the label. Not only are these &lt;label&gt; tags great for styling, they also allow you to make the caption clickable for the associated element.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">view plain</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">copy to clipboard</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">print</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">label</span><span> </span><span class="attribute">for</span><span>=</span><span class="attribute-value">&#8220;username&#8221;</span><span class="tag">&gt;</span><span>Username</span><span class="tag">&lt;/</span><span class="tag-name">label</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;</span><span class="tag-name">input</span><span> </span><span class="attribute">id</span><span>=</span><span class="attribute-value">&#8220;username&#8221;</span><span> </span><span class="attribute">type</span><span>=</span><span class="attribute-value">&#8220;text&#8221;</span><span class="tag">&gt;</span><span> </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;">Username
</pre>
<h3>7. &lt;fieldset&gt;</h3>
<p>Fieldset is a nifty little attribute that you can add to your forms to logically group form elements. Once applied the &lt;fieldset&gt; tag draws a box around the elements within the fieldset. Bonus points for adding a &lt;label&gt; tag within the fieldset to define the title of the group.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">view plain</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">copy to clipboard</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">print</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">form</span><span class="tag">&gt;</span><span class="tag">&lt;</span><span class="tag-name">fieldset</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;</span><span class="tag-name">legend</span><span class="tag">&gt;</span><span>Are You Smarter Than a 5th Grader?</span><span class="tag">&lt;/</span><span class="tag-name">legend</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span>Yes <span class="tag">&lt;</span><span class="tag-name">input</span><span> </span><span class="attribute">name</span><span>=</span><span class="attribute-value">&#8220;yes&#8221;</span><span> </span><span class="attribute">value</span><span>=</span><span class="attribute-value">&#8220;yes&#8221;</span><span> </span><span class="attribute">type</span><span>=</span><span class="attribute-value">&#8220;radio&#8221;</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> </span></li>
<li class="alt"><span>No <span class="tag">&lt;</span><span class="tag-name">input</span><span> </span><span class="attribute">name</span><span>=</span><span class="attribute-value">&#8220;no&#8221;</span><span> </span><span class="attribute">value</span><span>=</span><span class="attribute-value">&#8220;no&#8221;</span><span> </span><span class="attribute">type</span><span>=</span><span class="attribute-value">&#8220;radio&#8221;</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;/</span><span class="tag-name">fieldset</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span><span class="tag">&lt;/</span><span class="tag-name">form</span><span class="tag">&gt;</span><span> </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;">
Are You Smarter Than a 5th Grader?
Yes 

No 
</pre>
<p><strong>Live demo:</strong></p>
<p> Are You Smarter Than a 5th Grader? Yes  No   </p>
<h3>8. &lt;abbr&gt;</h3>
<p>The &lt;abbr&gt; tag is much akin to the &lt;acronym&gt; tag, except the &lt;abbr&gt; tag is only used to define abbreviated words. Just like &lt;acronym&gt;, you define a title within the tag. When a visitor hovers over the abbreviated text, the full definition appears below. The &lt;abbr&gt; tag is rarely used, but the benefits are many for screen readers, spellcheckers and search engines.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">view plain</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">copy to clipboard</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">print</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">abbr</span><span> </span><span class="attribute">title</span><span>=</span><span class="attribute-value">&#8220;Sergeant&#8221;</span><span class="tag">&gt;</span><span>Sgt.</span><span class="tag">&lt;/</span><span class="tag-name">abbr</span><span class="tag">&gt;</span><span> Pepper&#8217;s Lonely Hearts Club is my favorite album. </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;"><abbr title="Sergeant">Sgt.</abbr> Pepper's Lonely Hearts Club is my favorite album.</pre>
<p><strong>Live demo:</strong></p>
<p><abbr title="Sergeant">Sgt.</abbr> Pepper&#8217;s Lonely Hearts Club is my favorite album.</p>
<h3>9. rel</h3>
<p>Rel can be an <em>insanely useful</em> attribute, as any HTML element can have a rel applied to it. It&#8217;s helpful for passing extra variables that aren&#8217;t otherwise specified. This is helpful when using Javascript with your HTML. If you have a link that you want to edit inline, you might add:</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">view plain</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">copy to clipboard</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">print</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">a</span><span> </span><span class="attribute">rel</span><span>=</span><span class="attribute-value">&#8220;clickable&#8221;</span><span> </span><span class="attribute">href</span><span>=</span><span class="attribute-value">&#8220;page.html&#8221;</span><span class="tag">&gt;</span><span>This link is editable</span><span class="tag">&lt;/</span><span class="tag-name">a</span><span class="tag">&gt;</span><span> </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;"><a rel="clickable" href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/page.html">This link is editable</a></pre>
<p>The Javascript might be looking for a link with the rel attribute &#8220;clickable&#8221;, and it knows to apply some Ajax and allow it to be edited inline. This is one of many techniques you can use with the rel attribute, as the possibilities are endless.</p>
<h3>10. &lt;wbr&gt;</h3>
<p>The &lt;wbr&gt; tag is an incredibly obscure tag. To be honest, I doubt many of you have come into contact with the tag, as it&#8217;s hardly ever used. (Truthfully, I hadn&#8217;t seen the tag before I started researching this article.) Essentially, the tag allows you to specify a place where you think a line break might be useful, but only if needed. This tag is unique as it relies on the discretion of the browser to insert the linebreak, if needed. It&#8217;s perfect for creating layouts that you want to avoid having horizontal scrollbars.</p>
<p>If you were wanting to achieve the same effect but without using the &lt;wbr&gt; tag, you could also try <code> </code> or <code>­­</code>. It should be noted that none of these tags have full support across all browsers. To see which browsers support the tags check out <a href="http://www.quirksmode.org/oddsandends/wbr.html">this article</a> by Quirksmode.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">view plain</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">copy to clipboard</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">print</a><a href="http://net.tutsplus.com/articles/web-roundups/10-rare-html-tags-you-really-should-know/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">span</span><span class="tag">&gt;</span><span>How do you say Supercalifragilistic</span><span class="tag">&lt;</span><span class="tag-name">wbr</span><span class="tag">&gt;</span><span>expialidocious?</span><span class="tag">&lt;/</span><span class="tag-name">span</span><span class="tag">&gt;</span><span> </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;"><span>How do you say Supercalifragilisticexpialidocious?</span></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nvmindmedia.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nvmindmedia.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nvmindmedia.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nvmindmedia.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nvmindmedia.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nvmindmedia.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nvmindmedia.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nvmindmedia.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nvmindmedia.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nvmindmedia.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nvmindmedia.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nvmindmedia.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nvmindmedia.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nvmindmedia.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=18&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nvmindmedia.wordpress.com/2009/04/08/10-rare-html-tags-you-really-should-know/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5fca6c6715ab8a9be9cc6de97a647a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nvmindmedia</media:title>
		</media:content>
	</item>
		<item>
		<title>30+ Amazing Mac Apps for Developers30+ Amazing Mac Apps for Developers</title>
		<link>http://nvmindmedia.wordpress.com/2009/04/08/30-amazing-mac-apps-for-developers30-amazing-mac-apps-for-developers/</link>
		<comments>http://nvmindmedia.wordpress.com/2009/04/08/30-amazing-mac-apps-for-developers30-amazing-mac-apps-for-developers/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 00:15:06 +0000</pubDate>
		<dc:creator>nashio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nvmindmedia.wordpress.com/?p=15</guid>
		<description><![CDATA[One of the most important aspects of being a web developer is having the correct tools and applications at your disposal to get the job done. These applications can range from text editors with helpful features, to screen capturing software to display video and/or audio to a client or your users. Today, we will have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=15&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="text">
<p>One of the most important aspects of being a web developer is having the correct tools and applications at your disposal to get the job done. These applications can range from text editors with helpful features, to screen capturing software to display video and/or audio to a client or your users. Today, we will have a look at 30+ amazing Mac applications for web developers.</p>
<h2>Panic&#8217;s Coda</h2>
<div class="tutorial_image"><a href="http://www.panic.com/coda/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img1.jpg" alt="Screenshot 1" /></a></div>
<p>Anyone who knows me had to imagine this would be the first on the list. I use Coda everyday and couldn&#8217;t imagine development without it. If you are looking for a super powerful and functional text editor, I highly recommend Coda.</p>
<p><strong>Price:</strong> Free trial, $99 for regular license.</p>
<p><a href="http://www.panic.com/coda/">Visit Site</a></p>
<h2>TextMate</h2>
<div class="tutorial_image"><a href="http://macromates.com/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img2.jpg" alt="Screenshot 2" /></a></div>
<p>Another popular text editor for Mac is TextMate created by MacroMates. Another nice feature is the price is a bit lower than that of Codas.</p>
<p><strong>Price:</strong> Free Trial, $55 per license.</p>
<p><a href="http://macromates.com/">Visit Site</a></p>
<h2>Eclipse</h2>
<div class="tutorial_image"><a href="http://www.eclipse.org/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img3.jpg" alt="Screenshot 3" /></a></div>
<p>Eclipse is a very popular IDE that has become the tool many programmers prefer to use. There are many Eclipse Plugins as well that support different web and computer languages. No matter what language you program in, Eclipse can most likely accommodate you.</p>
<p><strong>Price:</strong> Free!</p>
<p><a href="http://www.eclipse.org/">Visit Site</a></p>
<h2>QuickSilver</h2>
<div class="tutorial_image"><a href="http://www.blacktree.com/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img4.jpg" alt="Screenshot 4" /></a></div>
<p>A favorite of many Mac owners, QuickSilver is a very extendable interface that allows you to quick launch programs, manage shortcuts, contacts, music, and many other applications.</p>
<p><strong>Price:</strong> Free!</p>
<p><a href="http://www.blacktree.com/">Visit Site</a></p>
<h2>Komodo Edit</h2>
<div class="tutorial_image"><a href="http://www.activestate.com/komodo_edit/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img5.jpg" alt="Screenshot 5" /></a></div>
<p>If you are looking for a powerful free and open source text editor that runs on any platform, then Komodo Edit might be the one for you. Primarily focused on dynamic web languages, Komodo Edit comes with many features and customizable plugins to help you get the job done.</p>
<p><strong>Price:</strong> Free and Open Source!</p>
<p><a href="http://www.activestate.com/komodo_edit/">Visit Site</a></p>
<h2>Billings 3</h2>
<div class="tutorial_image"><a href="http://www.billingsapp.com/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img6.jpg" alt="Screenshot 6" /></a></div>
<p>Billings 3 is a wonderful time billing and invoicing tool, perfect for anyone who does any freelance work. Billings 3 integrates with the Mac interface brilliantly and its features save a lot of manual labor.</p>
<p><strong>Price:</strong> $39.99 per license, $25.00 to upgrade.</p>
<p><a href="http://www.billingsapp.com/">Visit Site</a></p>
<h2>BB Edit</h2>
<div class="tutorial_image"><a href="http://www.barebones.com/products/bbedit/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img7.jpg" alt="Screenshot 7" /></a></div>
<p>BBEdit is a text editor for Mac that claims &#8216;It Doesn&#8217;t Suck&#8217;, and you know what? It most certainly does not. Packed full of helpful features, including project management, BBEdit is the text editor of choice for many web developers.</p>
<p><strong>Price:</strong> Free Trial, $125 per license, $49 for educational license.</p>
<p><a href="http://www.barebones.com/products/bbedit/">Visit Site</a></p>
<h2>MAMP</h2>
<div class="tutorial_image"><a href="http://www.mamp.info/en/index.html"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img8.jpg" alt="Screenshot 8" /></a></div>
<p>Most recent Macs come with everything that MAMP does, but by downloading and installing MAMP you can get your own local server up and running in under 5 minutes. In case you were wondering, MAMP stands for Mac, Apache, MySQL, and php/perl/python, whatever your server side language of choice. If you need help installing check out this <a href="http://en.support.wordpress.com/affiliate-links/">quick screencast on getting MAMP setup on your Mac.</a></p>
<p><strong>Price:</strong> Free, additionally a paid version &#8216;MAMP Pro&#8217; is available for $55.00.</p>
<p><a href="http://www.mamp.info/en/index.html">Visit Site</a></p>
<h2>Panic Transmit</h2>
<div class="tutorial_image"><a href="http://www.panic.com/transmit/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img9.jpg" alt="Screenshot 9" /></a></div>
<p>Saying that Transmit is a superb FTP program for Mac would be an extreme understatement. Just look at all the features of the program on their homepage, there are far too many to list here. If you are looking for a high quality FTP program for Mac, Transmit is a great choice.</p>
<p><strong>Price:</strong> Free Trial, $29.95 per license.</p>
<p><a href="http://www.panic.com/transmit/">Visit Site</a></p>
<h2>Paparazzi</h2>
<div class="tutorial_image"><a href="http://derailer.org/paparazzi/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img10.jpg" alt="Screenshot 10" /></a></div>
<p>If you do a lot of writing or use screenshots often, you may consider downloading paparazzi. Paparazzi is a small but powerful (and free) screenshot program that makes taking snapshots of websites a breeze.</p>
<p><strong>Price:</strong> Free!</p>
<p><a href="http://derailer.org/paparazzi/">Visit Site</a></p>
<h2>Magnifique</h2>
<div class="tutorial_image"><a href="http://magnifiqueapp.com/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img11.jpg" alt="Screenshot 11" /></a></div>
<p>While not necessarily a development tool, Magnifique heps you customize the look and feel of your Mac workspace by quickly changing in between themes of your choice. Great for those who need a little inspiration, or who need a change of &#8216;scenery&#8217;.</p>
<p><strong>Price:</strong> Free!</p>
<p><a href="http://magnifiqueapp.com/">Visit Site</a></p>
<h2>Flow</h2>
<div class="tutorial_image"><a href="http://www.gridironsoftware.com/products/flow.html"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img12.jpg" alt="Screenshot 12" /></a></div>
<p>Flow is a visual workflow manager, built to give you full control and understanding over your current project. The concept of flow is slightly difficult to describe, so I recommend checking the screenshots or giving the trial a go. While it is a bit on the pricy side, it is extremely helpful if you work at a company where you often work with a large group of people and need to stay organized.</p>
<p><strong>Price:</strong> Free Trial, $249 per license.</p>
<p><a href="http://www.gridironsoftware.com/products/flow.html">Visit Site</a></p>
<h2>Man Hour</h2>
<div class="tutorial_image"><a href="http://aelgo.com/manhour/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img13.jpg" alt="Screenshot 13" /></a></div>
<p>Man Hour is a simple and flexible time tracking program. It&#8217;s strength lies in it&#8217;s flexibility of letting you change what you charge per hour depending upon the project at hand. The price tag is also very easy on the eyes.</p>
<p><strong>Price:</strong> Free Trial, $9.99 per license.</p>
<p><a href="http://aelgo.com/manhour/">Visit Site</a></p>
<h2>CyberDuck</h2>
<div class="tutorial_image"><a href="http://cyberduck.ch/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img14.jpg" alt="Screenshot 14" /></a></div>
<p>Cyberduck is a popular and free ftp program requiring Mac OS X 10.4 or higher. It also supports FTP, SFTP, WebDAV, Mosso Cloud Files and Amazon S3.</p>
<p><strong>Price:</strong> Free and Open Source!</p>
<p><a href="http://cyberduck.ch/">Visit Site</a></p>
<h2>FileZilla</h2>
<div class="tutorial_image"><a href="http://filezilla-project.org/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img15.jpg" alt="Screenshot 15" /></a></div>
<p>FileZilla is a very well known open source FTP program that runs on most operating systems. Simple, easy to use, and works as it should.</p>
<p><strong>Price:</strong> Free and Open Source!</p>
<p><a href="http://filezilla-project.org/">Visit Site</a></p>
<h2>TextExpander</h2>
<div class="tutorial_image"><a href="http://www.smileonmymac.com/TextExpander/index.html"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img16.jpg" alt="Screenshot 16" /></a></div>
<p>Recently Jeffrey posted a screencast titled &#8216;<a href="http://net.tutsplus.com/videos/screencasts/how-i-can-code-twice-as-fast-as-you/">How I can code twice as fast as you.&#8217;</a> While the title was sort of a joke, Jeffrey showed how valuable a good text expander program can be and how much time it can save. My personal favorite is TextExpander for Mac OS X. Text Expander will save you all kinds of time by allowing you to setup shortcut names for anything you type over and over again.</p>
<p><strong>Price:</strong> Free Trial, $29.95 per license.</p>
<p><a href="http://www.smileonmymac.com/TextExpander/index.html">Visit Site</a></p>
<h2>DropBox</h2>
<div class="tutorial_image"><a href="https://www.getdropbox.com/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img17.jpg" alt="Screenshot 17" /></a></div>
<p>Dropbox is a very easy to use program that allows you to share, sync, and backup files on your hard drive. Even better is that you get a 2GB account for free, which should be plenty to backup those files you can&#8217;t afford to lose.</p>
<p><strong>Price:</strong> 2 GB free, $9.99/month for more space.</p>
<p><a href="https://www.getdropbox.com/">Visit Site</a></p>
<h2>Growl</h2>
<div class="tutorial_image"><a href="http://growl.info/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img18.jpg" alt="Screenshot 18" /></a></div>
<p>Growl is another one of those applications that is a little hard to explain, but extremely helpful to have. Basically, Growl lets you know when certain things happen, in a very unobtrusive way. For instance, Growl integrates perfectly with Coda and lets you know when a file or folder has been successfully uploaded or downloaded, or if there was an error that occurred. Check out the about page for more screenshots and information.</p>
<p><strong>Price:</strong> Free.</p>
<p><a href="http://growl.info/">Visit Site</a></p>
<h2>LaunchBar</h2>
<div class="tutorial_image"><a href="http://www.obdev.at/products/launchbar/beta.html"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img19.jpg" alt="Screenshot 19" /></a></div>
<p>LaunchBar is a lot like QuickSilver, with a very powerful search tool. LaunchBar also allows you to setup and use simple text commands to run programs, edit files, and manipulate data. It is free to use until April 1, 2009.</p>
<p><strong>Price:</strong> Free until Apr 1, $32 per license after that.</p>
<p><a href="http://www.obdev.at/products/launchbar/beta.html">Visit Site</a></p>
<h2>Money<sup>3</sup></h2>
<div class="tutorial_image"><a href="http://www.jumsoft.com/money/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img20.jpg" alt="Screenshot 20" /></a></div>
<p>Money<sup>3</sup> is the latest version of the Money accounting program built specifically for Mac OS X. Version 3 offers a completely new user interface and the ability to manage all different types of accounts. In addition, Money can also help you plan and track your budget. Furthermore, it was cool to get to use the &#8216;sup&#8217; tag.</p>
<p><strong>Price:</strong> Free Trial, $39.00 per license.</p>
<p><a href="http://www.jumsoft.com/money/">Visit Site</a></p>
<h2>On The Job</h2>
<div class="tutorial_image"><a href="http://stuntsoftware.com/OnTheJob/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img21.jpg" alt="Screenshot 21" /></a></div>
<p>On The Job is a fully packed software program built to track time and expenses, and provide you with super simple client invoicing. The multiple billing currency option is particularly helpful.</p>
<p><strong>Price:</strong> Free Trial, $39.95 per license.</p>
<p><a href="http://stuntsoftware.com/OnTheJob/">Visit Site</a></p>
<h2>Versions</h2>
<div class="tutorial_image"><a href="http://versionsapp.com/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img22.jpg" alt="Screenshot 22" /></a></div>
<p>Version control is very important for anyone involved in development, and Versions makes it super simple to maintain. Even if you have never worked with subversion, Versions is a breeze.</p>
<p><strong>Price:</strong> Free Trial, $53 per license.</p>
<p><a href="http://versionsapp.com/">Visit Site</a></p>
<h2>Snipply</h2>
<div class="tutorial_image"><a href="http://code.google.com/p/snippely/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img23.jpg" alt="Screenshot 23" /></a></div>
<p>Snipply is an Adobe AIR application used to organize chunks and snippets of code into separate categories. If you have used Code, it is similar to Coda Clips. I prefer to keep my larger code libraries in Snippley as it is very easy to use and doesn&#8217;t clutter my clips. Best of all it is absolutely free!</p>
<p><strong>Price:</strong> Free and Open Source!</p>
<p><a href="http://code.google.com/p/snippely/">Visit Site</a></p>
<h2>Espresso</h2>
<div class="tutorial_image"><a href="http://macrabbit.com/espresso/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img24.jpg" alt="Screenshot 24" /></a></div>
<p>There has been a lot of talk about Espresso and how it will rival many of the current popular text editors. It is currently in public beta and requires Leopard. Check out all of the features offered on the homepage.</p>
<p><strong>Price:</strong> Free to try, pre order for $80.00. Discount for CSSEdit users.</p>
<p><a href="http://macrabbit.com/espresso/">Visit Site</a></p>
<h2>CSSEdit</h2>
<div class="tutorial_image"><a href="http://macrabbit.com/cssedit/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img25.jpg" alt="Screenshot 25" /></a></div>
<p>From the same people that built Espresso, CSSEdit is a text editor focused mainly on, well, CSS. Packed with all kinds of helpful features and references, CSSEdit is great for those who frequently design websites or templates.</p>
<p><strong>Price:</strong> Free Trial, $40.00 per license</p>
<p><a href="http://macrabbit.com/cssedit/">Visit Site</a></p>
<h2>Capture Me</h2>
<div class="tutorial_image"><a href="http://www.chimoosoft.com/products/captureme/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img26.jpg" alt="Screenshot 26" /></a></div>
<p>Looking for a simple and free screen capturing program? Then you might enjoy Capture Me, which contains features resizing on the fly, custom file types for images, and an easy to use interface.</p>
<p><strong>Price:</strong> Free and Open Source!</p>
<p><a href="http://www.chimoosoft.com/products/captureme/">Visit Site</a></p>
<h2>BackDrop</h2>
<div class="tutorial_image"><a href="http://www.johnhaney.com/backdrop/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img27.jpg" alt="Screenshot 27" /></a></div>
<p>Backdrop is a great program for those of us who constantly have multiple windows and panles open and need to clear up some space. If you need to focus on some code, or just do some writing, just activate BackDrop and watch your clutter disappear, allowing you to get back to work.</p>
<p><strong>Price:</strong> Free!</p>
<p><a href="http://www.johnhaney.com/backdrop/">Visit Site</a></p>
<h2>ServerSkine</h2>
<div class="tutorial_image"><a href="http://www.serverskine.com/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img28.jpg" alt="Screenshot 28" /></a></div>
<p>If you are constantly searching and trying to keep track of different clients domain and server information, ServerSkine can be a lifesaver. ServerSkine allows you to organize all of your different server and domain accounts of your clients in one easy to use program.</p>
<p><strong>Price:</strong> Free!</p>
<p><a href="http://www.serverskine.com/">Visit Site</a></p>
<h2>Snapz Pro X</h2>
<div class="tutorial_image"><a href="http://www.ambrosiasw.com/utilities/snapzprox/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img29.jpg" alt="Screenshot 29" /></a></div>
<p>Snapz Pro X is a very powerful and versatile video and screen capturing software program for Mac. If you have checked out the <a href="http://en.support.wordpress.com/affiliate-links/">WordPress for Designers series</a>, this is the software I use to create the screencasts.</p>
<p><strong>Price:</strong> Free Trial, $69 per license.</p>
<p><a href="http://www.ambrosiasw.com/utilities/snapzprox/">Visit Site</a></p>
<h2>Skype</h2>
<div class="tutorial_image"><a href="http://www.skype.com/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img30.jpg" alt="Screenshot 30" /></a></div>
<p>While not limited to Mac OS only, Skype is a must have application for those who freelance or do any kind of work from home. Use it to make free calls to your boss or company, catch up with a client, or sit it on a video chat for a meeting.</p>
<p><strong>Price:</strong> Free, discount for calls to certain areas of the world.</p>
<p><a href="http://www.skype.com/">Visit Site</a></p>
<h2>SpanningSync</h2>
<div class="tutorial_image"><a href="http://www.spanningsync.com/"><img src="http://nettuts.s3.amazonaws.com/254_apps/images/img31.jpg" alt="Screenshot 31" /></a></div>
<p>SpanningSync allows you to synchronize iCal and Address Book with Google Calendar and Gmail Contacts. For those power gmail users, SpanningSync can be a huge help when it comes to organizing your events.</p>
<p><strong>Price:</strong> Free, discount for calls to certain areas of the world.</p>
<p><a href="http://www.spanningsync.com/">Visit Site</a></p>
<h2>Your Favorites?</h2>
<p>For the sake of time and this article, there is no way we could include every excellent Mac application, so what are some of your favorites? What applications do you find to be most helpful when it comes to development?</p>
<h2>Thanks Twitter!</h2>
<p>A special thanks to those that replied to me on twitter when I asked what were some of your favorite Mac apps. I did my best to take all of your replies into thought before I finalized the list. Thanks Twitter!</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nvmindmedia.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nvmindmedia.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nvmindmedia.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nvmindmedia.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nvmindmedia.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nvmindmedia.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nvmindmedia.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nvmindmedia.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nvmindmedia.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nvmindmedia.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nvmindmedia.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nvmindmedia.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nvmindmedia.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nvmindmedia.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=15&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nvmindmedia.wordpress.com/2009/04/08/30-amazing-mac-apps-for-developers30-amazing-mac-apps-for-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5fca6c6715ab8a9be9cc6de97a647a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nvmindmedia</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img1.jpg" medium="image">
			<media:title type="html">Screenshot 1</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img2.jpg" medium="image">
			<media:title type="html">Screenshot 2</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img3.jpg" medium="image">
			<media:title type="html">Screenshot 3</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img4.jpg" medium="image">
			<media:title type="html">Screenshot 4</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img5.jpg" medium="image">
			<media:title type="html">Screenshot 5</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img6.jpg" medium="image">
			<media:title type="html">Screenshot 6</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img7.jpg" medium="image">
			<media:title type="html">Screenshot 7</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img8.jpg" medium="image">
			<media:title type="html">Screenshot 8</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img9.jpg" medium="image">
			<media:title type="html">Screenshot 9</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img10.jpg" medium="image">
			<media:title type="html">Screenshot 10</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img11.jpg" medium="image">
			<media:title type="html">Screenshot 11</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img12.jpg" medium="image">
			<media:title type="html">Screenshot 12</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img13.jpg" medium="image">
			<media:title type="html">Screenshot 13</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img14.jpg" medium="image">
			<media:title type="html">Screenshot 14</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img15.jpg" medium="image">
			<media:title type="html">Screenshot 15</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img16.jpg" medium="image">
			<media:title type="html">Screenshot 16</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img17.jpg" medium="image">
			<media:title type="html">Screenshot 17</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img18.jpg" medium="image">
			<media:title type="html">Screenshot 18</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img19.jpg" medium="image">
			<media:title type="html">Screenshot 19</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img20.jpg" medium="image">
			<media:title type="html">Screenshot 20</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img21.jpg" medium="image">
			<media:title type="html">Screenshot 21</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img22.jpg" medium="image">
			<media:title type="html">Screenshot 22</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img23.jpg" medium="image">
			<media:title type="html">Screenshot 23</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img24.jpg" medium="image">
			<media:title type="html">Screenshot 24</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img25.jpg" medium="image">
			<media:title type="html">Screenshot 25</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img26.jpg" medium="image">
			<media:title type="html">Screenshot 26</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img27.jpg" medium="image">
			<media:title type="html">Screenshot 27</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img28.jpg" medium="image">
			<media:title type="html">Screenshot 28</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img29.jpg" medium="image">
			<media:title type="html">Screenshot 29</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img30.jpg" medium="image">
			<media:title type="html">Screenshot 30</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/254_apps/images/img31.jpg" medium="image">
			<media:title type="html">Screenshot 31</media:title>
		</media:content>
	</item>
		<item>
		<title>Build a Better Tooltip with jQuery Awesomeness</title>
		<link>http://nvmindmedia.wordpress.com/2009/04/08/build-a-better-tooltip-with-jquery-awesomeness/</link>
		<comments>http://nvmindmedia.wordpress.com/2009/04/08/build-a-better-tooltip-with-jquery-awesomeness/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 00:12:17 +0000</pubDate>
		<dc:creator>nashio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nvmindmedia.wordpress.com/?p=13</guid>
		<description><![CDATA[Browsers will automatically display a tooltip when you provide a title attribute. Internet Explorer will also use the alt attribute. But, in this tutorial I&#8217;m going to show you how to quickly write a jQuery plugin that will replace the typical browser tooltip with something a little flashier. One of the great tools we have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=13&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="text">
<p>Browsers will automatically display a tooltip when you provide a <code>title</code> attribute. Internet Explorer will also use the alt attribute. But, in this tutorial I&#8217;m going to show you how to quickly write a jQuery plugin that will replace the typical browser tooltip with something a little flashier.</p>
<p>One of the great tools we have in our web development goodie-bag are tooltips. A tooltip is a box  that appears when you hover your cursor over an element like a hyperlink. It provides supplementary  information about that element. For example, a link with little or no text (an icon) may become confusing.  Provide an extra sentence or two within a tooltip to explain to your users what will happen if they click on it.</p>
<h3>Before You Start</h3>
<p>This tutorial would probably fit in the category of Intermediate. The instructions assume that you have at least  a basic understanding of HTML/CSS, slicing techniques and jQuery.</p>
<p>If you need a refresher on jQuery, here are a few recommended sites:</p>
<ul>
<li><a href="http://en.support.wordpress.com/affiliate-links/">jQuery for Absolute Beginners: Video Series</a></li>
<li><a href="http://nettuts.com/tutorials/wordpress/creating-a-custom-wordpress-plugin-from-scratch/">Create a Custom WordPress Plugin From Scratch</a></li>
<li><a href="http://nettuts.com/tutorials/javascript-ajax/15-resources-to-get-you-started-with-jquery-from-scratch/">15 Resources To Get You Started With jQuery From Scratch</a></li>
<li><a href="http://www.smashingmagazine.com/2008/09/16/jquery-examples-and-best-practices/">jQuery and JavaScript Coding: Examples and Best Practices</a></li>
<li><a href="http://jquery.bassistance.de/jquery-getting-started.html">Getting Started with jQuery</a></li>
<li><a href="http://www.learningjquery.com/2006/11/how-to-get-anything-you-want-part-1">How to Get Anything You Want &#8211; part 1</a></li>
</ul>
<p>Just so you have a clear idea of the files involved in this tutorial, here is what the file structure should look  like by the time you are done.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/234_tooltip/images/file-structure.gif" alt="The file structure" width="600" height="383" /></div>
<p>Here&#8217;s a rundown of what each file/folder is:</p>
<ul>
<li><strong>Images</strong> folder contains the following images:</li>
<li> &#8211; - <strong>tipTip.png</strong> &#8211; created in Step 2</li>
<li> &#8211; - <strong>tipMid.png</strong> &#8211; created in Step 2</li>
<li> &#8211; - <strong>tipBtm.png</strong> &#8211; created in Step 2</li>
<li><strong>index.html</strong> &#8211;  &#8211; created in Step 3</li>
<li><strong>style.css</strong> &#8211; created in Step 3</li>
<li><strong>jquery-1.3.1.min.js</strong> &#8211; download this <a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.1.min.js&amp;downloadBtn=">here</a></li>
<li><strong>jquery.betterTooltip.js</strong> &#8211;  &#8211; created in Step 5</li>
</ul>
<h3>First, Get a Little Creative</h3>
<p>Open up Photoshop, or your software of choice, and whip up an awesome looking tooltip. Rather than designing  on a plain white background, it may help to draw up your tooltip on a background similar to that of your site.  That way it will blend in seamlessly. For the most part, there is no right or wrong way  to complete this step. Just use your imagination and creativity.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/234_tooltip/images/initial-design.gif" alt="Initial Tooltip Design" width="600" height="482" /></div>
<h3>Step 2 &#8211; Slice and Dice Your Tooltip</h3>
<p>For this particular design, you will need to slice the tooltip into 3 different images. This particular design will need a PNG to preserve transparency. 1) The top piece. 2) A thin 1 pixel slice that will repeat vertically in the middle. 3) The bottom piece. The 4th part of the diagram below shows the three pieces after they were cut out.</p>
<p>Place these image files into a folder named &#8220;images&#8221;.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/234_tooltip/images/slice-n-dice.gif" alt="Slice up the tooltip" width="600" height="482" /></div>
<p><em>Note: Internet Explorer does NOT like PNG transparency. Even IE 7 only partially supports it. If you animate a  PNG with JavaScript, any area with transparency will turn black momentarily while in movement. I&#8217;m using this design knowing full well it will have issues in IE that are hard to work around.</em></p>
<h3>Step 3 &#8211; Write the HTML/CSS Markup</h3>
<p>With the images sliced, we can move on to the HTML and CSS markup. This will be the easiest part of the whole  tutorial.</p>
<h4>The HTML</h4>
<p>This HTML markup will soon be moved into an external JavaScript file, so just type this in whatever  is most convenient and can be referred to later.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">div</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;tip&#8221;</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">div</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;tipMid&#8221;</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">div</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">div</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;tipBtm&#8221;</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">div</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;/</span><span class="tag-name">div</span><span class="tag">&gt;</span><span> </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;">	&lt;div class="tip"&gt;
		&lt;div class="tipMid"&gt;&lt;/div&gt;
		&lt;div class="tipBtm"&gt;&lt;/div&gt;
	&lt;/div&gt;</pre>
<p>There are three <code>div</code> tags. Two nested inside a parent. The first <code>div</code>, &#8220;tip&#8221; will be used to hold everything together  and display the top portion of the tooltip, <strong>tipTop.png</strong>.</p>
<p>&#8220;tipMid&#8221; will eventually hold the text that the tooltip will display. It will also have <strong>tipMid.png</strong> repeating vertically inside it.</p>
<p>&#8220;tipBtm&#8221; is solely there to display the bottom portion of the tooltip, <strong>tipBtm.png</strong>.</p>
<p>Inside of <strong>index.html</strong>, add a bunch of filler text and some elements with their title attributes filled out. Such as:</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">a</span><span> </span><span class="attribute">href</span><span>=</span><span class="attribute-value">&#8220;#&#8221;</span><span> </span><span class="attribute">title</span><span>=</span><span class="attribute-value">&#8220;This is the tooltip text&#8221;</span><span class="tag">&gt;</span><span>This is a link</span><span class="tag">&lt;/</span><span class="tag-name">a</span><span class="tag">&gt;</span><span> </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;">	<a title="This is the tooltip text" href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">This is a link</a></pre>
<p>In the head of <strong>index.html</strong>, you will need to link to the stylesheet and the two JavaScript files.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">link</span><span> </span><span class="attribute">href</span><span>=</span><span class="attribute-value">&#8220;style.css&#8221;</span><span> </span><span class="attribute">rel</span><span>=</span><span class="attribute-value">&#8220;stylesheet&#8221;</span><span> </span><span class="attribute">type</span><span>=</span><span class="attribute-value">&#8220;text/css&#8221;</span><span> </span><span class="attribute">media</span><span>=</span><span class="attribute-value">&#8220;all&#8221;</span><span> </span><span class="tag">/&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;</span><span class="tag-name">script</span><span> </span><span class="attribute">type</span><span>=</span><span class="attribute-value">&#8220;text/javascript&#8221;</span><span> </span><span class="attribute">src</span><span>=</span><span class="attribute-value">&#8220;jquery-1.3.1.min.js&#8221;</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">script</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">script</span><span> </span><span class="attribute">type</span><span>=</span><span class="attribute-value">&#8220;text/javascript&#8221;</span><span> </span><span class="attribute">src</span><span>=</span><span class="attribute-value">&#8220;jquery.betterTooltip.js&#8221;</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">script</span><span class="tag">&gt;</span><span> </span></span></li>
</ol>
</div>
<pre class="html" style="display:none;">	&lt;link href="style.css" rel="stylesheet" type="text/css" media="all" /&gt;
	&lt;script type="text/javascript" src="jquery-1.3.1.min.js"&gt;&lt;/script&gt;
	&lt;script type="text/javascript" src="jquery.betterTooltip.js"&gt;&lt;/script&gt;</pre>
<h4>The CSS</h4>
<p>The CSS used for this tooltip is relatively simple, just add the following to <strong>style.css</strong></p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-css">
<li class="alt"><span><span>.tip { </span></span></li>
<li><span> <span class="keyword">width</span><span>: </span><span class="string">212px</span><span>; </span></span></li>
<li class="alt"><span> <span class="keyword">padding-top</span><span>: </span><span class="string">37px</span><span>; </span></span></li>
<li><span> <span class="keyword">display</span><span>: </span><span class="string">none</span><span>; </span></span></li>
<li class="alt"><span> <span class="keyword">position</span><span>: </span><span class="string">absolute</span><span>; </span></span></li>
<li><span> <span class="keyword">background</span><span>: </span><span class="string">transparent</span><span> </span><span class="string">url</span><span>(images/tipTop.png) </span><span class="string">no-repeat</span><span> </span><span class="string">top</span><span>;} </span></span></li>
<li class="alt"><span> </span></li>
<li><span>.tipMid {<span class="keyword">background</span><span>: </span><span class="string">transparent</span><span> </span><span class="string">url</span><span>(images/tipMid.png) </span><span class="string">repeat</span><span>-y; </span><span class="keyword">padding</span><span>: 0 </span><span class="string">25px</span><span> </span><span class="string">20px</span><span> </span><span class="string">25px</span><span>;} </span></span></li>
<li class="alt"><span>.tipBtm {<span class="keyword">background</span><span>: </span><span class="string">transparent</span><span> </span><span class="string">url</span><span>(images/tipBtm.png) </span><span class="string">no-repeat</span><span> </span><span class="keyword">bottom</span><span class="string">bottom</span><span>; </span><span class="keyword">height</span><span>: </span><span class="string">32px</span><span>;} </span></span></li>
</ol>
</div>
<pre class="css" style="display:none;">	.tip {
		width: 212px;
		padding-top: 37px;
		display: none;
		position: absolute;
		background: transparent url(images/tipTop.png) no-repeat top;}

	.tipMid {background: transparent url(images/tipMid.png) repeat-y; padding: 0 25px 20px 25px;}
	.tipBtm {background: transparent url(images/tipBtm.png) no-repeat bottom; height: 32px;}</pre>
<p>Let me explain the above.</p>
<p>The wrapping element, .tip, is used to hold everything together. It has a top padding of 37 pixels.  That&#8217;s the height of the image in the background. The padding will push the child elements down to reveal  the image behind. It also has a position absolute so that we can move it around on top of the page  content.</p>
<p>The other two classes simply have a background image and, in the case of .topMid, padding to give the  content that will be placed inside, some room to breathe.</p>
<h3>Step 4 &#8211; Why a Plugin?</h3>
<p>jQuery is pretty cool by itself. But the real magic is in extending it with a plugin. When you put your  code into a plugin, you are making it reusable. That way you can build up a code library and never write  the same code twice.</p>
<p>Here is the tooltip plugin in its entirety:</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-c">
<li class="alt"><span><span> $.fn.betterTooltip = </span><span class="keyword">function</span><span>(options){ </span></span></li>
<li><span> </span></li>
<li class="alt"><span> <span class="comment">/* Setup the options for the tooltip that can be </span> </span></li>
<li><span><span class="comment"> accessed from outside the plugin              */</span><span> </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> defaults = { </span></span></li>
<li><span> speed: 200, </span></li>
<li class="alt"><span> delay: 300 </span></li>
<li><span> }; </span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="keyword">var</span><span> options = $.extend(defaults, options); </span></span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="comment">/* Create a function that builds the tooltip </span> </span></li>
<li class="alt"><span><span class="comment"> markup. Then, prepend the tooltip to the body */</span><span> </span></span></li>
<li><span> getTip = <span class="keyword">function</span><span>() { </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> tTip = </span></span></li>
<li><span> <span class="string">&#8220;&lt;div class=&#8217;tip&#8217;&gt;&#8221;</span><span> + </span></span></li>
<li class="alt"><span> <span class="string">&#8220;&lt;div class=&#8217;tipMid&#8217;&gt;&#8221;</span><span> + </span></span></li>
<li><span> <span class="string">&#8220;&lt;/div&gt;&#8221;</span><span> + </span></span></li>
<li class="alt"><span> <span class="string">&#8220;&lt;div class=&#8217;tipBtm&#8217;&gt;&lt;/div&gt;&#8221;</span><span> + </span></span></li>
<li><span> <span class="string">&#8220;&lt;/div&gt;&#8221;</span><span>; </span></span></li>
<li class="alt"><span> <span class="keyword">return</span><span> tTip; </span></span></li>
<li><span> } </span></li>
<li class="alt"><span> $(<span class="string">&#8220;body&#8221;</span><span>).prepend(getTip()); </span></span></li>
<li><span> </span></li>
<li class="alt"><span> <span class="comment">/* Give each item with the class associated with </span> </span></li>
<li><span><span class="comment"> the plugin the ability to call the tooltip    */</span><span> </span></span></li>
<li class="alt"><span> $(<span class="keyword">this</span><span>).each(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> </span></li>
<li class="alt"><span> <span class="keyword">var</span><span> $</span><span class="keyword">this</span><span> = $(</span><span class="keyword">this</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> tip = $(</span><span class="string">&#8216;.tip&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> tipInner = $(</span><span class="string">&#8216;.tip .tipMid&#8217;</span><span>); </span></span></li>
<li><span> </span></li>
<li class="alt"><span> <span class="keyword">var</span><span> tTitle = (</span><span class="keyword">this</span><span>.title); </span></span></li>
<li><span> <span class="keyword">this</span><span>.title = </span><span class="string">&#8220;&#8221;</span><span>; </span></span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="keyword">var</span><span> offset = $(</span><span class="keyword">this</span><span>).offset(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> tLeft = offset.left; </span></span></li>
<li><span> <span class="keyword">var</span><span> tTop = offset.top; </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> tWidth = $</span><span class="keyword">this</span><span>.width(); </span></span></li>
<li><span> <span class="keyword">var</span><span> tHeight = $</span><span class="keyword">this</span><span>.height(); </span></span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="comment">/* Mouse over and out functions*/</span><span> </span></span></li>
<li class="alt"><span> $<span class="keyword">this</span><span>.hover(</span><span class="keyword">function</span><span>() { </span></span></li>
<li><span> tipInner.html(tTitle); </span></li>
<li class="alt"><span> setTip(tTop, tLeft); </span></li>
<li><span> setTimer(); </span></li>
<li class="alt"><span> }, </span></li>
<li><span> <span class="keyword">function</span><span>() { </span></span></li>
<li class="alt"><span> stopTimer(); </span></li>
<li><span> tip.hide(); </span></li>
<li class="alt"><span> } </span></li>
<li><span> ); </span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="comment">/* Delay the fade-in animation of the tooltip */</span><span> </span></span></li>
<li class="alt"><span> setTimer = <span class="keyword">function</span><span>() { </span></span></li>
<li><span> $<span class="keyword">this</span><span>.showTipTimer = setInterval(</span><span class="string">&#8220;showTip()&#8221;</span><span>, defaults.delay); </span></span></li>
<li class="alt"><span> } </span></li>
<li><span> </span></li>
<li class="alt"><span> stopTimer = <span class="keyword">function</span><span>() { </span></span></li>
<li><span> clearInterval($<span class="keyword">this</span><span>.showTipTimer); </span></span></li>
<li class="alt"><span> } </span></li>
<li><span> </span></li>
<li class="alt"><span> <span class="comment">/* Position the tooltip relative to the class </span> </span></li>
<li><span><span class="comment"> associated with the tooltip                */</span><span> </span></span></li>
<li class="alt"><span> setTip = <span class="keyword">function</span><span>(top, left){ </span></span></li>
<li><span> <span class="keyword">var</span><span> topOffset = tip.height(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> xTip = (left-30)+</span><span class="string">&#8220;px&#8221;</span><span>; </span></span></li>
<li><span> <span class="keyword">var</span><span> yTip = (top-topOffset-60)+</span><span class="string">&#8220;px&#8221;</span><span>; </span></span></li>
<li class="alt"><span> tip.css({<span class="string">&#8216;top&#8217;</span><span> : yTip, </span><span class="string">&#8216;left&#8217;</span><span> : xTip}); </span></span></li>
<li><span> } </span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="comment">/* This function stops the timer and creates the</span> </span></li>
<li class="alt"><span><span class="comment"> fade-in animation                          */</span><span> </span></span></li>
<li><span> showTip = <span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> stopTimer(); </span></li>
<li><span> tip.animate({<span class="string">&#8220;top&#8221;</span><span>: </span><span class="string">&#8220;+=20px&#8221;</span><span>, </span><span class="string">&#8220;opacity&#8221;</span><span>: </span><span class="string">&#8220;toggle&#8221;</span><span>}, defaults.speed); </span></span></li>
<li class="alt"><span> } </span></li>
<li><span> }); </span></li>
<li class="alt"><span>}; </span></li>
</ol>
</div>
<pre class="javascript" style="display:none;">	$.fn.betterTooltip = function(options){

		/* Setup the options for the tooltip that can be
		   accessed from outside the plugin              */
		var defaults = {
			speed: 200,
			delay: 300
		};

		var options = $.extend(defaults, options);

		/* Create a function that builds the tooltip
		   markup. Then, prepend the tooltip to the body */
		getTip = function() {
			var tTip =
			"&lt;div class='tip'&gt;" +
				"&lt;div class='tipMid'&gt;"	+
				"&lt;/div&gt;" +
				"&lt;div class='tipBtm'&gt;&lt;/div&gt;" +
			"&lt;/div&gt;";
			return tTip;
		}
		$("body").prepend(getTip());

		/* Give each item with the class associated with
		   the plugin the ability to call the tooltip    */
		$(this).each(function(){

			var $this = $(this);
			var tip = $('.tip');
			var tipInner = $('.tip .tipMid');

			var tTitle = (this.title);
			this.title = "";

			var offset = $(this).offset();
			var tLeft = offset.left;
			var tTop = offset.top;
			var tWidth = $this.width();
			var tHeight = $this.height();

			/* Mouse over and out functions*/
			$this.hover(function() {
				tipInner.html(tTitle);
				setTip(tTop, tLeft);
				setTimer();
			},
			function() {
				stopTimer();
				tip.hide();
			}
		);		   

		/* Delay the fade-in animation of the tooltip */
		setTimer = function() {
			$this.showTipTimer = setInterval("showTip()", defaults.delay);
		}

		stopTimer = function() {
			clearInterval($this.showTipTimer);
		}

		/* Position the tooltip relative to the class
		   associated with the tooltip                */
		setTip = function(top, left){
			var topOffset = tip.height();
			var xTip = (left-30)+"px";
			var yTip = (top-topOffset-60)+"px";
			tip.css({'top' : yTip, 'left' : xTip});
		}

		/* This function stops the timer and creates the
		   fade-in animation                          */
		showTip = function(){
			stopTimer();
			tip.animate({"top": "+=20px", "opacity": "toggle"}, defaults.speed);
		}
	});
};</pre>
<h3>Step 5 &#8211; Write the Plugin</h3>
<p>Now that you&#8217;ve seen what the code looks like, it&#8217;s time to dissect it.  To get started, create a .js file and name it jquery.betterTooltip.js to make it compliant with jQuery  plugin standards.</p>
<p>Inside that .js file, include the following code:</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-c">
<li class="alt"><span><span>$.fn.betterTooltip = </span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> </span></li>
<li class="alt"><span>}); </span></li>
</ol>
</div>
<pre class="javascript" style="display:none;">	$.fn.betterTooltip = function(){

	});</pre>
<p>This creates a public function that can be invoked from the <code>head</code> of a document or   another external .js file. To invoke your plugin, you need to call the follow line from within a   <code>$(document).ready</code> page event.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.tTip&#8217;</span><span>).betterTooltip(); </span></span></li>
<li class="alt"><span>}); </span></li>
</ol>
</div>
<pre class="javascript" style="display:none;">	$(document).ready(function(){
		$('.tTip').betterTooltip();
	});</pre>
<p>The above line will attach the plugin to every element with the class name of &#8220;tTip&#8221;. Likewise, you  could attach it to any element of your choosing.</p>
<h4>Expose the Plugin Settings</h4>
<p>In order to prevent having to modify the plugin for every project it&#8217;s important to expose some of the  variables and settings so they can be tweaked from outside the plugin itself. The ultimate goal would be  to never touch the plugin, just adjust its settings. To do this, add the following to that first chunk  of code:</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-c">
<li class="alt"><span><span>$.fn.betterTooltip = </span><span class="keyword">function</span><span>(options){ </span></span></li>
<li><span> <span class="comment">/* Setup the options for the tooltip that can be </span> </span></li>
<li class="alt"><span><span class="comment"> accessed from outside                      */</span><span> </span></span></li>
<li><span> </span></li>
<li class="alt"><span> <span class="keyword">var</span><span> defaults = { </span></span></li>
<li><span> speed: 200, </span></li>
<li class="alt"><span> delay: 300 </span></li>
<li><span> }; </span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="keyword">var</span><span> options = $.extend(defaults, options); </span></span></li>
<li class="alt"><span>}); </span></li>
</ol>
</div>
<pre class="javascript" style="display:none;">	$.fn.betterTooltip = function(options){
		/* Setup the options for the tooltip that can be
		   accessed from outside                      */

		var defaults = {
			speed: 200,
			delay: 300
		};

		var options = $.extend(defaults, options);
	});</pre>
<p>This allows the settings &#8220;speed&#8221; and &#8220;delay&#8221; to be modified when the plugin is invoked like this:</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-c">
<li class="alt"><span><span>$(</span><span class="string">&#8216;.tTip&#8217;</span><span>).betterTooltip({speed: 600, delay: 600}); </span></span></li>
</ol>
</div>
<pre class="javascript" style="display:none;">	$('.tTip').betterTooltip({speed: 600, delay: 600});</pre>
<p>These are completely optional. If not specified, the plugin will use the default values.</p>
<h4>Inject the Tooltip Markup</h4>
<p>Remember that HTML you typed up for the tooltip? It will now make its official appearance.  In this chunck of code, the jQuery &#8220;prepend&#8221; content manipulation is used to inject the tooltip  immediately after the opening <code>body</code> tag. This way we can make sure that the tooltip  is positioned on top of everything.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-c">
<li class="alt"><span><span class="comment">/* Create a function that builds the tooltip </span> </span></li>
<li><span><span class="comment"> markup. Then, prepend the tooltip to the body */</span><span> </span></span></li>
<li class="alt"><span>getTip = <span class="keyword">function</span><span>() { </span></span></li>
<li><span> <span class="keyword">var</span><span> tTip = </span></span></li>
<li class="alt"><span> <span class="string">&#8220;&lt;div class=&#8217;tip&#8217;&gt;&#8221;</span><span> + </span></span></li>
<li><span> <span class="string">&#8220;&lt;div class=&#8217;tipMid&#8217;&gt;&#8221;</span><span> + </span></span></li>
<li class="alt"><span> <span class="string">&#8220;&lt;/div&gt;&#8221;</span><span> + </span></span></li>
<li><span> <span class="string">&#8220;&lt;div class=&#8217;tipBtm&#8217;&gt;&lt;/div&gt;&#8221;</span><span> + </span></span></li>
<li class="alt"><span> <span class="string">&#8220;&lt;/div&gt;&#8221;</span><span>; </span></span></li>
<li><span> <span class="keyword">return</span><span> tTip; </span></span></li>
<li class="alt"><span>} </span></li>
<li><span>$(<span class="string">&#8220;body&#8221;</span><span>).prepend(getTip()); </span></span></li>
</ol>
</div>
<pre class="javascript" style="display:none;">	/* Create a function that builds the tooltip
	   markup. Then, prepend the tooltip to the body */
	getTip = function() {
		var tTip =
		"&lt;div class='tip'&gt;" +
			"&lt;div class='tipMid'&gt;"	+
			"&lt;/div&gt;" +
			"&lt;div class='tipBtm'&gt;&lt;/div&gt;" +
		"&lt;/div&gt;";
		return tTip;
	}
	$("body").prepend(getTip());</pre>
<h4>The $(this).each function</h4>
<p>This is one of the most important and useful aspects of a jQuery plugin. The $(this).each function  loops through each page element that is associated with the plugin when it was evoked. In this case it&#8217;s  all elements with the &#8220;tTip&#8221; class. When it loops through each element it applies the properties and methods  that you specify.</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-c">
<li class="alt"><span><span>$(</span><span class="keyword">this</span><span>).each(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> </span></li>
<li class="alt"><span> <span class="keyword">var</span><span> $</span><span class="keyword">this</span><span> = $(</span><span class="keyword">this</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> tip = $(</span><span class="string">&#8216;.tip&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> tipInner = $(</span><span class="string">&#8216;.tip .tipMid&#8217;</span><span>); </span></span></li>
<li><span> </span></li>
<li class="alt"><span> <span class="keyword">var</span><span> tTitle = (</span><span class="keyword">this</span><span>.title); </span></span></li>
<li><span> <span class="keyword">this</span><span>.title = </span><span class="string">&#8220;&#8221;</span><span>; </span></span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="keyword">var</span><span> offset = $(</span><span class="keyword">this</span><span>).offset(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> tLeft = offset.left; </span></span></li>
<li><span> <span class="keyword">var</span><span> tTop = offset.top; </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> tWidth = $</span><span class="keyword">this</span><span>.width(); </span></span></li>
<li><span> <span class="keyword">var</span><span> tHeight = $</span><span class="keyword">this</span><span>.height(); </span></span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="comment">/* Mouse over and out functions*/</span><span> </span></span></li>
<li class="alt"><span> $<span class="keyword">this</span><span>.hover(</span><span class="keyword">function</span><span>() { </span></span></li>
<li><span> tipInner.html(tTitle); </span></li>
<li class="alt"><span> setTip(tTop, tLeft); </span></li>
<li><span> setTimer(); </span></li>
<li class="alt"><span> }, </span></li>
<li><span> <span class="keyword">function</span><span>() { </span></span></li>
<li class="alt"><span> stopTimer(); </span></li>
<li><span> tip.hide(); </span></li>
<li class="alt"><span> } </span></li>
<li><span>); </span></li>
</ol>
</div>
<pre class="javascript" style="display:none;">	$(this).each(function(){

		var $this = $(this);
		var tip = $('.tip');
		var tipInner = $('.tip .tipMid');

		var tTitle = (this.title);
		this.title = "";

		var offset = $(this).offset();
		var tLeft = offset.left;
		var tTop = offset.top;
		var tWidth = $this.width();
		var tHeight = $this.height();

		/* Mouse over and out functions*/
		$this.hover(function() {
			tipInner.html(tTitle);
			setTip(tTop, tLeft);
			setTimer();
		},
		function() {
			stopTimer();
			tip.hide();
		}
	);</pre>
<p>This is fairly simple. The top half consists of a bunch of properties for the height, width, x &amp; y position and even the title attribute value of the &#8220;tTip&#8221; elements. I&#8217;m using the jQuery offset() CSS method to grab the top and left position. There is also a hover function assigned to each &#8220;tTip&#8221; class that calls methods on mouse over and out. These methods will be described further down in the tutorial.</p>
<p>One important part of the $(this).each function is this line of code here that removes the title attribute:</p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-c">
<li class="alt"><span><span class="keyword">this</span><span>.title = </span><span class="string">&#8220;&#8221;</span><span>; </span></span></li>
</ol>
</div>
<pre class="javascript" style="display:none;">	this.title = "";</pre>
<p>The whole point of this tooltip is to swap the generic  tooltip with a better eye catching version. If you don&#8217;t remove the title attribute, which the browser  uses to generate the generic tooltip, you will get duel tooltips. Like this:</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/234_tooltip/images/duel-tooltip.gif" alt="Avoid duel tooltips" width="600" height="287" /></div>
<h4>Delay the Fade-in Animation of the Tooltip</h4>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-c">
<li class="alt"><span><span class="comment">/* Delay the fade-in animation of the tooltip */</span><span> </span></span></li>
<li><span>setTimer = <span class="keyword">function</span><span>() { </span></span></li>
<li class="alt"><span> $<span class="keyword">this</span><span>.showTipTimer = setInterval(</span><span class="string">&#8220;showTip()&#8221;</span><span>, defaults.delay); </span></span></li>
<li><span>} </span></li>
<li class="alt"><span> </span></li>
<li><span>stopTimer = <span class="keyword">function</span><span>() { </span></span></li>
<li class="alt"><span> clearInterval($<span class="keyword">this</span><span>.showTipTimer); </span></span></li>
<li><span>} </span></li>
</ol>
</div>
<pre class="javascript" style="display:none;">		/* Delay the fade-in animation of the tooltip */
		setTimer = function() {
			$this.showTipTimer = setInterval("showTip()", defaults.delay);
		}

		stopTimer = function() {
			clearInterval($this.showTipTimer);
		}</pre>
<p>These two methods, setTimer and stopTimer are used to create a delay from when the user hovers  their cursor over the element with the &#8220;tTip&#8221; class and when the tooltip makes its appearance. This  is important to avoid annoying users. I&#8217;m sure we all share the frustration when we accidentally hover  over one of those pop-up ads that are hidden in the content of sites.</p>
<p>The setTimer method creates a setInterval object that calls &#8220;showTip()&#8221; after the allotted time has passed.  In order for setInterval to not loop infinitely, the method stopTimer is called to stop the setInterval object.</p>
<h4>Position the Tooltip</h4>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-c">
<li class="alt"><span><span class="comment">/* Position the tooltip relative to the class </span> </span></li>
<li><span><span class="comment"> associated with the tooltip                */</span><span> </span></span></li>
<li class="alt"><span>setTip = <span class="keyword">function</span><span>(top, left){ </span></span></li>
<li><span> <span class="keyword">var</span><span> topOffset = tip.height(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> xTip = (left-30)+</span><span class="string">&#8220;px&#8221;</span><span>; </span></span></li>
<li><span> <span class="keyword">var</span><span> yTip = (top-topOffset-60)+</span><span class="string">&#8220;px&#8221;</span><span>; </span></span></li>
<li class="alt"><span> tip.css({<span class="string">&#8216;top&#8217;</span><span> : yTip, </span><span class="string">&#8216;left&#8217;</span><span> : xTip}); </span></span></li>
<li><span>} </span></li>
</ol>
</div>
<pre class="javascript" style="display:none;">		/* Position the tooltip relative to the class
		   associated with the tooltip                */
		setTip = function(top, left){
			var topOffset = tip.height();
			var xTip = (left-30)+"px";
			var yTip = (top-topOffset-60)+"px";
			tip.css({'top' : yTip, 'left' : xTip});
		}</pre>
<p>The hover function inside the $(this).each loop, that was created earlier, calls setTip(). Its purpose is to position  the tooltip directly above &#8220;tTip&#8221; element. This is done prior to the fade-in animation.</p>
<h4>Tooltip Fade-in Animation</h4>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">view plain</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">copy to clipboard</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">print</a><a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/#">?</a></div>
</div>
<ol class="dp-c">
<li class="alt"><span><span> </span><span class="comment">/* This function stops the timer and creates the</span> </span></li>
<li><span><span class="comment"> fade-in animation                          */</span><span> </span></span></li>
<li class="alt"><span> showTip = <span class="keyword">function</span><span>(){ </span></span></li>
<li><span> stopTimer(); </span></li>
<li class="alt"><span> tip.animate({<span class="string">&#8220;top&#8221;</span><span>: </span><span class="string">&#8220;+=20px&#8221;</span><span>, </span><span class="string">&#8220;opacity&#8221;</span><span>: </span><span class="string">&#8220;toggle&#8221;</span><span>}, defaults.speed); </span></span></li>
<li><span> } </span></li>
<li class="alt"><span>}); </span></li>
<li><span>; </span></li>
</ol>
</div>
<pre class="javascript" style="display:none;">		/* This function stops the timer and creates the
		   fade-in animation                          */
		showTip = function(){
			stopTimer();
			tip.animate({"top": "+=20px", "opacity": "toggle"}, defaults.speed);
		}
	});
};</pre>
<p>Last but not least, the showTip() function. This uses jQuery&#8217;s animate() UI effect to fade the tooltip in  while simultaneously sliding it down.</p>
<h3>Wrapping it Up. . .</h3>
<p>Once you are done and happy with your results, you can move your plugin from the basic HTML page full of filler text to  the real world and put it to use.</p>
<p>This is a very basic example of what a tooltip plugin can do. The fun part now will be to make it more robust.  There are all sorts of ways to expand this plugin. A needed enhancement would be detecting  the location of the tooltip in relation to the boundaries of the browser window and displaying the tooltip accordingly so  it doesn&#8217;t get cut off.</p>
<p>Thanks for reading this tutorial. I hope it shed some light on how you can use jQuery to enhance your website&#8217;s  interface.</p>
<p>Let the comments begin! I want to hear what you think. Does this technique actually help users get around easier,  or is it just another annoyance?</p>
<p>Source <a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/" target="_blank">Nettuts</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nvmindmedia.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nvmindmedia.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nvmindmedia.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nvmindmedia.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nvmindmedia.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nvmindmedia.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nvmindmedia.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nvmindmedia.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nvmindmedia.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nvmindmedia.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nvmindmedia.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nvmindmedia.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nvmindmedia.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nvmindmedia.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=13&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nvmindmedia.wordpress.com/2009/04/08/build-a-better-tooltip-with-jquery-awesomeness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5fca6c6715ab8a9be9cc6de97a647a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nvmindmedia</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/234_tooltip/images/file-structure.gif" medium="image">
			<media:title type="html">The file structure</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/234_tooltip/images/initial-design.gif" medium="image">
			<media:title type="html">Initial Tooltip Design</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/234_tooltip/images/slice-n-dice.gif" medium="image">
			<media:title type="html">Slice up the tooltip</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/234_tooltip/images/duel-tooltip.gif" medium="image">
			<media:title type="html">Avoid duel tooltips</media:title>
		</media:content>
	</item>
		<item>
		<title>Social Networking with BuddyPress</title>
		<link>http://nvmindmedia.wordpress.com/2009/04/08/social-networking-with-buddypress/</link>
		<comments>http://nvmindmedia.wordpress.com/2009/04/08/social-networking-with-buddypress/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 00:10:52 +0000</pubDate>
		<dc:creator>nashio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nvmindmedia.wordpress.com/?p=11</guid>
		<description><![CDATA[Automattic, the company behind WordPress, has recently acquired and will be releasing social networking software called BuddyPress. The software, built on top of WordPress, was created by Andy Peatling as way to start your very own social network similar to Facebook. Today, we will take a look at installing BuddyPress. Step 1 &#8211; What is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=11&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="text">
<p>Automattic, the company behind WordPress, has recently acquired and will be releasing social networking software called BuddyPress. The software, built on top of WordPress, was created by Andy Peatling as way to start your very own social network similar to Facebook. Today, we will take a look at installing BuddyPress.</p>
<h3>Step 1 &#8211; What is BuddyPress?</h3>
<div class="tutorial_image"><img style="width:379px;" src="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/buddypressintro.png" alt="BuddyPress" /></div>
<p>BuddyPress is a social networking application built on top of WordPress Multi-User (MU) as a plugin. WordPress MU is the the software behind <a href="http://wordpress.com/">WordPress.com</a>. It allows a user to host a network of blogs on a site. BuddyPress adds a large variety of new social interaction features to WordPress. The features can be added all at once or as individual components:</p>
<ul>
<li>A WordPress blog</li>
<li>Individual profiles for members</li>
<li>Private Message (PM) functionality</li>
<li>Friend Networks</li>
<li>Groups, which include a blog, photos and other user generated content</li>
<li>&#8220;The Wire&#8221; (like the wall on Facebook)</li>
<li>Activity/Action streams of public actions on the site</li>
<li>Forums using bbPress</li>
</ul>
<div class="tutorial_image"><img style="width:157px;" src="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/features.png" alt="Features" /></div>
<p>A <a href="http://buddypress.org/demo/">fully featured demo</a> is available at the BuddyPress website.</p>
<div class="tutorial_image"><img style="width:384px;" src="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/demo.png" alt="Demo" /></div>
<p>Today, we will install a full installation of BuddyPress (all the bells and whistles), so we can start a social network from scratch.</p>
<p>The software is in its RC stage, but is nearing its final version. The current version will help you get started with social networking by providing an admin control panel and all the basic features outlined above. You will then be ready to upgrade to the final version when the time comes.</p>
<h3>Step 2 &#8211; Requirements</h3>
<p>Before you install the BuddyPress system, your server will require you have two components already in place:</p>
<ul>
<li> a <a href="http://net.tutsplus.com/tutorials/php/everything-you-need-to-get-started-with-mysql/">MySQL database</a> to store all the BuddyPress information. If you do not have a database created, create one with a user who has all privileges (such as UPDATE, INSERT, DELETE, SELECT) on that database. Remember the username/password and database name for later steps.</li>
<li> a <a href="http://httpd.apache.org/docs/mod/mod_rewrite.html">mod rewrite module</a> so you can have clean URLS. If you have used WordPress or another piece of software that has clean URLs, then you should be ready to proceed without adding this component again.</li>
</ul>
<div class="tutorial_image"><img style="width:557px;" src="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/phpmyadmin.png" alt="phpMyAdmin" /></div>
<h3>Step 3 &#8211; Download WordPress MU</h3>
<p>Before you can start the BuddyPress installation you will need a copy of WordPress MU installed.  Grab the <a href="http://mu.wordpress.org/latest.zip">latest version (ZIP)</a> (<a href="http://mu.wordpress.org/latest.tar.gz">TAR.GZ</a>) and unzip it. You should see a folder with a name similar to &#8220;wordpress-mu&#8221;.</p>
<p>Upload the files in this directory to the location where you want to access your site. This can be the main domain or a subfolder. Grab a cup of coffee or tea while you wait for the upload to finish.</p>
<div class="tutorial_image"><img style="width:313px;" src="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/ftp.png" alt="FTP/Files" /></div>
<h3>Step 4 &#8211; Install WordPress MU</h3>
<p>Once the upload has completed you can go ahead and install WordPress MU.</p>
<p>Point your browser to the directory where you uploaded the files so that index.php is executed. You will be shown a screen to enter some details. The settings should be filled as given below:</p>
<ul>
<li><strong>Blog Addresses</strong> &#8211; For the purpose of this article we will select &#8220;sub-directories&#8221;. If you happen to have Wildcard DNS records enabled, you can select the other option, but that is outside the scope of this article.</li>
<li><strong>Database Name</strong> &#8211; The database name from Step 2</li>
<li><strong>User Name</strong> &#8211; The username from Step 2</li>
<li><strong>Password</strong> &#8211; The password from Step 2</li>
<li><strong>Database Host</strong> &#8211; This is usually localhost if the MySQL server is on the same server as the web server. Only change this if the installation is returning errors about the server/host setting.</li>
<li><strong>Server Address</strong> &#8211; The installer should be able to guess this setting, but double check that it is set to the server/domain you are installing to.</li>
<li><strong>Site Title</strong> &#8211; This will be the name of the social network site, so name it whatever you want.</li>
<li><strong>Email</strong> &#8211; Enter a valid email address to be used for the admin account.</li>
</ul>
<div class="tutorial_image"><img style="width:528px;" src="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/wordpress-mu.png" alt="Install" /></div>
<p>Once you have double-checked all the above settings, click Submit. If all goes well, you should be greeted with an &#8220;Installation Finished!&#8221; screen that includes your username and password. You have also been sent an email with the same details included.</p>
<p>Before you continue, follow the instructions for setting permissions on the Installation Finished page.</p>
<div class="tutorial_image"><img style="width:374px;" src="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/install.png" alt="Install" /></div>
<h3>Step 5 &#8211; Download BuddyPress</h3>
<p>At this point, you can now install the BuddyPress system. Since we are installing the full system, you can download the &#8220;combo&#8221; archive <a href="http://buddypress.org/download/combo/latest.zip">here</a>.</p>
<p>Unzip the combo file and upload all the contents of the extracted zip to the root mu-plugins folder located in wp-content. Upload ALL the folders and files located in the zip, and make sure these folders and files have been chmodded to 755.</p>
<p>Move the mu-plugins/bp-themes folder you just uploaded to wp-content. Make sure these folders have been chmodded to 755.</p>
<div class="tutorial_image"><img style="width:394px;" src="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/mu-plugins.png" alt="Files" /></div>
<h3>Step 6 &#8211; Setup BuddyPress</h3>
<p>Once the files are uploaded, log in to the WordPress MU admin control panel with the username and password you created earlier. The URL to log in (emailed to you when you installed WordPress MU) is in the form <a href="http://yourdomain.tld/folder/wp-login.php">http://yourdomain.tld/folder/wp-login.php</a></p>
<p>Under the &#8220;Site Admin&#8221; menu find the &#8220;Themes&#8221; link and click it. You will be shown a list of installed WordPress MU themes, one of which is the BuddyPress theme. Select &#8220;Yes&#8221; for &#8220;BuddyPress Home Theme&#8221; and click &#8220;Update Themes&#8221;.</p>
<div class="tutorial_image"><img style="width:492px;" src="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/themes.png" alt="Themes" /></div>
<p>Finally, you will need to enable registrations if you want users to be able to sign up for your site. Under the &#8220;Site Admin&#8221; menu go to &#8220;Options&#8221; and make sure the Enabled option is selected for &#8220;Allow new registrations&#8221;.</p>
<div class="tutorial_image"><img style="width:519px;" src="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/allownewreg.png" alt="Allow New Registration Settings" /></div>
<p>Congratulations! Your social network is now ready for use. When logged into the admin control panel, you can manage a few settings from the &#8220;BuddyPress&#8221; link under &#8220;Site Admin&#8221;. To view your new network and profile click &#8220;My Account&#8221; from the admin bar at the top of the screen and select &#8220;Activity&#8221; or &#8220;Profile&#8221;.</p>
<h3>Step 7 &#8211; Additonal Plugins and Themes</h3>
<p>The plugin space for BuddyPress is small right now, but it will probably explode with new activity like WordPress once did. However, there are a few cool <a href="http://buddypress.org/extend/plugins/">plugins</a> available for BuddyPress right now:</p>
<ul>
<li><a href="http://wordpress.org/extend/plugins/bpgroups">bpGroups</a> which includes improvements to the group system.</li>
<li><a href="http://wordpress.org/extend/plugins/invitefriends-plug-in">Invite Friends</a> which adds some functionality to allow you to add friends from other social networking applications like Twitter, Facebook and GMail.</li>
<li><a href="http://wordpress.org/extend/plugins/twittertowire">Twitter To Wire</a> which adds your tweets to your wire (the BuddyPress version of Facebook&#8217;s Wall) automatically.</li>
</ul>
<p>There is also a <a>page for themes</a>, but no themes have yet been made available for download. If you are curious about the power of the theming system, you can view a few examples at <a href="http://wannanetwork.com/">WannaNetwork</a>, <a href="http://grungepress.com/">GrungePress</a>, and <a href="http://flokka.com/">Flokka</a>.</p>
<div class="tutorial_image"><img style="width:287px;" src="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/extend.png" alt="Extend Screen Shot" /></div>
<h3>Closing</h3>
<p>I hope this tutorial has been successful in introducing you to BuddyPress and has opened up an opportunity for you to start your own social network site. The WordPress MU / BuddyPress configuration provides more social functionality than can be provided by a simple forum or blog network setup.</p>
<p>Remember, this tutorial is meant to familiarize you with the software and its installation before its final release. If you want to continue with your BuddyPress installation on the programming side of things, the BuddyPress Codex has some <a href="http://codex.buddypress.org/developer-docs/">developer documentation</a>.</p>
<p>Source <a href="http://net.tutsplus.com/tutorials/wordpress/social-networking-with-buddypress/" target="_blank">Nettuts</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nvmindmedia.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nvmindmedia.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nvmindmedia.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nvmindmedia.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nvmindmedia.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nvmindmedia.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nvmindmedia.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nvmindmedia.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nvmindmedia.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nvmindmedia.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nvmindmedia.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nvmindmedia.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nvmindmedia.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nvmindmedia.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=11&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nvmindmedia.wordpress.com/2009/04/08/social-networking-with-buddypress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5fca6c6715ab8a9be9cc6de97a647a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nvmindmedia</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/buddypressintro.png" medium="image">
			<media:title type="html">BuddyPress</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/features.png" medium="image">
			<media:title type="html">Features</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/demo.png" medium="image">
			<media:title type="html">Demo</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/phpmyadmin.png" medium="image">
			<media:title type="html">phpMyAdmin</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/ftp.png" medium="image">
			<media:title type="html">FTP/Files</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/wordpress-mu.png" medium="image">
			<media:title type="html">Install</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/install.png" medium="image">
			<media:title type="html">Install</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/mu-plugins.png" medium="image">
			<media:title type="html">Files</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/themes.png" medium="image">
			<media:title type="html">Themes</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/allownewreg.png" medium="image">
			<media:title type="html">Allow New Registration Settings</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/263_buddypress/buddypress/extend.png" medium="image">
			<media:title type="html">Extend Screen Shot</media:title>
		</media:content>
	</item>
		<item>
		<title>50 Excellent Image Galleries You Can Use Today</title>
		<link>http://nvmindmedia.wordpress.com/2009/04/08/50-excellent-image-galleries-you-can-use-today/</link>
		<comments>http://nvmindmedia.wordpress.com/2009/04/08/50-excellent-image-galleries-you-can-use-today/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 00:08:17 +0000</pubDate>
		<dc:creator>nashio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nvmindmedia.wordpress.com/?p=8</guid>
		<description><![CDATA[1. Gallery 2 Gallery 2 has probably the biggest community and is one of the most used gallery scripts on the web. 2. Zenphoto Zenphoto bills itself as the &#8220;simplest, most useful gallery software for your site&#8221;. The script is built in PHP. 3. Minishowcase Minishowcase is an simple and tiny php/javascript photo gallery. 4. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=8&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>1. <a href="http://gallery.menalto.com/">Gallery 2</a></h3>
<p>Gallery 2 has probably the biggest community and is one of the most used gallery scripts on the web.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/1.png" alt="" /></div>
<h3>2. <a href="http://www.zenphoto.org/">Zenphoto</a></h3>
<p>Zenphoto bills itself as the &#8220;simplest, most useful gallery software for your site&#8221;. The script is built in PHP.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/2.png" alt="" /></div>
<h3>3. <a href="http://minishowcase.net/">Minishowcase</a></h3>
<p>Minishowcase is an simple and tiny php/javascript photo gallery.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/3.png" alt="" /></div>
<h3>4. <a href="http://slideshow.triptracker.net/">TripTracker</a></h3>
<p>TripTracker is a small JavaScript image viewer and animated slideshow player.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/4.png" alt="" /></div>
<h3>5. <a href="http://www.dynamicdrive.com/style/csslibrary/item/css-image-gallery/">Dynamic Drive CSS Image Gallery</a></h3>
<p>Instead of using JavaScript, the Dynamic Drive CSS Image Gallery is completely powered by CSS.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/5.png" alt="" /></div>
<h3>6. <a href="http://www.agilegallery.com/ajax-photo-gallery.html">Ajax Photo Gallery</a></h3>
<p>A free Ajax-powered photo gallery that pulls photos from <a href="http://picasa.google.com/">Picasa</a> from XML.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/6.png" alt="" /></div>
<h3>7. <a href="http://www.airtightinteractive.com/simpleviewer/">SimpleViewer</a></h3>
<p>A free flash-based image gallery script that also comes with an optional Pro version that offers more options and customizations.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/7.png" alt="" /></div>
<h3>8. <a href="http://jalbum.net/">Jalbum</a></h3>
<p>Jalbum is a hybrid online/offline software that you download to your computer that uploads the image galleries to your space at jalbum.net.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/8.png" alt="" /></div>
<h3>9. <a href="http://coppermine-gallery.net/">Coppermine</a></h3>
<p>Like Gallery 2, Coppermine is another &#8220;old school&#8221; PHP photo album script that has been around for many years.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/9.png" alt="" /></div>
<h3>10. <a href="http://www.plogger.org/">Plogger</a></h3>
<p>Plogger is a PHP gallery script that has useful features like inline ajax photo editing, zip upload files, and the ability to build your own themes.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/10.png" alt="" /></div>
<h3>11. <a href="http://www.cssplay.co.uk/menu/lightbox.html#flower8">CSS Play</a></h3>
<p>A slick, multi-page gallery built entirely of CSS.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/11.png" alt="" /></div>
<h3>12. <a href="http://www.no3dfx.com/polaroid/">Polaroid Gallery</a></h3>
<p>Polariod Gallery is an interesting flash script that arranges your photos (from XML file or Flickr RSS feed) into a gallery of &#8220;polaroids&#8221;.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/12.png" alt="" /></div>
<h3>13. <a href="http://www.dezinerfolio.com/dfgallery-2/free-flash-gallery">dfGallery</a></h3>
<p>dfGallery is a beautiful free flash gallery script, with customizable themes and an administration section built with the PHP framework CodeIgniter.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/13.png" alt="" /></div>
<h3>14. <a href="http://e2interactive.com/e2_photo_gallery/">(E)2 Photo Gallery</a></h3>
<p>An excellent JavaScript photo gallery built with MooTools.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/14.png" alt="" /></div>
<h3>15. <a href="http://www.airtightinteractive.com/projects/autoviewer/">AutoViewer</a></h3>
<p>AutoViewer arranges images in a Flash gallery in a specified sequence with images and captions.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/15.png" alt="" /></div>
<h3>16. <a href="http://smoothgallery.jondesign.net/">Smooth Gallery</a></h3>
<p>Yet another JavaScript image gallery built upon the tiny framework MooTools.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/16.png" alt="" /></div>
<h3>17. <a href="http://design.tedforbes.com/">Satellite</a></h3>
<p>A photo gallery script that allows users to build customizable galleries from their Flickr accounts.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/17.png" alt="" /></div>
<h3>18. <a href="http://sonspring.com/journal/hoverbox-image-gallery">Hoverbox</a></h3>
<p>Hoverbox is a simple, lightweight CSS-only image gallery.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/18.png" alt="" /></div>
<h3>19. <a href="http://www.flashgallery.org/">Flash Gallery</a></h3>
<p>Like the name suggests, Flash Gallery is a simple XML and Flash powered gallery that is easy to customize.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/19.png" alt="" /></div>
<h3>20. <a href="http://highslide.com/">HighSlide JS</a></h3>
<p>While not technically a gallery script, HighSlide allows you to easily zoom in and out on pictures, using a simple JavaScript effect.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/20.png" alt="" /></div>
<h3>21. <a href="http://www.pixelpost.org/">Pixelpost</a></h3>
<p>Pixelpost is a twist on an image gallery script that adds photo blogging into the mix. Open source, fast, and multi-lingual.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/21.png" alt="" /></div>
<h3>22. <a href="http://scriptandstyle.com/automatically-generate-a-photo-gallery-from-a-directory-of-images">Script and Style Auto-Generated Photo Gallery</a></h3>
<p>A nifty script that takes a directory of images and creates an image gallery. Built with PHP and JavaScript.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/22.png" alt="" /></div>
<h3>23. <a href="http://www.airtightinteractive.com/projects/postcardviewer/">Postcard Viewer</a></h3>
<p>A flash script that takes images, places them into &#8220;postcards&#8221; and rearranges them in a gallery.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/23.png" alt="" /></div>
<h3>24. <a href="http://www.andrewberg.com/photobrowser/afpb_flash.html">Andrew Berg&#8217;s Flash Photo Browser</a></h3>
<p>A simple flash-animated photo browsing script. Simple but fun.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/24.png" alt="" /></div>
<h3>25. <a href="http://tantannoodles.com/toolkit/photo-album/">Flickr Photo Album for WordPress</a></h3>
<p>Tan Tan Noodles has a plugin for WordPress that pulls your Flickr photosets and creates albums in WordPress.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/25.png" alt="" /></div>
<h3>26. <a href="http://devkick.com/lab/galleria/">Galleria</a></h3>
<p>Galleria is a lightweight image gallery script based on jQuery.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/26.png" alt="" /></div>
<h3>27. <a href="http://www.nickstakenburg.com/projects/lightview/">Lightview</a></h3>
<p>A clean, lightweight solution for building simple image and media galleries in overlays.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/27.png" alt="" /></div>
<h3>28. <a href="http://www.cabel.name/2008/02/fancyzoom-10.html">Fancy Zoom</a></h3>
<p>Fancy Zoom is a bit of JavaScript that allows you to zoom in on photos without requiring a second download of the image.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/28.png" alt="" /></div>
<h3>29. <a href="http://www.imagevuex.com/">Imagevue</a></h3>
<p>A nice flash image gallery that has photo albums, slideshows, and an admin area.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/29.png" alt="" /></div>
<h3>30. <a href="http://benjaminsterling.com/jquery-jqgalscroll-photo-gallery/">jpGalScroll Photo Gallery</a></h3>
<p>A simple gallery snippet built upon jQuery that offers scrolling and pagination.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/30.png" alt="" /></div>
<h3>31. <a href="http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/">nextgen gallery</a></h3>
<p>nextgen gallery is a robust image gallery plugin for WordPress users, built upon jQuery.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/31.png" alt="" /></div>
<h3>32. <a href="http://www.sgal.org/">Singapore</a></h3>
<p>Dubbed as the &#8220;smallest big gallery&#8221;, Singapore is a lightweight, powerful image gallery script built on PHP.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/32.png" alt="" /></div>
<h3>33. <a href="http://www.malsup.com/jquery/cycle/">jQuery Cycle</a></h3>
<p>A plugin for jQuery that let&#8217;s you &#8220;cycle&#8221; through galleries of images in different ways.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/33.png" alt="" /></div>
<h3>34. <a href="http://imagin.ro/">Imagin</a></h3>
<p>A flash photo gallery that can organize pictures into galleries and sub-galleries.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/34.png" alt="" /></div>
<h3>35. <a href="http://p.horm.org/er/">Phormer</a></h3>
<p>PHP-based photo gallery that doesn&#8217;t require a MySQL database and installs in under 3 minutes.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/35.png" alt="" /></div>
<h3>36. <a href="http://nubyonrails.com/pages/gullery">Gullery</a></h3>
<p>Gullery is a simple image gallery built with Ruby on Rails. Perfect for a personal portfolio or small image gallery.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/36.png" alt="" /></div>
<h3>37. <a href="http://www.sitepoint.com/article/photo-gallery-cakephp-flickr/">How to Build a Photo Gallery with CakePHP and Flickr</a></h3>
<p>An interesting tutorial on how to build a web-based image gallery with the PHP framework CakePHP and Flickr.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/37.png" alt="" /></div>
<h3>38. <a href="http://thefilebrowser.com/">filebrowser</a></h3>
<p>A small PHP application that allows you to thumbnail images for use on the web. Built by <a href="http://lussumo.com/">Lussumo</a>.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/38.png" alt="" /></div>
<h3>39. <a href="http://www.randombyte.net/blog/projects/falbum/">FAlbum</a></h3>
<p>A WordPress-powered image gallery that displays photos and photosets from Flickr.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/39.png" alt="" /></div>
<h3>40. <a href="http://www.digitalia.be/software/slimbox2">Slimbox 2</a></h3>
<p>A tiny, standards-compliant, fully customizable lightbox image viewer built upon jQuery.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/40.png" alt="" /></div>
<h3>41. <a href="http://www.leigeber.com/2008/12/javascript-slideshow/">Animated JavaScript Slideshow</a></h3>
<p>A slideshow gallery feature script built upon Javascript, in under 5kb.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/41.png" alt="" /></div>
<h3>42. <a href="http://zwily.com/iphoto/">iPhotoToGallery</a></h3>
<p>An iPhoto plugin that makes publishing photos to a Gallery 2 installation much easier.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/42.png" alt="" /></div>
<h3>43. <a href="http://www.puidokas.com/portfolio/frogjs/">FrogJS Gallery</a></h3>
<p>A simple, unobtrusive gallery script built upon Lightbox, but showcases galleries in a different manner.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/43.png" alt="" /></div>
<h3>44. <a href="http://nettuts.com/javascript-ajax/create-a-spectacular-photo-gallery-with-mootools/">Create a Spectacular Photo Gallery with MooTools</a></h3>
<p>Nettuts+&#8217; very own Jared Rhizor has an excellent tutorial on how to build a simple image gallery with MooTools.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/44.png" alt="" /></div>
<h3>45. <a href="http://skam.webfactional.com/blog/2007/08/08/django-based-photo-gallery-tutorial/">Django-based photo gallery tutorial</a></h3>
<p>Simple tutorial on how to build a photo gallery with the Python framework Django.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/45.png" alt="" /></div>
<h3>46. <a href="http://www.flash-gallery.com/zen-flash-gallery/demo/">Zen Gallery</a></h3>
<p>Elegant flash gallery scripts and tools for putting photos on your site.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/46.png" alt="" /></div>
<h3>47. <a href="http://folderblog.org/">folderblog</a></h3>
<p>A free, lightweight PHP script that displays images from a folder into a gallery.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/47.png" alt="" /></div>
<h3>48. <a href="http://blog.perfectspace.com/2006/03/28/duh-gallery-the-simple-wordpress-photo-gallery-plugin/">Duh Gallery</a></h3>
<p>Yet another simple WordPress gallery plugin.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/48.png" alt="" /></div>
<h3>49. <a href="http://jimmac.musichall.cz/original.php">Original Photo Gallery</a></h3>
<p>A set of scripts that provide a client side script to scale images and publish the images in gallery form.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/49.png" alt="" /></div>
<h3>50. <a href="http://flashexplained.com/actionscript/making-the-ultimate-dynamic-image-gallery-in-flash-8/">Making the ultimate dynamic image gallery in Flash 8</a></h3>
<p>A guide for intermediate Flash users to build a dynamic image gallery, loaded by XML.</p>
<div class="tutorial_image"><img src="http://nettuts.s3.amazonaws.com/269_50imagegalleries/50.png" alt="" /></div>
<div class="tutorial_image"></div>
<div class="tutorial_image">Source <a href="http://net.tutsplus.com/articles/web-roundups/50-excellent-image-galleries-you-can-use-today/" target="_blank">Nettutes</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nvmindmedia.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nvmindmedia.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nvmindmedia.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nvmindmedia.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nvmindmedia.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nvmindmedia.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nvmindmedia.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nvmindmedia.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nvmindmedia.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nvmindmedia.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nvmindmedia.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nvmindmedia.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nvmindmedia.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nvmindmedia.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=8&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nvmindmedia.wordpress.com/2009/04/08/50-excellent-image-galleries-you-can-use-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5fca6c6715ab8a9be9cc6de97a647a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nvmindmedia</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/1.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/2.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/3.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/4.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/5.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/6.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/7.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/8.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/9.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/10.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/11.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/12.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/13.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/14.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/15.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/16.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/17.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/18.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/19.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/20.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/21.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/22.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/23.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/24.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/25.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/26.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/27.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/28.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/29.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/30.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/31.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/32.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/33.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/34.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/35.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/36.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/37.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/38.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/39.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/40.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/41.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/42.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/43.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/44.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/45.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/46.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/47.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/48.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/49.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/269_50imagegalleries/50.png" medium="image" />
	</item>
		<item>
		<title>Learn How to Style Articles for Print and Email</title>
		<link>http://nvmindmedia.wordpress.com/2009/04/07/learn-how-to-style-articles-for-print-and-email/</link>
		<comments>http://nvmindmedia.wordpress.com/2009/04/07/learn-how-to-style-articles-for-print-and-email/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 23:56:06 +0000</pubDate>
		<dc:creator>nashio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nvmindmedia.wordpress.com/?p=6</guid>
		<description><![CDATA[When designing websites, a commonly desired feature is the ability to dynamically print or email any section of a webpage. Unfortunately, this idea is usually scrapped later in the project due to a lack of time or knowledge. Formatting the text for printing is more difficult than it might initially seem. Today, we will use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=6&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="text">
<p>When designing websites, a commonly desired feature is the ability to dynamically print or email any section of a webpage. Unfortunately, this idea is usually scrapped later in the project due to a lack of time or knowledge. Formatting the text for printing is more difficult than it might initially seem. Today, we will use JavaScript to automatically search for certain page elements and format them correctly for a printing.</p>
<h2>Objectives:</h2>
<p>At the end of this tutorial, we will have accomplished the following:</p>
<ul>
<li>Use jQuery to print or email any section of a page automatically when a certain element is clicked.</li>
<li>Format and change the style to optimize for print or email.</li>
<li>Add variables to the email version (To, From, Message, etc.)</li>
</ul>
<h2>The Page</h2>
<p><img class="alignnone" src="http://nettuts.s3.amazonaws.com/255_printEmail/images/1.png" alt="" width="592" height="670" /></p>
<h2>What&#8217;s Wrong With This?</h2>
<p>Wow&#8230;that page is colorful. I agree &#8211; it&#8217;s not the greatest color scheme in the world. This design was definitely not designed for print. Although the background blue will not print out on most printers, the printer will just make it disappear. This will mess up the rest of the design though because now the bright orange and green text will print on a white background. There is no easy way for a user to print out a nice black and white formatted article from this page, short of copying it into a word processor and formatting it themselves.</p>
<h2>Keep The Design, Fix The Problem</h2>
<p>One solution might be to provide a print stylesheet, as Tuts+ has done. This would work if there was only one article on a page. Unfortunately, this example is in blog format. This means that there are several articles on a page; and chances are the user only wants to print out one article. We are going to use jQuery to allow the user to click a link after each article that formats the article and allows them to print or email it.</p>
<p><img class="alignnone" src="http://nettuts.s3.amazonaws.com/255_printEmail/images/2.png" alt="" width="592" height="439" /></p>
<h2>HTML for This Page</h2>
<p>The HTML is rather simple for this page. We&#8217;ll add a couple of standard classes: One to signify a section to be printed/emailed (.printSection), one to signify the area that contains the links to print or email (.printControls), a class for all print links (.printControl), and a class for all email links (.emailControl). Notice how we also linked to Google&#8217;s minified file. This allows us to use jQuery later.</p>
<ol class="dp-xml">
<li class="alt"><span><span>&lt;!DOCTYPE html PUBLIC &#8221;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8221;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;</span><span class="tag-name">head</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">meta</span><span> </span><span class="attribute">http-equiv</span><span>=</span><span class="attribute-value">&#8220;Content-Type&#8221;</span><span> </span><span class="attribute">content</span><span>=</span><span class="attribute-value">&#8220;text/html; charset=utf-8&#8243;</span><span> </span><span class="tag">/&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;</span><span class="tag-name">title</span><span class="tag">&gt;</span><span>Print | Email jQuery Plugin</span><span class="tag">&lt;/</span><span class="tag-name">title</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">script</span><span> </span><span class="attribute">type</span><span>=</span><span class="attribute-value">&#8220;text/javascript&#8221;</span><span> </span><span class="attribute">src</span><span>=</span><span class="attribute-value">&#8220;http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js&#8221;</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;/</span><span class="tag-name">script</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span><span class="tag">&lt;/</span><span class="tag-name">head</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> </span></li>
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">body</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;</span><span class="tag-name">div</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;page-wrap&#8221;</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">div</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printSection&#8221;</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">a</span><span> </span><span class="attribute">name</span><span>=</span><span class="attribute-value">&#8220;1&#8243;</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">a</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">h2</span><span class="tag">&gt;</span><span>This is a Heading</span><span class="tag">&lt;/</span><span class="tag-name">h2</span><span class="tag">&gt;</span><span class="tag">&lt;</span><span class="tag-name">br</span><span> </span><span class="tag">/&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">img</span><span> </span><span class="attribute">src</span><span>=</span><span class="attribute-value">&#8220;image.jpg&#8221;</span><span> </span><span class="tag">/&gt;</span><span> </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">p</span><span class="tag">&gt;</span><span>Article Text</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">span</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printControls&#8221;</span><span class="tag">&gt;</span><span class="tag">&lt;</span><span class="tag-name">p</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printControl&#8221;</span><span class="tag">&gt;</span><span>Print Section</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span> | </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">p</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;emailControl&#8221;</span><span class="tag">&gt;</span><span>Email Section</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">span</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;/</span><span class="tag-name">div</span><span class="tag">&gt;</span><span class="comments">&lt;!&#8211; End printSection &#8211;&gt;</span><span> </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">div</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printSection&#8221;</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">a</span><span> </span><span class="attribute">name</span><span>=</span><span class="attribute-value">&#8220;2&#8243;</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">a</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">h2</span><span class="tag">&gt;</span><span>This is a Different Heading</span><span class="tag">&lt;/</span><span class="tag-name">h2</span><span class="tag">&gt;</span><span class="tag">&lt;</span><span class="tag-name">p</span><span class="tag">&gt;</span><span>Article Text</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">p</span><span class="tag">&gt;</span><span>More Article Text</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">span</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printControls&#8221;</span><span class="tag">&gt;</span><span class="tag">&lt;</span><span class="tag-name">p</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printControl&#8221;</span><span class="tag">&gt;</span><span>Print Section</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span> | </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">p</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;emailControl&#8221;</span><span class="tag">&gt;</span><span>Email Section</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">span</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;/</span><span class="tag-name">div</span><span class="tag">&gt;</span><span class="comments">&lt;!&#8211; End printSection &#8211;&gt;</span><span> </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">div</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printSection&#8221;</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">a</span><span> </span><span class="attribute">name</span><span>=</span><span class="attribute-value">&#8220;3&#8243;</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">a</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">h2</span><span class="tag">&gt;</span><span>This is Another Heading</span><span class="tag">&lt;/</span><span class="tag-name">h2</span><span class="tag">&gt;</span><span class="tag">&lt;</span><span class="tag-name">p</span><span class="tag">&gt;</span><span>Article Text</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">p</span><span class="tag">&gt;</span><span>More Article Text</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">span</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printControls&#8221;</span><span class="tag">&gt;</span><span class="tag">&lt;</span><span class="tag-name">p</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printControl&#8221;</span><span class="tag">&gt;</span><span>Print Section</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span> | </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">p</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;emailControl&#8221;</span><span class="tag">&gt;</span><span>Email Section</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">span</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;/</span><span class="tag-name">div</span><span class="tag">&gt;</span><span class="comments">&lt;!&#8211; End printSection &#8211;&gt;</span><span> </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">div</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printSection&#8221;</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">a</span><span> </span><span class="attribute">name</span><span>=</span><span class="attribute-value">&#8220;4&#8243;</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">a</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span> <span class="tag">&lt;</span><span class="tag-name">h2</span><span class="tag">&gt;</span><span>This is a Heading Again</span><span class="tag">&lt;/</span><span class="tag-name">h2</span><span class="tag">&gt;</span><span class="tag">&lt;</span><span class="tag-name">p</span><span class="tag">&gt;</span><span>Article Text</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">p</span><span class="tag">&gt;</span><span>More Article Text</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span> </span></li>
<li><span> <span class="tag">&lt;</span><span class="tag-name">span</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printControls&#8221;</span><span class="tag">&gt;</span><span class="tag">&lt;</span><span class="tag-name">p</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;printControl&#8221;</span><span class="tag">&gt;</span><span>Print Section</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span> | </span></span></li>
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">p</span><span> </span><span class="attribute">class</span><span>=</span><span class="attribute-value">&#8220;emailControl&#8221;</span><span class="tag">&gt;</span><span>Email Section</span><span class="tag">&lt;/</span><span class="tag-name">p</span><span class="tag">&gt;</span><span class="tag">&lt;/</span><span class="tag-name">span</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span> <span class="tag">&lt;/</span><span class="tag-name">div</span><span class="tag">&gt;</span><span class="comments">&lt;!&#8211; End printSection &#8211;&gt;</span><span> </span></span></li>
<li class="alt"><span><span class="tag">&lt;/</span><span class="tag-name">div</span><span class="tag">&gt;</span><span class="comments">&lt;!&#8211; End Page Wrap &#8211;&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;/</span><span class="tag-name">body</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span><span class="tag">&lt;/</span><span class="tag-name">html</span><span class="tag">&gt;</span><span><br />
</span></span></li>
</ol>
<h2>The CSS</h2>
<p>The CSS is pretty simple too.</p>
<ol class="dp-css">
<li class="alt"><span><span>body{ </span></span></li>
<li><span><span class="keyword">text-align</span><span>: </span><span class="string">center</span><span>; </span></span></li>
<li class="alt"><span><span class="keyword">font-family</span><span>: </span><span class="string">Tahoma</span><span>, </span><span class="string">Arial</span><span>, </span><span class="string">Helvetica</span><span>, Sans </span><span class="string">Serif</span><span>; </span></span></li>
<li><span>} </span></li>
<li class="alt"><span>h2{ </span></li>
<li><span><span class="keyword">color</span><span>: </span><span class="colors">#d98841</span><span>; </span></span></li>
<li class="alt"><span><span class="keyword">font-size</span><span>: </span><span class="string">48px</span><span>; </span></span></li>
<li><span><span class="keyword">padding</span><span>: </span><span class="string">0px</span><span>; </span></span></li>
<li class="alt"><span><span class="keyword">margin</span><span>: </span><span class="string">0px</span><span>; </span></span></li>
<li><span><span class="keyword">font-weight</span><span>: </span><span class="string">normal</span><span>; </span></span></li>
<li class="alt"><span>} </span></li>
<li><span> </span></li>
<li class="alt"><span>.<span class="keyword">page</span><span>-wrap{ </span></span></li>
<li><span><span class="keyword">margin-left</span><span>: </span><span class="string">auto</span><span>; </span></span></li>
<li class="alt"><span><span class="keyword">margin-right</span><span>: </span><span class="string">auto</span><span>; </span></span></li>
<li><span><span class="keyword">width</span><span>: </span><span class="string">550px</span><span>; </span></span></li>
<li class="alt"><span><span class="keyword">background</span><span>: </span><span class="colors">#10222b</span><span>; </span></span></li>
<li><span><span class="keyword">padding</span><span>: </span><span class="string">15px</span><span>; </span></span></li>
<li class="alt"><span><span class="keyword">text-align</span><span>: </span><span class="string">left</span><span>; </span></span></li>
<li><span>} </span></li>
<li class="alt"><span>.printSection p{ </span></li>
<li><span><span class="keyword">color</span><span>: </span><span class="colors">#bdd684</span><span>; </span></span></li>
<li class="alt"><span><span class="keyword">font-size</span><span>: </span><span class="string">12px</span><span>; </span></span></li>
<li><span><span class="keyword">text-align</span><span>: </span><span class="string">justify</span><span>; </span></span></li>
<li class="alt"><span>} </span></li>
<li><span>p.printControl, p.emailControl, .printControls{ </span></li>
<li class="alt"><span><span class="keyword">display</span><span>: </span><span class="string">inline</span><span>; </span></span></li>
<li><span><span class="keyword">color</span><span>: </span><span class="colors">#f2ece4</span><span>; </span></span></li>
<li class="alt"><span>} </span></li>
<li><span>p.printControl, p.emailControl{ </span></li>
<li class="alt"><span><span class="keyword">cursor</span><span>: </span><span class="string">pointer</span><span>; </span></span></li>
<li><span>} </span></li>
<li class="alt"><span>img{ </span></li>
<li><span><span class="keyword">margin-left</span><span>: </span><span class="string">35px</span><span>; </span></span></li>
<li class="alt"><span>}<br />
</span></li>
</ol>
<p>We&#8217;ll also add a bit of CSS to increase usability. In case Javascript is disabled, we don&#8217;t want dead links &#8211; so we hide the links:</p>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">noscript</span><span class="tag">&gt;</span><span> </span></span></li>
<li><span><span class="tag">&lt;</span><span class="tag-name">style</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span>.printControls{ </span></li>
<li><span>display: none; </span></li>
<li class="alt"><span>} </span></li>
<li><span><span class="tag">&lt;/</span><span class="tag-name">style</span><span class="tag">&gt;</span><span> </span></span></li>
<li class="alt"><span><span class="tag">&lt;/</span><span class="tag-name">noscript</span><span class="tag">&gt;</span><span><br />
</span></span></li>
</ol>
<h2>Script Time</h2>
<h4>What do we want to accomplish when printing?</h4>
<ul>
<li>add a listener to wait for a .printControl or .emailControl to be clicked.</li>
<li>change the appearance of the section to be printer friendly</li>
<li>grab the parts of the page that we want to print</li>
<li>open up a window and size it.</li>
<li>put the parts of the page that we grabbed into the window</li>
<li>open up the print dialogue box</li>
<li>close the window after done printing</li>
</ul>
<h4>How we are going to accomplish these things?</h4>
<h4>Add the Listener:</h4>
<p>We put the print listener inside the DOM reading function:</p>
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.printControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> <span class="comment">//Here we will put the printing code</span><span> </span></span></li>
<li><span> }); </span></li>
<li class="alt"><span>});<br />
</span></li>
</ol>
<h4>Change the Appearance</h4>
<p>We need to change the colors from the colorful scheme, to black and white. There are several ways we can accomplish this task. The method we&#8217;ll use is to add a class temporarily to the affected section, take the code to print, and then immediately remove the class again. We add the class by using jQuery&#8217;s CSS selector to select the divs, and then add a class to all elements inside with the children() command.</p></div>
<div class="text"></div>
<div class="text">
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.printControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().addClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().removeClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li class="alt"><span> }); </span></li>
<li><span>}); </span></li>
</ol>
</div>
<div class="text">We also must add some more styling for the elements with printversion:</div>
<div class="text">
<ol class="dp-css">
<li class="alt"><span><span>h2.printversion, p.printversion{ </span></span></li>
<li><span><span class="keyword">color</span><span>: </span><span class="colors">#333333</span><span>; </span></span></li>
<li class="alt"><span><span class="keyword">text-align</span><span>: </span><span class="string">left</span><span>; </span></span></li>
<li><span>} </span></li>
<li class="alt"><span>.printControls.printversion{ </span></li>
<li><span><span class="keyword">display</span><span>: </span><span class="string">none</span><span>; </span></span></li>
<li class="alt"><span>}<br />
</span></li>
</ol>
<h4>Grabbing the Section</h4>
<p>We are now going to grab the section and put it in a variable. We are going to put this after we add the class but before we remove it, so that the version in the variable is with the added class. We grab the HTML in the head to get the styling info and concatenate it with the section&#8217;s HTML. The &#8220;this&#8221; allows us to only select the section that was clicked instead of all of them. Then we go up to levels from the print button and grab that.</p>
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.printControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().addClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> printContent= $(</span><span class="string">&#8216;head&#8217;</span><span>).html() + $(</span><span class="keyword">this</span><span>).parent().parent().html(); </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().removeClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> }); </span></li>
<li class="alt"><span>});<br />
</span></li>
</ol>
<h4>Opening the Window</h4>
<p>We now need to put the variable somewhere. But first, we need to open up a new window. These lines aren&#8217;t very important and are just plain JavaScript &#8211; no jQuery in this step. Basically, we open up a window, assign a unique name, and give it some basic parameters.</p>
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.printControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().addClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> printContent= $(</span><span class="string">&#8216;head&#8217;</span><span>).html() + $(</span><span class="keyword">this</span><span>).parent().parent().html(); </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().removeClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> windowUrl = </span><span class="string">&#8216;about:blank&#8217;</span><span>; </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> uniqueName = </span><span class="keyword">new</span><span> Date(); </span></span></li>
<li><span> <span class="keyword">var</span><span> windowName = </span><span class="string">&#8216;PrintSection&#8217;</span><span> + uniqueName.getTime(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> printWindow = window.open(windowUrl, windowName, </span><span class="string">&#8216;left=500,top=000,width=600,height=1000&#8242;</span><span>); </span></span></li>
<li><span> }); </span></li>
<li class="alt"><span>});<br />
</span></li>
</ol>
</div>
<div class="text">
<h4>Fill the Window</h4>
<p>We now need to fill the window with what we grabbed earlier. We basically just write to the window the variable&#8217;s value.</p>
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.printControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().addClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> printContent= $(</span><span class="string">&#8216;head&#8217;</span><span>).html() + $(</span><span class="keyword">this</span><span>).parent().parent().html(); </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().removeClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> windowUrl = </span><span class="string">&#8216;about:blank&#8217;</span><span>; </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> uniqueName = </span><span class="keyword">new</span><span> Date(); </span></span></li>
<li><span> <span class="keyword">var</span><span> windowName = </span><span class="string">&#8216;PrintSection&#8217;</span><span> + uniqueName.getTime(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> printWindow = window.open(windowUrl, windowName, </span><span class="string">&#8216;left=500,top=000,width=600,height=1000&#8242;</span><span>); </span></span></li>
<li><span> printWindow.document.write(printContent); </span></li>
<li class="alt"><span> }); </span></li>
<li><span>});<br />
</span></li>
</ol>
<h4>Print and Close</h4>
<p>We need to add a few more lines before we&#8217;re finished. First, we need to focus the window and then open up the print dialogue box. Then we close the window after the dialogue box has been closed.</p>
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.printControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().addClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> printContent= $(</span><span class="string">&#8216;head&#8217;</span><span>).html() + $(</span><span class="keyword">this</span><span>).parent().parent().html(); </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().removeClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> windowUrl = </span><span class="string">&#8216;about:blank&#8217;</span><span>; </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> uniqueName = </span><span class="keyword">new</span><span> Date(); </span></span></li>
<li><span> <span class="keyword">var</span><span> windowName = </span><span class="string">&#8216;PrintSection&#8217;</span><span> + uniqueName.getTime(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> printWindow = window.open(windowUrl, windowName, </span><span class="string">&#8216;left=500,top=000,width=600,height=1000&#8242;</span><span>); </span></span></li>
<li><span> printWindow.document.write(printContent); </span></li>
<li class="alt"><span> printWindow.document.close(); </span></li>
<li><span> printWindow.focus(); </span></li>
<li class="alt"><span> printWindow.print(); </span></li>
<li><span> printWindow.close(); </span></li>
<li class="alt"><span> }); </span></li>
<li><span>});<br />
</span></li>
</ol>
<p>That&#8217;s it. We should now have a functional print button after every article. Good job, but we&#8217;re not finished yet. Now we got to make the email button function correctly.</p>
<p><img class="alignnone" src="http://nettuts.s3.amazonaws.com/255_printEmail/images/3.png" alt="" width="597" height="538" /></p>
<h4>What must we accomplish when emailing?</h4>
<ul>
<li>add a listener to wait for a .printControl or .emailControl to be clicked.</li>
<li>We need the email address they&#8217;re sending it to.</li>
<li>We need their name.</li>
<li>We need their email.</li>
<li>We need a short message to be sent with.</li>
<li>put all of this info into variables through the use of prompts.</li>
<li>change the appearance of the section to be email friendly</li>
<li>We need the URL of the page, including an anchor tag to skip right to the article.</li>
<li>put all of this information into one variable.</li>
<li>put this into a new window.</li>
</ul>
<h4>Things we&#8217;ve already done when printing</h4>
<p>There&#8217;s no need to go over all of these steps again. We can skip the ones that we covered with printing:</p>
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.emailControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().addClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().removeClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> windowUrl = </span><span class="string">&#8216;about:blank&#8217;</span><span>; </span></span></li>
<li><span> <span class="keyword">var</span><span> uniqueName = </span><span class="keyword">new</span><span> Date(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> windowName = </span><span class="string">&#8216;emailSection&#8217;</span><span> + uniqueName.getTime(); </span></span></li>
<li><span> <span class="keyword">var</span><span> emailWindow = window.open(windowUrl, windowName, </span><span class="string">&#8216;left=500,top=000,width=600&#8242;</span><span>); </span></span></li>
<li class="alt"><span> emailWindow.document.write(printContent); </span></li>
<li><span> emailWindow.document.close(); </span></li>
<li class="alt"><span> emailWindow.focus(); </span></li>
<li><span> }); </span></li>
<li class="alt"><span>});<br />
</span></li>
</ol>
<h4>Getting the Information</h4>
<p>For this example, we don&#8217;t need anything fancy for retrieving the required information. We&#8217;re just going to raise several prompts that store the information in variables.</p>
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.emailControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> sendTo = prompt(</span><span class="string">&#8216;Please type who you would like to send this to&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> fromWho = prompt(</span><span class="string">&#8216;And What is Your Name?&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> fromWhoEmail = prompt(</span><span class="string">&#8216;And What is Your Email?&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> fromMessage = prompt(</span><span class="string">&#8216;Do You have a Message?&#8217;</span><span>); </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().addClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().removeClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> windowUrl = </span><span class="string">&#8216;about:blank&#8217;</span><span>; </span></span></li>
<li><span> <span class="keyword">var</span><span> uniqueName = </span><span class="keyword">new</span><span> Date(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> windowName = </span><span class="string">&#8216;emailSection&#8217;</span><span> + uniqueName.getTime(); </span></span></li>
<li><span> <span class="keyword">var</span><span> emailWindow = window.open(windowUrl, windowName, </span><span class="string">&#8216;left=500,top=000,width=600&#8242;</span><span>); </span></span></li>
<li class="alt"><span> emailWindow.document.write(printContent); </span></li>
<li><span> emailWindow.document.close(); </span></li>
<li class="alt"><span> emailWindow.focus(); </span></li>
<li><span> }); </span></li>
<li class="alt"><span>});<br />
</span></li>
</ol>
<p><img class="alignnone" src="http://nettuts.s3.amazonaws.com/255_printEmail/images/8.png" alt="" width="585" height="726" /></div>
<div class="text"></div>
<div class="text">
<h4>Getting the URL and Anchor Tag</h4>
<p>Now, we need to store the current URL and article number (via the anchor tag) in variables. We will combine them later.</p>
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.emailControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> sendTo = prompt(</span><span class="string">&#8216;Please type who you would like to send this to&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> fromWho = prompt(</span><span class="string">&#8216;And What is Your Name?&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> fromWhoEmail = prompt(</span><span class="string">&#8216;And What is Your Email?&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> fromMessage = prompt(</span><span class="string">&#8216;Do You have a Message?&#8217;</span><span>); </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().addClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> emailID=$(</span><span class="keyword">this</span><span>).parent().parent().find(</span><span class="string">&#8216;a&#8217;</span><span>).attr(</span><span class="string">&#8216;name&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> currentURL= window.location.href; </span></span></li>
<li><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().removeClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> windowUrl = </span><span class="string">&#8216;about:blank&#8217;</span><span>; </span></span></li>
<li><span> <span class="keyword">var</span><span> uniqueName = </span><span class="keyword">new</span><span> Date(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> windowName = </span><span class="string">&#8216;emailSection&#8217;</span><span> + uniqueName.getTime(); </span></span></li>
<li><span> <span class="keyword">var</span><span> emailWindow = window.open(windowUrl, windowName, </span><span class="string">&#8216;left=500,top=000,width=600&#8242;</span><span>); </span></span></li>
<li class="alt"><span> emailWindow.document.write(printContent); </span></li>
<li><span> emailWindow.document.close(); </span></li>
<li class="alt"><span> emailWindow.focus(); </span></li>
<li><span> }); </span></li>
<li class="alt"><span>});</span></li>
</ol>
<h4>Putting Everything Together</h4>
<p>First we combine the URL together with the anchor tag and put it in a nice string of text. Then we combine that with everything else we need in a variable called emailContent.</p>
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.emailControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> sendTo = prompt(</span><span class="string">&#8216;Please type who you would like to send this to&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> fromWho = prompt(</span><span class="string">&#8216;And What is Your Name?&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> fromWhoEmail = prompt(</span><span class="string">&#8216;And What is Your Email?&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> fromMessage = prompt(</span><span class="string">&#8216;Do You have a Message?&#8217;</span><span>); </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().addClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> emailID=$(</span><span class="keyword">this</span><span>).parent().parent().find(</span><span class="string">&#8216;a&#8217;</span><span>).attr(</span><span class="string">&#8216;name&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> currentURL= window.location.href; </span></span></li>
<li><span> <span class="keyword">var</span><span> emailLink=</span><span class="string">&#8216;&lt;p&gt;&lt;b&gt;Source:&lt;/b&gt; &lt;a href=&#8221;&#8216;</span><span> + currentURL + </span><span class="string">&#8216;#&#8217;</span><span> + emailID + </span><span class="string">&#8216;&#8221;&gt;&#8217;</span><span> + currentURL + </span><span class="string">&#8216;#&#8217;</span><span> + emailID +</span><span class="string">&#8216;&lt;/a&gt;&lt;/p&gt;&#8217;</span><span>; </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> emailContent= $(</span><span class="string">&#8216;head&#8217;</span><span>).html() + </span><span class="string">&#8216;&lt;div style=&#8221;text-align:left;&#8221;&gt;&lt;p&gt;&lt;b&gt;To:&lt;/b&gt;&#8217;</span><span> + sendTo + </span><span class="string">&#8216;&lt;/p&gt;&#8217;</span><span> + </span><span class="string">&#8216;&lt;p&gt;&lt;b&gt;From(Name):&lt;/b&gt;&#8217;</span><span> + fromWho + </span><span class="string">&#8216;&lt;/p&gt;&#8217;</span><span> + </span><span class="string">&#8216;&lt;p&gt;&lt;b&gt;From(Email):&lt;/b&gt;&#8217;</span><span> + fromWhoEmail + </span><span class="string">&#8216;&lt;/p&gt;&#8217;</span><span> + </span><span class="string">&#8216;&lt;p&gt;&lt;b&gt;Message:&lt;/b&gt;&#8217;</span><span> + fromMessage + </span><span class="string">&#8216;&lt;/p&gt;&#8217;</span><span> + emailLink + </span><span class="string">&#8216;&lt;/div&gt;&#8217;</span><span> + $(</span><span class="keyword">this</span><span>).parent().parent().html(); </span></span></li>
<li><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().removeClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> windowUrl = </span><span class="string">&#8216;about:blank&#8217;</span><span>; </span></span></li>
<li><span> <span class="keyword">var</span><span> uniqueName = </span><span class="keyword">new</span><span> Date(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> windowName = </span><span class="string">&#8216;emailSection&#8217;</span><span> + uniqueName.getTime(); </span></span></li>
<li><span> <span class="keyword">var</span><span> emailWindow = window.open(windowUrl, windowName, </span><span class="string">&#8216;left=500,top=000,width=600&#8242;</span><span>); </span></span></li>
<li class="alt"><span> emailWindow.document.write(printContent); </span></li>
<li><span> emailWindow.document.close(); </span></li>
<li class="alt"><span> emailWindow.focus(); </span></li>
<li><span> }); </span></li>
<li class="alt"><span>});<br />
</span></li>
</ol>
<h2>Finished Code</h2>
<ol class="dp-c">
<li class="alt"><span><span>$(document).ready(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li><span> $(<span class="string">&#8216;.printControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().addClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> printContent= $(</span><span class="string">&#8216;head&#8217;</span><span>).html() + $(</span><span class="keyword">this</span><span>).parent().parent().html(); </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().removeClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> windowUrl = </span><span class="string">&#8216;about:blank&#8217;</span><span>; </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> uniqueName = </span><span class="keyword">new</span><span> Date(); </span></span></li>
<li><span> <span class="keyword">var</span><span> windowName = </span><span class="string">&#8216;PrintSection&#8217;</span><span> + uniqueName.getTime(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> printWindow = window.open(windowUrl, windowName, </span><span class="string">&#8216;left=500,top=000,width=600,height=1000&#8242;</span><span>); </span></span></li>
<li><span> printWindow.document.write(printContent); </span></li>
<li class="alt"><span> printWindow.document.close(); </span></li>
<li><span> printWindow.focus(); </span></li>
<li class="alt"><span> printWindow.print(); </span></li>
<li><span> printWindow.close(); </span></li>
<li class="alt"><span> }); </span></li>
<li><span> $(<span class="string">&#8216;.emailControl&#8217;</span><span>).click(</span><span class="keyword">function</span><span>(){ </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> sendTo = prompt(</span><span class="string">&#8216;Please type who you would like to send this to&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> fromWho = prompt(</span><span class="string">&#8216;And What is Your Name?&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> fromWhoEmail = prompt(</span><span class="string">&#8216;And What is Your Email?&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> fromMessage = prompt(</span><span class="string">&#8216;Do You have a Message?&#8217;</span><span>); </span></span></li>
<li class="alt"><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().addClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li><span> <span class="keyword">var</span><span> emailID=$(</span><span class="keyword">this</span><span>).parent().parent().find(</span><span class="string">&#8216;a&#8217;</span><span>).attr(</span><span class="string">&#8216;name&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> currentURL= window.location.href; </span></span></li>
<li><span> <span class="keyword">var</span><span> emailLink=</span><span class="string">&#8216;&lt;p&gt;&lt;b&gt;Source:&lt;/b&gt; &lt;a href=&#8221;&#8216;</span><span> + currentURL + </span><span class="string">&#8216;#&#8217;</span><span> + emailID + </span><span class="string">&#8216;&#8221;&gt;&#8217;</span><span> + currentURL + </span><span class="string">&#8216;#&#8217;</span><span> + emailID +</span><span class="string">&#8216;&lt;/a&gt;&lt;/p&gt;&#8217;</span><span>; </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> emailContent= $(</span><span class="string">&#8216;head&#8217;</span><span>).html() + </span><span class="string">&#8216;&lt;div style=&#8221;text-align:left;&#8221;&gt;&lt;p&gt;&lt;b&gt;To:&lt;/b&gt;&#8217;</span><span> + sendTo + </span><span class="string">&#8216;&lt;/p&gt;&#8217;</span><span> + </span><span class="string">&#8216;&lt;p&gt;&lt;b&gt;From(Name):&lt;/b&gt;&#8217;</span><span> + fromWho + </span><span class="string">&#8216;&lt;/p&gt;&#8217;</span><span> + </span><span class="string">&#8216;&lt;p&gt;&lt;b&gt;From(Email):&lt;/b&gt;&#8217;</span><span> + fromWhoEmail + </span><span class="string">&#8216;&lt;/p&gt;&#8217;</span><span> + </span><span class="string">&#8216;&lt;p&gt;&lt;b&gt;Message:&lt;/b&gt;&#8217;</span><span> + fromMessage + </span><span class="string">&#8216;&lt;/p&gt;&#8217;</span><span> + emailLink + </span><span class="string">&#8216;&lt;/div&gt;&#8217;</span><span> + $(</span><span class="keyword">this</span><span>).parent().parent().html(); </span></span></li>
<li><span> $(<span class="string">&#8216;.printSection&#8217;</span><span>).children().removeClass(</span><span class="string">&#8216;printversion&#8217;</span><span>); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> windowUrl = </span><span class="string">&#8216;about:blank&#8217;</span><span>; </span></span></li>
<li><span> <span class="keyword">var</span><span> uniqueName = </span><span class="keyword">new</span><span> Date(); </span></span></li>
<li class="alt"><span> <span class="keyword">var</span><span> windowName = </span><span class="string">&#8216;emailSection&#8217;</span><span> + uniqueName.getTime(); </span></span></li>
<li><span> <span class="keyword">var</span><span> emailWindow = window.open(windowUrl, windowName, </span><span class="string">&#8216;left=500,top=000,width=600&#8242;</span><span>); </span></span></li>
<li class="alt"><span> emailWindow.document.write(emailContent); </span></li>
<li><span> emailWindow.document.close(); </span></li>
<li class="alt"><span> emailWindow.focus(); </span></li>
<li><span> }); </span></li>
<li class="alt"><span>});<br />
</span></li>
</ol>
<h2>We&#8217;re Done</h2>
<p>We now have an automatic way to print and email sections of a web site that degrades when JavaScript is disabled. Good job! If you enjoyed this tutorial, stay tuned; in a future tutorial, we&#8217;ll cover how to turn this into a jQuery plugin. Meanwhile, if you have any questions or comments, be sure to leave them below. I&#8217;d love to hear from you!</p>
<p>Source <a href="http://net.tutsplus.com/tutorials/javascript-ajax/learn-how-to-style-articles-for-print-and-email/" target="_blank">Nettuts</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nvmindmedia.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nvmindmedia.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nvmindmedia.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nvmindmedia.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nvmindmedia.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nvmindmedia.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nvmindmedia.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nvmindmedia.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nvmindmedia.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nvmindmedia.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nvmindmedia.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nvmindmedia.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nvmindmedia.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nvmindmedia.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=6&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nvmindmedia.wordpress.com/2009/04/07/learn-how-to-style-articles-for-print-and-email/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5fca6c6715ab8a9be9cc6de97a647a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nvmindmedia</media:title>
		</media:content>

		<media:content url="http://nettuts.s3.amazonaws.com/255_printEmail/images/1.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/255_printEmail/images/2.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/255_printEmail/images/3.png" medium="image" />

		<media:content url="http://nettuts.s3.amazonaws.com/255_printEmail/images/8.png" medium="image" />
	</item>
		<item>
		<title>9 Extremely Useful and Free PHP Libraries</title>
		<link>http://nvmindmedia.wordpress.com/2009/04/07/9-extremely-useful-and-free-php-libraries/</link>
		<comments>http://nvmindmedia.wordpress.com/2009/04/07/9-extremely-useful-and-free-php-libraries/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 23:08:55 +0000</pubDate>
		<dc:creator>nashio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nvmindmedia.wordpress.com/?p=3</guid>
		<description><![CDATA[A lot of functionality is shared among applications &#8211; like sending emails or preventing spam. In the spirit of reusing the wheel instead of reinventing it, here are nine free web libraries that you can use in your next program which will dramatically increase your efficiency. 1. ReCAPTCHA The reCAPTCHA library allows you to integrate [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=3&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="text">
<p>A lot of functionality is shared among applications &#8211; like sending emails or preventing spam. In the spirit of reusing the wheel instead of reinventing it, here are nine free web libraries that you can use in your next program which will dramatically increase your efficiency.</p>
<h3>1. ReCAPTCHA</h3>
<p><a href="http://recaptcha.net/plugins/php/">The reCAPTCHA library</a> allows you to integrate an advanced CAPTCHA system on your website, which helps keep spam bots from posting on your website. The visual CAPTCHA also includes a helpful audio feature.</p>
<p>In addition to the reCAPTCHA service, the library also includes an API for the &#8220;Mailhide&#8221; service which hides emails from spammers.</p>
<p>The API is free and easy to implement on your site and also gives back to the community as it translates scanned books.</p>
<p><a href="http://code.google.com/p/recaptcha/downloads/list?q=label:phplib-Latest">Download ReCAPTCHA</a> | <a href="http://recaptcha.net/api/getkey?app=php">Get an API Key</a> | <a href="http://recaptcha.net/plugins/php/">Documentation</a></p>
<h3>2. Akismet</h3>
<p>Akismet is a free service that can be used on most small sites &#8211; or used on larger sites for a small fee. The library works by comparing comments to a database of existing spam comments provided by other users. The library can then decide to flag the comment for moderation or allow it through. Everyday the library grows and the service improves.</p>
<p><a href="http://net.tutsplus.com/tutorials/tools-and-tips/the-best-ways-to-fight-spam/">Implement Akismet</a></p>
<h3>3. Services_JSON</h3>
<p>JSON is a handy format for transmitting human readable data. Not everyone has made the move to PHP5 which has included JSON support since version 5.2.0. This small library enables you to implement JSON functionality into your own applications if you are not using a recent version of PHP.</p>
<p><a href="http://pear.php.net/package/Services_JSON">View Services_JSON</a></p>
<h3>4. Smarty</h3>
<p><a href="http://smarty.net/">Smarty</a> is a template engine which was formally a sub-project of the PHP project. Smarty provides many powerful features such as loops, variables, and a great caching system. The library has many years under its belt and is nearing its version three release.</p>
<p><a href="http://smarty.net/download.php">Download Smarty</a> | <a href="http://smarty.net/docs.php">View Documentation</a></p>
<h3>5. pChart</h3>
<p>In addition to displaying text data in your application, it can also be useful to show data in a more visual format. This can be done with a slew of options like pie charts and bar graphs. <a href="http://pchart.sourceforge.net/index.php">pChart</a> is a script that allows you to create charts and graphs from SQL queries or manually provided details. The script is baked by GD to create the images. There is also a main focus on the aesthetics; so it creates some beautiful work.</p>
<p><a href="http://pchart.sourceforge.net/download.php">Download pChart</a> | <a href="http://pchart.sourceforge.net/documentation.php">View Documentation</a> | <a href="http://pchart.sourceforge.net/demo.php">View Demos</a></p>
<h3>6. SimplePie</h3>
<p>SimplePie allows you to easily pull in syndicated content (like RSS feeds). It&#8217;s also been integrated with a lot of different platforms and language sets; it should be able to deal almost any feed in a variety of ways.</p>
<p><a href="http://simplepie.org/downloads/">Download SimplePie</a> | <a href="http://simplepie.org/wiki/">View Documentation</a> | <a href="http://net.tutsplus.com/videos/screencasts/extending-simplepie-to-parse-unique-rss-feeds/">Extending SimplePie to Parse Unique RSS Feeds</a></p>
<h3>7. XML-RPC PHP Library</h3>
<p>Applications sometimes use functionality to &#8220;ping&#8221; other sites when an action has occurred (known as trackbacks). This is done by using a protocol called XML-RPC. The <a href="http://phpxmlrpc.sourceforge.net/">XML-RPC PHP</a> library also allows you to integrate the functionality into your website.</p>
<p><a href="http://phpxmlrpc.sourceforge.net/#download">Download XML-RPC PHP</a> | <a href="http://phpxmlrpc.sourceforge.net/#interest">View Documentation</a></p>
<h3>8. Amazon S3</h3>
<p>Amazon provides a nice service to work in the cloud, called &#8220;S3&#8243;. Nettuts+ even uses it to store the images seen in each article. There is a nice <a href="http://undesigned.org.za/2007/10/22/amazon-s3-php-class">Amazon S3 library</a> that doesn&#8217;t require any third party tools and allows for large file uploads.</p>
<p><a href="http://amazon-s3-php-class.googlecode.com/files/s3-php5-curl_0.3.9.tar.gz">Download Amazon S3 PHP Class</a></p>
<h3>9. PHPMailer</h3>
<p>Most applications send out an email in some form, but usually rely on the basic php mail() function. PHPMailer is an existing powerful class that allows you to send different types of emails &#8211; from basic text to rich formatted emails. These emails can also include attachments or custom headers.</p>
<p><a href="http://phpmailer.codeworxtech.com/index.php?pg=sf&amp;p=dl">Download PHPMailer</a> | <a href="http://phpmailer.codeworxtech.com/index.php?pg=tutorial">View Documentation</a></p>
<p>Source <a href="http://net.tutsplus.com/articles/web-roundups/9-extremely-useful-and-free-php-libraries/" target="_blank">Nettuts</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nvmindmedia.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nvmindmedia.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nvmindmedia.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nvmindmedia.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nvmindmedia.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nvmindmedia.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nvmindmedia.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nvmindmedia.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nvmindmedia.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nvmindmedia.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nvmindmedia.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nvmindmedia.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nvmindmedia.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nvmindmedia.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nvmindmedia.wordpress.com&amp;blog=7272743&amp;post=3&amp;subd=nvmindmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nvmindmedia.wordpress.com/2009/04/07/9-extremely-useful-and-free-php-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a5fca6c6715ab8a9be9cc6de97a647a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nvmindmedia</media:title>
		</media:content>
	</item>
	</channel>
</rss>
