<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>FWebDe</title>
	
	<link>http://fwebde.com</link>
	<description>Helping people to make fantastic websites, whether you are a designer, a developer, or someone just who loves websites.</description>
	<lastBuildDate>Mon, 26 Jul 2010 16:59:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Fwebde" /><feedburner:info uri="fwebde" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Fwebde</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/Fwebde" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2FFwebde" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
		<title>8 Less Common CSS Properties You May Find Interesting</title>
		<link>http://feedproxy.google.com/~r/Fwebde/~3/m5_vkIGHoMk/</link>
		<comments>http://fwebde.com/css/less-common-css-properties/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 16:59:58 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2436</guid>
		<description><![CDATA[We're all familiar with the most common CSS properties that we use daily, such as <code>width</code>, <code>height</code>, <code>margin</code> and <code>border</code>. And for most projects, the ones we use all the time are just fine. Of course, there are also those ones that you discover through your IDE's autocomplete feature, which can have some pretty interesting results. Some are immediately obvious to what they do, and some are not.]]></description>
			<content:encoded><![CDATA[<p>We're all familiar with the most common CSS properties that we use daily, such as <code>width</code>, <code>height</code>, <code>margin</code> and <code>border</code>. And for most projects, the ones we use all the time are just fine. Of course, there are also those ones that you discover through your IDE's autocomplete feature, which can have some pretty interesting results. Some are immediately obvious to what they do, and some are not.</p>
<div class="clearing"></div>
<ul>
<li><strong><code>word-spacing</code></strong>
<p>This property is for those times when your font's default word spacing just isn't what you want it to be. Use this to add more space between words, or to move them closer together, or even have them overlapping each other! A similar property, <code>letter-spacing</code> is generally seen more often.</p>
</li>
<li><strong><code>azimuth</code></strong>
<p>I'm sure you've heard of this property before, though most people seem to have <em>no idea</em> what it is for. Probably because the name starts with "a", so it always shows up at the top of every IDE's autocomplete list.</p>
<p>Basically the <code>azimuth</code> property specifies the location of the sound when the content is being read aloud. For example, you can specify an angle in degrees (deg), or you can use predefined values such as "center" or "left-side". This property is meant to be used with aural stylesheets.</p>
</li>
<li><strong><code>clip</code></strong>
<p>This CSS property specifies which portion of an absolutely positioned box should be visible. You can specify the value using <code>rect</code>, which will "clip" the box to the shape of the rectangle using the specified coordinates.</p>
</li>
<li><strong><code>cursor</code></strong>
<p>This one has a lot of potential for abuse. However, when used wisely, this CSS property can greatly improve various types of user interfaces. For example, if a certain box is meant to be dragged by the user, you could add this style to the handle: <code>cursor: move</code></p>
</li>
<li><strong><code>empty-cells</code></strong>
<p>Of course, empty cells are a common occurrence when using tables. With this CSS property you can set the value to either <code>show</code> or <code>hide</code>, to specify whether you want empty table cells to be visible or not.</p>
</li>
<li><strong><code>direction</code></strong>
<p>This CSS property specifies the direction of the text in the content. It can be set to either <code>ltr</code> for the default direction for English, or to <code>rtl</code> to have text going from right to left.</p>
</li>
<li><strong><code>outline</code></strong>
<p>This one is kind of similar to <code>border</code>. However the difference between the two is that with <code>outline</code>, the outline is drawn outside of the border, and does not have any effect on the box's size or position.</p>
</li>
<li><strong><code>orphans</code></strong>
<p>The <code>orphans</code> CSS property only applies to paged media. What it does is specify the minimum number of lines inside the element that must be left at the bottom of a page. This This can be helpful to prevent extra lines from screwing up an entire layout.</p>
</li>
</ul>
<p><strong>What other less common CSS properties do you know of? And do you actually use any of them?</strong></p>
<img src="http://feeds.feedburner.com/~r/Fwebde/~4/m5_vkIGHoMk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/css/less-common-css-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://fwebde.com/css/less-common-css-properties/</feedburner:origLink></item>
		<item>
		<title>Website Security For Beginners</title>
		<link>http://feedproxy.google.com/~r/Fwebde/~3/ELDPJeJWxqA/</link>
		<comments>http://fwebde.com/programming/website-security-beginners/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 08:10:59 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2218</guid>
		<description><![CDATA[Security is a crucial subject that all web developers should know. After all, what good is a website if an attacker can cause it to go down in seconds? Unfortunately, it can be daunting to beginners when you start thinking of security simply as hoops you must jump through to have a safe site]]></description>
			<content:encoded><![CDATA[<p>Security is a crucial subject that all web developers should know. After all, what good is a website if an attacker can cause it to go down in seconds? Unfortunately, it can be daunting to beginners when you start thinking of security simply as hoops you must jump through to have a safe site. So I've decided to outline several very important ideas for web security for beginners, or for experts who need a bit of a refresher.</p>
<div class="clearing"></div>
<h3>Never Trust User Input</h3>
<p>Always assume that any input from your users could potentially bring your site down to its knees, whether through malicious intent, or even by accident.</p>
<p>After all, user input is where the majority of all attacks on your website will come from, so to be constantly vigilant with anything input by the user. There isn't really any specific technique to achieve this, but it is always a good thing to remember at all times when working on your website's security.</p>
<p>Most of the points outlined below are related to this one, explaining various techniques to implement this important idea.</p>
<h3>Sanitize All Input</h3>
<p>User input that has not been properly sanitized can lead to all sorts of nasty things, like SQL injection and XSS attacks.</p>
<p>Make sure that you always sanitize your data when it is being <strong>input</strong>, and not when it is being retrieved from the database. It is always better to only have clean data stored, and avoids any problems if you slip up while sanitizing the data on output.</p>
<h3>Keep Logic and Data Separate</h3>
<p>Vulnerabilities in websites can often be exploited through code injection, which can often be as a result of mixing logic with data. A common example is SQL injection, where an attacker can exploit a vulnerability in your code by modifying your SQL queries to do their bidding.</p>
<p>A great way to separate logic from data is to use prepared statements when working with your database. Basically it helps to separate the two by not making you insert any values directly into your SQL statements, and instead binding parameters later and then executing them.</p>
<h3>Use Proper Directory Permissions</h3>
<p>You may be asking "People can't access my important files, isn't that enough?" It is all too common to find that a shared web host has not been properly configured with security in mind, allowing other users on the same server to access the files of other accounts who haven't set their file permissions correctly.</p>
<p>In general, it is usually discouraged to always set (<code>chmod</code>) your file permissions to 777, because that means that just about anyone can have full access to it.</p>
<h3>Use a Strong Password</h3>
<p>This can't be said enough. Even with thousands of security measures protecting your site from a malicious user, a weak password can quickly end up counteracting the many security measures you have in place.</p>
<p>All of the general rules for passwords apply: make sure it's a decent length, mix uppercase and lowercase characters along with numbers and symbols, pick something that only <em>you</em> remember, and all that good stuff.</p>
<h3>Prepare for the Worst</h3>
<p>Unfortunately, even with some of the strongest security measures built into your site, nothing can ever stop an attacker who is determined enough to get into your site. So, it is also a good idea to prepare for that possibility.</p>
<p>Always keep frequent backups of both your site's files, and of your database. That way once your site is compromised, you'll at least be (hopefully) able to get back up and running as soon as possible. And once your backup is restored to your server, always make sure that you look over anything that could have potentially caused the attack, and fix the vulnerability to prevent this from ever happening again.</p>
<p><em>If you're interested in finding out about specific exploits, how they work, and how to protect against them, be sure to check out my other post on the subject, <a href="http://fwebde.com/programming/hack-your-own-site/">Hack Your Own Site</a>.</em></p>
<img src="http://feeds.feedburner.com/~r/Fwebde/~4/ELDPJeJWxqA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/programming/website-security-beginners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://fwebde.com/programming/website-security-beginners/</feedburner:origLink></item>
		<item>
		<title>Five Alternatives to WordPress</title>
		<link>http://feedproxy.google.com/~r/Fwebde/~3/AbDPRgVPk64/</link>
		<comments>http://fwebde.com/wordpress/five-alternatives-to-wordpress/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 08:00:11 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2493</guid>
		<description><![CDATA[WordPress obviously stands as the most popular blogging platform in use today. And it is, for the most part, an excellent piece of software. However it is always a good idea to explore the alternatives, and you might even find one that you like! So here I present to you five excellent alternatives to WordPress for your blog.]]></description>
			<content:encoded><![CDATA[<p>WordPress obviously stands as the most popular blogging platform in use today. And it is, for the most part, an excellent piece of software. However it is always a good idea to explore the alternatives, and you might even find one that you like! So here I present to you five excellent alternatives to WordPress for your blog.</p>
<h3>b2evolution</h3>
<p><a href="http://b2evolution.net/">b2evolution</a> is an old one, but a good one. b2evolution is an open source blogging platform written in PHP, using a MySQL database. In fact, WordPress originated as a fork of b2evolution, back in 2003. And even though this blogging platform is that old, it is still being updated frequently to compete with more modern platforms.</p>
<h3>Movable Type</h3>
<p><a href="http://www.movabletype.org/">Movable Type</a> is probably one of the most popular alternatives to WordPress, and with good reason. It is a very powerful publishing platform, with all the features you would need to make a site like one running WordPress. And while some of the latest versions of Movable Type use an interface strikingly similar to that of WordPress, I would recommend it to anyone who is looking to try something different.</p>
<h3>Habari</h3>
<p><a href="http://habariproject.org">Habari</a> is described on its website as "next-generation blogging". The main difference between Habari and other blogging platforms is the way it is built, designed for modern hosting environments. Their <a href="http://wiki.habariproject.org/en/FAQ">FAQ</a> does a good job of explaining this:</p>
<blockquote><p>
Habari is being written specifically for modern web hosting environments, and uses modern object-oriented programming techniques. Using these recent but well-established additions to the PHP language allows Habari to make use of PDO, enabling prepared statements for all interactions with the database. This greatly reduces the system's vulnerability to SQL injection attacks. This is just one of many benefits of modern object-oriented techniques.
</p></blockquote>
<h3>WikyBlog</h3>
<p>Now this is an interesting one. <a href="http://www.wikyblog.com/">WikyBlog</a> is a content management system designed with the idea to combine the features of wikis and blogs into a single efficient application. It combines your standard blog styled organization that you'll find in any other blogging platform, with features found in wikis, such as collaborative editing and revision history.</p>
<h3>Write Your Own</h3>
<p>If you can't find a good blogging platform that suits all of your needs, and you are interested to learn, you might want to try your hand at writing your own! It's actually not very hard to create a very basic system, and it is a great learning experience. If you're new to this kind of thing, take a look at my (slightly old, but still good) <a href="http://fwebde.com/web-design/creating-a-php-cms-part-1/">PHP CMS tutorial</a>, and work from there to make it into a full blog system.</p>
<p>Now don't get me wrong, I still love WordPress. But there <em>are</em> many alternatives out there, and some of them are actually very nice!</p>
<p>Would you suggest any other alternatives to WordPress? Be sure to leave a comment.</p>
<img src="http://feeds.feedburner.com/~r/Fwebde/~4/AbDPRgVPk64" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/wordpress/five-alternatives-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://fwebde.com/wordpress/five-alternatives-to-wordpress/</feedburner:origLink></item>
		<item>
		<title>Remember To Add Links</title>
		<link>http://feedproxy.google.com/~r/Fwebde/~3/1wLqXxOe27I/</link>
		<comments>http://fwebde.com/blogging/remember-to-add-links/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 08:23:17 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2447</guid>
		<description><![CDATA[I don't know about you, but as I'm writing a blog post, I often find myself remembering a link I read earlier that is related to the subject as I'm typing. So, I usually type out the text of the link, and try to remember to add the link in later. Unfortunately, we all forget things like this too often.]]></description>
			<content:encoded><![CDATA[<p>I don't know about you, but as I'm writing a blog post, I often find myself remembering a link I read earlier that is related to the subject as I'm typing. So, I usually type out the text of the link, and try to remember to add the link in later. Unfortunately, we all forget things like this too often.</p>
<p>If you find yourself doing this from time to time, here is a quick tip to help you remember to find the URL you need. First, add something like this into your CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">a <span style="color: #6666ff;">.find-url</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#9e0016</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f93e58</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The colours in there don't really matter at all, as long as you choose something that will stand out to you when you look over your draft of the post. Once you have that in your CSS, style the links you can't remember like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;find-url&quot;</span>&gt;</span>I can't remember the URL right now.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

<p>Now, when you look over your post to revise it, the links you couldn't remember while typing out your post should be highlighted <a style="color:#9e0016;background:#f93e58;">like this</a>, to remind you to go and find the URL you would like to link to.</p>
<img src="http://feeds.feedburner.com/~r/Fwebde/~4/1wLqXxOe27I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/blogging/remember-to-add-links/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://fwebde.com/blogging/remember-to-add-links/</feedburner:origLink></item>
		<item>
		<title>Understanding the CSS z-index Property</title>
		<link>http://feedproxy.google.com/~r/Fwebde/~3/36v4IiyAXiU/</link>
		<comments>http://fwebde.com/css/understanding-z-index/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 08:23:16 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2438</guid>
		<description><![CDATA[When we think of CSS and web design, we generally think in two dimensions. After all, the screens we use to view websites display the page as a two-dimensional image. Two of the most common CSS properties, <code>width</code> and <code>height</code>, match that.]]></description>
			<content:encoded><![CDATA[<p>When we think of CSS and web design, we generally think in two dimensions. After all, the screens we use to view websites display the page as a two-dimensional image. Two of the most common CSS properties, <code>width</code> and <code>height</code>, match that.</p>
<p>If you are new to CSS, you might not have heard about the <code>z-index</code> property. This property allows you to control the position of elements on the page in terms of layers, essentially adding a third dimension to the page.</p>
<h3>Using z-index</h3>
<p>The z-index of an element on the page is the layer that it is on, with the default being <strong>0</strong>. As the z-index of an element increases, so does its layer.</p>
<p>Let's look at a quick example:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#box1</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#1144aa</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#box2</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ffd100</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">75px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">20</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#box3</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ff6f00</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">125px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">40px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">60px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">30</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>With the sizes and positions of #box1, #box2 and #box3, there will be a space on the page that is occupied by all of these elements. By applying the z-index property to these boxes, we can define which one is on the top, which is in the middle, and which one is on the bottom, giving us something like this:</p>
<p><img src="http://fwebde.com/wp-content/uploads/2010/06/z-index1.png" alt="" title="z-index1" width="227" height="217" class="size-full wp-image-2443" style="border:none" /></p>
<p>Now if we can imagine looking at the image from the side, we can visually see how the different layers are positioned on top of each other.</p>
<p><img src="http://fwebde.com/wp-content/uploads/2010/06/z-index-layers.png" alt="" title="z-index-layers" width="400" height="400" class="alignnone size-full wp-image-2444" style="border:none" /></p>
<p>Try changing the z-index values for each of the elements, and you should be able to see how the resulting image changes. Try adding some more elements in there, and seeing what different combinations can be made.</p>
<img src="http://feeds.feedburner.com/~r/Fwebde/~4/36v4IiyAXiU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/css/understanding-z-index/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://fwebde.com/css/understanding-z-index/</feedburner:origLink></item>
		<item>
		<title>Hexadecimal Colour Codes Explained</title>
		<link>http://feedproxy.google.com/~r/Fwebde/~3/2EDLd0rtaBk/</link>
		<comments>http://fwebde.com/web-design/hex-colour-codes-explained/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 08:22:51 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2397</guid>
		<description><![CDATA[No web developer can go a day without encountering any method of representing colour on the web. There are many ways of representing colour, some have advantages and disadvantages over others, but of course, the vastly popular and most well-known option is hex colour codes.]]></description>
			<content:encoded><![CDATA[<p>No web developer can go a day without encountering any method of representing colour on the web. There are many ways of representing colour, some have advantages and disadvantages over others, but of course, the vastly popular and most well-known option is hex colour codes.</p>
<p>Across the internet, you'll find many tables offering a visual representation of selected hex codes, sometimes even with colour pickers, often with many other helpful features. However, I thought it would be interesting to learn about how these mysterious codes actually work.</p>
<h3>How do they work?</h3>
<p>When you first came across a hex colour code such as <strong>#0FCA3E</strong> during your adventures in learning web design, you probably thought that it would be painful to have to memorize all of these seemingly random codes. But like (almost) everything, there is some sort of order behind the perceived chaos.</p>
<p>When viewing an image on a computer screen, the individual pixels are displayed using the <a href="http://en.wikipedia.org/wiki/RGB_color_model">RGB colour model</a>. This is an additive colour model, meaning that varying degrees of different colours of light (red, green, and blue in this case) are mixed together to produce a wide array of different colours.</p>
<p><img src="http://fwebde.com/wp-content/uploads/2010/06/rgb.png" alt="" title="Image of an LCD pixel, showing the individual subpixels." width="125" height="125" class="alignright size-full wp-image-2404" /></p>
<p>This can be easily seen in LCD displays. If you look very closely, you'll be able to see that each pixel is divided into three subpixels, each of which display either red, green, or blue light, which go together to form a full pixel. In the image to the right, you can see three subpixels, each displaying the colour at its full intensity, which a user would see as white when sitting at a reasonable distance away from their monitor.</p>
<h4>How do we control this?</h4>
<p>We can control how colours are displayed by using, you guessed it, hex colour codes. These codes can look very cryptic at first, but once you understand them, it's really quite simple.</p>
<p>Every hex colour code is a six-digit hexadecimal number consisting of three parts. Each of these parts represents the intensity of the red, green, or blue light, respectively. This is called a hex <em>triplet</em>.</p>
<p>Each part of a hex triplet is represented using the hexadecimal number system. This system uses the digits 0-9, and it continues with A representing 10, B for 11, up to F, for 15. This is used because two hexadecimal digits can represent exactly one byte of information, which makes it easy for computers to work with.</p>
<p>Because one byte of information can have 256 possible values, and each hex triplet is three bytes long, the number of colours that can be represented using hex codes is 16,777,216, or 256<span style="font-size:10px;vertical-align:super;">3</span>.</p>
<p>Because a picture is worth a thousand words (even if it's a picture of text), here is a quick example of a couple hex triplets, with their decimal representations.</p>
<p><img src="http://fwebde.com/wp-content/uploads/2010/06/hex.png" alt="A couple examples of hex colour codes with their decimal representations." width="500" height="430" class="size-full wp-image-2412" style="border:none" /></p>
<p>Well now that you know how hex colour codes work, with some practice it should be easy to read and understand any hex triplets you may come across. If you're feeling confident, you can give this game a try: <a href="http://yizzle.com/whatthehex/">What the hex</a>.</p>
<p><cite><a href="http://en.wikipedia.org/wiki/File:RGB_illumination.jpg">Thumbnail source</a></cite></p>
<img src="http://feeds.feedburner.com/~r/Fwebde/~4/2EDLd0rtaBk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/web-design/hex-colour-codes-explained/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://fwebde.com/web-design/hex-colour-codes-explained/</feedburner:origLink></item>
		<item>
		<title>10+ Examples Of Effective Forum Designs</title>
		<link>http://feedproxy.google.com/~r/Fwebde/~3/WYV7qOQfmIg/</link>
		<comments>http://fwebde.com/web-design/effective-forum-designs/#comments</comments>
		<pubDate>Thu, 27 May 2010 08:02:12 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=1368</guid>
		<description><![CDATA[I've posted earlier <a href="http://fwebde.com/web-design/forum-design/">on internet forum design</a>, including tips to remember when working on a forum design. Here are some examples of forum designs that are very effective, consider these tips, and generally look nice.

Here are some examples of excellent forum designs that look great, are usable, and help the general "feel" of a community.]]></description>
			<content:encoded><![CDATA[<p>I've posted earlier <a href="http://fwebde.com/web-design/forum-design/">on internet forum design</a>, including tips to remember when working on a forum design. Here are some examples of forum designs that are very effective, consider these tips, and generally look nice.</p>
<p>Here are some examples of excellent forum designs that look great, are usable, and help the general "feel" of a community.</p>
<h3 class="clearing">Default Forum Themes</h3>
<p><a href="http://forums.xkcd.com/"><img src="http://fwebde.com/wp-content/uploads/2010/01/xkcd.png" alt="" title="xkcd Forums" width="600" height="200" class="aligncenter size-full wp-image-1415" /></a></p>
<p>The default theme for a forum software can work well at times. For example, support forums often stick with a default theme because they don't exactly need users to stay around, because most people will register, ask a question and leave.</p>
<p>Many communities can also get away with using a default theme. For example, <a href="http://forums.xkcd.com/">xkcd Forums</a> uses the PHPBB default theme (Even the blog uses the WordPress default theme). You can also see the vBulletin default theme being used everywhere. I think even the <a href="http://forums.digitalpoint.com/">DigitalPoint</a> theme is based off of it.</p>
<h3>Ubuntu Forums</h3>
<p><a href="http://ubuntuforums.org/"><img src="http://fwebde.com/wp-content/uploads/2010/01/ubuntu.png" alt="" title="Ubuntu Forums" width="600" height="200" class="aligncenter size-full wp-image-1413" /></a></p>
<p><a href="http://ubuntuforums.org/">Ubuntu Forums</a> is a great community providing support for all things related to <a href="http://ubuntu.com/">Ubuntu.</a> The layout of the board index is a bit different from the standard forum layout, because of such a large number of categories. I'd say they could easily get away with being different, because even this layout is so easy to use.</p>
<h3>TalkFreelance</h3>
<p><a href="http://www.talkfreelance.com/"><img src="http://fwebde.com/wp-content/uploads/2010/01/tf.png" alt="" title="TalkFreelance" width="600" height="200" class="aligncenter size-full wp-image-1411" /></a></p>
<p>The design of <a href="http://www.talkfreelance.com/">TalkFreelance</a> is simply <em>stunning</em>. It has an excellent use of colours that aren't often seen on forums, and makes good use of a sidebar for displaying user information and forum statistics.</p>
<h3>ExpressionEngine Forums</h3>
<p><a href="http://expressionengine.com/forums/"><img src="http://fwebde.com/wp-content/uploads/2010/01/ee.png" alt="" title="ExpressionEngine Forums" width="600" height="200" class="aligncenter size-full wp-image-1408" /></a></p>
<p>The <a href="http://expressionengine.com/forums/">ExpressionEngine Forums</a> have a nice clean design, following a more standard forum layout.</p>
<h3>Design Forums</h3>
<p><a href="http://www.designforums.co.uk/"><img src="http://fwebde.com/wp-content/uploads/2010/01/designforums.png" alt="" title="Design Forums" width="600" height="200" class="aligncenter size-full wp-image-1406" /></a></p>
<p>Many of the elements of <a href="http://www.designforums.co.uk/">Design Forums</a> are quite simple, but the way they are put together make it into an excellent forum design.</p>
<h3>Wiimote Project</h3>
<p><a href="http://www.wiimoteproject.com/index.php?action=forum"><img src="http://fwebde.com/wp-content/uploads/2010/01/wiimote.png" alt="" title="Wiimote Project" width="600" height="200" class="aligncenter size-full wp-image-1414" /></a></p>
<p><a href="http://www.wiimoteproject.com/index.php?action=forum">Wiimote Project</a> has a nice, clean theme for <a href="http://simplemachines.org/" title="Simple Machines Forum">SMF</a>, placing more emphasis than usual on the numbers of posts and topics.</p>
<p>If you go to <a href="http://www.wiimoteproject.com/index.php">the actual home page of Wiimote Project</a>, instead of the usual board index you will find a portal page listing the latest posts, and various forum statistics.</p>
<h3>The Admin Zone</h3>
<p><a href="http://www.theadminzone.com/forums/"><img src="http://fwebde.com/wp-content/uploads/2010/01/taz.png" alt="" title="The Admin Zone" width="600" height="200" class="aligncenter size-full wp-image-1410" /></a></p>
<p><a href="http://www.theadminzone.com/forums/">The Admin Zone</a> uses a fairly standard theme, with a table used for the board index. The home page is similar to a portal, but containing various articles, interviews and more.</p>
<h3>Boagworld</h3>
<p><a href="http://www.boagworld.com/forum/"><img src="http://fwebde.com/wp-content/uploads/2010/01/boag.png" alt="" title="Boagworld" width="600" height="200" class="aligncenter size-full wp-image-1405" /></a></p>
<p>The layout of <a href="http://www.boagworld.com/forum/">Boagworld</a> is less standard. Instead of using a table to list the forums, each forum is displayed with a list of the latest posts.</p>
<h3>Typophile Forums</h3>
<p><a href="http://typophile.com/forum"><img src="http://fwebde.com/wp-content/uploads/2010/01/typophile.png" alt="" title="Typophile" width="600" height="200" class="aligncenter size-full wp-image-1412" /></a></p>
<p>The <a href="http://typophile.com/forum">Typophile Forums</a> have a clean and simple design, with only a few categories.</p>
<h3>FreelanceSwitch Forum</h3>
<p><a href="http://forum.freelanceswitch.com/"><img src="http://fwebde.com/wp-content/uploads/2010/01/freelancesw.png" alt="" title="FreelanceSwitch Forum" width="600" height="200" class="aligncenter size-full wp-image-1409" /></a></p>
<p>The <a href="http://forum.freelanceswitch.com/">FreelanceSwitch Forum</a> is another example of a forum with a less common layout. The board index contains a list of the latest posts, with the forums (topics) displayed in a drop-down menu.</p>
<p>What other forums do you think have effective designs?</p>
<img src="http://feeds.feedburner.com/~r/Fwebde/~4/WYV7qOQfmIg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/web-design/effective-forum-designs/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://fwebde.com/web-design/effective-forum-designs/</feedburner:origLink></item>
		<item>
		<title>Hack Your Own Site</title>
		<link>http://feedproxy.google.com/~r/Fwebde/~3/UaBCTsly-mc/</link>
		<comments>http://fwebde.com/programming/hack-your-own-site/#comments</comments>
		<pubDate>Mon, 24 May 2010 08:01:42 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=1475</guid>
		<description><![CDATA[What's the best way to protect your site from hacking? To actually try it out, and hack your own site! It can be a great learning experience to test out some common exploits on your site, and fix all your vulnerabilities.

Plus, it's pretty fun to see the different ways that people can get into and cause problems with your site. This post focuses on a few of the most common ways that people can do this.]]></description>
			<content:encoded><![CDATA[<p>What's the best way to protect your site from hacking? To actually try it out, and hack your own site! It can be a great learning experience to test out some common exploits on your site, and fix all your vulnerabilities.</p>
<p>Plus, it's pretty fun to see the different ways that people can get into and cause problems with your site. This post focuses on a few of the most common ways that people can do this.</p>
<p>Today we are going to try out some examples of common exploits, and figure out how to solve them, keeping everything safe. We will focus on SQL injection and cross-site scripting for today.</p>
<p>Remember to only use these on your own site, I will not be held responsible if someone gets angry at you for trying these on their site. And don't be stupid and try these on your live site, have a private server setup for this.</p>
<h3>SQL Injection</h3>
<p><a href="http://xkcd.com/327/"><img src="http://fwebde.com/wp-content/uploads/2010/01/exploits_of_a_mom.png" alt="" title="Her daughter is named Help I&#039;m trapped in a driver&#039;s license factory." width="666" height="205" class="aligncenter size-full wp-image-1547" /></a></p>
<p>SQL injection attacks work by adding extra malicious commands into SQL queries. For example if we have a login form, our SQL query would look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #ff0000;">'users'</span>
    <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">'username'</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'myuser'</span>
    <span style="color: #993333; font-weight: bold;">AND</span> <span style="color: #ff0000;">'password'</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'mypassword'</span></pre></div></div>

<p>And here is some code that someone could inject into the SQL query through the form:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Username: ' OR 1=1 /*
Password: */;--</pre></div></div>

<p>This would change our SQL query into the following:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #ff0000;">'users'</span>
    <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">'username'</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">''</span> <span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span> <span style="color: #808080; font-style: italic;">/*
    AND 'password' = '*/</span>;<span style="color: #808080; font-style: italic;">--'</span></pre></div></div>

<p>Because PHP simply sees the MySQL query as a string, the user can play around with the quotes inside it and add stuff to it. In this example, the OR operator is used to change the SQL query to check if either the username is equal to an empty string, or if 1 is equal to 1, which will always be true. And then the rest of the query is commented out, to avoid any errors.</p>
<p>For a login form, this will allow anyone access to the "protected" areas. You obviously don't want just anyone to get into a members only area, so we have to fix this problem.</p>
<p>The easiest way to solve this vulnerability is to escape your strings before using them in your queries. A function included in PHP is <code><a href="http://php.net/manual/en/function.mysql-real-escape-string.php">mysql_real_escape_string</a></code>. However, there can be some problems with this, mainly because it is a blacklist of certain "dangerous" characters.</p>
<p>So, we're going to use <strong>prepared statements</strong>. This method is more secure because SQL logic from the data being used. Prepared statements are included in PHP, through the <a href="http://php.net/manual/en/book.mysqli.php">MySQLi</a> class. It's basically used like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
<span style="color: #666666; font-style: italic;">// Create the mysqli object, replace parameters with the DB information</span>
<span style="color: #000088;">$db</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> mysqli<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'username'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'database'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Create statement object</span>
<span style="color: #000088;">$stmt</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">stmt_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$stmt</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SELECT * FROM users WHERE \'username\' = ? AND \'password\' = ?'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Bind your variables and replace the ?s</span>
    <span style="color: #000088;">$stmt</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">bind_param</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ss'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$username</span><span style="color: #339933;">,</span> <span style="color: #000088;">$password</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Set your variables</span>
    <span style="color: #000088;">$username</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'aldld'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$password</span> <span style="color: #339933;">=</span> <span style="color: #990000;">md5</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Assuming that passwords aren't stored in plaintext. Right?</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Execute query</span>
    <span style="color: #000088;">$stmt</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Close statement object</span>
    <span style="color: #000088;">$stmt</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>For more on using MySQL prepared statements with PHP, check out <a href="http://www.ultramegatech.com/blog/2009/07/using-mysql-prepared-statements-in-php/">this awesome article at UltraMegaTech</a>.</p>
<h3>Cross-Site Scripting</h3>
<p>Cross-site scripting (<strong>XSS</strong>) is another type of code injection technique, similar to SQL injection. Except this time, client-side scripts such as JavaScript are inserted into pages to be targeted to users, not to the site itself. This is often why search results in Google sometimes say "This site may harm your computer."</p>
<p>For example, let's say we have a comments form that allows HTML. XSS can be a problem here because a bad user can input the following:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
doBadStuff<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Does bad things</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Of course, this is the simplest possible example that exists, but even with more complex situations, for example if <a href="http://en.wikipedia.org/wiki/BBCode">BBCode</a> is used, someone determined to harm your users can find a way around it.</p>
<p>A simple way to prevent common types of XSS is to use the PHP <code><a href="http://ca3.php.net/htmlspecialchars">htmlspecialchars</a></code> function. It converts certain characters to HTML entities, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'test &lt;bad code&gt; test'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_QUOTES</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Output: test &amp;lt;bad code&amp;gt; test</span>
<span style="color: #339933;">&lt;/</span>bad<span style="color: #339933;">&gt;</span></pre></div></div>

<p>The only problem with this is that it means that HTML cannot be used by users at all. To work around this, you could try to use a "whitelist" of HTML tags that can be used, and be sure to do it very carefully.</p>
<p>For more information on basic protection against XSS, check out <a href="http://www.webmaster-talk.com/php-forum/47587-tip-prevent-xss-attacks.html">this post at Webmaster-Talk</a>. It has an easy to understand example, with fixes that make sense.</p>
<h3>Conclusion</h3>
<p>These are just a couple of examples of common attacks on websites that can be prevented with some good security practices. What other security vulnerabilities would you like to learn to fix? Do you ever hack your site, to test for vulnerabilities? I'd love to hear what you think.</p>
<img src="http://feeds.feedburner.com/~r/Fwebde/~4/UaBCTsly-mc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/programming/hack-your-own-site/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://fwebde.com/programming/hack-your-own-site/</feedburner:origLink></item>
		<item>
		<title>The New Font API From Google</title>
		<link>http://feedproxy.google.com/~r/Fwebde/~3/83fDjplfuz8/</link>
		<comments>http://fwebde.com/web-design/google-font-api/#comments</comments>
		<pubDate>Thu, 20 May 2010 08:02:41 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2362</guid>
		<description><![CDATA[Google has just recently released a new font API, which will greatly help to simplify the usage of fonts on the web. It is called, of course, Google Font API. Included with this API is the font directory, along with an interactive font preview. The Google Font API makes it extremely simple to use external [...]]]></description>
			<content:encoded><![CDATA[<p>Google has just recently released a new font API, which will greatly help to simplify the usage of fonts on the web. It is called, of course, <a href="http://code.google.com/apis/webfonts/">Google Font API</a>. Included with this API is the <a href="http://code.google.com/webfonts">font directory</a>, along with an interactive <a href="http://code.google.com/webfonts/preview">font preview</a>.</p>
<p>The Google Font API makes it extremely simple to use external fonts on the web, with its directory of open source fonts.</p>
<p>The Google Font API is based on @font-face, which has already been in use for quite some time for embedding external fonts on a website. But one of the great things about the Google Font API is <a href="http://code.google.com/apis/webfonts/faq.html#Browsers_Supported">supported by many browsers</a>, even our favourite browser, IE6! Unfortunately, this will not currently work on Android, iPhone, iPad, or iPod (or Opera).</p>
<h3>Using the Google Font API</h3>
<p>Getting started with the Google Font API is actually really simple.  It basically takes only three steps to include a font in your site.</p>
<h4>Step One</h4>
<p>Browse the <a href="http://code.google.com/webfonts">Google Font Directory</a>, and pick one you like. For the purposes of this article, I decided to go with <a href="http://code.google.com/webfonts/family?family=Yanone+Kaffeesatz">Yanone Kaffeesatz</a>.</p>
<p><img src="http://fwebde.com/wp-content/uploads/2010/05/font-directory.png" alt="" title="font-directory" width="660" height="163" class="aligncenter size-full wp-image-2392" /></p>
<h4>Step Two</h4>
<p>Add the correct code into the <code>head</code> section of your website, to include the CSS required to import the font. When using the font directory, Google will give you all the code you need to be able to use the font you want. For Yanone Kaffeesatz, this is the code that it gave me:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&lt;link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz' rel='stylesheet' type='text/css' /&gt;</pre></div></div>

<h4>Step Three</h4>
<p>Once you've included that line of code in between your site's <code>head</code> tags, you can now use the font you've selected in your CSS just like any other font. Just in case if anything goes wrong, I've also decided to include a couple of fallback fonts.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.foo</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'Yanone Kaffeesatz'</span><span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
    <span style="color: #808080; font-style: italic;">/* All your other CSS properties here
       or above, doesn't matter */</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Because text using fonts included using the Google Font API are simply treated as normal text, you can also style your fonts however you like, such as with things like text shadows. Just make sure you don't go too far; I think we all know what it looks like when hundreds of styles are applied to a single block of text.</p>
<p>Currently the selection of fonts is rather limited, but hopefully this will improve over time, as more and more fonts are added to the directory.</p>
<p>So to conclude this post, here is an example of <a href="http://code.google.com/webfonts/family?family=Yanone+Kaffeesatz">Yanone Kaffeesatz</a>, one of the fonts included in the Google Font API.</p>
<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz' rel='stylesheet' type='text/css' media='screen' />
<div style="font-family: 'Yanone Kaffeesatz', arial, serif;font-size: 75px;" class="clearing">
The Yanone Kaffeesatz font, used at FWebDe!
</div>
<img src="http://feeds.feedburner.com/~r/Fwebde/~4/83fDjplfuz8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/web-design/google-font-api/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://fwebde.com/web-design/google-font-api/</feedburner:origLink></item>
		<item>
		<title>A Look At Internet Forum Design</title>
		<link>http://feedproxy.google.com/~r/Fwebde/~3/OSGGKsaTRx0/</link>
		<comments>http://fwebde.com/web-design/forum-design/#comments</comments>
		<pubDate>Mon, 17 May 2010 08:59:28 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=1348</guid>
		<description><![CDATA[I enjoy hanging around forums once in a while. You might, too. They are a great way of promoting your blog, for asking questions and getting help with problems, and just to chat once in a while.

Forums are also great for adding to an existing website, to create a community around it, and to have a quicker way to publicly interact with and answer questions of users than simply posting to a blog. If you have some spare time, you can also use that time for managing the forum, and building a community of members and readers.]]></description>
			<content:encoded><![CDATA[<p>I enjoy hanging around forums once in a while. You might, too. They are a great way of promoting your blog, for asking questions and getting help with problems, and just to chat once in a while.</p>
<p>Forums are also great for adding to an existing website, to create a community around it, and to have a quicker way to publicly interact with and answer questions of users than simply posting to a blog. If you have some spare time, you can also use that time for managing the forum, and building a community of members and readers.</p>
<p>Before I got interested in blogs (FWebDe is actually my first), I was first interested more in forums. While they weren't hugely successful, with only about 300 members, I've learned a few things about managing an online community.</p>
<p>There are many tips about getting more members and monetizing forums, but design is a topic that is often ignored, or at least given less importance than on say, a blog. Anyone should know that one of the first things that potential members see is the design, and that it has to give a good first impression, and attract their attention to read more, or to register.</p>
<h3>Usability</h3>
<p>Usability is <em>extremely</em> important for forum designs, because they are highly interactive, with many different features for doing things such as creating topics and replying to posts. You could say that they are much more interactive than blogs or static websites, where users are mainly reading posts.</p>
<h3>The General Layout</h3>
<p>The general layout of a forum is very important, and it should be consistent throughout. It should also keep a similar basic layout to other forums, for the sake of usability. For most forums, the most common kinds of layout will be the the best anyway.</p>
<h4>The Single-Column Layout</h4>
<p>One think you don't see too often on regular sites is a single-column layout. Normally, there is a sidebar or two, or sometimes even three. Forums are where you usually start to see simpler single-column layouts.</p>
<p>A good forum layout will put a lot of focus on the posts, because the ultimate goal is generally to have users interacting with their content, and with each other. On busy forums, hundreds of posts can be added every hour. With such fast content generation, it's a good idea to put some emphasis on it. <strong>Content is King</strong>, and forums can have a lot of it.</p>
<h5>Sidebars</h5>
<p>An alternative to the single-column layout that you can see sometimes is to add a <strong>sidebar</strong> next to the board index. You can see this in use at the <a href="http://www.sitepoint.com/forums/">SitePoint forums</a>. This can be especially useful if you have many categories, and would like to list them all in a more compact way.</p>
<p><a href="http://sitepoint.com/forums/"><img src="http://fwebde.com/wp-content/uploads/2010/01/sitepoint.png" alt="SitePoint sidebar" title="SitePoint sidebar" width="600" height="150" class="aligncenter size-full wp-image-1387" /></a></p>
<p>A sidebar can also be used for displaying a login box, user information and forum statistics, like how it is done at <a href="http://www.talkfreelance.com/">TalkFreelance</a>.</p>
<p>Sidebars were actually introduced in <a href="http://invisionboard.com/">IP.Board</a> version 3.0. Some love it, some hate it, but you should try out a sidebar, and see how that works on your forum.</p>
<h4>The Table-Based Layout</h4>
<p>I think that forums are one place where you <em>could</em> get away with using tables for layout.</p>
<p>Before you run away, screaming, you should notice that the common forum layout basically <em>is</em> a table. You have separate columns with some general information about each forum.</p>
<ul>
<li>The name of the forum</li>
<li>A short description of what it's about</li>
<li>The number of topics</li>
<li>The number of posts</li>
<li>Information about the latest post</li>
</ul>
<p>And then, you have a row for each forum or category. Sometimes there is even a little icon indicating if that forum has recently been posted in.</p>
<h4>The Front Page</h4>
<p>Most forums usually have a (relatively) simple front page, displaying the board index with a table of forums and categories, often with board information, news and statistics closer to the footer.</p>
<p>One thing that you'll often see on forums is a separate front page from the board index, containing the latest news, recent topics and posts, and other information for quick access. This can be very useful if you have a huge community with new posts every few minutes.</p>
<h4>Displaying User Information</h4>
<p>Not so much anymore, but it is sometimes debated whether the poster's information should be displayed vertically or horizontally. They are both good options, and you should try them both out and see what you, and your users like best.</p>
<p>The decision mainly depends on what kinds of information you want to display next to each post. A horizontal user information area can be good if you're only displaying a bit of basic information. Information commonly displayed next to each post include:</p>
<ul>
<li>The user's name, with a link to their profile</li>
<li>Their avatar</li>
<li>Their current rank</li>
<li>Their post count</li>
<li>The date they registered</li>
</ul>
<p>However, if you would like to display a bit more information without looking too cluttered, vertical is generally a better idea.</p>
<h4>User Signatures</h4>
<p>It is also a good idea to place some restrictions on user signatures. In addition to not allowing inappropriate material, filling it with tons of links is generally not looked upon kindly.</p>
<p>I've even seen some forums that have disabled images in signatures, leaving only a link and a bit of text. I think that this can be a good idea, because nobody <em>really</em> cares about the image in a person's signature. If someone is interested in their site, they'll probably just click on a link.</p>
<p>Another commonly used technique for displaying signatures is to only have each poster's signature to display once per page. That way, if somebody posts many times in one topic, readers aren't bothered with seeing the exact same signature over and over again.</p>
<h3>A Few Things To Remember</h3>
<p>When working on the design for a forum, here are a few things to think about.</p>
<h4>Avoid Excess Clutter</h4>
<p>This goes for any design, and also for forums. Extra clutter, including ads, news boxes and extra widgets can seriously get in the way of the content. Because the content is the main focus of a community, if you don't put that first, potential new members won't have much of a reason to register.</p>
<p>A common source of clutter that I see is shoutboxes. They are boxes, usually at the top of the page, that are used for members to quickly post messages to the entire forum. I'd say if you need to send a message to tons of people, consider using Twitter instead.</p>
<h4>Maximize Readability</h4>
<p>Readability is an important step to put your content, and your community forward. General readability rules apply: Avoid tiny text, add good amounts of spacing, ensure good contrast, and choose a good font.</p>
<p><strong>One thing to remember:</strong> Don't always use dark themes. Light text on a dark background is often difficult to read, and dark text on a dark background is even worse. This is usually seen on gaming forums, which I can understand, but there is more to games than darkness.</p>
<h4>Place the Search Box In a Prominent Location</h4>
<p><img src="http://fwebde.com/wp-content/uploads/2010/01/ipboard.png" alt="" title="Search" width="600" height="100" class="aligncenter size-full wp-image-1383" /></p>
<p>Newbies are often berated for not searching before they post. You should give them an easier time, and make the search box prominent and easy to use. I've seen some forums hide search boxes behind JavaScript pull-downs, and it looks like they're just <em>trying</em> to give new users a hard time.</p>
<p>But it's such a cool effect, you say? This one little bit of usability can have a <em>huge</em> impact on your community.</p>
<p>By hiding the search box, new users won't be able to find the information they need, and will instead start a new topic asking their question, and they can be openly yelled at for not searching first. Guests to the site will see that topic, and will see that forum as an angry, YouTube-like community, costing you many new members.</p>
<h3>Conclusion</h3>
<p>What do you think of forums? Do you frequent forums often, or do you run a forum? Do you know of any examples of great forum designs? <strong>Be sure to leave a comment.</strong></p>
<p>I'll be doing a follow-up to this post, including some examples of effective forum designs. In the meantime, you can subscribe to the <a href="http://feeds.feedburner.com/Fwebde">RSS feed</a>, or to <a href="http://feedburner.google.com/fb/a/mailverify?uri=Fwebde">updates via Email</a>, to be notified of the next posts at FWebDe.</p>
<p><strong>Update:</strong> See some excellent <a href="http://fwebde.com/web-design/effective-forum-designs/">examples of effective forum designs</a>!</p>
<img src="http://feeds.feedburner.com/~r/Fwebde/~4/OSGGKsaTRx0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/web-design/forum-design/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://fwebde.com/web-design/forum-design/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.751 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-07-29 01:22:01 --><!-- Compression = gzip -->
