<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mySource &#187; Programming Techniques</title>
	<atom:link href="http://www.janbthomas.com/jansblog/category/programming-techniques/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.janbthomas.com/jansblog</link>
	<description>Documenting my web development and bug fixes</description>
	<lastBuildDate>Mon, 30 Aug 2010 19:56:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Capture 404 Errors Gracefully</title>
		<link>http://www.janbthomas.com/jansblog/404-errors-gracefully/</link>
		<comments>http://www.janbthomas.com/jansblog/404-errors-gracefully/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 17:38:47 +0000</pubDate>
		<dc:creator>AdminJan</dc:creator>
				<category><![CDATA[Articles and Reviews]]></category>
		<category><![CDATA[Programming Techniques]]></category>

		<guid isPermaLink="false">http://www.janbthomas.com/jansblog/?p=151</guid>
		<description><![CDATA[Broken Links, Miss-spelled addresses, Unauthorized access, and Server Errors.  Turn these errors into opportunities.  Capture and keep visitors on your website after an error has occurred by customizing the error reporting page.  Provide links, a search box, a back button and a fresh opportunity to explore your site.
Here&#8217;s the error page for [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Broken Links, Miss-spelled addresses, Unauthorized access, and Server Errors. </strong> Turn these errors into opportunities.  Capture and keep visitors on your website after an error has occurred by customizing the error reporting page.  Provide links, a search box, a back button and a fresh opportunity to explore your site.<span id="more-151"></span></p>
<p>Here&#8217;s the error page for this site:  <a href="http://www.janbthomas.com/oops" class="uline">www.janbthomas.com/oops</a></p>
<p><strong>1.  Create a custom error page in HTML. </strong> Add links, a google search box and an identifying logo.  Google has some web master tools to help.<br />
I created a page called 404.html</p>
<p><strong>2.  Use FTP to copy 404.html to the server.  </strong>The file 404.html will be displayed whenever the HTTP error code indicates the file is not found.    </p>
<p><strong>3.  Identify this file to the web server by adding a reference line in the .htaccess file. </strong> (This may vary depending on your web hosting company.)  </p>
<p>Here&#8217;s the line to add:<br />
ErrorDocument 404 http://www.your_domain.com/404.html</p>
<p><strong>4.  Upload these changes to the server.</strong></p>
<p>Here are some of the more common HTTP error codes:<br />
Client Errors<br />
   400 Bad syntax<br />
   403 Forbidden<br />
   404 Not Found &#8211; Most common</p>
<p>Server Error<br />
   500 Internal Error</p>
<p><strong>5.  As an alternative, capture all errors with the same file by adding a few lines into the .htaccess file.  </strong></p>
<p>RewriteEngine On<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule (.*) /errors.html</p>
<p>In this example, the HTML error page is called errors.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.janbthomas.com/jansblog/404-errors-gracefully/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a favicon for Your Site</title>
		<link>http://www.janbthomas.com/jansblog/creating-a-favicon/</link>
		<comments>http://www.janbthomas.com/jansblog/creating-a-favicon/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 18:52:40 +0000</pubDate>
		<dc:creator>AdminJan</dc:creator>
				<category><![CDATA[Programming Techniques]]></category>
		<category><![CDATA[favicon]]></category>

		<guid isPermaLink="false">http://www.janbthomas.com/jansblog/?p=79</guid>
		<description><![CDATA[Favicons can be temperamental.  There are an endless number of sites offering advice about the favicon.  IE seems to be the source of the frustration.  Here are a set of steps to adding a favicon to the website:
1.  Create the Graphic.  Use Photoshop or any graphic-based program to create an [...]]]></description>
			<content:encoded><![CDATA[<p>Favicons can be temperamental.  There are an endless number of sites offering advice about the favicon.  IE seems to be the source of the frustration.  Here are a set of steps to adding a favicon to the website:</p>
<p><strong>1.  Create the Graphic.</strong>  Use Photoshop or any graphic-based program to create an image that is 16X16 pixels.  Save the file in GIF or PNG format.  Save as a transparent image if possible.  (Not required.)</p>
<p><strong>2.  Convert the graphic file to an icon. </strong> If you don&#8217;t already have a good tool to create an icon, here&#8217;s a free utility: <a href=" http://tools.dynamicdrive.com/favicon/" class="uline" target="blank"> http://tools.dynamicdrive.com/favicon/</a></p>
<p><strong>3.  Name the file:</strong>  favicon.ico and put this on the webserver with your other html files.</p>
<p>4.  <strong>Put BOTH of these lines of code into the header portion of your webpage:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;icon&quot; href=&quot;http://www.yoursite.com/favicon.ico&quot; 
  type=&quot;image/x-icon&quot; /&gt;
&lt;link rel=&quot;shortcut icon&quot; href=&quot;http://www.yoursite.com/favicon.ico&quot; 
  type=&quot;image/x-icon&quot;  /&gt;</pre></div></div>

<p>5.  Load this icon from the IE and Firefox address line:<br />
http://www.yoursite.com/favicon.ico</p>
<p>6.  Now test your webpage and the favicon should appear in the browser next to your web address.  If not, try to add the webpage into the Favorites (IE) and Bookmarks(Firefox).  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.janbthomas.com/jansblog/creating-a-favicon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Text Rollovers on multiple lines Flicker</title>
		<link>http://www.janbthomas.com/jansblog/css-text-rollovers-on-multiple-lines-flicker/</link>
		<comments>http://www.janbthomas.com/jansblog/css-text-rollovers-on-multiple-lines-flicker/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 16:57:32 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[Programming Techniques]]></category>
		<category><![CDATA[multi-line roll over]]></category>

		<guid isPermaLink="false">http://www.janbthomas.com/jansblog/?p=21</guid>
		<description><![CDATA[As the mouse moves between line 1 and 2 the hover state goes away until it rolls back into line 2 of the link.
Firefox keeps the hover state active between lines of a css link.  Its only in Internet Explorer that the rollover flickers.  Here&#8217;s what I found:  if you add height: 1% to the definition [...]]]></description>
			<content:encoded><![CDATA[<p>As the mouse moves between line 1 and 2 the hover state goes away until it rolls back into line 2 of the link.</p>
<p>Firefox keeps the hover state active between lines of a css link.  Its only in Internet Explorer that the rollover flickers.  Here&#8217;s what I found:  if you add height: 1% to the definition of the css tag a then the flashing rollovers will go away.</p>
<p>a {<br />
 color: #1b155f;<br />
 text-decoration: underline;<br />
 height: 1%;<br />
}  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.janbthomas.com/jansblog/css-text-rollovers-on-multiple-lines-flicker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS:  Positioning the text to the right of the bullet in an unordered list</title>
		<link>http://www.janbthomas.com/jansblog/css-positioning-the-text-to-the-right-of-the-bullet-in-an-unordered-list/</link>
		<comments>http://www.janbthomas.com/jansblog/css-positioning-the-text-to-the-right-of-the-bullet-in-an-unordered-list/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 23:34:56 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[Programming Techniques]]></category>
		<category><![CDATA[UL bullet indentation]]></category>
		<category><![CDATA[UL bullet position]]></category>

		<guid isPermaLink="false">http://www.janbthomas.com/jansblog/?p=20</guid>
		<description><![CDATA[redefine the UL tag.  In this case I created a whole new id:
#thisul {
 list-style-position: outside;
 list-style-type: disc;
 margin-left: 30px;
}
Make sure the position is outside and there is a left margin defined for the UL.
]]></description>
			<content:encoded><![CDATA[<p>redefine the UL tag.  In this case I created a whole new id:</p>
<p>#thisul {<br />
 list-style-position: outside;<br />
 list-style-type: disc;<br />
 margin-left: 30px;<br />
}</p>
<p>Make sure the position is outside and there is a left margin defined for the UL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.janbthomas.com/jansblog/css-positioning-the-text-to-the-right-of-the-bullet-in-an-unordered-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Special Characters from database into HTML</title>
		<link>http://www.janbthomas.com/jansblog/php-special-characters-from-database-into-html/</link>
		<comments>http://www.janbthomas.com/jansblog/php-special-characters-from-database-into-html/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 04:38:03 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[Programming Techniques]]></category>

		<guid isPermaLink="false">http://www.janbthomas.com/jansblog/?p=17</guid>
		<description><![CDATA[Reserved HTML characters such as ampersand (&#038;) and greater than(>) can cause problems if they appear as ordinary text in an HTML document. The browser will mistake these reserved characters for markup. Use the php function htmlentities to convert characters such as &#038; to &#38;amp; if this becomes a problem.
Be aware though, some text such [...]]]></description>
			<content:encoded><![CDATA[<p>Reserved HTML characters such as ampersand (&#038;) and greater than(>) can cause problems if they appear as ordinary text in an HTML document. The browser will mistake these reserved characters for markup. Use the php function htmlentities to convert characters such as &#038; to &amp;amp; if this becomes a problem.</p>
<p>Be aware though, some text such as RSS feeds contain HTML markup for formatting purposes. In this case, htmlentities is NOT recommened. </p>
<p>Character encoding can also lead to display problems. To ensure proper display of special characters, pay attention to the character encoding. UTF-8 is the default character encoding for XML. ISO-8859-1 is more commonly used in HMTL. If you use UTF-8 encoding in the HTML document’s head section, the special characters from XML files and RSS will display properly.</p>
<p>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=UTF-8&#8243; /&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.janbthomas.com/jansblog/php-special-characters-from-database-into-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Word Press Issues: Indents and Paragraphs</title>
		<link>http://www.janbthomas.com/jansblog/word-press-indents/</link>
		<comments>http://www.janbthomas.com/jansblog/word-press-indents/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 04:00:31 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[Programming Techniques]]></category>
		<category><![CDATA[WordPress Techniques]]></category>

		<guid isPermaLink="false">http://www.janbthomas.com/jansblog/?p=16</guid>
		<description><![CDATA[In Word Press blogs there are no indents and paragraphs by default. Ordinarily when you hit the &#60;Enter&#62; key you get a single line but not a paragraph. When I was trying to test this, I found that if you hit the &#60;Enter&#62; twice you get a paragraph break.
The indentation is a separate issue.  I [...]]]></description>
			<content:encoded><![CDATA[<p>In Word Press blogs there are no indents and paragraphs by default. Ordinarily when you hit the &lt;Enter&gt; key you get a single line but not a paragraph. When I was trying to test this, I found that if you hit the &lt;Enter&gt; twice you get a paragraph break.</p>
<p>The indentation is a separate issue.  I was reading that most bloggers don&#8217;t indent their paragraphs.  But if you want to indent a paragraph you use the style.css and add</p>
<p>text-indent: 20px;</p>
<p>For my template, posts are defined by the CSS class:  storycontent so that&#8217;s where I would add the text-indent line to my style.css file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.janbthomas.com/jansblog/word-press-indents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use php to pass parameters in the url</title>
		<link>http://www.janbthomas.com/jansblog/use-php-to-pass-parameters-in-the-url/</link>
		<comments>http://www.janbthomas.com/jansblog/use-php-to-pass-parameters-in-the-url/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 15:57:31 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[Programming Techniques]]></category>

		<guid isPermaLink="false">http://www.janbthomas.com/jansblog/?p=15</guid>
		<description><![CDATA[  I want to pass the parameter topic on the url like this:
 http://www.cycsf.org/eventdetails.php?topic=1
Here&#8217;s how it can be done in php:
if (isset($_GET['topic']))
    $topic_id = (get_magic_quotes_gpc()) ? $_GET['topic'] : addslashes($_GET['topic']);
 else
    $topic_id = &#8221;&#8221;;
]]></description>
			<content:encoded><![CDATA[<p>  I want to pass the parameter topic on the url like this:</p>
<p> <a href="http://www.cycsf.org/eventdetails.php?topic=1">http://www.cycsf.org/eventdetails.php?topic=1</a></p>
<p>Here&#8217;s how it can be done in php:</p>
<p>if (isset($_GET['topic']))<br />
    $topic_id = (get_magic_quotes_gpc()) ? $_GET['topic'] : addslashes($_GET['topic']);<br />
 else<br />
    $topic_id = &#8221;&#8221;;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.janbthomas.com/jansblog/use-php-to-pass-parameters-in-the-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox cursor is an insertion caret on Popup Menus</title>
		<link>http://www.janbthomas.com/jansblog/firefox-cursor-is-an-insertion-caret-on-popup-menus/</link>
		<comments>http://www.janbthomas.com/jansblog/firefox-cursor-is-an-insertion-caret-on-popup-menus/#comments</comments>
		<pubDate>Thu, 31 May 2007 06:17:26 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[Programming Techniques]]></category>

		<guid isPermaLink="false">http://www.janbthomas.com/jansblog/?p=14</guid>
		<description><![CDATA[When I created a popup menu in Fireworks and Dreamweaver the popup menu in Firefox has an insertion caret.  Here&#8217;s a way to fix this:
Add a line in the javascript MM_showMenu
document.body.style.cursor = &#8216;pointer&#8217;;
At the end of the function add another line:
document.body.style.cursor = &#8216;default&#8217;;
]]></description>
			<content:encoded><![CDATA[<p>When I created a popup menu in Fireworks and Dreamweaver the popup menu in Firefox has an insertion caret.  Here&#8217;s a way to fix this:</p>
<p>Add a line in the javascript MM_showMenu<br />
document.body.style.cursor = &#8216;pointer&#8217;;</p>
<p>At the end of the function add another line:<br />
document.body.style.cursor = &#8216;default&#8217;;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.janbthomas.com/jansblog/firefox-cursor-is-an-insertion-caret-on-popup-menus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS:  create a navigation bar using the CSS list tag</title>
		<link>http://www.janbthomas.com/jansblog/css-make-list-display-horizontal-to-create-a-navigation-bar/</link>
		<comments>http://www.janbthomas.com/jansblog/css-make-list-display-horizontal-to-create-a-navigation-bar/#comments</comments>
		<pubDate>Mon, 14 May 2007 17:20:51 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[Programming Techniques]]></category>

		<guid isPermaLink="false">http://www.janbthomas.com/jansblog/?p=13</guid>
		<description><![CDATA[Here&#8217;s a quick way to create a navigation bar in CSS:  use a list.  The list-style: none removes the bullets.  The display: inline tells the list items to be positioned horizontally across the page.  I&#8217;ve used this solution when the navigation is simple.
#navlist li
{
list-style: none;
display: inline;
}
The top menu bar of this blog is created using this [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick way to create a navigation bar in CSS:  use a list.  The list-style: none removes the bullets.  The display: inline tells the list items to be positioned horizontally across the page.  I&#8217;ve used this solution when the navigation is simple.</p>
<p>#navlist li<br />
{<br />
list-style: none;<br />
display: inline;<br />
}</p>
<p>The top menu bar of this blog is created using this technique.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.janbthomas.com/jansblog/css-make-list-display-horizontal-to-create-a-navigation-bar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fade-in slideshow written in javascript</title>
		<link>http://www.janbthomas.com/jansblog/fade-in-slideshow-written-in-javascript/</link>
		<comments>http://www.janbthomas.com/jansblog/fade-in-slideshow-written-in-javascript/#comments</comments>
		<pubDate>Mon, 14 May 2007 17:11:08 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[Programming Techniques]]></category>

		<guid isPermaLink="false">http://www.janbthomas.com/jansblog/?p=12</guid>
		<description><![CDATA[I found this slideshow that fades the images during transitions.  The images can be setup with hyperlinks. The code allows for 2 slideshows simultaneously on the same page. 
Here&#8217;s a working version of this slideshow:
http://www.cccwinternights.org
Here&#8217;s where I found the code:
http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm
]]></description>
			<content:encoded><![CDATA[<p>I found this slideshow that fades the images during transitions.  The images can be setup with hyperlinks. The code allows for 2 slideshows simultaneously on the same page. </p>
<p>Here&#8217;s a working version of this slideshow:<br />
http://<a href="http://www.cccwinternights.org/">www.cccwinternights.org</a></p>
<p>Here&#8217;s where I found the code:<br />
<a href="http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm">http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.janbthomas.com/jansblog/fade-in-slideshow-written-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
