<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atomfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="0.3" xml:lang="en">
	<title>FocusedTutorials.com</title>
	<link rel="alternate" type="text/html" href="http://www.focusedtutorials.com" />
	<tagline />
	<modified>2007-06-08T12:56:45Z</modified>
	<copyright>Copyright 2007</copyright>
	<generator url="http://wordpress.org/" version="2.0">WordPress</generator>
			<link rel="start" type="application/atom+xml" href="http://feeds.feedburner.com/focusedtutorials" /><feedburner:info uri="focusedtutorials" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><entry>
	  	<author>
			<name>James Mitchell</name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[Where the hell are the new tutorials?]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/focusedtutorials/~3/IRopzcWXuEc/" />
		<id>http://www.focusedtutorials.com/2007/06/07/where-the-hell-are-the-new-tutorials/</id>
		<modified>2007-06-07T15:27:30Z</modified>
		<issued>2007-06-07T15:27:30Z</issued>
		
	<dc:subject>Misc</dc:subject> 
		<summary type="text/plain" mode="escaped"><![CDATA[In case you have not noticed - there have not been any new tutorials since April 9th.  What has been going on?  So if you&#8217;ve been asking yourself that very question then read on.  And if you are one of the few who hasn&#8217;t been asking that question you might want to [...]]]></summary>
		<content type="text/html" mode="escaped" xml:base="http://www.focusedtutorials.com/misc/where-the-hell-are-the-new-tutorials/"><![CDATA[<p><img class="postthumb" src="http://www.focusedtutorials.com/wp-content/uploads/2007/06/hell-sign.gif" alt="" height="110" width="110" />In case you have not noticed - there have not been any new tutorials since <strong>April 9th</strong>.  <em>What has been going on?</em>  So if you&#8217;ve been asking yourself that very question then read on.  And if you are one of the few who hasn&#8217;t been asking that question you might want to read on to see whats coming for Focused Tutorials.<a id="more-91"></a></p>
<h3>New Look</h3>
<p><img class="imgright" src="http://www.focusedtutorials.com/wp-content/uploads/2007/06/ft-new-look.jpg" alt=""/>The first thing we have up our sleeves is a new look.  We&#8217;ve been hard at work designing a new look for the site.  It is a design that focuses more on the content/tutorial then on other flashy elements.</p>
<h3>New Focus</h3>
<p>I am probably the most excited about this up coming change.  The site is still going to be focused tutorials, but those tutorials will be focused on something more specific.  All tutorials will be focused on Web Standards.  We&#8217;ll show you how to set up XHTML Strict document templates, CSS resets, the proper way to use various elements, and of course we&#8217;ll give you tips/tricks/techniques on implementation.  And that&#8217;s not all!  We&#8217;ll likely cover many, many more things.</p>
<h3>New Contributors</h3>
<p>We are going to have new tutorial contributors, some have made current list and some will be added when the new site is launched.  Each contributor will have their own bio and photo (if I can convince them to submit one) so we can all learn a bit about them.</p>
<h3>Improved Frequency</h3>
<p>Another very important update will be the frequency in which tutorials are posted.  It is my goal to have several tutorials released every week.  With the addition of some quality contributors this is a very achievable goal.  I&#8217;ll do some arm twisting, threatening, and maybe even bribing if I have to.  It is our feeling that the more standards-based tutorials &amp; techniques available the better off Designers and Developers will be.</p>
<h3>Added Advertising Opportunities</h3>
<p>Now before you freak out and think this site is going to have ads all over the place - hear me out.  These ads will not be obtrusive.  There will be ads at the bottom of the site in the footer, text-link ads and small banner ads.  This means there will be some advertising opportunities for designers and developers to advertise themselves.  If you are interested in any of these spots send an email to ads(at)focusedtutorials(dot)com.</p>
<p>Hopefully, this gives you a taste of what is to come as well as a reason for why things seem to be at a stand still here.  We have been diligently working as fast as we can, amid client work, to make all of the above reality.  Thank you for your paitence and check back often and until then <strong>&#8230;Stay Focused</strong>!
</p>
]]></content>
	<feedburner:origLink>http://www.focusedtutorials.com/misc/where-the-hell-are-the-new-tutorials/</feedburner:origLink></entry>
		<entry>
	  	<author>
			<name>Ben Cardy</name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[Just a Touch of Color - Method 3]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/focusedtutorials/~3/hUJclbf_r7E/" />
		<id>http://www.focusedtutorials.com/2007/04/09/just-a-touch-of-color-method-3/</id>
		<modified>2007-04-09T22:43:39Z</modified>
		<issued>2007-04-09T22:43:39Z</issued>
		
	<dc:subject>Photoshop</dc:subject> 
		<summary type="text/plain" mode="escaped"><![CDATA[This is another method to produce the same effect as these two earlier tutorials. This is my preferred method as it leaves the image untouched, you don&#8217;t have to duplicate the image layer, and you can very easily edit which part of the image is &#8216;highlighted&#8217; later on, if you change your mind.
Let&#8217;s get started.
Step [...]]]></summary>
		<content type="text/html" mode="escaped" xml:base="http://www.focusedtutorials.com/photoshop/just-a-touch-of-color-method-3/"><![CDATA[<p><img class="postthumb" src="http://www.focusedtutorials.com/wp-content/uploads/2007/04/tut-thumb.jpg" alt="tut-thumb.jpg" height="110" width="110" />This is another method to produce the same effect as these two <a href="http://www.focusedtutorials.com/2007/02/17/just-a-touch-of-color-method-2/">earlier</a> <a href="http://www.focusedtutorials.com/2006/12/21/just-a-touch-of-color-method-one/">tutorials</a>. This is my preferred method as it leaves the image untouched, you don&#8217;t have to duplicate the image layer, and you can very easily edit which part of the image is &#8216;highlighted&#8217; later on, if you change your mind.</p>
<p>Let&#8217;s get started.</p>
<p><a id="more-83"></a><strong>Step 1:</strong></p>
<p>Open the image you wish to isolate an area of. Then, in the layer palette, click the &#8220;Create new fill or adjustment layer&#8221; button (shown in the image), and click &#8220;Hue/Saturation&#8230;&#8221;. Alternatively, click Layer &gt; New Adjustment Layer &gt; Hue/Saturation&#8230; on the menus:<br />
<img src="http://www.focusedtutorials.com/wp-content/uploads/2007/04/tut-1.thumbnail.jpg" alt="Method 3 - Step One" height="88" width="128" /></p>
<p><strong>Step 2:</strong></p>
<p>Drag the Saturation slider down to the bottom, -100. The whole image should appear desaturated. Click OK.<br />
<img src="http://www.focusedtutorials.com/wp-content/uploads/2007/04/tut-2.thumbnail.jpg" alt="Method 3 - Step 2" height="82" width="128" /><br />
A new layer should appear above the image layer, called &#8220;Hue/Saturation 1&#8243;. You will notice that this layer has two icons. The first: <img src="http://www.focusedtutorials.com/wp-content/uploads/2007/04/tut-2a.jpg" alt="tut-2a.jpg" height="34" width="34" /> means it&#8217;s an adjustment layer. You can double click this to bring up the Hue/Saturation dialog box once again to edit the settings of the layer. The second: <img src="http://www.focusedtutorials.com/wp-content/uploads/2007/04/tut-2b.jpg" alt="tut-2b.jpg" height="31" width="38" /> is the layer mask. Anything white on this mask lets the adjustment layer do it&#8217;s work on the layers below. Anything black on this mask stops the adjustment layer from working.</p>
<p><strong>Step 3:</strong></p>
<p>So here&#8217;s how we do the actual highlighting. Notice, the whole image is desaturated, and the whole of the layer mask is white. Click on the layer mask on the Hue/Saturation layer (<img src="http://www.focusedtutorials.com/wp-content/uploads/2007/04/tut-2b.jpg" alt="tut-2b.jpg" height="31" width="38" /> this image) and select a black brush. Zoom in nice and tight to the area you wish to bring back to colour, and start painting with black! Make sure that the layer mask is selected, otherwise it will not work. Anything you paint black you should see that the colour comes through once again:<br />
<img src="http://www.focusedtutorials.com/wp-content/uploads/2007/04/tut-3.thumbnail.jpg" alt="Method 3 - Step 3" height="82" width="128" /></p>
<p>If you make a mistake - don&#8217;t worry! Just paint anything you wish to become desaturated again with white, instead of black, and it will return to the way it was. And that is it. Just delete the Hue/Saturation layer anytime you want your original image back!</p>
<p><img src="http://www.focusedtutorials.com/wp-content/uploads/2007/04/tut-4.thumbnail.jpg" alt="tut-4.jpg" height="92" width="128" /></p>
<p>If you decide that you wish everything to be a different colour, rather than black and white, you can of course just double click that Adjustment icon (<img src="http://www.focusedtutorials.com/wp-content/uploads/2007/04/tut-2a.jpg" alt="tut-2a.jpg" height="34" width="34" />), slide the Saturation back to 0 and change Hue, for example:</p>
<p><img src="http://www.focusedtutorials.com/wp-content/uploads/2007/04/tut-5.thumbnail.jpg" alt="tut-5.jpg" height="96" width="125" /></p>
<p>Have fun <img src='http://www.focusedtutorials.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
]]></content>
	<feedburner:origLink>http://www.focusedtutorials.com/photoshop/just-a-touch-of-color-method-3/</feedburner:origLink></entry>
		<entry>
	  	<author>
			<name>James Mitchell</name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[Just a Touch of Color - Method 2]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/focusedtutorials/~3/VcxqxlssZks/" />
		<id>http://www.focusedtutorials.com/2007/02/17/just-a-touch-of-color-method-2/</id>
		<modified>2007-02-18T03:18:30Z</modified>
		<issued>2007-02-18T03:18:30Z</issued>
		
	<dc:subject>Photoshop</dc:subject> 
		<summary type="text/plain" mode="escaped"><![CDATA[As promised in an earlier tutorial, here is the second method for highlighting or silouetting a little color from a full color photograph.  This is a better method in my opinion for two reasons.  First it leaves the original photo untouched (which is a prefered method by professionals).  Secondly, it can allow [...]]]></summary>
		<content type="text/html" mode="escaped" xml:base="http://www.focusedtutorials.com/photoshop/just-a-touch-of-color-method-2/"><![CDATA[<p><img class="postthumb" id="image80" src="http://www.focusedtutorials.com/wp-content/uploads/2007/02/thumbnail.jpg" alt="thumbnail" height="110" width="109" />As promised in an <a href="http://www.focusedtutorials.com/2006/12/21/just-a-touch-of-color-method-one/">earlier tutorial</a>, here is the second method for highlighting or silouetting a little color from a full color photograph.  This is a better method in my opinion for two reasons.  First it leaves the original photo untouched (which is a prefered method by professionals).  Secondly, it can allow you to further manipulate the photo later.  </p>
<p>Let&#8217;s get started.<br />
<a id="more-70"></a></p>
<h3>Step 1:</h3>
<p>Duplicate the layer.  You can do this by hitting cmd+J (ctrl+J on the PC) or go to Layer > Duplicate Layer.<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2007/02/step1.jpg"><img id="image81" src="http://www.focusedtutorials.com/wp-content/uploads/2007/02/step1.thumbnail.jpg" alt="step 1" height="96" width="53" /></a></p>
<h3>Step 2:</h3>
<p>With the new layer selected zoom into the area or areas you&#8217;d like to eventually have the color.  Hit Q on your keyboard to enter quick mask mode.  Now grab your paint brush and start painting in the area you want.  You should get a pinkish looking color in this area, don&#8217;t worry this isn&#8217;t ruining your photo.  Once you have the area completely painted in, its time to go back to standard editing mode.  To do this just hit the Q on your keyboard again.  You should now have a selection around the area you just painted in.  If you see parts of it are not quite in the selection just go back into quick mask mode and paint those areas in.  </p>
<p>Outlining:<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2007/02/step2.jpg"><img id="image73" src="http://www.focusedtutorials.com/wp-content/uploads/2007/02/step2.thumbnail.jpg" alt="step 2" height="80" width="128" /></a></p>
<p>Filling in my outline:<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2007/02/step2b.jpg"><img id="image74" src="http://www.focusedtutorials.com/wp-content/uploads/2007/02/step2b.thumbnail.jpg" alt="step 2b" height="80" width="128" /></a></p>
<p>After done and back in standard editing mode:<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2007/02/step2c.jpg"><img id="image76" src="http://www.focusedtutorials.com/wp-content/uploads/2007/02/step2c.thumbnail.jpg" alt="step 2c" height="80" width="128" /></a></p>
<h3>Step 3:</h3>
<p>Now just invert your selection by pressing cmd+shift+I (ctrl+shift+I on the PC) or Select > Inverse.</p>
<p><a href="http://www.focusedtutorials.com/wp-content/uploads/2007/02/step3.jpg"><img id="image77" src="http://www.focusedtutorials.com/wp-content/uploads/2007/02/step3.thumbnail.jpg" alt="step 3" height="96" width="70" /></a></p>
<h3>Step 4:</h3>
<p>It&#8217;s time for the magic now, just desaturate the current selection by pressing cmd+shift+U (ctrl+shift+U on the PC) or Image > Adjustments > Desaturate.  See our final photograph, with the before and after below.</p>
<p>Before:<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2007/02/before.jpg"><img id="image78" src="http://www.focusedtutorials.com/wp-content/uploads/2007/02/before.thumbnail.jpg" alt="before" height="96" width="70" /></a></p>
<p>After:<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2007/02/after.jpg"><img id="image79" src="http://www.focusedtutorials.com/wp-content/uploads/2007/02/after.thumbnail.jpg" alt="after" height="96" width="70" /></a></p>
<p>That&#8217;s it.  At any time you can always just delete this new layer and you still have your original photo untouched.  Hopefully you&#8217;ll find a method that works for you and feel free to share it with everyone.  Until next time, stay focused!
</p>
]]></content>
	<feedburner:origLink>http://www.focusedtutorials.com/photoshop/just-a-touch-of-color-method-2/</feedburner:origLink></entry>
		<entry>
	  	<author>
			<name>Ben Cardy</name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[Basic PHP Login Part 1]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/focusedtutorials/~3/2vx9K25p7GM/" />
		<id>http://www.focusedtutorials.com/2007/02/01/basic-php-login-part-1/</id>
		<modified>2007-02-02T02:12:00Z</modified>
		<issued>2007-02-02T02:12:00Z</issued>
		
	<dc:subject>PHP</dc:subject>
	<dc:subject>mySQL</dc:subject> 
		<summary type="text/plain" mode="escaped"><![CDATA[Every site nowadays seems to have some kind of admin section, some kind of login system. There&#8217;s always more features and benefits for those registered with a site than for mere guests. So how do you go about creating one of these systems? A secure, adaptable system that&#8217;s simple to use is easier than you [...]]]></summary>
		<content type="text/html" mode="escaped" xml:base="http://www.focusedtutorials.com/php/basic-php-login-part-1/"><![CDATA[<p>Every site nowadays seems to have some kind of admin section, some kind of login system. There&#8217;s always more features and benefits for those registered with a site than for mere guests. So how do you go about creating one of these systems? A secure, adaptable system that&#8217;s simple to use is easier than you may have thought&#8230;<br />
<a id="more-69"></a><br />
To create a basic PHP login system, you will need PHP installed on your server, as well as a MySQL database. This article will assume that you already know how to connect to the database.</p>
<p>Firstly you&#8217;ll need to create the users table you will be using. Below is the statement I usually use to create the most basic table.<br />
<code>create table users (<br />
&nbsp;&nbsp;user_id int not null primary key auto_increment,<br />
&nbsp;&nbsp;user_name varchar(30) not null,<br />
&nbsp;&nbsp;user_pass varchar(100) not null<br />
)</code></p>
<p>Once we have the basic table set up, we can go on to the actual PHP and XHTML. This is the code for the form used to login:<br />
<code>&lt;form method=&quot;post&quot; action=&quot;login.php&quot;&gt;<br />
&nbsp;&nbsp;Username:&lt;br /&gt;<br />
&nbsp;&nbsp;&lt;br /&gt;<br />
&nbsp;&nbsp;Password:&lt;br /&gt;<br />
&nbsp;&nbsp;&lt;br /&gt;<br />
&nbsp;&nbsp;<br />
&lt;/form&gt;</code><br />
This code basically creates a simple form which posts data to login.php, two input fields, one for the username and one for the password.</p>
<p>The following code is used on login.php which logs the user in:<br />
<code>session_start();<br />
$connection_string = mysql_connect(&quot;localhost&quot;,&quot;username&quot;,&quot;password&quot;);<br />
mysql_select_db(&quot;database_name&quot;);<br />
if (isset($_POST[&#039;username&#039;])) {<br />
&nbsp;&nbsp;$result = mysql_query(&quot;SELECT user_id, user_name, user_pass FROM users WHERE user_name = &#039;&quot;.$_POST[&#039;username&#039;].&quot;&#039; AND user_pass = &#039;&quot;.sha1($_POST[&#039;password&#039;]).&quot;&#039;&quot;, $connection_string);<br />
&nbsp;&nbsp;if (mysql_num_rows($result)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;$user_info = mysql_fetch_array($result);<br />
&nbsp;&nbsp;&nbsp;&nbsp;$_SESSION[&#039;user&#039;] = $user_info[&#039;user_id&#039;];<br />
&nbsp;&nbsp;&nbsp;&nbsp;$_SESSION[&#039;user_pass&#039;] = sha1($_POST[&#039;password&#039;]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;$_SESSION[&#039;ipaddress&#039;] = $_SERVER[&#039;REMOTE_ADDR&#039;];<br />
&nbsp;&nbsp;&nbsp;&nbsp;$error = 0;<br />
&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;$error = 1;<br />
&nbsp;&nbsp;}<br />
} else {<br />
&nbsp;&nbsp;$error = 2;<br />
}</code></p>
<p>There are two things this code assumes. The first is that you have set up the database table correctly as above, and the second is that the page is passed two variables from a form by the POST method, called username and password. These are obvious names for the fields of a login form. Lets step through the code line by line.</p>
<p><strong>Line 1:</strong> This line initiates a session, enabling us to use the $_SESSION variables later on in the script.<br />
<strong>Line 2:</strong> This line is the connection to the database, stored in the variable $connection_string. The values in the mysql_connect function must be changed to match your database.<br />
<strong>Line 3:</strong> The database must be selected from within MySQL. This line must be changed to the name of the database you have stored your users table in.<br />
<strong>Line 4:</strong> Checks if there has actually been any data posted to the page from a form.<br />
<strong>Line 5:</strong> This line queries the database for any records in the database where the user_name is what was entered into the form, and the user_pass is the sha1 encryption of what was entered into the form. The returned results are put into the variable $result.<br />
<strong>Line 6:</strong> Checks if there have been any rows returned by the query.<br />
<strong>Line 7:</strong> If there is a match, this means the user has typed in the correct credentials. The data from the database is then stored in the array $user_info<br />
<strong>Line 8:</strong> The session variable $_SESSION[&#8217;user&#8217;] is set to hold the id of the user that just logged in.<br />
<strong>Line 9:</strong> The session variable $_SESSION[&#8217;user_pass&#8217;] is used to store the encrypted form of the user&#8217;s password.<br />
<strong>Line 10:</strong> The session variable $_SESSION[&#8217;ipaddress&#8217;] is used to store the IP of the user logging in.<br />
<strong>Line 11:</strong> The error flag is set to indicate no error.<br />
<strong>Lines 12-14:</strong> If there were no results returned, the error flag is set to 1. This variable can then be used later on when returning an error to the user about their invalid login.<br />
<strong>Lines 15-17:</strong> If there was no post data sent to the page, the error flag is set to 2. Again, this variable can be used later on.</p>
<p>Finally, we need the code to check that the user who is trying to access restricted pages is logged in, and therefore allowed access:<br />
<code>session_start();<br />
$connection_string = mysql_connect(&quot;localhost&quot;,&quot;username&quot;,&quot;password&quot;);<br />
mysql_select_db(&quot;database_name&quot;);<br />
if (!$_SESSION[&#039;user&#039;]) {<br />
&nbsp;&nbsp;// Print error message or redirect elsewhere<br />
}<br />
&nbsp;&nbsp;$result = mysql_query(&quot;SELECT user_id FROM users WHERE user_id = &#039;&quot;.$_SESSION[&#039;user&#039;].&quot;&#039; AND user_pass = &#039;&quot;.$_SESSION[&#039;user_pass&#039;].&quot;&#039;&quot;, $connection_string);<br />
if (mysql_num_rows($result) == 0) {<br />
&nbsp;&nbsp;// Print error message or redirect elsewhere<br />
}<br />
if ($_SESSION[&#039;ipaddress&#039;] != $_SERVER[&#039;REMOTE_ADDR&#039;]) {<br />
&nbsp;&nbsp;// Print error message or redirect elsewhere<br />
} <br />
</code></p>
<p>Again, lets step through the code.</p>
<p><strong>Line 1:</strong> Enable the $_SESSION variables.<br />
<strong>Line 2-3:</strong> Connect to the database.<br />
<strong>Line 4:</strong> If there is no $_SESSION variable set, then the user has not logged in.<br />
<strong>Line 5:</strong> Therefore, you can either print an error message or redirect the user to a page that they are allowed to view.<br />
<strong>Line 7: </strong>Query the database for the user details that are stored in the $_SESSION variables.<br />
<strong>Line 8:</strong> If none are returned, then the user has not logged in correctly, or the $_SESSION variables have corrupted.<br />
<strong>Line 9:</strong> See Line 5.<br />
<strong>Line 11:</strong> If the IP address does not match the one in the $_SESSION variable, something has gone wrong.<br />
<strong>Line 12: </strong>See Line 5.</p>
<p>And there you have it. Code to secure a section of your site! To add users, you can either create a registration form, or insert the data straight into the database.
</p>
]]></content>
	<feedburner:origLink>http://www.focusedtutorials.com/php/basic-php-login-part-1/</feedburner:origLink></entry>
		<entry>
	  	<author>
			<name>James Mitchell</name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[Sync activeCollab milestones with your Google Calendar]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/focusedtutorials/~3/8oedGTua28s/" />
		<id>http://www.focusedtutorials.com/2006/12/29/sync-your-activecollab-with-your-google-calendar/</id>
		<modified>2006-12-29T19:57:06Z</modified>
		<issued>2006-12-29T19:57:06Z</issued>
		
	<dc:subject>Misc</dc:subject> 
		<summary type="text/plain" mode="escaped"><![CDATA[ActiveCollab is a great web based, open source collaboration and project management tool with some stellar features.  One of these features is the ability to export your milestones as an iCal file.  Syncing this automatically to Google has been hard to do, until now!
There are three ways to make it happen.  The [...]]]></summary>
		<content type="text/html" mode="escaped" xml:base="http://www.focusedtutorials.com/misc/sync-your-activecollab-with-your-google-calendar/"><![CDATA[<p><a href="http://www.activecollab.com" title="visit activeCollab's website">ActiveCollab</a> is a great web based, open source collaboration and project management tool with some stellar features.  One of these features is the ability to export your milestones as an iCal file.  Syncing this automatically to Google has been hard to do, until now!</p>
<p>There are three ways to make it happen.  The first will allow you to sync your active milestones (by project) to a <a href="http://www.google.com/calendar">Google Calendar</a>.  The second will allow you to sync all of your milestones (regardless of project) to a Google Calendar.  The third is a core &#8220;hack&#8221; which will   allow you to sync <strong>all</strong> active milestones to a Google Calendar.<br />
<a id="more-61"></a><br />
<div class="horRule"><hr /></div>
<p><strong>Active Project Method</strong> (<em>non-core modifying</em>):</p>
<ol>
<li>Log into activeCollab</li>
<li>Select the project you want to sync.</li>
<li>Click on the Milestones tab.</li>
<li>Right click over the iCalendar link and copy the link/shortcut. (it should contain  ?c=feed&#038;a=<strong>project_ical</strong>&#038;id={id}&#038;token={token}). </li>
<li>Now head to your Google Calendar.</li>
<li>While viewing the Google Calendar, Click on the Manage calendars link on the left hand side below the listing of calendars.</li>
<li>Under the &#8220;Other Calendars&#8221; heading click on the Add calendar button.</li>
<li>Then you&#8217;ll want to click on the fourth tab titled &#8220;Public Calendar Address&#8221;.</li>
<li>Now enter your feed address. (remember you copied it so just paste it here.</li>
<li>Click on the Add button.</li>
</ol>
<p>Congratulations, you now have your calendar synced with all your active milestones for that project.</p>
<div class="horRule"><hr /></div>
<p>Secondly, for those who want all of their active milestones synced.</p>
<p><strong>Active User Method</strong> (<em>non-core modifying</em>):</p>
<ol>
<li>Log into activeCollab</li>
<li>Click on the My tasks tab.</li>
<li>Right click over the iCalendar link and copy the link/shortcut. (it should contain  ?c=feed&#038;a=<strong>user_ical</strong>&#038;id={id}&#038;token={token})</li>
<li>Now head to your Google Calendar.</li>
<li>While viewing the Google Calendar, Click on the Manage calendars link on the left hand side below the listing of calendars.</li>
<li>Under the &#8220;Other Calendars&#8221; heading click on the Add calendar button.</li>
<li>Then you&#8217;ll want to click on the fourth tab titled &#8220;Public Calendar Address&#8221;.</li>
<li>Now enter your feed address. (remember you copied it so just paste it here.</li>
<li>Click on the Add button.</li>
</ol>
<p>Yet again, congratulations you now have a synced calendar to all of your active milestones.</p>
<div class="horRule"><hr /></div>
<p>Now for the more adventurous or for those who want the sync to include all active milestones, here is your method. </p>
<p><strong>All Active &#8220;Core Hack&#8221; Method</strong> (<em>core editing necessary*</em>):</p>
<ol>
<li>Make Backups of the files and the data!</li>
<li>Open up language/en_us/general.php</li>
<li>Add the following line:<br />
            <code>&#039;active milestones&#039; =&gt; &#039;active milestones&#039;,</code>
        </li>
<li>Open up application/controllers/feedcontroller.class.php</li>
<li>Add the following code:<br />
            <code>/**<br />
* Show calendar for active milestones<br />
*<br />
* @param void<br />
* @return null<br />
*/<br />
function active_ical() {<br />
$this-&gt;setLayout(&#039;ical&#039;);<br />
&nbsp;<br />
$user = $this-&gt;loginUserByToken();<br />
if(!($user instanceof User)) {<br />
header(&#039;HTTP/1.0 404 Not Found&#039;);<br />
die();<br />
} // if<br />
&nbsp;<br />
$this-&gt;renderCalendar($user, lang(&#039;active milestones&#039;), ProjectMilestones::getActiveMilestones());<br />
} // active_ical</code>
        </li>
<li>Log into activeCollab</li>
<li>Click on the My tasks tab.</li>
<li>Right click over the iCalendar link and copy the link/shortcut. (it should contain  ?c=feed&#038;a=<strong>user_ical</strong>&#038;id={id}&#038;token={token})</li>
<li>Now head to your Google Calendar.</li>
<li>While viewing the Google Calendar, Click on the Manage calendars link on the left hand side below the listing of calendars.</li>
<li>Under the &#8220;Other Calendars&#8221; heading click on the Add calendar button.</li>
<li>Then you&#8217;ll want to click on the fourth tab titled &#8220;Public Calendar Address&#8221;.</li>
<li>Now enter your feed address. (remember you copied it so just paste it here.</li>
<li>Replace the text user_ical with active_ical in that copied link before you add it to Google.</li>
<li>Click on the Add button.</li>
</ol>
<p>With that method you will now have a calendar that is synced up with ALL active milestones for everyone.</p>
<p><strong>Additional Notes:</strong></p>
<ul>
<li>Quote from within <a href="http://www.activecollab.com" title="visit activeCollab's website">activeCollab</a>: &#8220;if you change your password the link to the calendar data will also change! You&#8217;ll need to resubscribe.&#8221;</li>
<li>Special thanks to TJ Singleton from <a href="http://www.vantagestreet.com" title="visit TJ's site">VantageStreet</a> for the code, hack and technique.</li>
</ul>
<p>*Edit at your own risk.  <a href="http://www.focusedtutorials.com">FocusedTutorials</a> nor this author share in any responsibliliy for losses encountered while using this method.
</p>
]]></content>
	<feedburner:origLink>http://www.focusedtutorials.com/misc/sync-your-activecollab-with-your-google-calendar/</feedburner:origLink></entry>
		<entry>
	  	<author>
			<name>James Mitchell</name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[Just a Touch of Color - Method 1]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/focusedtutorials/~3/vOn9oAlEdMo/" />
		<id>http://www.focusedtutorials.com/2006/12/21/just-a-touch-of-color/</id>
		<modified>2006-12-22T04:14:00Z</modified>
		<issued>2006-12-22T04:14:00Z</issued>
		
	<dc:subject>Photoshop</dc:subject> 
		<summary type="text/plain" mode="escaped"><![CDATA[This is likely one of the most popular Photo effects you&#8217;ll see in the commercial market.  This effect is used on websites, in advertising, and most commonly by wedding photographers.  I am going to walk you through how to turn a full color photograph into a black and white one with a touch [...]]]></summary>
		<content type="text/html" mode="escaped" xml:base="http://www.focusedtutorials.com/photoshop/just-a-touch-of-color-method-one/"><![CDATA[<p><img class="postthumb" id="image57" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/postthumb.jpg" alt="thumbnail" height="111" width="106" />This is likely one of the most popular Photo effects you&#8217;ll see in the commercial market.  This effect is used on websites, in advertising, and most commonly by wedding photographers.  I am going to walk you through how to turn a full color photograph into a black and white one with a touch of color &#8220;spotlighting&#8221; something in the photo.</p>
<p>Feel free to <a href="http://www.focusedtutorials.com/downloads/Mono2Color_Images.zip" title="Mono2Color Images">download</a> the images I am using for this tutorial or grab one of our own.</p>
<p><a id="more-45"></a><br />
<strong>Step 1:</strong></p>
<p>With the file open go to Image > Adjustments > Desaturate.  This will remove all of the color from the image.  Don&#8217;t panic it is supposed to!  (<em>note: do not change the image mode at all, it should remain RGB for this tutorial to work properly</em>)</p>
<p><a href="http://www.focusedtutorials.com/wp-content/uploads/2006/12/desaturate.jpg"><img id="image46" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/desaturate.thumbnail.jpg" alt="Desaturate" height="96" width="121" /></a></p>
<p><strong>Step 2:</strong></p>
<p>Select the History Brush and give it the following settings: Brush Size: 10px, Hardness: 100%.<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2006/12/history_brush.jpg"><img id="image49" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/history_brush.thumbnail.jpg" alt="History Brush" height="96" width="26" /></a></p>
<p><a href="http://www.focusedtutorials.com/wp-content/uploads/2006/12/brush_settings.jpg"><img id="image48" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/brush_settings.thumbnail.jpg" alt="Brush Settings" height="96" width="79" /></a></p>
<p><strong>Step 3:</strong></p>
<p>With the History Brush selected all you need to do is &#8220;paint&#8221; over the areas you want to reveal the color.  </p>
<p>Original Image:<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2006/12/original.jpg"><img id="image50" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/original.thumbnail.jpg" alt="Roses Original" height="96" width="119" /></a></p>
<p>Image In Progress:<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2006/12/inprogress.jpg"><img id="image51" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/inprogress.thumbnail.jpg" alt="Roses In Progress" height="96" width="119" /></a></p>
<p>Final Image:<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2006/12/final.jpg"><img id="image52" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/final.thumbnail.jpg" alt="Roses Final" height="96" width="119" /></a></p>
<p>Here are a few tips to remember when doing this:</p>
<ul>
<li>Take your time!</li>
<li>Zoom as necessary, close for intricate spots</li>
<li>Trace around the outside of the image first (if necessary reduce your brush size for those tight spots)</li>
<li>Take your time!</li>
<li>Make sure to unclick every now and then so that if you make any mistakes you do not have to start all over.</li>
<li>When your outline is complete, increase the brush size so you can &#8220;paint&#8221; the inside faster.</li>
<li>Did I mention to take your time?</li>
</ul>
<p>That is all there is to it!</p>
<p>I did another one for the holiday season just to show the impact it can have on any photo.</p>
<p>Before:<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2006/12/presents_before.jpg"><img id="image58" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/presents_before.thumbnail.jpg" alt="Presents Before" height="96" width="87" /></a></p>
<p>After:<br />
<a href="http://www.focusedtutorials.com/wp-content/uploads/2006/12/presents_after.jpg"><img id="image59" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/presents_after.thumbnail.jpg" alt="Presents After" height="96" width="87" /></a></p>
<p>Have fun and enjoy this technique.</p>
<p>All images used for this tutorial were obtained at <a href="http://www.sxc.hu">www.sxc.hu</a>.</p>
<p><strong>Update:</strong>  This method is a good method, however it does alter the original image (which could be really bad especially if you haven&#8217;t kept a back up copy of it).  In the coming days I will share with you the preferred way to create this effect.  </p>
<p><strong>See also:</strong> <a href="http://www.focusedtutorials.com/2007/02/17/just-a-touch-of-color-method-2/">Just a Touch of Color - Method 2</a>
</p>
]]></content>
	<feedburner:origLink>http://www.focusedtutorials.com/photoshop/just-a-touch-of-color-method-one/</feedburner:origLink></entry>
		<entry>
	  	<author>
			<name>Marc Amos</name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[Preloading Images with CSS]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/focusedtutorials/~3/Wm5dhzHc6N8/" />
		<id>http://www.focusedtutorials.com/2006/12/18/preloading-images-with-css/</id>
		<modified>2006-12-19T04:00:19Z</modified>
		<issued>2006-12-19T04:00:19Z</issued>
		
	<dc:subject>CSS</dc:subject> 
		<summary type="text/plain" mode="escaped"><![CDATA[Although most people know that you can pre-load images using Javascript, I thought I&#8217;d add my own method; Pre-loading images with CSS.
You can do it in 2 easy steps.

Step 1: 
Put something like this in your CSS file:
#preloadedImages {
&#160;&#160;&#160;&#160;&#160;&#160; width: 0;
&#160;&#160;&#160;&#160;&#160;&#160; height: 0;
&#160;&#160;&#160;&#160;&#160;&#160; background-image: url(path/to/image1.png);
&#160;&#160;&#160;&#160;&#160;&#160; background-image: url(path/to/image2.png);
&#160;&#160;&#160;&#160;&#160;&#160; background-image: url(path/to/image3.png);
&#160;&#160;&#160;&#160;&#160;&#160; background-image: url(path/to/image4.png);
}
Make sure you change, of [...]]]></summary>
		<content type="text/html" mode="escaped" xml:base="http://www.focusedtutorials.com/css/preloading-images-with-css/"><![CDATA[<p>Although most people know that you can pre-load images using Javascript, I thought I&#8217;d add my own method; Pre-loading images with CSS.</p>
<p>You can do it in 2 easy steps.</p>
<p><a id="more-44"></a><br />
<strong>Step 1:</strong> </p>
<p>Put something like this in your CSS file:<br />
<code>#preloadedImages {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width: 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; height: 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; background-image: url(path/to/image1.png);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; background-image: url(path/to/image2.png);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; background-image: url(path/to/image3.png);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; background-image: url(path/to/image4.png);<br />
}</code><br />
Make sure you change, of course, the quantity of images and the paths to them. This step makes certain the mentioned images are loaded into your cache as the browser goes through your CSS file.</p>
<p><strong>Step 2:</strong></p>
<p>Then, simply load a <strong>&lt;div&gt;</strong> element with your ID high up in the (x)html page (directly under the opening <strong>&lt;body&gt;</strong> tag is recommended), and viola! For example:</p>
<p><code>&lt;div id=&quot;preloadedImages&quot;&gt;&lt;/div&gt;</code></p>
<p>Note: This &lt;div&gt; doesn&#8217;t need to contain anything, or do anything more than I&#8217;ve already written. To use your pre-loaded images, simply call them into your code as you would normally. The above trick simply gets them loaded into your browser&#8217;s cache long before you call them in your code.</p>
]]></content>
	<feedburner:origLink>http://www.focusedtutorials.com/css/preloading-images-with-css/</feedburner:origLink></entry>
		<entry>
	  	<author>
			<name>James Mitchell</name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[Copy a CD on your Mac OS X]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/focusedtutorials/~3/EluiZwPDNkg/" />
		<id>http://www.focusedtutorials.com/2006/12/14/copy-a-cd-on-your-mac-os-x/</id>
		<modified>2006-12-15T03:29:27Z</modified>
		<issued>2006-12-15T03:29:27Z</issued>
		
	<dc:subject>Mac OS X</dc:subject> 
		<summary type="text/plain" mode="escaped"><![CDATA[As a new Mac user I wanted to copy a CD and I thought it would be easy.  After trying everything I knew (which at this point wasn&#8217;t much) I couldn&#8217;t figure out how to do it.  With all of my Mac friends away from their Instant Messenger or not signed on, I [...]]]></summary>
		<content type="text/html" mode="escaped" xml:base="http://www.focusedtutorials.com/mac-os-x/copy-a-cd-on-your-mac-os-x/"><![CDATA[<p>As a new Mac user I wanted to copy a CD and I thought it would be easy.  After trying everything I knew (which at this point wasn&#8217;t much) I couldn&#8217;t figure out how to do it.  With all of my Mac friends away from their Instant Messenger or not signed on, I started the task of searching on how to do it.  Many sites claim to have a &#8220;how to,&#8221; but they were not much help and were way outdated.  So I found one that was fairly good and explaining how to burn a CD with the OS X operating system.  I decided immediately that I wanted to take some screenshots and post a tutorial on how to do it, so others didn&#8217;t have to search as long as I did.</p>
<p>Let&#8217;s get started!</p>
<p><a id="more-38"></a><br />
<strong>Step 1:</strong></p>
<p>Insert the CD that you want to copy</p>
<p><strong>Step 2:</strong> </p>
<ul>
<li>Open Finder</li>
<li>Open the Applications folder</li>
<li>Open the Utilities folder</li>
<li>Now start the Disk Utility Program</li>
</ul>
<p><img id="image39" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/step2.jpg" alt="Step 2" height="100" width="400" /></p>
<p><strong>Step 3:</strong></p>
<p>Once Disk Utility is running:</p>
<ul>
<li>Click on the File Menu</li>
<li>Choose New</li>
<li>Now click on Disk Image from Folder</li>
</ul>
<p><strong>Step 4:</strong></p>
<p>At this point the Finder window will appear.</p>
<ul>
<li>Select the CD you want to copy.</li>
<li>Then click on the Image button</li>
</ul>
<p><img id="image40" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/step4.jpg" alt="Step 4" height="126" width="272" /></p>
<p><strong>Step 5:</strong></p>
<p>Now a dialog box will appear titled &#8220;New Image From Folder&#8221;. Make your settings like:</p>
<ul>
<li>In the Save As Box, name the CD what you wan&#8217;t</li>
<li>In the Where Box, choose Desktop</li>
<li>In the Image Format Box, choose <strong>DVD/CD Master</strong></li>
<li>Now click Save</li>
</ul>
<p><img id="image41" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/step5.jpg" alt="Step 5" height="262" width="449" /></p>
<p>Now a new file is being created and placed on your Desktop.  It will have the name you gave it from the Save As Box from Step 5 and it will have a &#8220;.cdr&#8221; file extension.  This procedure may take a few minutes to complete, so just sit tight as your Mac finishes creating the file.  This file is a disk image of your CD. (example&#8230; New_CD.cdr)</p>
<p>(<em>Note:  keep the Disk Utility program open, as we will come back to it in Step 7.</em>)</p>
<p><strong>Step 6:</strong></p>
<p>Now that the disk image of your CD is complete, <strong>eject</strong> the CD.</p>
<p><strong>Step 7:</strong></p>
<p>Go back to the Disk Utility program.  You should now see in the listings at the left the disk image of your CD (usually at the bottom of the list).  Click on it <strong>once</strong>.</p>
<p><strong>Step 8:</strong></p>
<p>Now in the upper left corner of the Disk Utility program click on the <strong>Burn</strong> button.<br />
<img id="image42" src="http://www.focusedtutorials.com/wp-content/uploads/2006/12/step8.jpg" alt="Step 8" height="94" width="145" /></p>
<p><strong>Step 9:</strong></p>
<p>The rest is just a matter of following the directions by inserting a blank CD-R when prompted and then just waiting for it to complete.</p>
<p>Congratulations you now have a copy of your CD!</p>
<p><strong>Update:</strong>  My research at this point is that the same procedure will work for a DVD.  Please correct me if I am wrong.</p>
<p><em>Disclaimer:  Keep in mind FocusedTutorials.com in no way condones the pirating or unauthorized duplication of CD&#8217;s or DVD&#8217;s.  Please use this tutorial responsibly.</em>
</p>
]]></content>
	<feedburner:origLink>http://www.focusedtutorials.com/mac-os-x/copy-a-cd-on-your-mac-os-x/</feedburner:origLink></entry>
		<entry>
	  	<author>
			<name>James Mitchell</name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[Proper Page Titles for Usability]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/focusedtutorials/~3/8XLkn3bA7Tc/" />
		<id>http://www.focusedtutorials.com/2006/12/08/proper-page-titles-for-usability/</id>
		<modified>2006-12-08T15:39:03Z</modified>
		<issued>2006-12-08T15:39:03Z</issued>
		
	<dc:subject>xhtml</dc:subject> 
		<summary type="text/plain" mode="escaped"><![CDATA[Page titles are probably the most overlooked aspect of writing any website. They are important not just for SEO reason, but also for usability. Most websites I have noticed tend to put the company/website name first and then the page title (unfortunately, even this site - which I will be changing ASAP updated).  While [...]]]></summary>
		<content type="text/html" mode="escaped" xml:base="http://www.focusedtutorials.com/xhtml/proper-page-titles-for-usability/"><![CDATA[<p>Page titles are probably the most overlooked aspect of writing any website. They are important not just for SEO reason, but also for usability. Most websites I have noticed tend to put the company/website name first and then the page title (<strike>unfortunately, even this site - which I will be changing ASAP</strike> <em>updated</em>).  While this formatting (see below) looks good in the browser it propagates poorly to the page history section.</p>
<blockquote><p>FocusedTutorials.com > Blog Archive > {Page Title}</p></blockquote>
<p><a id="more-37"></a><br />
Suppose you are on a site for a long period of time, say a Stock Photo site, you will likely fill up the page history especially if you are doing searches.  It becomes very difficult to see where you have been or to easily and quickly go back to your search results time after time.  Personally, I have had to just do a new search, and advance through the pages till I find what I was looking for.  </p>
<p>Depending on the site usuability should come first for things like page titles.  Stock Photo sites should have a layout similar to:</p>
<blockquote><p>{Page Title} < Section of Website < Name of Website </p></blockquote>
<p>With a page title structure like this not only will it be beneficial for Search Engines, but also for users staying on your site for long periods of time.</p>
<p>(inspiration &#038; source: <a href="http://www.brandspankingnew.net/archive/2006/11/html_page_titles_usability.html">Brand Spanking New</a>)
</p>
]]></content>
	<feedburner:origLink>http://www.focusedtutorials.com/xhtml/proper-page-titles-for-usability/</feedburner:origLink></entry>
		<entry>
	  	<author>
			<name>Ben Abrams</name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[Ad / image Rotation using array]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/focusedtutorials/~3/_5OJagOPoF8/" />
		<id>http://www.focusedtutorials.com/2006/09/14/ad-image-rotation-using-array/</id>
		<modified>2006-09-15T02:22:06Z</modified>
		<issued>2006-09-15T02:22:06Z</issued>
		
	<dc:subject>PHP</dc:subject> 
		<summary type="text/plain" mode="escaped"><![CDATA[In many sites, there is the need for some form of ad rotation&#8230;
Serving dynamic content to visitors is great for keeping your site fresh, and this example can be applied to any purpose. Using only “arrays”, it cuts out the need for a database.
So let’s get going.

Some prior knowledge of arrays is required, but it’s [...]]]></summary>
		<content type="text/html" mode="escaped" xml:base="http://www.focusedtutorials.com/php/ad-image-rotation-using-array/"><![CDATA[<p>In many sites, there is the need for some form of ad rotation&#8230;</p>
<p>Serving dynamic content to visitors is great for keeping your site fresh, and this example can be applied to any purpose. Using only “arrays”, it cuts out the need for a database.</p>
<p>So let’s get going.</p>
<p><a id="more-35"></a><br />
Some prior knowledge of arrays is required, but it’s not too hard. We will be building a function to grab a random array values and build a link and print it. Simple.</p>
<p>Firstly we will look at our array values…<br />
<code><br />
$link[0][&#039;image&#039;] = &#039;/images/advert.jpg&#039;;<br />
&nbsp;<br />
$link[0][&#039;url&#039;] = &#039;http://www.focusedtutorials.com&#039;;<br />
&nbsp;<br />
$link[0][&#039;desc&#039;] = &#039;This is a test description&#039;;</code></p>
<p>We know our array is called $link. The first square bracket is our identifier, “[0]”. To add other links, we will increment this value – “[1] , [2] , [3]” etc.  The second block is our value – in our case [‘image’] is the path to the image&#8230;</p>
<p>So hopefully, we will end up with a few entries in our array…<br />
<code><br />
$link[0][&#039;image&#039;] = &#039;/images/f_t_image.jpg&#039;;<br />
&nbsp;<br />
$link[0][&#039;url&#039;] = &#039;http://www.focusedtutorials.com&#039;;<br />
&nbsp;<br />
$link[0][&#039;desc&#039;] = &#039;focusedtutorials.com&#039;;<br />
&nbsp;<br />
$link[1][&#039;image&#039;] = &#039;/images/webradiance.png&#039;;<br />
&nbsp;<br />
$link[1][&#039;url&#039;] = &#039;http://www.webradiance.com&#039;;<br />
&nbsp;<br />
$link[1][&#039;desc&#039;] = &#039;Web Development forum&#039;;<br />
&nbsp;<br />
$link[2][&#039;image&#039;] = &#039;/images/affilate.jpg&#039;;<br />
&nbsp;<br />
$link[2][&#039;url&#039;] = &#039;http://www.some-affiliate.com&#039;;<br />
&nbsp;<br />
$link[2][&#039;desc&#039;] = &#039;This is a test description&#039;;</code></p>
<p>Its ok having this array with our links in, but we need to select a random entry from the array. To do this we will use the PHP function RND_ARRAY. This will allow us to pick one or more random entries out of an array. We only want the one though.<br />
<code><br />
$random = array_rand($link);<br />
</code><br />
We add our array into array_rand, basicly it finds a random entry in the array $link.We will call the random number $random.</p>
<p>To call our array entry normally we would type:</p>
<p><code><br />
echo $link[1][ &#039;url&#039;];<br />
</code><br />
Where we specified we wanted entry one ( see the [1] bit) however, we want to change that for our random number.</p>
<p>So!</p>
<p><code><br />
echo $link[$random][&#039;url&#039;];<br />
</code></p>
<p>Now we will get the &#8216;url&#8217; value from a random entry in our array.</p>
<p>Use this method for the rest of the values, to build our link.<br />
<code>echo &quot;&lt;a href=&#039;&quot;.$link[$random][&#039;url&#039;].&quot;&#039;&gt;&lt;img src=&#039;&quot;.$link[$random][&#039;image&#039;].&quot;&#039; alt=&#039;&quot;.$link[$random][&#039;desc&#039;].&quot;&#039;/&gt;&lt;/a&gt;&quot;;</code><br />
Throw this in a function and HOORAY! We can call thos function when we wish! Download the source file to see it in action!</p>
<p><a href="http://www.focusedtutorials.com/wp-content/uploads/2006/09/ad_rotate.zip">Source file for the ad roation using arrays</a></p>
]]></content>
	<feedburner:origLink>http://www.focusedtutorials.com/php/ad-image-rotation-using-array/</feedburner:origLink></entry>
	</feed>
