<?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>Tim Thorp Training &#38; Consulting &#187; webdev</title>
	<atom:link href="http://www.timthorp.com/category/webdev/feed" rel="self" type="application/rss+xml" />
	<link>http://www.timthorp.com</link>
	<description>technology made simple.</description>
	<lastBuildDate>Mon, 19 Oct 2009 14:45:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The 20 Minute WordPress Installation and Configuration</title>
		<link>http://www.timthorp.com/webdev/the-20-minute-wordpress-installation-and-configuration</link>
		<comments>http://www.timthorp.com/webdev/the-20-minute-wordpress-installation-and-configuration#comments</comments>
		<pubDate>Fri, 31 Oct 2008 19:24:46 +0000</pubDate>
		<dc:creator>Tim Thorp</dc:creator>
				<category><![CDATA[tech tips]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://www.timthorp.com/?p=17</guid>
		<description><![CDATA[So, every time I follow the famous 5 minute WordPress Installation Guide, I do a few things differently. These extra steps make the installation take around 20 minutes (if I rush), but I am writing this note, primarily for myself to document my process and also as a guide for those who like doing things [...]]]></description>
			<content:encoded><![CDATA[<p>So, every time I follow the famous 5 minute WordPress Installation Guide, I do a few things differently. These extra steps make the installation take around 20 minutes (if I rush), but I am writing this note, primarily for myself to document my process and also as a guide for those who like doing things in the way I do them. Since the wordpress installation guide is so handy and thoughtful in its presentation, I am not trying to recreate it. This post is meant to supplement the instructions in the <a href="http://codex.wordpress.org/Installing_WordPress">wordpress installation guide</a>.</p>
<ol>
<li>Login to your web hosting server and create a database and assign user permissions. This is usually done in cpanel</li>
<li>Download the latest package at <a href="http://wordpress.org/download/">http://wordpress.org/download/</a> and unzip</li>
<li>Copy wp-config-sample.php as wp-config.php and edit the first lines 3-8 so that the database connection can be made. Get the secret key for lines 13-15 at <a href="http://api.wordpress.org/secret-key/1.1/">http://api.wordpress.org/secret-key/1.1/</a></li>
<li>Optional Step: add a theme to wp-content/themes (this can be done at a later time too, but I like doing it at the beginning). Note: the theme&#8217;s name is defined in its stylesheet and should be the same as the directory that holds it.</li>
<li>FTP all files to server</li>
<li>With your browser, visit domain.com/wp-admin/install.php and follow the onscreen instructions</li>
<li>Login and Add Users</li>
<li>If you want page titles in your URLs, go to Settings | Permalinks and choose a Custom Structure. I like<tt>/%category%/%postname%</tt></li>
<li>Go to Design | Themes and choose the theme that you previously uploaded</li>
<li>Go to Design | Widgets and choose the ones you need. I usually turn on Pages and Text</li>
<li>To prevent Comment SPAM, go to Plugins and turn on Akismet. Get your API key at <a href="http://wordpress.com/">www.wordpress.com</a>. If you are a returning user, your API key is the same every time. To get it, login and choose &#8220;Your Dashboard&#8221; (on the left) and &#8220;Profile&#8221; (on the right). The API key is at the top.</li>
<li>If Google Analytics will be used, install the tracking code.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.timthorp.com/webdev/the-20-minute-wordpress-installation-and-configuration/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Export data from MySQL to CSV using PHP</title>
		<link>http://www.timthorp.com/webdev/export-as-csv</link>
		<comments>http://www.timthorp.com/webdev/export-as-csv#comments</comments>
		<pubDate>Thu, 20 Mar 2008 13:00:24 +0000</pubDate>
		<dc:creator>Tim Thorp</dc:creator>
				<category><![CDATA[webdev]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[parse]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.timthorp.com/webdev/export-as-csv</guid>
		<description><![CDATA[In a recent project, we were collecting registrations for an event using a PHP web form and a MySQL database. The office worker wanted to download all of the collected data in an excel file. In a subsequent meeting with another office worker, the idea of easily downloading the collected data into excel was very [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent project, we were collecting registrations for an event using a PHP web form and a MySQL database. The office worker wanted to download all of the collected data in an excel file. In a subsequent meeting with another office worker, the idea of easily downloading the collected data into excel was very convenient for performing mail merges and other administrative tasks, so I tried to make one &#8220;csvdump.php&#8221; file which met many needs.</p>

<div class="wp_codebox"><table><tr id="p92"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code" id="p9code2"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$tbl</span><span style="color: #339933;">=</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tbl'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//get the table to export from the parameter in the URL</span>
<span style="color: #000088;">$cur</span><span style="color: #339933;">=</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;m-j-Y&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//construct today's date </span>
<span style="color: #000088;">$filename</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;basename_&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$cur</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.csv&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//construct the default filename </span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: text/csv&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Disposition: inline; filename=<span style="color: #006699; font-weight: bold;">$filename</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;connect.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$query</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SELECT * FROM <span style="color: #006699; font-weight: bold;">$tbl</span>;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$result</span><span style="color: #339933;">=</span><span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//loop through field names and put them in the first row, separated by commas</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$field</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_field</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span> 
	<span style="color: #b1b100;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$field-&gt;name</span>,&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$fields</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #000088;">$field</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//put a line break after the first row</span>
<span style="color: #666666; font-style: italic;">//loop through records, separating them with commas</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
                <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fields</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$field</span><span style="color: #009900;">&#41;</span>
                <span style="color: #009900;">&#123;</span>
                                <span style="color: #b1b100;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$row</span>[<span style="color: #006699; font-weight: bold;">$field</span>],&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #b1b100;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//line break after each row</span>
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.timthorp.com/webdev/export-as-csv/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good looking, good working forms</title>
		<link>http://www.timthorp.com/webdev/good-looking-good-working-forms</link>
		<comments>http://www.timthorp.com/webdev/good-looking-good-working-forms#comments</comments>
		<pubDate>Sun, 02 Mar 2008 17:12:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[webdev]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[sticky forms]]></category>

		<guid isPermaLink="false">http://www.timthorp.com/webdev/good-looking-good-working-forms</guid>
		<description><![CDATA[Look, I got some old-school web form techniques that I need to upgrade. I need a user friendly, server friendly, data-worker friendly, programmer friendly, form (in order of importance). Form design shall be inspired by wufoo. It shall protect the server against SQL injection and cross site scripting. Forms will be completely filled out and [...]]]></description>
			<content:encoded><![CDATA[<p>Look, I got some old-school web form techniques that I need to upgrade. I need a user friendly, server friendly, data-worker friendly, programmer friendly, form (in order of importance). Form design shall be inspired by wufoo. It shall protect the server against SQL injection and cross site scripting. Forms will be completely filled out and data will be correctly formed. It shall have well commented, standards compliant, indented and consolidated (where appropriate) code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timthorp.com/webdev/good-looking-good-working-forms/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Classes and IDs</title>
		<link>http://www.timthorp.com/webdev/css-classes-and-ids</link>
		<comments>http://www.timthorp.com/webdev/css-classes-and-ids#comments</comments>
		<pubDate>Mon, 18 Feb 2008 12:55:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[webdev]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[ID]]></category>

		<guid isPermaLink="false">http://www.timthorp.com/webdev/css-classes-and-ids</guid>
		<description><![CDATA[I love working with sites designed with CSS and XHTML, but learning and remembering all of the syntax and rules challenges me. When should I use classes and when should I use IDs? What does the HTML and CSS look like when either is chosen?
As a general rule, IDs are meant for elements that happen [...]]]></description>
			<content:encoded><![CDATA[<p>I love working with sites designed with CSS and XHTML, but learning and remembering all of the syntax and rules challenges me. When should I use classes and when should I use IDs? What does the HTML and CSS look like when either is chosen?</p>
<p>As a general rule, IDs are meant for elements that happen once per page and classes are meant for elements that happen several times per page. In a practical sense, I think of classes as things like &#8220;alertbox&#8221;, &#8220;code&#8221;, &#8220;note&#8221;, &#8220;warning&#8221;, &#8220;productname&#8221;, etc.</p>
<p>Whereas with IDs, they are useful for page layout elements like &#8220;header&#8221;, &#8220;body&#8221;, &#8220;wrapper&#8221; and &#8220;box&#8221;. They are also useful for the name of a form and anytime you are integrating with JavaScript, IDs are more useful than classes.</p>
<p>I will approach this issue by using this page as an example. In the following paragraphs, I would like to write some code snippets and have them contained by a light grey box with a black border and courier text. Since an ID is used to identify an individual element on a page and I want to have several code snippets on this page, I should use a CSS class.</p>
<p>Classes</p>
<p>Classes refer to elements which will be used throughout the site and in some cases, several times on one page. I like to think of classes as the stylistic elements that are the pillars of the site.<br />
This is HTML for applying a class to a div:</p>

<div class="wp_codebox"><table><tr id="p67"><td class="code" id="p6code7"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;alert&quot;&gt;</pre></td></tr></table></div>

<p>This is CSS for defining a class:</p>

<div class="wp_codebox"><table><tr id="p68"><td class="code" id="p6code8"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.alert</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">color</span> <span style="color: #00AA00;">:</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>IDs</p>
<p>IDs are used for elements which occur once on a page. Their rules override class rules and can be set up differently on any page, but can only be used once per page. I use them to identify each of my form fields and page divider elements. I could use them for an alert box, as follows, but then I could only have one alert on the page.</p>
<p>This is HTML for applying an ID to a div:</p>

<div class="wp_codebox"><table><tr id="p69"><td class="code" id="p6code9"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;alert&quot;&gt;</pre></td></tr></table></div>

<p>This is CSS for defining an ID:</p>

<div class="wp_codebox"><table><tr id="p610"><td class="code" id="p6code10"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#alert</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">color</span> <span style="color: #00AA00;">:</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.timthorp.com/webdev/css-classes-and-ids/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Initial Design Meetings</title>
		<link>http://www.timthorp.com/webdev/initial-design-meetings</link>
		<comments>http://www.timthorp.com/webdev/initial-design-meetings#comments</comments>
		<pubDate>Fri, 01 Feb 2008 12:53:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[webdev]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.timthorp.com/webdev/initial-design-meetings</guid>
		<description><![CDATA[So, I&#8217;m at a meeting with a fellow office worker that wants a new system and I&#8217;m struck by how difficult it is for an internal client to talk about what they want. It&#8217;s not that they feel intrusive with making demands, but there&#8217;s just no common language. For example, working at a university, I [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;m at a meeting with a fellow office worker that wants a new system and I&#8217;m struck by how difficult it is for an internal client to talk about what they want. It&#8217;s not that they feel intrusive with making demands, but there&#8217;s just no common language. For example, working at a university, I wouldn&#8217;t expect a dean to ask me if I would be willing to make a web 2.0 system with a relational database backend and ajax form controls. What I am finding is that I have to understand their work in order to build a system.</p>
<p>This might be a stretch, but I love analogies, so I&#8217;ll give it a shot. I think the meetings are similar to what would happen if a person who never had seen a modern kitchen wanted one. He would say,</p>
<p>&#8220;I wonder if there is any way that I could cut my food components and heat them over a hot element&#8221;</p>
<p>&#8220;It would be really neat if there were a place to clean the cooking devices including a mechanism for the removal of waste material&#8221;</p>
<p>Of course there&#8217;s a way to do that, it&#8217;s called an oven and a sink. With programming, the capacity is there to do anything that you have seen on the web, but if the functional owner and the developer can&#8217;t talk clearly about what is wanted, I think the risk of misunderstanding could lead to a significant miscalculation such as an incorrect data model and there is no amount of AJAX that can clean that up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timthorp.com/webdev/initial-design-meetings/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making Decisions</title>
		<link>http://www.timthorp.com/webdev/making-decisions</link>
		<comments>http://www.timthorp.com/webdev/making-decisions#comments</comments>
		<pubDate>Wed, 16 Jan 2008 12:41:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[webdev]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[decisions]]></category>
		<category><![CDATA[priorities]]></category>

		<guid isPermaLink="false">http://www.timthorp.com/http:/www.timthorp.com/category/post-name/</guid>
		<description><![CDATA[I just got a new position as Web Developer and am busy taking things in, meeting people and learning about priorities. One of the things that stands out is the quantity of things on my plate that need improvement. I really want to get going on some of this stuff and I am interested in [...]]]></description>
			<content:encoded><![CDATA[<p>I just got a new position as Web Developer and am busy taking things in, meeting people and learning about priorities. One of the things that stands out is the quantity of things on my plate that need improvement. I really want to get going on some of this stuff and I am interested in utilizing a decision making model that is known for its reliable results. The most reliable one that I know of is to think thoroughly, brainstorm potential solutions, evaluate solutions and, ultimately, take a risk by making a decision. So, these are some of the things I need to decide about:</p>
<p>FAQ system &#8211; leaning towards Interspire ActiveKB, but maybe I should use the ASK Drupal module</p>
<p>Content Management System &#8211; down to drupal vs. joomla</p>
<p>ad-hoc forms system &#8211; this tends to be a complete hack, but I&#8217;d like to have it make some sense when it is all said and done. Kinda liking drupal webforms module. Also am considering just doing it in PHP.</p>
<p>project portfolio management. Really, a fancy name for the fact that people want stuff done and we can&#8217;t do all of it right now. We need a way to prioritize, estimate, complete and generally, to perform.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timthorp.com/webdev/making-decisions/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
