<?xml version="1.0" encoding="UTF-8"?>
<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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0">

<channel>
	<title>Flowdrops</title>
	<atom:link href="http://www.flowdrops.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flowdrops.com</link>
	<description>Coffee Addicted Web Designer, Joomla! and WordPress Developer</description>
	<lastBuildDate>Sun, 19 Apr 2009 19:52:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-nc-nd/3.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Dynamic form elements &amp; the jQuery validation plugin</title>
		<link>http://www.flowdrops.com/blog/jquery/dynamic-form-elements-the-jquery-validation-plugin/</link>
		<comments>http://www.flowdrops.com/blog/jquery/dynamic-form-elements-the-jquery-validation-plugin/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 17:50:57 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Dynamic Forms]]></category>
		<category><![CDATA[Validation]]></category>

		<guid isPermaLink="false">http://www.flowdrops.com/?p=228</guid>
		<description><![CDATA[jquery-validation-and-dynamic-forms]]></description>
			<content:encoded><![CDATA[<p>I recently run into a problem where I had to validate a form with dynamic fields. I am impressed of the <a href="http://plugins.jquery.com/project/validate" target="_blank">jQuery Validation plugin</a> but I had no clue on how to achieve this as the documentation does not have any code on this included. A few searches on in the WWW didn’t bring the right results, but I eventually found some snippet in the Google Groups (I forgot where, sorry).</p>
<p>Now, let’s say you have a form with a few elements and depending on their selection or values one or more fields are added to the form:</p>
<p><a href="http://www.flowdrops.com/demos/jquery/validation/dynamic-forms/" target="_blank">View a basic sample/demo form here</a></p>
<p>Since you cannot validate a hidden element (because the user can’t make a selection or enter anything), you cannot add validation rules. You need to add/remove this rules dynamic depending on the user’s input.</p>
<p>Actually, the code is very simple. All you have to do is to catch the ‘change’, ‘blur’ or whatever event from the ‘other’ element and attach a simple function to add the validation rule. To go with the demo form this is it:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span> jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;input[name='howhelp']&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">change</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;input[name='howhelp']:checked&quot;</span> <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;help&quot;</span> <span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#whathelp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">rules</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;add&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;required&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#problems&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</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: #000066; font-weight: bold;">else</span>
  <span style="color: #009900;">&#123;</span>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#whathelp&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">rules</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;remove&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;required&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#problems&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</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: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Simple. Let’s see what the code does line for line:</p>
<ul>
<li>line 1 tells to fire a function if the radiobuttons status have changed</li>
<li>line 3 checks if the current selected radiobutton’s value is equal to ‘help’</li>
<li>line 5 adds the validation rule to the hidden select ‘whathelp’</li>
<li>line 6 shows the hidden select</li>
<li>the rest removes the validation rule and hides the select, in this case the value was not equal to ‘help’</li>
</ul>
<p>With this code, you can validate pretty much any complex form with the validate plugin.</p>
<p>Further reading:</p>
<ul>
<li><a href="http://www.flowdrops.com/demos/jquery/validation/dynamic-forms/" target="_blank">Demo form</a></li>
<li><a href="http://jquery.com/" target="_blank">jQuery</a></li>
<li><a href="http://plugins.jquery.com/project/validate" target="_blank">jQuery Validation plugin</a></li>
<li><a href="http://docs.jquery.com/Plugins/Validation" target="_blank">jQuery Validation plugin (documentation)</a></li>
</ul>
<p>I’d like to know how you validate complex dynamic forms, so please leave your comments here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flowdrops.com/blog/jquery/dynamic-form-elements-the-jquery-validation-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Too Busy</title>
		<link>http://www.flowdrops.com/blog/flowdrops/i-am-too-busy/</link>
		<comments>http://www.flowdrops.com/blog/flowdrops/i-am-too-busy/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 19:10:13 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Flowdrops]]></category>

		<guid isPermaLink="false">http://www.flowdrops.com/flowdrops/i-am-too-busy/</guid>
		<description><![CDATA[As you already have seen, I am currently absolutely not able to keep up with my Blog. I’ve been sick for weeks, have too many tasks and jobs to complete and I’m in the process of opening a new Restaurant/Bar/Guesthouse. In short: I have no clue when I’m back here on my virtual home.
iF AJAX [...]]]></description>
			<content:encoded><![CDATA[<p>As you already have seen, I am currently absolutely not able to keep up with my Blog. I’ve been sick for weeks, have too many tasks and jobs to complete and I’m in the process of opening a new Restaurant/Bar/Guesthouse. In short: I have no clue when I’m back here on my virtual home.</p>
<h5>iF AJAX Comments For WordPress – can you do it?</h5>
<p>I also wasn’t able to keep up with the development of my plugin and unlikely will be able to update it within the coming weeks, so I made a decision:</p>
<p>If anyone wants to take over further development of the plugin, you are free to do so. There will be no support from my side. <a href="http://www.flowdrops.com/contact/">Contact me</a> if you think you are able do it.</p>
<p>That’s about it for the moment. I wish everyone a happy and successful 2009!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flowdrops.com/blog/flowdrops/i-am-too-busy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iF AJAX Comments For WordPress: Latest Beta Version</title>
		<link>http://www.flowdrops.com/blog/wordpress/if-ajax-comments-for-wordpress-latest-beta-version/</link>
		<comments>http://www.flowdrops.com/blog/wordpress/if-ajax-comments-for-wordpress-latest-beta-version/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 11:16:08 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Flowdrops]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[iF AJAX Comments For WordPress]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Update]]></category>

		<guid isPermaLink="false">http://www.flowdrops.com/?p=219</guid>
		<description><![CDATA[For those who can&#8217;t wait or want to test the upcoming version, here&#8217;s the latest beta. Tested in WP 2.7 RC1 with the default theme.
Known issues

The new comment threading function in WP 2.7 is not yet supported (the comment is added at the wrong location)

Download
iF AJAX Comments For WordPress 0.99.5b
Have fun!
]]></description>
			<content:encoded><![CDATA[<p>For those who can&#8217;t wait or want to test the upcoming version, here&#8217;s the latest beta. Tested in WP 2.7 RC1 with the default theme.</p>
<p><strong>Known issues</strong></p>
<ul>
<li>The new comment threading function in WP 2.7 is not yet supported (the comment is added at the wrong location)</li>
</ul>
<p><strong>Download</strong></p>
<p><span class="downloadLink"><a href="http://www.flowdrops.com/blog/downloads/13">iF AJAX Comments For WordPress 0.99.5b</a></span></p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flowdrops.com/blog/wordpress/if-ajax-comments-for-wordpress-latest-beta-version/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Quick Progress Note And A Few Links</title>
		<link>http://www.flowdrops.com/blog/wordpress/quick-progress-note-and-a-few-links/</link>
		<comments>http://www.flowdrops.com/blog/wordpress/quick-progress-note-and-a-few-links/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 17:01:17 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Flowdrops]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Digg]]></category>
		<category><![CDATA[iF AJAX Comments For WordPress]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Useful]]></category>

		<guid isPermaLink="false">http://www.flowdrops.com/?p=217</guid>
		<description><![CDATA[This is just a qick note &#38; response to Gene&#8217;s question &#8216;Any progress on a 2.7 compatible version now that there are public betas out there?&#8217;.
I already made some changes to the plugin to make it work with the new comments template of WP 2.7, but it is still buggy. Once the bugs are cleaned [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a qick note &amp; response to Gene&#8217;s question &#8216;Any progress on a 2.7 compatible version now that there are public betas out there?&#8217;.</p>
<p>I already made some changes to the plugin to make it work with the new comments template of WP 2.7, but it is still buggy. Once the bugs are cleaned out I will of course upload the changes for you all. WP 2.7 is soon to be released and I think that I will have time this coming weekend to work on the plugin. So, hopefully, next Sunday or Monday there will be a new version to grab &amp; enjoy for you.</p>
<p>Today I found some useful links on Digg which I would like to share with you:</p>
<ul>
<li><a href="http://www.smashingapps.com/2008/12/01/31-incredible-resources-and-inspirations-for-designers-like-you-to-discover-the-best-of-the-web-in-november.html" target="_blank">31 Incredible Resources And Inspirations For Designers</a></li>
<li><a href="http://www.toxel.com/design/2008/11/26/24-beautiful-and-creative-website-headers/" target="_blank">24 Beautiful and Creative Website Headers</a></li>
<li><a href="http://www.webresourcesdepot.com/15-must-have-bookmarklets-for-web-designers-and-developers/" target="_blank">15 Must-Have Bookmarklets For Web Designers And Developers</a></li>
<li><a href="http://www.smashingmagazine.com/2008/12/02/10-useful-rss-hacks-for-wordpress/" target="_blank">10 Useful RSS-Tricks and Hacks For WordPress</a></li>
</ul>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flowdrops.com/blog/wordpress/quick-progress-note-and-a-few-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Updates, My Plugin And Other News</title>
		<link>http://www.flowdrops.com/blog/flowdrops/site-updates-my-plugin-and-other-news/</link>
		<comments>http://www.flowdrops.com/blog/flowdrops/site-updates-my-plugin-and-other-news/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 06:37:13 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Flowdrops]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Update]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.flowdrops.com/?p=210</guid>
		<description><![CDATA[It&#8217;s time for some updates:
Site Updates

I switched from &#8216;i.Farang&#8217; to &#8216;Flowdrops&#8217;
I have made this change because I want the focus of the site to be more on my work &#38; ideas rather than my private life and other uninteresting things. I also switched to a temporary theme because WP 2.7 has broken many things on [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s time for some updates:</p>
<p><strong>Site Updates</strong></p>
<ul>
<li>I switched from &#8216;i.Farang&#8217; to &#8216;Flowdrops&#8217;<br />
I have made this change because I want the focus of the site to be more on my work &amp; ideas rather than my private life and other uninteresting things. I also switched to a temporary theme because WP 2.7 has broken many things on the site. I wanted to change the theme anyway, but not before 2009 (stay tuned, something cool is coming!)</li>
<li>I deactivated my Plugin &#8216;iF AJAX Comments for WordPress&#8217;<br />
simple reason: WP 2.7 &#8211; it breaks the plugin and I&#8217;m working on a update. It takes a little longer than expected, I just want to make sure that all new commenting features of WP 2.7 are supported. There are also a few spam plugins of which my plugin didn&#8217;t play nice. Same here: stay tuned</li>
</ul>
<p><strong>My Plugin</strong></p>
<p>WordPress 2.7 breaks my plugin &#8216;iF AJAX Comments for WordPress&#8217;! This is not something to worry about, there are just some changes in the comments template because of the threading and paging features which comes with the new WP version. The diffictult part is the threading function: the form jumps around in the comment thread but the posted comment is currently inserted at the bottom of the list. No problem though, I&#8217;ll get this done. It&#8217;s also a good opportunity for me to further optimize and clean up my code. I also like to integrate a function which makes the plugin compatible for all the themes which are using only DIVs to list the comments. Furthermore, there are still some compatibility issues with various spam plugins. I want to have all this done before releasing a new version, so: stay tuned!</p>
<p><strong>Other things to take note</strong></p>
<p>I recently made some good connections here in Thailand and over the Internet and currently getting some good projects. Means I&#8217;m a little bit busy this time but that&#8217;s good. I like being busy. The bad part is that I have not much time to take care of this site and post some good quality stuff. Everything should become normal again within the next two months. Until then: stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flowdrops.com/blog/flowdrops/site-updates-my-plugin-and-other-news/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automattic Acquired IntenseDebate’s Enhanced Comment System</title>
		<link>http://www.flowdrops.com/blog/wordpress/automattic-acquired-intensedebate%e2%80%99s-enhanced-comment-system/</link>
		<comments>http://www.flowdrops.com/blog/wordpress/automattic-acquired-intensedebate%e2%80%99s-enhanced-comment-system/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 00:24:53 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Automattic]]></category>
		<category><![CDATA[IntenseDebate]]></category>

		<guid isPermaLink="false">http://www.flowdrops.com/?p=186</guid>
		<description><![CDATA[According to this news, as well as this one and this blog post at IntenseDebate, Automattic has aquired the enhanced comment system of IntenseDebate. The coming WordPress 2.7 will include some of IntenseDebate’s features by default, including threaded commenting.
IntenseDebate originally launched to the public last October, sporting features including OpenID support, user profiles, and the [...]]]></description>
			<content:encoded><![CDATA[<p>According to <a href="http://www.techcrunch.com/2008/09/23/automattic-has-acquired-intensedebates-enhanced-comment-system/" target="_blank">this news</a>, as well as <a href="http://weblogtoolscollection.com/archives/2008/09/23/automattic-has-acquired-intensedebate/" target="_blank">this one</a> and this blog post at <a href="http://www.intensedebate.com/blog/2008/09/23/automattic-acquires-intensedebate/" target="_blank">IntenseDebate</a>, Automattic has aquired the enhanced comment system of IntenseDebate. The coming WordPress 2.7 will include some of IntenseDebate’s features by default, including threaded commenting.</p>
<p>IntenseDebate originally launched to the public last October, sporting features including OpenID support, user profiles, and the ability to track a user’s comments across multiple blogs.</p>
<p>This will probably be the end of my plugin, <a href="/projects/wordpress/wordpress-plugin-if-ajax-comments/" target="_blank">iF AJAX Comment for WordPress</a>. I already had a feeling that this could happen, <a href="/projects/wordpress/wordpress-plugin-if-ajax-comments/#comment-461" target="_blank">I commented about it</a>. When WordPress 2.7 is out, we&#8217;ll see what&#8217;s still missing.</p>
<p>More about the aquisition:</p>
<ul>
<li><a href="http://ma.tt/2008/09/intense-debate-goes-automattic/" target="_blank">http://ma.tt/2008/09/intense-debate-goes-automattic/</a></li>
<li><a href="http://toni.org/2008/09/23/automattic-acquires-intensedebate/" target="_blank">http://toni.org/2008/09/23/automattic-acquires-intensedebate/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.flowdrops.com/blog/wordpress/automattic-acquired-intensedebate%e2%80%99s-enhanced-comment-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guest Posts And the_author() In Your WordPress Blog</title>
		<link>http://www.flowdrops.com/blog/wordpress/guest-posts-and-the_author-in-your-wordpress-blog/</link>
		<comments>http://www.flowdrops.com/blog/wordpress/guest-posts-and-the_author-in-your-wordpress-blog/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 13:24:12 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Theme]]></category>

		<guid isPermaLink="false">http://www.flowdrops.com/2008/08/18/guest-posts-and-the_author-in-your-wordpress-blog/</guid>
		<description><![CDATA[As you may have seen I have a guest post on this blog written by Matt from phuketvogue.com. Since I am the only registered writer/author on this site, all posts are marked as &#8216;written by Toxane&#8217; or something similar. I thought it would be just fair for the guest writer, to mark these posts with [...]]]></description>
			<content:encoded><![CDATA[<p>As you may have seen I have a guest post on this blog written by <a href="http://whatismatt.com/" target="_blank">Matt</a> from <a href="http://phuketvogue.com/" target="_blank">phuketvogue.com</a>. Since I am the only registered writer/author on this site, all posts are marked as &#8216;written by Toxane&#8217; or something similar. I thought it would be just fair for the guest writer, to mark these posts with the corresponding author name and a link back to the author&#8217;s site.</p>
<p>What I didn&#8217;t want was to have the guest authors as registered WordPress users on my blog, just to keep things simple (and save). I came up with the following solution:</p>
<p>In my theme folder I have my &#8216;functions.php&#8217; file and I added the following code to it:</p>

<div class="wp_syntax"><table><tr><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
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Guest Posts</span>
<span style="color: #000000; font-weight: bold;">function</span> theAuthor<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$guestName</span> <span style="color: #339933;">=</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;guestName&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$guestLink</span> <span style="color: #339933;">=</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;guestLink&quot;</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;">$guestName</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$guestLink</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$guestLink</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; target=&quot;_blank&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$guestName</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">else</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$guestName</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #009900;">&#123;</span>
		the_author<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: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The code checks if the post has a custom field &#8216;guestName&#8217;. If the field is found, the code further checks if there&#8217;s a custom field &#8216;guestLink&#8217;. If that field is found as well, the code returns the name of the guest author as a hyperlink back to the guest authors website. If there&#8217;s no &#8216;guestLink&#8217;, only the guest author&#8217;s name is returned. If both custom fields are missing, the code returns &#8216;the_author()&#8217; which is the registered WordPress user.</p>
<p>Next I replaced all occurences of &#8216;the_author()&#8217; in the theme files with &#8216;theAuthor()&#8217;</p>
<p>To mark any post in your WordPress Blog as a guest post, you just add a custom field &#8216;guestName&#8217; and the name of the guest author as value. If you want the guest author&#8217;s name appears as a hyperlink, just add a custom field &#8216;guestLink&#8217; and the web address of the guest author as value.</p>
<p>That&#8217;s it. Simple and fair for your guest author(s).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flowdrops.com/blog/wordpress/guest-posts-and-the_author-in-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress, My Gravatar and the Mystery Man</title>
		<link>http://www.flowdrops.com/blog/wordpress/wordpress-my-gravatar-and-the-mystery-man/</link>
		<comments>http://www.flowdrops.com/blog/wordpress/wordpress-my-gravatar-and-the-mystery-man/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 05:04:34 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Gravatars]]></category>
		<category><![CDATA[Mystery Man]]></category>

		<guid isPermaLink="false">http://www.flowdrops.com/?p=170</guid>
		<description><![CDATA[I just had a problem with my own gravatar not showing up on my own site for the comments I wrote. First I thought that clearing the browser cache would solve everything. I was wrong. After clearing the cache, deleting cookies and checking my gravatar (http://en.gravatar.com/site/check/), I was really out of (quick) ideas. Then it [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_174" class="wp-caption alignright" style="width: 106px"><img class="size-full wp-image-174" title="Mystery Man" src="http://www.flowdrops.com/wp-content/uploads/2008/08/mystery-man.jpeg" alt="Mystery Man - the default Gravatar" width="96" height="96" /><p class="wp-caption-text">Mystery Man - the default Gravatar</p></div>
<p>I just had a problem with my own <a href="http://www.gravatar.com/" target="_blank">gravatar</a> not showing up on my own site for the comments I wrote. First I thought that clearing the browser cache would solve everything. I was wrong. After clearing the cache, deleting cookies and checking my gravatar (<a href="http://en.gravatar.com/site/check/" target="_blank">http://en.gravatar.com/site/check/</a>), I was really out of (quick) ideas. Then it suddenly hit me: a few days ago I changed a few things in my Blog&#8217;s user accounts. I added new accounts with different user rights and merged the old accounts with the new ones.</p>
<p>After having a look at WordPress&#8217;s gravatar code (wp-includes/pluggable.php), everything was clear: WordPress actually pulls the user id and gets the email address which is stored in the user account data for this id. This ensures that if a user changes the email address in the user account, it will always pull the new gravatar associated with the new email address. The user id &#8211; for registered users &#8211; is stored in the comments table for each and every comment.</p>
<p>That said, if you change user accounts and a user id changes, you need to run</p>
<pre>UPDATE wp_comments SET user_id = new_user_id WHERE user_id = old_user_id</pre>
<p>otherwise you&#8217;re going to have a lot comments from the mystery man&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flowdrops.com/blog/wordpress/wordpress-my-gravatar-and-the-mystery-man/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PayPal donation form with CSS and jQuery for WordPress</title>
		<link>http://www.flowdrops.com/blog/wordpress/paypal-donation-form-with-css-and-jquery-for-wordpress/</link>
		<comments>http://www.flowdrops.com/blog/wordpress/paypal-donation-form-with-css-and-jquery-for-wordpress/#comments</comments>
		<pubDate>Sun, 03 Aug 2008 05:00:26 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Donation]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PayPal]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.flowdrops.com/?p=157</guid>
		<description><![CDATA[Learn how to create a PayPal donation form, beautify it with a little bit CSS and validate the input with jQuery. You can also integrate the form into WordPress as a page template. ]]></description>
			<content:encoded><![CDATA[<p>Yesterday I got an email from Jamie asking me how I made my <a href="http://www.flowdrops.com/donate/" target="_blank">PayPal donation</a> form. Here&#8217;s how I did it.</p>
<p>First, we need a PayPal form with the donation stuff inside:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;form_paypal&quot;</span> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://www.paypal.com/cgi-bin/webscr&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cmd&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;_donations&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;business&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;paypal@email.com&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;item_name&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;My Donations Subject&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;no_shipping&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;no_note&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;1&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;currency_code&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;USD&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tax&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;bn&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;PP-DonationsBF&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span>&gt;</span>Amount (US$) : <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;amount&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;input_amount&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Donate&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span></pre></td></tr></table></div>

<p>More information about the PayPal donation buttons and the form code behind can be found here: <a title="https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_donate_techview_outside" href="https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_donate_techview_outside">https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_donate_techview_outside</a></p>
<p>Next, we need to add some more code to the form where we want to show the various messages displayed by jQuery. These messages are set to be hidden (display:none;):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Donate&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><span style="color: #ddbb00;">&amp;nbsp;&amp;nbsp;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msg_moreamount&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;icon_warning red&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;display:none;&quot;</span>&gt;</span>PayPal takes $0.35 commission for a $1 donation. Please enter at least $1.35 , thank you!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msg_noamount&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;icon_warning red&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;display:none;&quot;</span>&gt;</span>Please enter the amount you wish to donate and try again.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msg_activity&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;display:none;&quot;</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/loader.gif&quot;</span> <span style="color: #000066;">align</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;absmiddle&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><span style="color: #ddbb00;">&amp;nbsp;</span>Transferring to PayPal, please wait...<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span></pre></td></tr></table></div>

<p>The jQuery script which actually checks and validates the form looks like this:</p>

<div class="wp_syntax"><table><tr><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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">// the minimum required value to be entered.</span>
	<span style="color: #006600; font-style: italic;">// in this case PayPal takes $0.35 from a $1</span>
	<span style="color: #006600; font-style: italic;">// donation, hence we ask for at least $1.35</span>
	<span style="color: #003366; font-weight: bold;">var</span> minimum_value <span style="color: #339933;">=</span> <span style="color: #CC0000;">1.35</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// attach this script to the form's submit action</span>
	jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#form_paypal'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #006600; font-style: italic;">// check if there is an amount entered</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#input_amount'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #006600; font-style: italic;">// is the amount equal to or higher than the minimum_value?</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#input_amount'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> minimum_value<span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #006600; font-style: italic;">// need more amount</span>
				<span style="color: #006600; font-style: italic;">// hide messages, show more amount error</span>
				jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#msg_noamount'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#msg_moreamount'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// prevent the form from submitting</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #000066; font-weight: bold;">else</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #006600; font-style: italic;">// amount is more than minimum_value</span>
				<span style="color: #006600; font-style: italic;">// hide messages, show activity</span>
				jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#msg_moreamount'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#msg_noamount'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#msg_activity'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// submit the form</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000066; font-weight: bold;">else</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #006600; font-style: italic;">// no amount entered at all</span>
			<span style="color: #006600; font-style: italic;">// hide messages, show no amount error</span>
			jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#msg_moreamount'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#msg_noamount'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// prevent the form from submitting</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The code is documented so it should be clear what each block does.</p>
<p>The final step is to add some CSS styling:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.red</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;">#ff0000</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.icon_warning</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:<span style="color: #993333;">transparent</span> </span>url<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">../images/exclamation.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>padding<span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>padding-<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: #00AA00;">&#125;</span>
form<span style="color: #cc00cc;">#form_paypal</span> input <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span><span style="color: #00AA00;">;</span>border<span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ddd</span><span style="color: #00AA00;">;</span>background<span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fefefe</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
form<span style="color: #cc00cc;">#form_paypal</span> input<span style="color: #cc00cc;">#input_amount</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">50px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
form<span style="color: #cc00cc;">#form_paypal</span> <span style="color: #6666ff;">.submit</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span><span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>border-style<span style="color: #00AA00;">:</span><span style="color: #993333;">outset</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>If you want to integrate this form into your WordPress Blog then this is the way to go:</p>
<p>In your WordPress Theme folder (wp-content/themes/yourtheme/) create a new file named &#8216;donate.php&#8217;. To make the file available as a WordPress page template you&#8217;ll need to add the following code at the top of the file:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/*
Template Name: Donate
*/</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>A donation form template for the default theme would look like this:</p>

<div class="wp_syntax"><table><tr><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
27
28
29
30
31
32
33
34
35
36
37
38
39
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/*
Template Name: Donate
*/</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot;&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>have_posts<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: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;div class=&quot;post&quot; id=&quot;post-<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
    &lt;h2&gt;Make A Donation&lt;/h2&gt;
    &lt;p&gt;If you think you have benefited or I have helped you in some way, by using any of my 
    WordPress plugins or themes, please consider making a donation. Donations support the 
    continued development of my websites and help cover the hosting costs. 
    Donations of any size are gratefully accepted. Thank you!&lt;/p&gt;
    &lt;form id=&quot;ppDonate&quot; action=&quot;https://www.paypal.com/cgi-bin/webscr&quot; method=&quot;post&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_donations&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;business&quot; value=&quot;paypal@email.com&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;item_name&quot; value=&quot;My Donations Subject&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;no_shipping&quot; value=&quot;0&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;no_note&quot; value=&quot;1&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;tax&quot; value=&quot;0&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;bn&quot; value=&quot;PP-DonationsBF&quot;&gt;
      &lt;label for=&quot;&quot;&gt;Amount (US$) : &lt;/label&gt;
      &lt;input type=&quot;text&quot; name=&quot;amount&quot; id=&quot;ppAmount&quot; width=&quot;10&quot; class=&quot;text&quot; /&gt;
      &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Donate&quot; class=&quot;submit&quot; /&gt;
      &lt;span id=&quot;moreAmount&quot; class=&quot;warningIcon red&quot; style=&quot;display:none;&quot;&gt;PayPal takes $0.35 commission for $1 donation. 
      Please enter at least $1.35 , thank you!&lt;/span&gt;
      &lt;span id=&quot;noAmount&quot; class=&quot;warningIcon red&quot; style=&quot;display:none;&quot;&gt;Please enter an amount to donate and try again.&lt;/span&gt;
      &lt;span id=&quot;ppGo&quot; style=&quot;display:none;&quot;&gt;
      &lt;img src=&quot;&amp;lt;?php bloginfo('template_url'); ?&amp;gt;/images/loader.gif&quot; align=&quot;absmiddle&quot; /&gt;Transferring to PayPal, please wait...&lt;/span&gt;
    &lt;/form&gt;
    &lt;p&gt;&lt;small&gt;Info : once you click on 'Donate', you will be transferred to PayPal where you can enter your payment information.&lt;/small&gt;&lt;/p&gt;
  &lt;/div&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_post_link<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit this entry.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;p&gt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;/p&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_sidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Next you need to create a page in WordPress, call it &#8216;Donate&#8217;, &#8216;Make A Donation&#8217; or whatever you want the page title to be. You can leave the page content empty as we will use our template file. Scroll down to the &#8216;Page Template&#8217; section and select your page template (&#8217;Donate&#8217; in our case). Save &amp; publish the page.</p>
<p><strong>Available Files</strong></p>
<ul>
<li><span class="downloadLink"><a href="http://www.flowdrops.com/blog/downloads/10">Donation Form Example</a></span></li>
<li><span class="downloadLink"><a href="http://www.flowdrops.com/blog/downloads/11">Donation Form &#8211; WordPress Page Template (default theme)</a></span></li>
</ul>
<p>&nbsp;</p>
<p>Hopefully this short tutorial will be of some use for you (if so, don&#8217;t forget to <a href="http://www.flowdrops.com/donate/" target="_blank">donate</a> ;) ) and if you still have some questions feel free to leave a comment below.</p>
<p><strong>Received Donations</strong></p>
<ul>
<li>Sun 8/17/2008, $5.00 &bull; Saarthak, <a href="http://lughole.net/" target="_blank">http://lughole.net/</a></li>
<li>Mon 10/13/2008, $50.00 &bull; Armando, <a href="http://www.criteriondg.info/" target="_blank">http://www.criteriondg.info/</a></li>
<li>Tue 2/17/2009, $2.00 &bull; McDowell Crook</li>
</ul>
<p>Thank You!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flowdrops.com/blog/wordpress/paypal-donation-form-with-css-and-jquery-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Is Woopra worth the Hype?</title>
		<link>http://www.flowdrops.com/blog/nonsense/is-woopra-worth-the-hype/</link>
		<comments>http://www.flowdrops.com/blog/nonsense/is-woopra-worth-the-hype/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 08:44:53 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[Woopra]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.flowdrops.com/?p=146</guid>
		<description><![CDATA[I was having a look at another web site&#8217;s page source and I was wondering about a script tag in its footer. This is how I found Woopra. &#8216;Woopra is the world&#8217;s most comprehensive, information rich, easy to use, real-time Web tracking and analysis application.&#8217; states the frontpage of Woopra&#8217;s web site. Ok, I&#8217;ll give [...]]]></description>
			<content:encoded><![CDATA[<p>I was having a look at another web site&#8217;s page source and I was wondering about a script tag in its footer. This is how I found <a href="http://www.woopra.com" target="_blank">Woopra</a>. &#8216;Woopra is the world&#8217;s most comprehensive, information rich, easy to use, real-time Web tracking and analysis application.&#8217; states the frontpage of Woopra&#8217;s web site. Ok, I&#8217;ll give it a shot.</p>
<p>When I registered my Woopra account, I almost instantly got a email with the registration confirmation link. &#8216;Cool&#8217; was my thought, &#8216;now I&#8217;m checking out how feature rich this thing is&#8217;. After registration, you have to add a web site profile. I did that and was checking my mail account every few hours for the approval confirmation. After several hours and no response I got a little nervous and went to the <a href="http://www.woopra.com/forums/" target="_blank">Woopra Forums</a> to check out if there&#8217;s something about the approval time. Indeed, there are quite many topics about the site approvals. This made me &#8216;a little&#8217; pissed because they haven&#8217;t stated this anywhere. Just a line like &#8216;during beta, it may take several weeks to get your web site approved for Woopra &#8216; or something like that would have make things clear. Ok, I&#8217;ll wait.</p>
<p>8 days later my site got approved. Fired up the Woopra Client and was quite impressed by the UI (User Interface). Several days and X tests later I feel that Woopra is not really worth the hype. There are only a few features which makes Woopra different from other statistic app&#8217;s: the rich user interface, the real time analytics and the proactive chat function. I have the real time analytics with my <a href="http://pmetrics.performancing.com/6145" target="_blank">PMetrics</a> account, don&#8217;t need the proactive chat function (and I personally hate it when I get interrupted by those marketing assistants or whoever while browsing a site) and for the rich UI, there&#8217;s something in the pipe: <a href="http://www.aboutnico.be/index.php/2008/07/31/google-analytics-air-back-up/" target="_blank">Google Analytics AIR</a> (<a href="http://www.aboutnico.be/index.php/google-analytics-air-beta-sign-up/" target="_blank">Screenshots</a>)</p>
<p>Beside all that, the collected statistic results were far away from my other stats software (<a href="http://awstats.sourceforge.net" target="_blank">AWStats</a>, <a href="http://www.webalizer.org/" target="_blank">Webalizer</a>, <a href="http://www.google.com/analytics/" target="_blank">Google Analytics</a> and <a href="http://pmetrics.performancing.com/6145" target="_blank">PMetrics</a>).</p>
<p>Woopra&#8217;s competitors do not sleep and I think we can expect some new things soon. Time will tell.</p>
<p><strong>Further readings:</strong></p>
<ul>
<li><a href="http://www.woopra.com" target="_blank">Woopra</a></li>
<li><a href="http://www.google.com/analytics/" target="_blank">Google Analytics</a></li>
<li><a href="http://www.aboutnico.be/index.php/2008/07/31/google-analytics-air-back-up/" target="_blank">Google Analytics AIR</a></li>
<li><a href="http://www.epikone.com/blog/" target="_blank">Analytics Talk</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.flowdrops.com/blog/nonsense/is-woopra-worth-the-hype/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
