<?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>ErumMunir.com &#187; Code</title>
	<atom:link href="http://www.erummunir.com/category/code/feed" rel="self" type="application/rss+xml" />
	<link>http://www.erummunir.com</link>
	<description></description>
	<lastBuildDate>Thu, 17 Sep 2009 09:10:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Clear Text On Input Field On Click</title>
		<link>http://www.erummunir.com/240/clear-text-on-input-field-on-click</link>
		<comments>http://www.erummunir.com/240/clear-text-on-input-field-on-click#comments</comments>
		<pubDate>Sat, 13 Sep 2008 17:31:43 +0000</pubDate>
		<dc:creator>Erum Munir</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Clear Text]]></category>
		<category><![CDATA[Input Field]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[On Click]]></category>
		<category><![CDATA[OnClick]]></category>

		<guid isPermaLink="false">http://www.erummunir.com/?p=240</guid>
		<description><![CDATA[Ever wanted to add text to your input fields and have it disappear when your visitor starts adding their info?
Better still, have it reappear if the visitor adds nothing?
Like this:





 
Here&#8217;s the code:
&#60;input type="text" name="field-name-here" onclick="this.value='';"  onfocus="this.select()" onblur="this.value=!this.value?'Enter Email To Get Updates':this.value;"  value="Enter Email To Get Updates" /&#62;
Replace Enter Email To Get Updates [...]<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/240/clear-text-on-input-field-on-click">Clear Text On Input Field On Click</a></p>



Related posts:<ol><li><a href='http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution' rel='bookmark' title='Permanent Link: CForms II &#8211; The All In One Contact Form Solution'>CForms II &#8211; The All In One Contact Form Solution</a> <small>Cforms II is a Wordpress plugin which makes it easy...</small></li><li><a href='http://www.erummunir.com/43/a-little-hack-to-get-your-password-back' rel='bookmark' title='Permanent Link: A Little Hack to Get Your Password Back'>A Little Hack to Get Your Password Back</a> <small>This can either be a very useful or a very...</small></li><li><a href='http://www.erummunir.com/118/adding-live-preview-for-comments' rel='bookmark' title='Permanent Link: Adding Live Preview For Comments'>Adding Live Preview For Comments</a> <small>If you scroll down you will see a live preview...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to add text to your input fields and have it disappear when your visitor starts adding their info?</p>
<p>Better still, have it reappear if the visitor adds nothing?</p>
<p>Like this:</p>
<form class="updates" style="padding:0px; margin:0px; text-align:left; margin-bottom:20px;" action="http://www.feedburner.com/fb/a/emailverify" method="post" target="popupwindow" onsubmit="window.open('http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2154386', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
<input type="text" onclick="this.value='';"  onfocus="this.select()" onblur="this.value=!this.value?'Enter Email To Get Updates':this.value;" style="width:150px;   font-size: 11px;" name="email" value="Enter Email To Get Updates"/>
<input type="hidden" value="http://feeds.feedburner.com/~e?ffid=2154386" name="url"/>
<input type="hidden" value="ErumMunir.com" name="title"/>
<input type="hidden" name="loc" value="en_US"/>
<input type="submit" value="Sign Up"  class="submit" /> </form>
<h2>Here&#8217;s the code:</h2>
<p class="box"><code>&lt;input type="text" name="field-name-here" onclick="this.value='';"  onfocus="this.select()" onblur="this.value=!this.value?'Enter Email To Get Updates':this.value;"  value="Enter Email To Get Updates" /&gt;</code></p>
<p>Replace <em>Enter Email To Get Updates</em> with your own text.</p>
<p>Just a simple technique which works great. </p>
<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/240/clear-text-on-input-field-on-click">Clear Text On Input Field On Click</a></p>


<p>Related posts:<ol><li><a href='http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution' rel='bookmark' title='Permanent Link: CForms II &#8211; The All In One Contact Form Solution'>CForms II &#8211; The All In One Contact Form Solution</a> <small>Cforms II is a Wordpress plugin which makes it easy...</small></li><li><a href='http://www.erummunir.com/43/a-little-hack-to-get-your-password-back' rel='bookmark' title='Permanent Link: A Little Hack to Get Your Password Back'>A Little Hack to Get Your Password Back</a> <small>This can either be a very useful or a very...</small></li><li><a href='http://www.erummunir.com/118/adding-live-preview-for-comments' rel='bookmark' title='Permanent Link: Adding Live Preview For Comments'>Adding Live Preview For Comments</a> <small>If you scroll down you will see a live preview...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.erummunir.com/240/clear-text-on-input-field-on-click/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Separate Your Trackbacks From Your Comments</title>
		<link>http://www.erummunir.com/126/separate-your-trackbacks-from-your-comments</link>
		<comments>http://www.erummunir.com/126/separate-your-trackbacks-from-your-comments#comments</comments>
		<pubDate>Thu, 07 Aug 2008 18:37:46 +0000</pubDate>
		<dc:creator>Erum Munir</dc:creator>
				<category><![CDATA[All Things Wordpress]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Comments]]></category>
		<category><![CDATA[Pingbacks]]></category>
		<category><![CDATA[Trackbacks]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://www.erummunir.com/?p=126</guid>
		<description><![CDATA[It is amazing how many blogs do not do this. They have the messiest comments section with a zillion comments, trackbacks and pingbacks all jumbled up. And it is almost impossible to make some sense of out of the entire mess. Want to follow the conversation? Try evading the trackbacks and pingbacks along the way.
What&#8217;s [...]<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/126/separate-your-trackbacks-from-your-comments">Separate Your Trackbacks From Your Comments</a></p>



Related posts:<ol><li><a href='http://www.erummunir.com/118/adding-live-preview-for-comments' rel='bookmark' title='Permanent Link: Adding Live Preview For Comments'>Adding Live Preview For Comments</a> <small>If you scroll down you will see a live preview...</small></li><li><a href='http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution' rel='bookmark' title='Permanent Link: CForms II &#8211; The All In One Contact Form Solution'>CForms II &#8211; The All In One Contact Form Solution</a> <small>Cforms II is a Wordpress plugin which makes it easy...</small></li><li><a href='http://www.erummunir.com/111/explode-and-increase-comments-using-these-wordpress-plugins' rel='bookmark' title='Permanent Link: Explode and Increase Comments Using These Wordpress Plugins'>Explode and Increase Comments Using These Wordpress Plugins</a> <small>I have already discussed a few techniques and plugins you...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>It is amazing how many blogs do not do this. They have the messiest comments section with a zillion comments, trackbacks and pingbacks all jumbled up. And it is almost impossible to make some sense of out of the entire mess. Want to follow the conversation? Try evading the trackbacks and pingbacks along the way.</p>
<h2>What&#8217;s the solution?</h2>
<p>Separate the two, of course.</p>
<p><strong>But How?</strong></p>
<p>That&#8217;s a good question. You will find plugins that do this but if you can manage something in the theme design, it is best to do so rather than install plugin upon plugin. Plugins are best used where you cannot achieve your objective without touching the core Wordpress files.</p>
<p style="padding-bottom:0px;"><span id="more-126"></span></p>
<p>In this case all you need to work with is your theme&#8217;s comments.php file.</p>
<h2>Step One &#8211; Counting Comments and Trackbacks</h2>
<p>Since the normal comment count includes both the comments and trackbacks, we first need to get a separate count for each.</p>
<p>Find this line in comments.php</p>
<p class="box"><code>&lt;!-- You can start editing here. --&gt;</code></p>
<p>Add the following code under it</p>
<pre><code>&lt;?php
$numTrackBacks = 0;
$numComments = 0;

foreach ($comments as $comment) {
$comment_type = get_comment_type(); 
if ($comment_type != 'comment') { $numTrackBacks++; }
else { $numComments++; }
}
?&gt;</code></pre>
<p><strong>Basic gist: </strong><br />
First we set $numTrackBacks and $numComments as 0. We then check the database and loop thru the comments and trackbacks. If the record retrieved is not a comment then a number is added to the trackback count otherwise the comment count is increased.</p>
<h2>Step Two &#8211; Showing the Comment Count</h2>
<p>Next we need to show the comment count before we display the comments.</p>
<p>Find this line</p>
<p class="box"><code>&lt;?php if ($comments) : ?&gt;</code></p>
<p>and add this code after it:</p>
<pre><code>&lt;?php echo $numComments;?&gt; 
&lt;? if ($numComments = 1) :?&gt;
Response
&lt;? else : ?&gt;
Responses
&lt;? endif; ?&gt;
to &amp;#8220;&lt;?php the_title(); ?&gt;&amp;#8221;</code></pre>
<p>This will spit out the comment count in this format:<br />
1 Response for &#8216;Post Title&#8217;<br />
5 Responses for &#8216;Post Title&#8217;</p>
<h2>Step Three &#8211; Displaying The Comments</h2>
<p>Next we have to display comments. Look for this line:</p>
<p class="box"><code>&lt;?php foreach ($comments as $comment) : ?&gt;</code></p>
<p>And add these two lines after it:</p>
<pre><code>&lt;?php $comment_type = get_comment_type(); ?&gt;
&lt;?php if($comment_type == 'comment') { ?&gt;</code></pre>
<p>What we are doing here is checking to see if the record retrieved is a comment.<br />
If so then we display it.</p>
<p>Since we have opened a loop, we also need to close it.</p>
<p>Find the line</p>
<p class="box"><code>&lt;?php endforeach; /* end for each comment */ ?&gt;</code></p>
<p>and replace it with:</p>
<pre><code>&lt;?php } /* End of is_comment statement */ ?&gt;
&lt;?php endforeach; /* end for each comment */ ?&gt;</code></pre>
<p>We have successfully displayed our comments without any trackbacks or pingbacks.</p>
<h2>Step Four &#8211; Displaying Trackbacks and Pingbacks</h2>
<p>Time to display our trackbacks and pingbacks.</p>
<p>Add this code right after you finish displaying the comments (in most themes it would be after the /ol tag):</p>
<pre>
<code>&lt;? if ($numTrackBacks != 0) :?&gt;
&lt;br /&gt;
&lt;h3&gt;Trackbacks and Pings 
(&lt;? echo $numTrackBacks; ?&gt;)&lt;/h3&gt;
&lt;? endif; ?&gt;
&lt;ol&gt;
&lt;?php foreach ($comments as $comment) : ?&gt;
&lt;?php $comment_type = get_comment_type(); ?&gt;
&lt;?php if($comment_type != 'comment') { ?&gt;
&lt;li&gt;&lt;?php comment_author_link() ?&gt;&lt;/li&gt;
&lt;?php } ?&gt;
&lt;?php endforeach; ?&gt;
&lt;/ol&gt;</code>
</pre>
<p>You can change the styling and format to suit your site. However, this basic code will show your trackbacks and pingbacks separated from your comments.</p>
<p>&#8211;</p>
<p>Now there is no excuse to not clean up your blog and organize your comments.</p>
<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/126/separate-your-trackbacks-from-your-comments">Separate Your Trackbacks From Your Comments</a></p>


<p>Related posts:<ol><li><a href='http://www.erummunir.com/118/adding-live-preview-for-comments' rel='bookmark' title='Permanent Link: Adding Live Preview For Comments'>Adding Live Preview For Comments</a> <small>If you scroll down you will see a live preview...</small></li><li><a href='http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution' rel='bookmark' title='Permanent Link: CForms II &#8211; The All In One Contact Form Solution'>CForms II &#8211; The All In One Contact Form Solution</a> <small>Cforms II is a Wordpress plugin which makes it easy...</small></li><li><a href='http://www.erummunir.com/111/explode-and-increase-comments-using-these-wordpress-plugins' rel='bookmark' title='Permanent Link: Explode and Increase Comments Using These Wordpress Plugins'>Explode and Increase Comments Using These Wordpress Plugins</a> <small>I have already discussed a few techniques and plugins you...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.erummunir.com/126/separate-your-trackbacks-from-your-comments/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Live Preview For Comments</title>
		<link>http://www.erummunir.com/118/adding-live-preview-for-comments</link>
		<comments>http://www.erummunir.com/118/adding-live-preview-for-comments#comments</comments>
		<pubDate>Wed, 06 Aug 2008 10:38:35 +0000</pubDate>
		<dc:creator>Erum Munir</dc:creator>
				<category><![CDATA[All Things Wordpress]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Comments]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.erummunir.com/?p=118</guid>
		<description><![CDATA[If you scroll down you will see a live preview option for comments. Just try it out by typing in a comment. Pretty cool, huh!?
A friend asked me why this was useful and why anyone will want to see their comment twice? 
My answer:  If your comment is pretty long, the textarea will start [...]<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/118/adding-live-preview-for-comments">Adding Live Preview For Comments</a></p>



Related posts:<ol><li><a href='http://www.erummunir.com/126/separate-your-trackbacks-from-your-comments' rel='bookmark' title='Permanent Link: Separate Your Trackbacks From Your Comments'>Separate Your Trackbacks From Your Comments</a> <small>It is amazing how many blogs do not do this....</small></li><li><a href='http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution' rel='bookmark' title='Permanent Link: CForms II &#8211; The All In One Contact Form Solution'>CForms II &#8211; The All In One Contact Form Solution</a> <small>Cforms II is a Wordpress plugin which makes it easy...</small></li><li><a href='http://www.erummunir.com/16/adding-code-to-your-wordpress-post' rel='bookmark' title='Permanent Link: Adding Code To Your Wordpress Post'>Adding Code To Your Wordpress Post</a> <small>Trying to add code to your wordpress post can be...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>If you scroll down you will see a live preview option for comments. Just try it out by typing in a comment. Pretty cool, huh!?</p>
<p>A friend asked me why this was useful and why anyone will want to see their comment twice? </p>
<p>My answer:  If your comment is pretty long, the textarea will start to scroll and you won&#8217;t be able to look at your entire comment in on go. The preview on the other hand shows the comment in its entirety. This way you can see how it looks and proof read with ease before you post.</p>
<p style="padding-bottom:0px;"><span id="more-118"></span></p>
<p>I have gotten this technique from the <a href="http://www.rockatee.com/blog/creating-a-simple-comment-live-preview-to-use-with-expressionengine/" target="_blank">Rockatee Blog</a>. So a big thank you to Maleika.</p>
<ol>
<li>First things first. You need to <a href="http://www.jquery.com" target="_blank">download jQuery</a>. Lets just name it jquery.js and place it in  your theme folder. </li>
<li>Next download <a href="http://www.erummunir.com/wp-content/themes/em/preview.js">this file</a> and place it in your theme folder.</li>
<li>Now open header.php from your theme and add these lines in the head area:
<p class="box"><code>&lt;script type="text/javascript" src="&lt;?php bloginfo('template_directory'); ?&gt;/jquery.js"&gt;&lt;/script&gt; 
&lt;script type="text/javascript" src="&lt;?php bloginfo('template_directory'); ?&gt;/preview.js"&gt;&lt;/script&gt;</code></p>
</li>
<li>Last step is to add the following code to you comments.php file wherever you want the live preview to show up.
<p class="box"><code>&lt;div class="comment-preview"&gt; 
&lt;h3&gt;My Comment Preview&lt;/h3&gt; 
&lt;p class="live-preview"&gt;Add some instructions - this text will get replaced by the comment preview.&lt;/p&gt; 
&lt;/div&gt;</code></p>
</li>
<li>You can use the class p.live-preview to style the live comment preview.
</ol>
<p>See that was simple and you have your own comment live preview.</p>
<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/118/adding-live-preview-for-comments">Adding Live Preview For Comments</a></p>


<p>Related posts:<ol><li><a href='http://www.erummunir.com/126/separate-your-trackbacks-from-your-comments' rel='bookmark' title='Permanent Link: Separate Your Trackbacks From Your Comments'>Separate Your Trackbacks From Your Comments</a> <small>It is amazing how many blogs do not do this....</small></li><li><a href='http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution' rel='bookmark' title='Permanent Link: CForms II &#8211; The All In One Contact Form Solution'>CForms II &#8211; The All In One Contact Form Solution</a> <small>Cforms II is a Wordpress plugin which makes it easy...</small></li><li><a href='http://www.erummunir.com/16/adding-code-to-your-wordpress-post' rel='bookmark' title='Permanent Link: Adding Code To Your Wordpress Post'>Adding Code To Your Wordpress Post</a> <small>Trying to add code to your wordpress post can be...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.erummunir.com/118/adding-live-preview-for-comments/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CForms II &#8211; The All In One Contact Form Solution</title>
		<link>http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution</link>
		<comments>http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution#comments</comments>
		<pubDate>Sun, 03 Aug 2008 12:52:25 +0000</pubDate>
		<dc:creator>Erum Munir</dc:creator>
				<category><![CDATA[All Things Wordpress]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[CForms]]></category>
		<category><![CDATA[Comments]]></category>
		<category><![CDATA[Contact Form]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>

		<guid isPermaLink="false">http://www.erummunir.com/?p=76</guid>
		<description><![CDATA[Cforms II is a Wordpress plugin which makes it easy for you to add a contact form to your website.
Once you install and activate the plugin, don&#8217;t get intimidated by the dozens of  options available. It is pretty easy to set up. Click on CForms from your WP admin menu.

Click to view the bigger [...]<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution">CForms II &#8211; The All In One Contact Form Solution</a></p>



Related posts:<ol><li><a href='http://www.erummunir.com/154/cforms-ii-more-on-using-as-a-comment-form' rel='bookmark' title='Permanent Link: CForms II &#8211; More on Using as a Comment Form'>CForms II &#8211; More on Using as a Comment Form</a> <small>Good news! There is a new version of CForms that...</small></li><li><a href='http://www.erummunir.com/8/most-useful-wordpress-plugins' rel='bookmark' title='Permanent Link: Most Useful Wordpress Plugins'>Most Useful Wordpress Plugins</a> <small>Since I design custom blogs for my clients, I have...</small></li><li><a href='http://www.erummunir.com/36/updated-list-of-important-and-useful-wordpress-plugins-wp-251' rel='bookmark' title='Permanent Link: Updated List of Important and Useful Wordpress Plugins (WP 2.5.1)'>Updated List of Important and Useful Wordpress Plugins (WP 2.5.1)</a> <small>It is time for an updated list of useful Wordpress...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.deliciousdays.com/cforms-plugin" target="_blank">Cforms II</a> is a Wordpress plugin which makes it easy for you to add a contact form to your website.</p>
<p>Once you install and activate the plugin, don&#8217;t get intimidated by the dozens of  options available. It is pretty easy to set up. Click on CForms from your WP admin menu.</p>
<p><a href="http://www.erummunir.com/wp-content/uploads/2008/08/1.jpg" style="background: none;" rel='gb_image[]'><img src="http://www.erummunir.com/wp-content/uploads/2008/08/2.jpg" alt="Click to view bigger image" /></a><br />
<small>Click to view the bigger image</small><br />
<span id="more-76"></span><br />
<strong>Please match the steps to the above image:</strong></p>
<ol>
<li>Select a contact form you want to edit. One form is pre-added for your convenience.</li>
<li>Alternatively you can also use these links to select the form you want to edit.</li>
<li>You can also add a new form or duplicate the current one.</li>
<li>Change your form name here and click update settings (12).</li>
<li>You can toggle AJAX settings on or off. You might want to do this to get CForms to work wither certain comment plugins. More on this later in the post.</li>
<li>One of the most useful features is you can add form presets. These provide a great starting point for your form. Amongst these are the basic form, form with error messages, comment form replacement and a few other options. I suggest starting with the form with error messages for your contact form and the comment form if you want to replace your default comment form with CForms (yes you can do that). </li>
<li> Add fields by entering the number you want add and clicking the plus sign.</li>
<li>Next add a field name.</li>
<li>Click on the little settings image next to the field name text box and it will give you a pop-up with all the options. This makes it easier to fill the options for that particular field.</li>
<li>Select the type of field you want for example an input field, a checkbox, a dropdown, etc. You might want to go back to the last step to update the options if you change the field type.</li>
<li>Choose from several options like making a field required, make it disabled, verify email address, make it read only, etc.</li>
<li>Once you are happy with the form click on update settings to save it.</li>
</ol>
<p>Once you have finished with the form above scroll down to the settings. These are specific to the chosen form so make sure you have selected the correct one.</p>
<h2>Redirection, Messages, Text and Button Label</h2>
<p><img src="http://www.erummunir.com/wp-content/uploads/2008/08/4.jpg"  /></p>
<p>The first few options relate to form specific text and messages that need to be shown on your contact form (for example what text you want on your submit button). You can change them if you want but the default values are fine, too.</p>
<p><img src="http://www.erummunir.com/wp-content/uploads/2008/08/3.jpg"  /></p>
<p>These are the values you might want to change. Message summaries comprise of both error messages and form submission success or failure messages. Choose whether to display this above or below your form. I personally suggest above the form.</p>
<p>Next choose if you want to use javascript to show the errors. </p>
<p>Fancy error messages add certain styling to the fields that are showing errors. You can change this styling but the default is pink. </p>
<p>This was one way of highlighting the fields giving errors. Another is to add the error message along with each field. Checking Embedded Custom Error Messages will do the trick.</p>
<p>Next set the limit on how many form submissions your visitor can make.</p>
<p>You don&#8217;t need to deal with the redirection fields unless you want your visitors to be redirected to a specific page after filling the form.</p>
<h2>Using CForms as a Comment Form</h2>
<p><img src="http://www.erummunir.com/wp-content/uploads/2008/08/6.jpg"  /></p>
<p>Click on WP Comment Feature. It is the sixth option.</p>
<p>Select &#8216;Enable this form to optionally (user determined) act as a WP comment form&#8217;</p>
<p>Five new comment specific fields are added to your form once you do this.</p>
<p>Now go to form preset and choose the Comment Form preset. If you want you can add a captcha or Q&#038;A verification field to deter spammers.</p>
<p>Next add: </p>
<p class="box"><code>&lt;?  insert_cform('comments'); ?&gt;</code></p>
<p>in place of the regular comment form in your comments.php file. Replace comments with the name you choose for your comment form.</p>
<p>Your visitors should now be able to use the Cforms comment form to post a comment or send you a note.</p>
<p>If you have AJAX enabled on this form, then know that the page will not re-load once a comment has been added. Therefore the commentator will not see the comment styling you have added to comments.php until the page re-loads. </p>
<p>You can change the styling that gets shown until the page gets refreshed under the main menu for <em>Global Settings</em>. Choose &#8216;WP Comment Feature Settings&#8217; and make changes to &#8216;New comment HTML template&#8217;</p>
<h2>Enabling CForms Comment Form To Work With The Subscribe To Comments Plugin</h2>
<p>Since this is a very widely used plugin, let me explain how you can add the the checkbox to subscribe to your Cforms comment form.</p>
<p>Select &#8216;Core Form Admin / Email Options&#8217; and check the &#8216;Use custom input field NAMES &#038; ID&#8217;s&#8217;.</p>
<p><img src="http://www.erummunir.com/wp-content/uploads/2008/08/5.jpg"  /></p>
<p>This will enable you to add custom fields with their own specific values, id&#8217;s and names.</p>
<p>The subscribe to comments plugin needs a very specific checkbox with value, id and name equal to subscribe.</p>
<p>Now go up to your form and add a field. Here&#8217;s what you need to add to field name:</p>
<p class="box"><code>[id:subscribe]#Subscribe To Comments|subscribe</code></p>
<p>Let me explain. The [id:subscribe] adds subscribe as the name and id in the input tag for this checkbox. #Subscribe To Comments can be changed to whatever you want to display on your contact form next to the checkbox. Adding |subscribe adds subscribe as the value for the checkbox.</p>
<p><strong>Note:</strong> You will have to turn AJAX off  for this form as the subscribe to comments plugin does not work with AJAX on. </p>
<p>Also it will keep showing the checkbox to subscribe even when your visitor is subscribed. It won&#8217;t get swapped with the Manage Subscriptions link. </p>
<p>A workaround is to just add the subscribe to comments option outside of the comment form. This way people won&#8217;t have to leave a comment to subscribe either. Just add this line either to single.php or comments.php depending on where you want to place it.</p>
<p class="box"><code>&lt;?php show_manual_subscription_form(); ?&gt;</code></p>
<h2>What about other plugins</h2>
<p>I haven&#8217;t tried other plugins but for example the <a href="http://www.fiddyp.co.uk/commentluv-wordpress-plugin" target="_blank">CommentLuv</a> plugin uses the id, name and value &#8216;luv&#8217; so it should work the same way as above.</p>
<p><strong>AJAX and Comment Plugins</strong><br />
If you are using other comment plugins then it is a good idea to turn AJAX off. For example the <a href="http://www.raproject.com/ajax-edit-comments-20/" target="_blank">WP AJAX Edit Comments</a> also works better with AJAX turned off as you need to re-load the page to view the edit option.</p>
<p>If you have successfully used Cforms with other plugins then be sure to mention that via the comments.</p>
<p><strong>In conclusion</strong> &#8230; Cforms is one of the most extensive plugins I have seen. The plugin author has not only worked on adding all the features one can think of and need in a contact form but has also worked on its presentation. It is a pleasure to use this plugin with all its features and design options.</p>
<p>And I have only covered some of these features. There are lots more features and settings you can tweak to your heart&#8217;s content including the &#8216;Tell-A-Friend Form Support&#8217; and so much more.</p>
<p>So just install the plugin and enjoy.</p>
<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution">CForms II &#8211; The All In One Contact Form Solution</a></p>


<p>Related posts:<ol><li><a href='http://www.erummunir.com/154/cforms-ii-more-on-using-as-a-comment-form' rel='bookmark' title='Permanent Link: CForms II &#8211; More on Using as a Comment Form'>CForms II &#8211; More on Using as a Comment Form</a> <small>Good news! There is a new version of CForms that...</small></li><li><a href='http://www.erummunir.com/8/most-useful-wordpress-plugins' rel='bookmark' title='Permanent Link: Most Useful Wordpress Plugins'>Most Useful Wordpress Plugins</a> <small>Since I design custom blogs for my clients, I have...</small></li><li><a href='http://www.erummunir.com/36/updated-list-of-important-and-useful-wordpress-plugins-wp-251' rel='bookmark' title='Permanent Link: Updated List of Important and Useful Wordpress Plugins (WP 2.5.1)'>Updated List of Important and Useful Wordpress Plugins (WP 2.5.1)</a> <small>It is time for an updated list of useful Wordpress...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution/feed</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>A Little Hack to Get Your Password Back</title>
		<link>http://www.erummunir.com/43/a-little-hack-to-get-your-password-back</link>
		<comments>http://www.erummunir.com/43/a-little-hack-to-get-your-password-back#comments</comments>
		<pubDate>Fri, 01 Aug 2008 07:11:51 +0000</pubDate>
		<dc:creator>Erum Munir</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Password]]></category>

		<guid isPermaLink="false">http://www.erummunir.com/?p=43</guid>
		<description><![CDATA[This can either be a very useful or a very dangerous trick depending on how it is used or abused.
I found this little tip at: FiddyP (it&#8217;s a really cool blog btw).
It only works in Firefix and boy does it work! 
If you have a stored password that you can&#8217;t remember and all you can [...]<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/43/a-little-hack-to-get-your-password-back">A Little Hack to Get Your Password Back</a></p>



Related posts:<ol><li><a href='http://www.erummunir.com/240/clear-text-on-input-field-on-click' rel='bookmark' title='Permanent Link: Clear Text On Input Field On Click'>Clear Text On Input Field On Click</a> <small>Ever wanted to add text to your input fields and...</small></li><li><a href='http://www.erummunir.com/118/adding-live-preview-for-comments' rel='bookmark' title='Permanent Link: Adding Live Preview For Comments'>Adding Live Preview For Comments</a> <small>If you scroll down you will see a live preview...</small></li><li><a href='http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution' rel='bookmark' title='Permanent Link: CForms II &#8211; The All In One Contact Form Solution'>CForms II &#8211; The All In One Contact Form Solution</a> <small>Cforms II is a Wordpress plugin which makes it easy...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This can either be a very useful or a very dangerous trick depending on how it is used or abused.</p>
<p>I found this little tip at: <a href="http://www.fiddyp.co.uk/simple-code-to-reveal-asterisk-s-password-fields-in-your-browser/#comment-27299" target="_blank">FiddyP</a> (it&#8217;s a really cool blog btw).</p>
<p>It only works in Firefix and boy does it work! </p>
<p>If you have a stored password that you can&#8217;t remember and all you can see are asteriks, just add this line to the address bar:</p>
<p class="box"><code>javascript:var els = document.getElementsByTagName('input'); for(var x=0; x&lt;els.length; x++){ if(els[x].type.toLowerCase() == 'password' ){ var test = els[x].type = 'text';}}</code></p>
<p>Press enter and wait to be pleasantly or unpleasantly surprised to see your password staring back at you.</p>
<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/43/a-little-hack-to-get-your-password-back">A Little Hack to Get Your Password Back</a></p>


<p>Related posts:<ol><li><a href='http://www.erummunir.com/240/clear-text-on-input-field-on-click' rel='bookmark' title='Permanent Link: Clear Text On Input Field On Click'>Clear Text On Input Field On Click</a> <small>Ever wanted to add text to your input fields and...</small></li><li><a href='http://www.erummunir.com/118/adding-live-preview-for-comments' rel='bookmark' title='Permanent Link: Adding Live Preview For Comments'>Adding Live Preview For Comments</a> <small>If you scroll down you will see a live preview...</small></li><li><a href='http://www.erummunir.com/76/cforms-ii-the-all-in-one-contact-form-solution' rel='bookmark' title='Permanent Link: CForms II &#8211; The All In One Contact Form Solution'>CForms II &#8211; The All In One Contact Form Solution</a> <small>Cforms II is a Wordpress plugin which makes it easy...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.erummunir.com/43/a-little-hack-to-get-your-password-back/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Code To Your Wordpress Post</title>
		<link>http://www.erummunir.com/16/adding-code-to-your-wordpress-post</link>
		<comments>http://www.erummunir.com/16/adding-code-to-your-wordpress-post#comments</comments>
		<pubDate>Sun, 29 Jun 2008 11:16:50 +0000</pubDate>
		<dc:creator>Erum Munir</dc:creator>
				<category><![CDATA[All Things Wordpress]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>

		<guid isPermaLink="false">http://www.erummunir.com/?p=16</guid>
		<description><![CDATA[Trying to add code to your wordpress post can be one of the most frustrating experiences. That is if you want the code to appear as code in your post.
Say, something like this:
&#60;ul&#62;&#60;li&#62;This would have been a bullet&#60;/li&#62;&#60;/ul&#62;
Had this been added to Wordpress normally, it would have appeared as a bullet. But since I&#8217;ve used [...]<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/16/adding-code-to-your-wordpress-post">Adding Code To Your Wordpress Post</a></p>



Related posts:<ol><li><a href='http://www.erummunir.com/118/adding-live-preview-for-comments' rel='bookmark' title='Permanent Link: Adding Live Preview For Comments'>Adding Live Preview For Comments</a> <small>If you scroll down you will see a live preview...</small></li><li><a href='http://www.erummunir.com/8/most-useful-wordpress-plugins' rel='bookmark' title='Permanent Link: Most Useful Wordpress Plugins'>Most Useful Wordpress Plugins</a> <small>Since I design custom blogs for my clients, I have...</small></li><li><a href='http://www.erummunir.com/36/updated-list-of-important-and-useful-wordpress-plugins-wp-251' rel='bookmark' title='Permanent Link: Updated List of Important and Useful Wordpress Plugins (WP 2.5.1)'>Updated List of Important and Useful Wordpress Plugins (WP 2.5.1)</a> <small>It is time for an updated list of useful Wordpress...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Trying to add code to your wordpress post can be one of the most frustrating experiences. That is if you want the code to appear as code in your post.</p>
<p>Say, something like this:</p>
<pre><code>&lt;ul&gt;&lt;li&gt;This would have been a bullet&lt;/li&gt;&lt;/ul&gt;</code></pre>
<p>Had this been added to Wordpress normally, it would have appeared as a bullet. But since I&#8217;ve used a really cool plugin called &#8216;Code Auto Escape&#8217;, I can add code as code as long as I add pre and code tags around it.</p>
<p>Now you may never need to show html, xhtml, javacript, php, etc code in yuor posts but just in case you do, this is the plugin to get.</p>
<p><a href="http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/trackback/" target="_blank">Get the Code Auto Escape Plugin</a></p>
<p>-----<br />
Post from: <a href="http://www.erummunir.com">ErumMunir.com</a>.<br />
Don't forget to leave a comment at:<br /></p>
<p><a href="http://www.erummunir.com/16/adding-code-to-your-wordpress-post">Adding Code To Your Wordpress Post</a></p>


<p>Related posts:<ol><li><a href='http://www.erummunir.com/118/adding-live-preview-for-comments' rel='bookmark' title='Permanent Link: Adding Live Preview For Comments'>Adding Live Preview For Comments</a> <small>If you scroll down you will see a live preview...</small></li><li><a href='http://www.erummunir.com/8/most-useful-wordpress-plugins' rel='bookmark' title='Permanent Link: Most Useful Wordpress Plugins'>Most Useful Wordpress Plugins</a> <small>Since I design custom blogs for my clients, I have...</small></li><li><a href='http://www.erummunir.com/36/updated-list-of-important-and-useful-wordpress-plugins-wp-251' rel='bookmark' title='Permanent Link: Updated List of Important and Useful Wordpress Plugins (WP 2.5.1)'>Updated List of Important and Useful Wordpress Plugins (WP 2.5.1)</a> <small>It is time for an updated list of useful Wordpress...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.erummunir.com/16/adding-code-to-your-wordpress-post/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
