<?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"
	>

<channel>
	<title>Dagon Design</title>
	<atom:link href="http://www.dagondesign.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dagondesign.com</link>
	<description>WordPress Plugins, PHP Scripts, Tools, and Tutorials</description>
	<pubDate>Fri, 02 May 2008 01:13:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Scheduled Post Shift Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/scheduled-post-shift-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/scheduled-post-shift-plugin-for-wordpress/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 01:16:11 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/scheduled-post-shift-plugin-for-wordpress/</guid>
		<description><![CDATA[This plugin automatically takes your oldest post, and updates its timestamp so that it appears as the latest post on your WordPress site. It does this by utilizing the cron feature built into WordPress 2.1 (and newer). It can rotate all the posts on your site, or just ones in a specific category. You can [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin automatically takes your oldest post, and updates its timestamp so that it appears as the latest post on your WordPress site. It does this by utilizing the cron feature built into WordPress 2.1 (and newer). It can rotate all the posts on your site, or just ones in a specific category. You can currently schedule it by setting the number of hours between shifts. For example, set it to 24 hours and it will shift the oldest post every day, at the time that you enabled it.<span id="more-101"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-scheduled-post-shift.txt">Latest Release</a> <strong>(For WordPress 2.1 through 2.5)</strong>
</li>
</ul>
<h3>Instructions</h3>
<ul>
<li>Download the above file, rename it from <strong>.txt</strong> to <strong>.php</strong>, and upload it to your plugins directory</li>
<li>Enable the plugin</li>
<li>Configure the plugin options (under <strong>DDPostShift</strong>)</li>
<li>Click the &#8216;Enable Post Shift&#8217; button to start</li>
</ul>
<h3>Disabling the Schedule</h3>
<p>To stop the schedule, simply click the &#8216;Disable Post Shift&#8217; button on the options page.</p>
<h3>Change Log</h3>
<ul>
<li><strong>04-27-08 Version 1.21</strong> - Updated for WordPress 2.5 and to be compatible with WP Security Scan plugin</li>
<li><strong>09-29-07 Version 1.2</strong> - Updated for WordPress 2.3</li>
<li><strong>05-16-07 Version 1.1</strong> - Updated for WordPress 2.2</li>
<li><strong>04-09-07 Version 1.0</strong> - First release</li>
</ul>
<h3>Options</h3>
<p>Here are the options available in this plugin&#8217;s options page in the WordPress admin panel.</p>
<h4>Shift Delay</h4>
<blockquote><p>This is the number of hours between post shifts. The schedule will start as soon as you click the &#8216;Enable Post Shift&#8217; button.</p></blockquote>
<h4>Category ID</h4>
<blockquote><p>If left blank, the plugin will operate on all of your posts. If you enter a category ID, it will only update posts in that category.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/scheduled-post-shift-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Other Posts from Cat plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/other-posts-from-cat-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/other-posts-from-cat-plugin-for-wordpress/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 01:04:32 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/other-posts-from-cat-plugin-for-wordpress/</guid>
		<description><![CDATA[This plugin will show the last X posts from the current category at the bottom of every post, or where you manually specify in each post. Using the built-in options page, you can choose the number of posts to show, set the header text, choose to show the post dates, select the format of the [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin will show the last X posts from the current category at the bottom of every post, or where you manually specify in each post. Using the built-in options page, you can choose the number of posts to show, set the header text, choose to show the post dates, select the format of the date, and choose whether or not to include the current post in the list. The latest version also has an option to show recent posts from all categories the current post is in.<span id="more-70"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-posts-from-cat.txt">Latest Release</a> <strong>(For WordPress 2.0 through 2.5)</strong></li>
<li><a href="http://www.dagondesign.com/files/ddop-maira.zip">International Version</a> <strong>(For WordPress 2.0 through 2.2)</strong><br />
<blockquote><p>One of our visitors sent in an internationalized version of this plugin, with full support for international text and date formatting! It includes English and Spanish support. This version is only supported by WordPress 2.0 through 2.2, and will not work in 2.3 or 2.5</p></blockquote>
</li>
</ul>
<h3>Instructions</h3>
<ul>
<li>Download the above file, rename it from <strong>.txt</strong> to <strong>.php</strong>, and upload it to your plugins directory.</li>
<li>Enable the plugin.</li>
<li>Configure the plugin options (under DDOtherPostsFromCat).</li>
<li>Test it out by viewing a post.</li>
</ul>
<h3>Change Log</h3>
<ul>
<li><strong>04-27-08 Version 1.6</strong> Added an option for excluded categories. Also a few other minor fixes.</li>
<li><strong>09-29-07 Version 1.5</strong> Updated for WordPress 2.3. Added &#8216;Load Default Options&#8217; button.</li>
<li><strong>06-11-07 Version 1.41</strong> Added wrapper class around output (.ddop)</li>
<li><strong>05-16-07 Version 1.4</strong> Updated for WordPress 2.2.</li>
<li><strong>01-28-07 Version 1.3</strong> Fixed an issue in which a database error would occur when the plugin is set to check all categories that the post is in, and it is in only one.</li>
<li><strong>08-09-06 Version 1.2</strong> Now if showing posts from all categories the current post is in, you can also choose to split them up into multiple lists (per category).</li>
<li><strong>08-08-06 Version 1.1</strong> By request, the plugin now features an option to show recent posts from all categories the current post is in. It also has a CSS class added for easy changes.</li>
<li><strong>04-19-06 Version 1.0</strong> First release. This is very similar to my &#8216;Posts by Author&#8217; plugin but it lists other posts from the same category, instead of other posts by the current author.</li>
</ul>
<h3>Notice</h3>
<p>Currently this plugin checks the first category a post is assigned to when generating a list of other posts in the same category. This means that it will work best for those of you who only assign one category to posts.</p>
<h3>Styling</h3>
<p>This plugin now has a div wrapped around the output with the <b>ddop</b> class assigned to it. For example, if you wanted to decrease the size of the text in the output, add this to your CSS file:</p>
<p><code>.ddop { font-size: 90%; }</code></p>
<h3>Options</h3>
<p>Here are the options available in this plugin&#8217;s options page in the WordPress admin panel.</p>
<p><b>Show at the bottom of every post</b></p>
<blockquote><p>If enabled, this plugin will generate its data at the bottom of every post, before the comments section.</p>
<p><b>NOTICE:</b> No matter what you have this set to, you can also manually call this plugin by entering the following line where you want the data to be shown in your post:</p>
<p><code>&lt;!-- ddpostsfromcat --&gt;</code></p></blockquote>
<p><b>Check all categories that current post is in</b></p>
<blockquote><p>With this option enabled, recent posts from <b>all</b> the categories (that the current post is in) will be shown. It will also show all of these categories in the heading (if you are showing one). Disabled, it will simply show other posts in the first category this post is found in.</p></blockquote>
<p><b>Split categories into separate lists </b></p>
<blockquote><p>This option only applies if the previous option (check all categories that current post is in) is set. It will allow you to split up the posts into multiple lists (per category) instead of all the posts being in a single list.</p></blockquote>
<p><b>Number of posts to show from this category</b></p>
<blockquote><p>This is the number of posts from the current category that will be shown.</p></blockquote>
<p><b>Text to show before list</b></p>
<blockquote><p>This is the header for the post list. If you want to use the category title in this text, use <b>%C</b>.</p></blockquote>
<p><b>Show date after listed posts</b></p>
<blockquote><p>This will show the post date after each post in the list.</p></blockquote>
<p><b>Date format</b></p>
<blockquote><p>If you are showing the date after posts, this will allow you to configure the date format (using the standard <a href="http://us3.php.net/date">PHP date() format</a>)</p></blockquote>
<p><b>Include current post in list</b></p>
<blockquote><p>This sets whether or not the post being viewed should show up in the list of other posts from this category.</p></blockquote>
<p><b>Show newest posts first</b></p>
<blockquote><p>If checked, this will show the newest posts first in the list. If not checked, it will show the oldest posts first.</p></blockquote>
<p><b>Excluded Categories</b></p>
<blockquote><p>This is a comma-separated list of category names you want excluded from this plugin. It is not case sensitive.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/other-posts-from-cat-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Draft Notification Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/draft-notification-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/draft-notification-plugin-for-wordpress/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 23:05:56 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/draft-notification-plugin-for-wordpress/</guid>
		<description><![CDATA[This WordPress plugin automatically emails the admin when a new draft is saved. The email contains the post&#8217;s title, the author, and a link. There is no options page currently, because there is really nothing to configure. The plugin now supports the new &#8216;pending&#8217; status.
Download

Latest Release (For WordPress 2.0 through 2.5)


Instructions

Download the above file, rename [...]]]></description>
			<content:encoded><![CDATA[<p>This WordPress plugin automatically emails the admin when a new draft is saved. The email contains the post&#8217;s title, the author, and a link. There is no options page currently, because there is really nothing to configure. The plugin now supports the new &#8216;pending&#8217; status.<span id="more-71"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-draft-notification.txt">Latest Release</a> <strong>(For WordPress 2.0 through 2.5)</strong>
</li>
</ul>
<h3>Instructions</h3>
<ul>
<li>Download the above file, rename it from <strong>.txt</strong> to <strong>.php</strong>, and upload it to your plugins directory.</li>
<li>Enable the plugin.</li>
</ul>
<h3>Change Log</h3>
<ul>
<li><strong>04-27-08 Version 1.21</strong> - Updated to work with WordPress 2.5 and the &#8216;pending&#8217; status.</li>
<li><strong>05-16-07 Version 1.2</strong> - Updated to work with WordPress 2.2.</li>
<li><strong>10-20-06 Version 1.1</strong> - The emails now contain the author&#8217;s name, instead of ID.</li>
<li><strong>04-22-06 Version 1.0</strong> - First release.</li>
</ul>
<h3>Notes</h3>
<p>Because of the way this plugin works, it also sends out an email when an existing draft has been saved again. There does not seem to be an efficient way to check to see if it is the first time the draft has been saved, since dates are not stored for drafts.</p>
<p>By default, the author&#8217;s display_name is shown in the email. If you would prefer to see the login_name, or nice_name field, just look for the line in the script that says &#8220;Choose one of the following options to show the author&#8217;s name&#8221; and uncomment the option you would like to use.</p>
<h3>Modifications</h3>
<p>If you would rather have the email notification sent to the author of the post, instead of the admin, replace this line:</p>
<pre>$recipient = get_bloginfo(&#039;admin_email&#039;);</pre>
<p>With this:</p>
<pre>$recipient = get_the_author_email();</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/draft-notification-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sitemap Generator Plugin for Wordpress</title>
		<link>http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 19:11:05 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/sitemap-generator-for-wordpress-v20/</guid>
		<description><![CDATA[This plugin creates a sitemap for your WordPress powered site. This is not just another XML sitemap plugin, but rather a true sitemap generator which is highly customizable from its own options page in the WordPress admin panel. Some of its features include: support for multi-level categories and pages, category/page exclusion, multiple-page generation with navigation, [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin creates a sitemap for your WordPress powered site. This is not just another XML sitemap plugin, but rather a true sitemap generator which is highly customizable from its own options page in the WordPress admin panel. Some of its features include: support for multi-level categories and pages, category/page exclusion, multiple-page generation with navigation, permalink support, choose what to display, what order to list items in, show comment counts and/or post dates, and much more. To see this plugin in action, visit my <a href="http://www.dagondesign.com/sitemap/">sitemap page</a>. <span id="more-42"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://wordpress.org/extend/plugins/sitemap-generator/">Latest Release</a><br />
<strong>(For WordPress 2.1 through 2.5)</strong>
</li>
<li><a href="http://www.dagondesign.com/files/dd-sitemap-gen2.7.txt">Version 2.7</a><br />
<strong>(No Longer Supported! - For WordPress 2.0)</strong>
</li>
</ul>
<h3>Languages</h3>
<p>The latest version of this plugin includes complete support for language files. If you would like to submit a translation, please <a href="http://www.dagondesign.com/contact/">contact me</a>. You can choose the language from the options page.</p>
<p><strong>Current languages</strong>: English, Albanian, Brazilian-Portuguese, Bulgarian, Czech, Dutch, French, German, Italian, Japanese, Lithuanian, Polish, Romanian, Russian, Simplified Chinese, Slovene, Spanish, Swedish, Turkish, Ukrainian</p>
<p>The language file contains not only the text shown on the sitemap page, but <strong>all</strong> of the text in the options page as well.</p>
<h3>Changelog</h3>
<ul>
<li><strong>04-26-08 Version 3.13</strong> - The plugin has been tested and works in WP 2.5. Added language files: Lithuanian, Romanian, Italian, Ukranian, and updated Spanish. Updated for compatibility with the <a href="http://wordpress.org/extend/plugins/wp-security-scan/">WP Security Scan Plugin</a> (thanks Michael). Undefined offset errors should be gone now. Updated the code that displays post/page titles. Fixed issue where comment counts showed on new lines.</li>
<li><strong>09-26-07 Version 3.12</strong> - Instead of having separate plugin versions for pre and post WP2.3, this version handles everything from WP 2.1 to 2.3. There is a separate download for those using WP 2.0. A bug was also fixed that caused posts to be duplicated in 2.3.</li>
<li><strong>09-22-07 Version 3.11</strong> - Bug fixed - categories were not showing up if they had a parent category with no posts.</li>
<li><strong>09-20-07 Version 3.1</strong> - Now supports WordPress 2.3. Added Czech, Russian, and (updated) French language files.</li>
<li><strong>07-27-07</strong> - Not a version update - added Albanian, Bulgarian, Swedish, and Turkish language files.</li>
<li><strong>07-08-07 Version 3.07</strong> - Post titles with html formatting should now show up properly in the sitemap. Slovene language file added.</li>
<li><strong>06-22-07 Version 3.06</strong> - Updated to display sub-categories (with posts), even when parent category has no posts. </li>
<li><strong>06-20-07 Version 3.05</strong> - Ampersands (in titles) issue fixed.</li>
<li><strong>06-18-07</strong> - Not a version update - added French and Brazilian-Portuguese language files.</li>
<li><strong>05-31-07 Version 3.04</strong> - Better support for international date formatting added (using the date_i18n function). Option to limit multi-cat posts to one cat removed for now due to incompatibility issues. Spanish and Polish language files added.</li>
<li><strong>05-17-07 Version 3.03</strong> - Parse error bug fixed. Non-published (draft) pages now hidden.</li>
<li><strong>05-16-07 Version 3.02</strong> - Updated to work with WordPress 2.2. Drafts no longer appear in the sitemap. Added new languages: Simplified Chinese, Dutch, and Japanese.</li>
<li><strong>05-09-07 Version 3.01</strong> - Bug fixed with future post check. German language file added.</li>
<li><strong>05-03-07 Version 3.0</strong> - This is a very big update. Most of the plugin has been rewritten from the ground up. Many things have been fixed, several new features have been added, and it runs much faster than before. Be sure to read the updated information below.</li>
<li><strong>03-24-07 Version 2.73</strong> - Sitemap page navigation will no longer show &#8216;/1/&#8217; in the URL for the first page. The same method has also been applied for those not using permalinks.</li>
<li><strong>02-09-07 Version 2.72</strong> - Fixed a compatibility issue with this plugin and some of my others.</li>
<li><strong>01-25-07 Version 2.71</strong> - Fixed bug when used with WordPress 2.1</li>
<li><strong>09-17-06 Version 2.7</strong> - You can choose to show excerpts even when a post or page title exists. They settings are now independent.</li>
<li><strong>04-02-06 Version 2.6</strong> - The page and category exclusion lists are no longer case-sensitive. An issue has also been fixed for excluded categories that have non-excluded sub-categories. They now show up properly. Lastly, an issue was fixed where sites with more than 10,000 posts were having problems generating the sitemap.</li>
<li><strong>03-23-06 Version 2.5</strong> - Lots of optimizations, runs much faster. Can now exclude pages (and subpages). Options page completely redone. All visible text is an option (under Language Settings). Comment count only counts approved comments.</li>
<li><strong>03-21-06 Version 2.4.2</strong> - Some minor code adjustments. Works properly when the <a href="http://boakes.org/analytics">Google Analytics</a> plugin by boakes.org is enabled.</li>
<li><strong>03-18-06 Version 2.4.1</strong> - Several minor issues fixed. Rewrite code greatly improved. Added option to change &#8216;continued text&#8217;. Can now generate sitemap on error pages.</li>
<li><strong>03-14-06 Version 2.4</strong> - Several requested features added: Choose to show everything, or just posts or pages. Can show publish date for posts (and configure the date/time format). Added ability to exclude categories. Option to open links in new windows</li>
<li><strong>02-16-06 Version 2.3.1</strong> - Fixed uploads/attachments showing up in sitemap.Fixed small bug when sorting pages by title.</li>
<li><strong>01-23-06 Version 2.3</strong> - Permalink support for navigation added! (read permalink section below for more info)</li>
<li><strong>01-22-06 Version 2.2.1</strong> - Option to hide password-protected items. Fixed navigation bug (when Wordpress was in sub-folder).</li>
<li><strong>01-21-06 Version 2.2</strong> - Rewritten again! - Handles multi-level categories and pages. Continuation of previous posts/pages shown. Customizable text for category pages. Separate sort orders for posts and pages. CSS added for easy customization. Always hides drafts and future-dated posts now (there&#8217;s no reason not to). Multi-category posts handled much better. &#8216;Breadcrumb trail&#8217; for sub-categories. For posts without titles - display &#8216;(no title)&#8217;, first X characters, or first X words. And many other fixes/updates.</li>
<li><strong>01-14-06 Version 2.0 </strong> - Rewritten completely, and turned into a plugin</li>
<li><strong>01-15-06 Version 2.1</strong> - New features and various fixes: -<br />
Handles custom table prefixes. Fade effect upon submitting options (for WP 2.0 users). Option to display posts or pages first. For posts without titles, choose to ignore, use &#8220;(no title)&#8221;, or first few words of text. Place sitemap navigation at the top, bottom, or both.</li>
<li><strong>01-14-06 Version 2.0 </strong> - Rewritten completely, and turned into a plugin</li>
<li><strong>12-08-05</strong> - Original (non-plugin) version 1.0 </li>
</ul>
<h3>Installation</h3>
<ul>
<li>Download <strong>sitemap-generator.zip</strong> and uncompress</li>
<li>Upload the entire <strong>sitemap-generator</strong> folder (not just the files inside) to your plugins directory</li>
<li>Activate the plugin in your administration panel</li>
<li>Configure the plugin in the options panel (under <strong>DDSitemapGen</strong>)</li>
<li>If using permalinks, read the permalink section below</li>
<li>Simply add the following line to a WordPress page (where you would like the sitemap to display):
<pre>&lt;!&#45;- ddsitemapgen &#45;-&gt;</pre>
<p><b>Note:</b> For those of you using the new rich-text editor - be sure to click the &#8216;html&#8217; button to edit the page source directly. Otherwise Wordpress will wrap code tags around the line which generates the sitemap and it will not work properly.</li>
</ul>
<h3>Upgrading?</h3>
<p>To upgrade, disable and then delete the existing plugin. Then install the new version as explained above.</p>
<p>After you install, be sure to click the &#8216;Load Default Options&#8217; button, as some of the settings have changed.</p>
<p>Version 3.0 of this plugin is a big jump from the previous versions. Most of the code has been rewritten from scratch, and a few things are different. One of the best improvements is the speed and stability. The sitemap generation is much faster now, which should especially help people with larger sites. Be sure to read the updated information below.</p>
<h3>Want to run the plugin from a template file?</h3>
<p>To use the sitemap generator function directly from a template file, just insert the following line where you would like the sitemap to be generated:</p>
<pre>&lt;?php echo ddsg_create_sitemap(); ?&gt;</pre>
<h3>Permalinks for sitemap navigation</h3>
<p>Depending on your settings, the sitemap may be spread across multiple pages. If you are using permalinks, be sure to enter the page slug of your sitemap page in the plugin options. That way it will use permalinks for the sitemap navigation as well. If you are not using permalinks, simply leave this option blank.</p>
<h3>CSS declarations</h3>
<p>This plugin has a couple of CSS classes built in to easily change the look of your sitemap. Just add the new declarations to your themes CSS file, and customize it however you like.</p>
<ul>
<li><strong>.ddsg-wrapper</strong> - Div around the entire sitemap.</li>
<li><strong>.ddsg-pagenav</strong> - Div around the page navigation.</li>
</ul>
<h3>Available Options</h3>
<p>These options can be configured from the options page in the WordPress admin panel. Most of these are fairly self-explanatory.</p>
<h4>General Options</h4>
<ul>
<li><b>Language</b> - Language files are located in /wp-content/plugins/sitemap-generator/lang/</li>
<li><b>Items per page</b> - Set to 0 for unlimited</li>
<li><b>Sitemap page slug</b> - If using permalinks, enter the slug of your sitemap page </li>
</ul>
<h4>Sitemap Generation</h4>
<ul>
<li><b>What to show</b> - Show posts, pages, or both</li>
<li><b>If showing both, which first</b> - Show posts or pages first</li>
<li><b>Post sort order</b> - Sort by title or date (oldest or newest first)</li>
<li><b>Page sort order</b> - Sort by title or date (oldest or newest first) or menu order (ascending or descending)</li>
<li><b>Show comment count after posts</b></li>
<li><b>Show comment count after pages</b></li>
<li><b>If showing comment counts, display when zero</b></li>
<li><b>Show dates after posts</b></li>
<li><b>Show dates after pages</b></li>
<li><b>Date format (if showing dates)</b> - Use <a href="http://us3.php.net/date">PHP date() formatting</a></li>
</ul>
<h4>Exclusions</h4>
<ul>
<li><b>Excluded categories</b> - Category IDs, separated by commas. Sub-categories will also be excluded, as well as all posts contained in excluded categories</li>
<li><b>Excluded pages</b> - Page IDs, separated by commas. Sub-pages will also be excluded</li>
<li><b>Hide future-dated posts</b></li>
<li><b>Hide password-protected items</b></li>
</ul>
<h4>Navigation</h4>
<ul>
<li><b>Sitemap navigation method</b> - Two types to choose from</li>
<li><b>Show sitemap navigation</b> - Where to show the navigation</li>
</ul>
<h4>Miscellaneous</h4>
<ul>
<li><b>Full path to XML sitemap</b> - If you are also using an XML sitemap plugin, you can enter the path to the XML file here, and a link to it will be added to your sitemap page </li>
<li><b>Where to show XML sitemap link</b> - At the end of the last page, or at the end of every page</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Interstitial Ads Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/interstitial-ads-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/interstitial-ads-plugin-for-wordpress/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 23:39:50 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/interstitial-ads-plugin-for-wordpres/</guid>
		<description><![CDATA[This plugin allows you to automatically add javascript (or anything else) to all links on your WordPress site. One common use for this is the implementation of interstitial ads, which require javascript to be added to each link, although there are many other possible uses. 
Download

Latest Release (For WordPress 2.0 through 2.5)


Installation

Download the above file
Rename [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin allows you to automatically add javascript (or anything else) to all links on your WordPress site. One common use for this is the implementation of <a href="http://en.wikipedia.org/wiki/Interstitial_webpage">interstitial</a> ads, which require javascript to be added to each link, although there are many other possible uses. <span id="more-102"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-interstitial.txt">Latest Release</a> <strong>(For WordPress 2.0 through 2.5)</strong>
</li>
</ul>
<h3>Installation</h3>
<ul>
<li>Download the above file</li>
<li>Rename <strong>dd-interstitial.txt</strong> from <strong>.txt</strong> to <strong>.php</strong> and upload it to your plugins directory</li>
<li>Activate the plugin from the WordPress admin panel</li>
<li>Configure the options under the admin panel: <strong>Options - DDInterAds</strong>
</ul>
<h3>Usage</h3>
<p>To use this plugin, simply go to the options page and enter the code you want added to all links.</p>
<h3>Change Log</h3>
<ul>
<li><strong>04-21-08 Version 1.1</strong> - Code is now ignored if it is in <strong>code</strong>, <strong>pre</strong>, or <strong>textarea</strong> blocks.</li>
<li><strong>05-23-07 Version 1.0</strong> - First release.</li>
</ul>
<h3>Notes</h3>
<p>For those of you using this plugin to add interstitial ads, often times you must also add some javascript (provided by the advertiser) to the header of your files. You can do this in the header.php file in your theme directory.</p>
<p>This plugin uses the ob_start function for output buffering to allow filtering of the entire page before display. While this generally works without any problems, certain plugins may conflict with this - especially if they are using a similar method. Keep this in mind when troubleshooting.</p>
<p>Lastly - Future options may be added depending on interest in the plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/interstitial-ads-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Prevent author impersonation in WordPress comments</title>
		<link>http://www.dagondesign.com/articles/prevent-author-impersonation-in-wordpress-comments/</link>
		<comments>http://www.dagondesign.com/articles/prevent-author-impersonation-in-wordpress-comments/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 22:22:02 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/prevent-author-impersonation-in-wordpress-comments/</guid>
		<description><![CDATA[This modification to WordPress prevents unregistered comment authors from using the names or email addresses of the registered authors on your site. It does this by first checking to see if the comment author is logged in. If they are not, it compares their name and email address to the registered author data. If there [...]]]></description>
			<content:encoded><![CDATA[<p>This modification to WordPress prevents unregistered comment authors from using the names or email addresses of the registered authors on your site. It does this by first checking to see if the comment author is logged in. If they are not, it compares their name and email address to the registered author data. If there is a match, the comment is blocked and a custom message is displayed. The name and email address comparison is case-insensitive. <span id="more-110"></span></p>
<h3>Requirements</h3>
<p>This code modification has been tested in WordPress 2.2 through 2.5.</p>
<h3>Instructions</h3>
<p><strong>1)</strong> Open <strong>/wp-comments-post.php</strong> for editing (backup the file first!)</p>
<p><strong>2)</strong> Find the following block of code:</p>
<pre>$comment_author&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = trim(strip_tags($_POST[&#039;author&#039;]));
$comment_author_email = trim($_POST[&#039;email&#039;]);
$comment_author_url&nbsp;&nbsp; = trim($_POST[&#039;url&#039;]);
$comment_content&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= trim($_POST[&#039;comment&#039;]);</pre>
<p><strong>3)</strong> After it, add the following:</p>
<pre>// get list of user (display) names for blog
global $wpdb;
$valid_users = (array)$wpdb-&gt;get_results(&quot;
&nbsp;&nbsp;SELECT display_name, user_email FROM &quot; . $wpdb-&gt;prefix . &quot;users&quot;);

// get ID of logged in user (if there is one)
global $userdata;
get_currentuserinfo();
$logged_in_name = $userdata-&gt;ID;
$logged_in_email = $userdata-&gt;user_email;
&nbsp;
// see if the comment author matches an existing author
$found_match = FALSE;
foreach ($valid_users as $va) {
&nbsp;&nbsp;if (trim($va-&gt;display_name) != &#039;&#039;) {
&nbsp;&nbsp;&nbsp;&nbsp;if (strtolower($va-&gt;display_name) == strtolower($comment_author)) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$found_match = TRUE;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;if (trim($va-&gt;user_email) != &#039;&#039;) {
&nbsp;&nbsp;&nbsp;&nbsp;if (strtolower($va-&gt;user_email) == strtolower($comment_author_email)) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$found_match = TRUE;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}&nbsp;&nbsp;
}

// if commenter is not logged in, but match was found, block the comment
if (trim($logged_in_name) == &#039;&#039;) {
&nbsp;&nbsp;if ($found_match == TRUE) {
&nbsp;&nbsp;&nbsp;&nbsp;wp_die( __(&#039;You cannot post using the name or email of a registered author.&#039;) );
&nbsp;&nbsp;}
}</pre>
<p><strong>4)</strong> Save and close the file</p>
<h3>Notes</h3>
<p>To test this modification, simply log out and try to post a comment using the name that displays when you regularly post comments (when you are logged in).</p>
<p>If you would like to change the message, just modify this line:</p>
<pre>wp_die( __(&#039;You cannot post using the name or email of a registered author.&#039;) );</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/prevent-author-impersonation-in-wordpress-comments/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Secure PHP Form Mailer Script</title>
		<link>http://www.dagondesign.com/articles/secure-php-form-mailer-script/</link>
		<comments>http://www.dagondesign.com/articles/secure-php-form-mailer-script/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 21:31:49 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/?p=35</guid>
		<description><![CDATA[This is the PHP version of my secure form mailer script. This script has a wide range of features including: an easy to use dynamic form generation system (any number of fields, in any order), multiple recipients, multiple file attachments, optional auto reply feature, an image verification system, numerous security features (including protection against email [...]]]></description>
			<content:encoded><![CDATA[<p>This is the PHP version of my secure form mailer script. This script has a wide range of features including: an easy to use dynamic form generation system (any number of fields, in any order), multiple recipients, multiple file attachments, optional auto reply feature, an image verification system, numerous security features (including protection against email header injection), a message template system, multiple languages, and too many other things to list. This script was designed to be easy to use, while still being extremely flexible. If you just want a simple contact form, you can set one up with just a few clicks. For those of you who need something a bit more advanced, you can completely customize script plugin to fit your needs - whether it is 5 fields or 500. A WordPress plugin version is also available. ReCaptcha support has also been added.<span id="more-35"></span></p>
<p>You can see a <strong>very basic</strong> implementation of the WordPress plugin version of this script on this site&#8217;s <a href="http://www.dagondesign.com/contact/">contact page</a>.</p>
<h3>Notice: WordPress Users</h3>
<p><a href="http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/">Information on the WordPress plugin version of this script</a></p>
<h3>Languages</h3>
<p>As of the latest release, this script contains language files for:</p>
<blockquote><p>English, Brazilian Portuguese, Catalan, Danish, Dutch, Finnish, French, German, Greek, Italian, Norwegian BokmÃ¥l, Polish, Portuguese, Romanian, Russian, Slovak, Slovene, Spanish, Swedish, Turkish</p></blockquote>
<p>If you would like to submit a language file please <a href="/contact/">contact me</a>.</p>
<h3>WordPress vs PHP Versions</h3>
<p>To make things easier to find, the two versions of this script share much of the same documentation. While the basic features are the same, there are several differences, so be sure to reference the proper page.</p>
<h3>Table of Contents</h3>
<p>Due to the size of this page, I have split everything up into sections:</p>
<ul>
<li><a href="#download">Download</a></li>
<li><a href="#changelog">Changelog</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#required">Required Configuration</a></li>
<li><a href="#otherconfig">Other Configuration Options</a></li>
<li><a href="#customize">Other Customizations</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#advancedrecip">Advanced Recipient Options</a></li>
<li><a href="#advancedform">Advanced Form Structure</a></li>
<li><a href="#manualcode">Manual Form Code</a></li>
<li><a href="#autoreply">Auto Reply Feature</a></li>
<li><a href="#othermods">Other Modifications</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
<li><a href="#comments">Comments</a></li>
</ul>
<hr /><a name="download"><br />
<h3>Download</h3>
<p></a></p>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-formmailer.zip">Latest Release</a> </li>
</ul>
<hr /><a name="changelog"><br />
<h3>Changelog</h3>
<p></a></p>
<p>Since both the WordPress and non-WordPress versions of this script are updated together, the changelog below reflects both versions.</p>
<ul>
<li><strong>11-25-07 - v5.4</strong> Added support for ReCaptcha, manual form code entry, 5 new languages (Catalan, Danish, Polish, Romanian, and Turkisk), several html and css tweaks, and other misc. updates.</li>
<li><strong>07-27-07 v5.33</strong> - Few minor bugs fixed. Finnish language file added.</li>
<li><strong>07-08-07 v5.32</strong> - Error messages affecting form alignment issue resolved. Italian and Slovak language files added.</li>
<li><strong>06-18-07 v5.3</strong> - &#8216;undefined index&#8217; errors fixed, image verification adjustments, p tags removed from fieldsets, changes to help html validity, various other fixes.</li>
<li><strong>05-09-07 v5.25</strong> - &#8216;Thank you&#8217; message now allows for form field inputs as well.</li>
<li><strong>05-08-07 v5.24</strong> - Auto-reply message now allows for form field inputs. Language selection issue resolved. str_replace errors (on certain servers) fixed. Norwegian BokmÃ¥l language file added.</li>
<li><strong>05-01-07</strong> - Not a version update. Greek and Swedish language files added.</li>
<li><strong>04-18-07 v5.23</strong> - Renamed email verification function (to fix conflicts with other scripts). The GD check is now disabled if you are not using image verification. Added two new language files - Portuguese and Russian.</li>
<li><strong>04-18-07</strong> - Not a version update. Brazilian Portuguese language file has been added.</li>
<li><strong>04-03-07 v5.22</strong> - Email generation code has been modified to try to work with more servers. French language file has also been updated.</li>
<li><strong>03-28-07 v5.21</strong> - Highly recommended update - Fixed an issue with the verification code not being handled properly. Nothing else has been changed.</li>
<li><strong>03-25-07 v5.2</strong> - Email generation improved - should work better in more email clients. Many issues with message generation and field types have been fixed. Better support added for field requirement options. CSS for various fields updated. Issue with submit button fixed. Dutch and French language files added. Checkbox and drop-down issues resolved. Email verification method improved. Undefined index errors fixed, and much more. Be sure to read the updated instructions for the field types.</li>
<li><strong>03-13-07 v5.1</strong> - Lots of updates: Slash escaping has been improved, p tags are now added around form elements, each form instance can have its own language setting, the language selection issue has been fixed, improved foreign character support in messages, check box handling improved, and a new optional auto reply feature has been added.</li>
<li><strong>02-06-07 v5.0</strong> - This is a <strong>major</strong> update from version 4, and because of this, I have completely re-written this page, and removed the old changelog to save space.</li>
</ul>
<hr /><a name="installation"><br />
<h3>Installation</h3>
<p></a></p>
<ul>
<li><strong>1)</strong> Download and uncompress dd-formmailer.zip</li>
<li><strong>2)</strong> Upload the entire dd-formmailer directory to your server</li>
<li><strong>4)</strong> Configure your options (explained below)</li>
<li><strong>5)</strong> Add the form to your page (explained below)</li>
</ul>
<hr /><a name="required"><br />
<h3>Required Configuration</h3>
<p></a></p>
<p>While this script is highly configurable, some of you may just want to get up and running quickly with a simple (and secure) contact form. If so, these are the minimum options you need to configure within the file:</p>
<blockquote><h4>Standalone Option</h4>
<p><strong>$standalone</strong> - If you plan to use this script by itself (not included from another PHP file), set this option to TRUE, and it will generate a proper html header and footer. If you want to change the basic header and footer, they are found near the bottom of this script. </p>
<h4>Path to CSS</h4>
<p><strong>$path_to_css</strong> - If you are using the standalone option, enter the relative path to your CSS file so it can be declared properly in the header. For those of you including this script in another PHP file, be sure to manually add the CSS declaration in the header section of your page, like this:</p>
<p><code>&lt;link rel="stylesheet" href="(path to dd-formmailer.css)" type="text/css" media="screen" /&gt;</code></p>
<h4>Language Setting</h4>
<p><strong>$language</strong> - The relative path to the language file you want to use.</p>
<h4>Full URL to Script</h4>
<p><strong>$script_path</strong> - The full URL to dd-formmailer.php (or whatever you have renamed it to)</p>
<h4>Full URL to Contact Page</h4>
<p><strong>$path_contact_page</strong> - If you are running this script in standalone mode, leave this blank. Otherwise, enter the full URL to the page that is displaying the form</p>
<h4>Recipient Data</h4>
<p><strong>$recipients</strong> - If you are just sending email to a single address, enter it here. For more advanced usage such as multiple recipients, CC, BCC, etc.. more information is below</p></blockquote>
<p>The other settings are optional, and are explained below.</p>
<hr /><a name="otherconfig"><br />
<h3>Other Configuration Options</h3>
<p></a></p>
<p>This is a listing of the other configurable options in the script. These are optional, but allow for much greater customization</p>
<blockquote><p><strong>Form Structure</strong> - This is where you define the fields that will be used on this form. There are a lot of options available for this, and they will be explained further down as well</p>
<p><strong>Manual Form Code</strong> - This is a very advanced option that has its own section on this page.</p>
<p><strong>Wrap messages</strong> - This option wraps message lines to 70 characters to comply with RFC specifications</p>
<p><strong>Show required</strong> - If enabled, required fields will be marked with an asterisk</p>
<p><strong>Show IP and Hostname</strong> - If enabled, the visitor&#8217;s IP and hostname are added to the message</p>
<p><strong>Special Fields - Sender name, Sender email, and Email subject</strong> - These options help generate the email headers. If you enter a field name, it will be replaced by user input from that field. For example, if you have a form field called fm_name and you use that as the Sender name option, the visitor&#8217;s name will be used as the From field in the email. You can also combine them. If you have a field called fm_firstname and fm_lastname you could enter &#8216;fm_lastname, fm_firstname&#8217; - For the Sender email option, just use your email field</p>
<p><strong>Max upload size</strong> - This allows you to set the maximum file size (in bytes) for attachment uploads. This option only applies if the setting is lower than the value already set in your php.ini file</p>
<p><strong>Message Structure</strong> - This feature is optional. If left blank, the script will generate the email message itself, which will include all the data the visitor submits. If you choose to use this option, it will act as the message template. Simply enter your custom text, including your field names. When the message is generated, the field names will be replaced by the user input from those fields. Note: Since the script will just do a search and replace for field names, be sure they are unique enough. Example: A check for fm_message2 would also get triggered by fm_message when the script adds in the input.</p>
<p><strong>Success Message</strong> - This is the text that is shown after the email has been sent. You can also use field names in this, and the user input from those fields will be used to generate the message.</p>
<p><strong>Auto Reply</strong> - This is an optional feature that allows you to automatically send a pre-defined message back to those who contact you. More information on this is below</p>
<p><strong>Image Verification Method</strong> - There are three choices for image verification. It can be disabled, you can use the script&#8217;s built-in system (a simple captcha - requires GD support on the server), or you can use the ReCaptcha system (requires signing up for a free account at <a href="http://recaptcha.net">recaptcha.net</a>)</p>
<p><strong>Basic Method Options</strong> - If using the basic image verification method, you can choose the text and background color for the image (3 or 6 digit hex codes). By default, the script will try and choose the best file format for the verification image, but if it gives you any problems, you can manually specify the format to see what works best for your server.</p>
<p><strong>ReCaptcha Method Options</strong> - If using the ReCaptcha image verification method, you must enter the public and private keys given to you at the ReCaptcha website. These are used to generate the verification form, and the keys are specific to the website under your account (meaning if you use this script on multiple sites, you need a set of keys for each).</p></blockquote>
<hr /><a name="customize"><br />
<h3>Other Customizations</h3>
<p></a></p>
<p>With the exception of the text defined in the options, all text visible to the visitor is contained within the language file.</p>
<p>Visual changes to the form can be made in the included CSS file. The class names used in the examples below already exist within the CSS.</p>
<hr /><a name="usage"><br />
<h3>Usage</h3>
<p></a></p>
<p>If you are using the standalone option, all you have to do is open the URL to the script file in your browser. </p>
<p>If you are not using the standalone option, you can include the script in your existing PHP file with the following code:</p>
<p><code>&lt;?php include('dd-formmailer.php'); ?&gt;</code></p>
<p>Be sure to use the relative path to the script file.</p>
<hr /><a name="advancedrecip"><br />
<h3>Advanced Recipient Options</h3>
<p></a></p>
<p>As mentioned above, if you want to send the messages to a single recipient, just enter the email address in the recipients option. To send to multiple recipients, separate the addresses with a <strong>|</strong> (pipe) character, and use one of the following prefixes for each: <strong>to= cc= bcc=</strong></p>
<p><strong>Examples:</strong></p>
<pre>to=user1@domain.com|to=user2@domain.com
to=user1@domain.com|cc=user2@domain.com
to=user1@domain.com|cc=user2@domain.com|bcc=user3@domain.com</pre>
<p>You can have as many of each type (to, cc, bcc) as you like, and they can be in any order, although the first one in the list is the always the primary recipient, and must use <strong>to=</strong></p>
<p>For those of you who want to let the vistor choose the recipient from a drop-down box, first you must enter <strong>selrecip</strong> in the recipients field. Then you must add a new line in the form structure box. Example:</p>
<pre>type=selrecip|class=fmselect|label=Recipient|data=(select),
User1,user1@domain.com,User2,user2@domain.com</pre>
<p>The type must be <strong>selrecip</strong>, but you can use whatever you like as the CSS class, and label. The first item in the data parameter is the default (unselected) option. After that are the names and email addresses. You can add in as many as you like - just keep them in the proper order (name,email,name,email,etc..). Only the names are visible within the HTML for privacy reasons. </p>
<p>The &#8216;(select)&#8217; item is the default selection, which the user must change to submit the form. You can change the &#8216;(select)&#8217; text if you choose.</p>
<hr /><a name="advancedform"><br />
<h3>Advanced Form Structure</h3>
<p></a></p>
<p>This script uses a dynamic form generation system, which means that by simply adding a new line to the form structure, you will have a new field in your form. You can have as many fields as you like, and in any order. The only field type that you must absolutely have is the <strong>verify</strong> field if you are using the image verification option. All of the fields are explained below, with examples. Separate each field type with a single newline in the form structure option. (Some of the examples below are bit long, so they are wrapped to the next line - be sure that the only newlines are after each field type when adding them to your form structure.)</p>
<p>These are the different parameters that apply to most of the field types (Special exceptions and parameters unique to a particular field are listed under each field type):</p>
<ul>
<li><strong>type</strong> - This tells the script what type of field you are adding.</li>
<li><strong>class</strong> - The CSS class used to style the field. The classes used in the examples below already exist in the CSS file.</li>
<li><strong>label</strong> - Text that is shown next to the field.</li>
<li><strong>fieldname</strong> - The name of the form field (must be unique).</li>
<li><strong>max</strong> - Maximum number of characters allowed.</li>
<li><strong>req</strong> - (OPTIONAL) If you want to require a field, set this to true. If not, do not add it.</li>
<li><strong>default</strong> - (OPTIONAL) This allows you to specify the default value of a field.</li>
</ul>
<hr />
<h4>TEXT</h4>
<p>This is a standard text input field.</p>
<pre>type=text|class=|label=|fieldname=|max=|[req=true]|[ver=]|[default=]</pre>
<p>The text field type has a special parameter - <strong>ver</strong> - which can be used to verify the input. You can choose <i>email</i> (which checks that the input is a proper email address) or <i>url</i> (which checks that the input is not only a proper URL, but that it actually exists). If you do not want to use either validation option, do not add this parameter.</p>
<p><strong>Examples</strong>:</p>
<pre>type=text|class=fmtext|label=Name|fieldname=fm_name|max=100|req=true 

type=text|class=fmtext|label=Age|fieldname=fm_age|max=100|
default=Enter your age! 

type=text|class=fmtext|label=Email|fieldname=fm_email|max=100|req=true|
ver=email 

type=text|class=fmtext|label=URL|fieldname=fm_url|max=100|ver=url</pre>
<hr />
<h4>PASSWORD</h4>
<p>This is a standard password field. It is exactly like a text field, except it shows asterisks when the user types.</p>
<pre>type=password|class=|label=|fieldname=|max=|[req=true]|[confirm=true]</pre>
<p>The password field type also has a special parameter - <strong>confirm</strong> - which if set to true, it duplicates the password field, so that the visitor has to confirm their input. If you do not want to use this, do not add the confirm parameter.</p>
<p><strong>Examples</strong>:</p>
<pre>type=password|class=fmtext|label=Password|fieldname=fm_pass|max=100|
req=true|confirm=true
&nbsp;
type=password|class=fmtext|label=Secret Word|fieldname=fm_secret|max=100</pre>
<hr />
<h4>TEXTAREA</h4>
<p>This is a standard text area, for multiple lines of text.</p>
<pre>type=textarea|class=|label=|fieldname=|max=|rows=|[req=true]|[default=]</pre>
<p>The textarea field type has a special parameter - <strong>rows</strong> which defines the number of rows in the field (required for valid html).</p>
<p><strong>Examples</strong>:</p>
<pre>type=textarea|class=fmtextarea|label=Message|fieldname=fm_message|
max=1000|rows=6
&nbsp;
type=textarea|class=fmtextarea|label=Message|fieldname=fm_message|max=1000|
rows=4|req=true
&nbsp;
type=textarea|class=fmtextarea|label=Message|fieldname=fm_message|max=1000|
rows=10|req=true|default=Type here!</pre>
<hr />
<h4>WIDETEXTAREA</h4>
<p>This is exactly the same as the standard textarea, except that it&#8217;s wider, and the label is above it instead of to the side.</p>
<pre>type=widetextarea|class=|label=|fieldname=|max=|rows=|[req=true]|[default=]</pre>
<p><strong>Example</strong>:</p>
<pre>type=widetextarea|class=fmtextwide|label=Message|fieldname=fm_message|
max=1000|rows=10|req=true</pre>
<p><strong>*</strong> Note that the normal textarea, and wide textarea fields use a different CSS class for formatting.</p>
<hr />
<h4>VERIFY</h4>
<p>This field is required if you are using the <strong>basic</strong> verification method. It does not apply if you are using the ReCaptcha method. It is used for placement of the verification image (and associated text box) in the form.</p>
<pre>type=verify|class=|label=</pre>
<p><strong>Example</strong>:</p>
<pre>type=verify|class=fmverify|label=Verify</pre>
<hr />
<h4>FULLBLOCK and HALFBLOCK</h4>
<p>These are not standard form fields, but simply a way you can add text to your form. The full block is as wide as a wide textarea, while the half block is aligned with other standard fields. You can use basic HTML in your text if you like.</p>
<pre>type=fullblock|class=|text=
type=halfblock|class=|text=</pre>
<p><strong>Examples</strong>:</p>
<pre>type=fullblock|class=fmfullblock|text=This could be some sort of 
introduction message.
&nbsp;
type=halfblock|class=fmhalfblock|text=This could be used to explain a field 
in greater depth.</pre>
<hr />
<h4>OPENFIELDSET and CLOSEFIELDSET</h4>
<p>These do just what the name implies - they open and close a fieldset in your form so you can help group fields together. It also allows you to specify a legend for the fieldset (required for valid HTML).</p>
<pre>type=openfieldset|legend=
type=closefieldset</pre>
<p><strong>Examples</strong>:</p>
<pre>type=openfieldset|legend=Your Information
&nbsp;
(other field would go between these)
&nbsp;
type=closefieldset</pre>
<hr />
<h4>CHECKBOX</h4>
<p>The checkbox field can be used to generate a single checkbox, or a group of them. The usage is a bit different than the other fields.</p>
<pre>type=checkbox|class=|label=|data=
(fieldname),(text),(checked),(REQUIRED),
(fieldname),(text),(CHECKED),(REQUIRED)&#46;..</pre>
<p>As you can see, the checkbox data is a comma separated list of four items per checkbox:</p>
<ul>
<li><strong>fieldname</strong> - A unique fieldname for each checkbox in the form.</li>
<li><strong>text</strong> - The text shown to the right of each checkbox.</li>
<li><strong>checked</strong> - <strong>true</strong> or <strong>false</strong>. This allows you to make checkboxes checked by default.</li>
<li><strong>required</strong> - <strong>true</strong> or <strong>false</strong>. If true, it means that the user must check the box to send the message. Mainly useful for &#8216;check here to agree&#8217; type situations.</li>
</ul>
<p><strong>Examples</strong></p>
<pre>type=checkbox|class=fmcheck|label=I Agree|data=fm_agree,I agree to the 
terms,false,true
&nbsp;
type=checkbox|class=fmcheck|label=Interests|data=fm_i1,Computers,false,
false,fm_i2,Art,false,false,fm_i3,Music,false,false</pre>
<hr />
<h4>RADIO</h4>
<p>This field generates a group of radio buttons. Radio buttons are similar to checkboxes, except that they are treated as a group, and only one option may be selected. </p>
<pre>type=radio|class=|label=|fieldname=|[req=true]|[default=]|data=(text),(text),
(text)&#46;..</pre>
<p>The <strong>req</strong> and <strong>default</strong> items are optional. <strong>req</strong>, if set to true, makes the field required. <strong>default</strong> can be set to the option number you want to be selected by default (starting at 1).</p>
<p><strong>Examples</strong>:</p>
<pre>type=radio|class=fmradio|label=Gender|fieldname=fm_gender|data=Male,Female
&nbsp;
type=radio|class=fmradio|label=Color|fieldname=fm_color|req=true|default=1|
data=Unspecified,Red,Green,Blue</pre>
<hr />
<h4>SELECT</h4>
<p>The select field generates either a standard drop-down box, or a multi-select box, depending on the <strong>multi</strong> option. Option groups are supported as well.</p>
<pre>type=select|class=|label=|fieldname=|[multi=true]|[req=true]|data=(#group),
(text),(text),(#group),(text)&#46;..</pre>
<p>The <strong>multi</strong> and <strong>req</strong> options are optional.</p>
<p>If the field is required, the first option you have in the data paramater will be the default, which tells the user they need to select one of the options. If they do not change the default option, and it is required, they will receive an error.</p>
<p>The data field is just a list of the options, separated by a comma. To define the start of an option group, just prefix the group name with a # as shown below.</p>
<p><strong>Examples</strong>:</p>
<pre>type=select|class=fmselect|label=Age|fieldname=fm_age|req=true|
data=(select),0-30,31-60,61-90,91-120
&nbsp;
type=select|class=fmselect|label=Colors|fieldname=fm_colors|
multi=true|req=true|data=(select),Red,Green,Blue
&nbsp;
type=select|class=fmselect|label=Choose|fieldname=fm_choose|
data=#Category1,item1,item2,#Category2,item3,item4</pre>
<hr />
<h4>FILE</h4>
<p>The file field generates a file upload box. As with all other fields, you can add as many of these as you like, as this script supports not only attachments, but multiple attachments. The only thing to keep in mind is that you may need to find out the limit your server has set for file upload sizes.</p>
<pre>type=file|class=|label=|fieldname=|[req=true]|[allowed=1,2,3]</pre>
<p>The <strong>allowed</strong> field is optional, and lets you define a (comma separated) list of file extensions that are allowed to be uploaded. Otherwise, all file types will be allowed.</p>
<p><strong>Examples</strong>:</p>
<pre>type=file|class=fmfile|label=Upload|fieldname=fm_upload
&nbsp;
type=file|class=fmfile|label=Upload|fieldname=fm_upload|req=true|
allowed=jpg,jpeg,gif,png</pre>
<hr /><a name="manualcode"><br />
<h3>Manual Form Code</h3>
<p></a></p>
<p>This feature allows you to manually specify the code used to generate your form. By default, this script uses the form structure information to dynamically generate the form. While this makes it easier for most people, since they do not have to write any code, it can limit those who need a bit more flexibility in their form structure.</p>
<p><strong>Notice</strong>: Usage of this feature is a bit tricky. If you do not have a good amount of experience with html forms and CSS, I do not recommend attempting it.</p>
<ul>
<li><strong>1)</strong> Customize your form using the &#8216;Form Structure&#8217; option as you would normally - this is required even when using the manual code entry, as it allows for processing of the form.</li>
<li><strong>2)</strong> Be sure you have all your options exactly as you want them, and view your newly created form page.</li>
<li><strong>3)</strong> View the source of the page, so you can copy the generated html. The code you need is between the following lines:
<pre>&lt;!&#45;- START of Dagon Design Formmailer output &#45;-&gt;
&lt;!&#45;- END of Dagon Design Formmailer output &#45;-&gt;</pre>
</li>
<li><strong>4)</strong> You can now customize this form code however you like, as long as the core elements of the form and fields are still in place.</li>
<li><strong>5)</strong> Enter your new code into the &#8216;Manual Form Code&#8217; option. (<strong>PHP VERSION NOTICE:</strong> Depending on your form code, you may have to &#8216;escape&#8217; single or double quotes, as you are assigning this code as a string value to the $manual_form_code option!)</li>
<li><strong>6)</strong> If everything worked properly, your page will now use the custom form code. Once again, the standard form structure option is still required, as it is still for processing of the form.</li>
</ul>
<p>You can also adjust the included CSS file to better fit your needs, or completely clear it out and manually create an entire new CSS structure for your task. Keep in mind that if you change any field items (or any options which affect the form code generation), you will have to repeat this process.</p>
<p>To disable the manual form code feature, just clear out the option for it.</p>
<hr /><a name="autoreply"><br />
<h3>Auto Reply Feature</h3>
<p></a></p>
<p>The options page for each instance includes fields to define an auto reply message. This is a pre-defined message that is sent back to the visitor. </p>
<p>To use this option, simply enter the name, email address, subject line, and message for your auto response. To disable this feature, just leave the message field blank.</p>
<p>You can also use field names in the auto reply message, and the user input from those fields will be used to generate the message.</p>
<hr /><a name="othermods"><br />
<h3>Other modifications</h3>
<p></a></p>
<h4>Redirect after form submission - Method 1</h4>
<p>It is possible to use Javascript to redirect the user after the form has been filled out. While this method is not 100% valid (Javascript redirection should go in the HEAD section of the page), it works. To add this feature, first find the following line in the script:</p>
<pre>$o .= $sent_message;</pre>
<p>And replace it with this:</p>
<pre>$o .= &#039;&lt;script&gt;&lt;!&#45;- 
window.location= &quot;http://www.mysite.com/&quot; 
//&#45;-&gt;&lt;/script&gt;&#039;;</pre>
<p>(where mysite.com is the URL you want to redirect to)</p>
<h4>Redirect after form submission - Method 2</h4>
<p>This is another method you can use to redirect the user after the form has been submitted. First, find this line:</p>
<p><code>$o .= $sent_message;</code></p>
<p>And after it, add this:</p>
<p><code>$o .= '&lt;META HTTP-EQUIV="REFRESH" CONTENT="4;URL=http://www.mysite.com/"&gt;';</code></p>
<p>Where &#8216;4&#8242; is the number of seconds to wait before refresh, and the &#8216;http://www.mysite.com/&#8217; is the URL you want to redirect to.</p>
<h4>Passing values to the form</h4>
<blockquote><p>To allow values to be passed directly to the form, all you have to do is change all references of $_POST to $_REQUEST (The REQUEST superglobal contains the values of both POST and GET items)</p></blockquote>
<h4>Prevent form data from being resubmitted upon refresh</h4>
<p>This feature is included in the WordPress plugin version, but not in the PHP version, because of how it has to be used. To enable the feature when using the script in standalone mode, add the following code after the PHP declaration at the top of the script:</p>
<pre>if (count($_POST) &gt; 0) {
&nbsp;&nbsp;$lastpost = isset($_COOKIE[&#039;lastpost&#039;]) ? $_COOKIE[&#039;lastpost&#039;] : &#039;&#039;;
&nbsp;&nbsp;if ($lastpost != md5(serialize($_POST))) {
&nbsp;&nbsp;&nbsp;&nbsp;setcookie(&#039;lastpost&#039;, md5(serialize($_POST)));
&nbsp;&nbsp;&nbsp;&nbsp;$_POST[&#039;_REPEATED&#039;] = 0;
&nbsp;&nbsp;} else {
&nbsp;&nbsp;&nbsp;&nbsp;$_POST[&#039;_REPEATED&#039;] = 1;
&nbsp;&nbsp;}
}</pre>
<p>If you are <strong>not</strong> using the standalone option, you must add that code at the very top of the PHP file you are calling the script from. Add PHP tags around it if needed. Just make sure there is no extra whitespace around the PHP tags.</p>
<h4>Modifying the script to use HII for image verification</h4>
<p>Miro has posted instructions for users wanting to use HII: <a href="http://www.dagondesign.com/articles/secure-php-form-mailer-script/#comment-67245">Read the comment</a>. <strong>Notice</strong>: Modifications listed in the comments may not apply for new versions of the script.</p>
<h4>Using SELRECIP and BCC together</h4>
<p>The easiest way to do this, is to find the following line in the script:</p>
<p><code>$send_status = mail($send_to, $email_subject, $msg, $headers);</code></p>
<p>If you are using SELRECIP, the message will be sent to whoever the visitor chooses. If you would also like the message to go to someone else, no matter who is chosen, just duplicate that line like so, adding in the address of the secondary recipient:</p>
<p><code>$send_status = mail("user2@domain.com", $email_subject, $msg, $headers);</code></p>
<hr /><a name="troubleshooting"><br />
<h3>Troubleshooting</h3>
<p></a></p>
<h4>Verification image not showing up</h3>
<p>The first thing to do is check to make sure your paths are set correctly in the options.</p>
<p>This script automatically chooses the best file type to generate the verification image. If your verification image is not displaying, the problem could be that your server will not properly generate that type of file. You can manually set this using the &#8216;Force image type&#8217; option in the script. It allows you to manually specify <strong>jpeg</strong>, <strong>gif</strong>, or <strong>png</strong>.</p>
<p>Try all the options to see which works best for you.</p>
<h4>Problems sending email</h4>
<p>The most common question I receive is &#8216;Why am I not receiving email from the script?&#8217;</p>
<p>There are many reasons this can happen. The first thing to do is make sure you have access to the PHP mail function on your web server, and that there are no restrictions in place that might prevent certain features of this script from working. If you are not sure, please ask your host for information. Unfortunately, I am not able to spend the time troubleshooting general server issues for everyone.</p>
<p>Also try having the script send the messages to another email address (on another domain), just to be sure the problem is not with your email account.</p>
<p>If you believe you can use the PHP mail function and have already tried a different email address, create a small PHP file with the following contents (be sure to use your own email address):</p>
<p><code>&lt;?php mail('you@domain.com', 'test subject', 'test message'); ?&gt;</code></p>
<p>Open the file in your browser and then check your mail. If you did not receive the message, something is not set properly on your server, and the trouble is not with this script. Even if other mail scripts work for you, that does not mean this one will, as there are several methods to send mail in PHP.</p>
<p>If you <strong>do</strong> receive the message, it most likely means that your server is configured to not allow the use of the fourth parameter (extra headers) in the mail() function. To work around this,  replace this line:</p>
<p><code>$send_status = mail($send_to, $email_subject, $msg, $headers);</code></p>
<p>With this:</p>
<p><code>$send_status = mail($send_to, $email_subject, $msg);</code></p>
<p>The only downside is that certain features (such as some header information, and the ability to send to multiple recipients) will be disabled. You may be able to contact your host and have them change this though. Many hosts add in this restriction for security reasons, to protect against unsafe scripts.</p>
<p>Lastly, some servers require an extra parameter for the mail function that specifies who the message is from. In many cases, this must be an email address on the server itself. Example:</p>
<p><code>$send_status = mail($send_to, $email_subject, $msg, $headers",
"-f user@domain.com");</code></p>
<h4>&#8216;Headers already sent&#8217; error</h4>
<p>Another common question is the &#8216;headers already sent&#8217; error message. Without getting into the details, this generally happens when something is output to the browser before a call to set_cookie, header, or a number of other PHP functions. Be sure there is no extra whitespace at the top of your file.</p>
<h4>Mail headers showing up in message body / attachments not working</h4>
<p>This issue can be caused if your server does not like the return/newline character set being used to end lines of the email headers. If you are experiencing this problem, try changing this line: </p>
<p><code>if (!defined('PHP_EOL')) 
define ('PHP_EOL', strtoupper(substr(PHP_OS,0,3) == 'WIN') ? "\r\n" : "\n");</code></p>
<p>To this:</p>
<p><code>if (!defined('PHP_EOL')) 
define ('PHP_EOL', strtoupper(substr(PHP_OS,0,3) == 'WIN') ? "\n" : "\n");</code></p>
<h4>If you require special SMTP settings for mail to be sent</h4>
<p>If you have to manually specify the SMTP settings, you can do so with the following code. This is only recommended for advanced users.</p>
<pre>ini_set(&quot;SMTP&quot;,&quot;mail.MYDOMAIN.com&quot;);
ini_set(&quot;smtp_port&quot;,&quot;587&quot;);
ini_set(&quot;username&quot;,&quot;MYUSERNAME@MYDOMAIN.com&quot;);
ini_set(&quot;password&quot;,&quot;MYPASSWORD&quot;); 
ini_set(&#039;sendmail_from&#039;, $sender_email);
$send_status = mail($send_to, $email_subject, $msg, $headers);
ini_restore(&#039;sendmail_from&#039;);</pre>
<p>(Just search for the reference to the mail() function to see where to add it)</p>
<h3>Conclusion</h3>
<p>Please be sure to read the entire article before asking a question. I spend a lot of time on the scripts and plugins available on this site, and it can be hard to keep up with all the requests. If you need modifications or a custom version, please <a href="/contact/">contact me</a>. Thanks for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/secure-php-form-mailer-script/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Secure Form Mailer Plugin For Wordpress</title>
		<link>http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 21:30:42 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/</guid>
		<description><![CDATA[This is the WordPress plugin version of my secure PHP form mailer script. This plugin has a wide range of features including: Support for multiple instances, an easy to use dynamic form generation system (any number of fields, in any order), multiple recipients, multiple file attachments, optional auto reply feature, an image verification system, numerous [...]]]></description>
			<content:encoded><![CDATA[<p>This is the WordPress plugin version of my secure PHP form mailer script. This plugin has a wide range of features including: Support for multiple instances, an easy to use dynamic form generation system (any number of fields, in any order), multiple recipients, multiple file attachments, optional auto reply feature, an image verification system, numerous security features (including protection against email header injection), a message template system, multiple languages, and too many other things to list. This plugin was designed to be easy to use, while still being extremely flexible. If you just want a simple contact form, you can set one up with just a few clicks. For those of you who need something a bit more advanced, you can completely customize the plugin to fit your needs - whether it is 5 fields or 500. A non-WordPress version is also available. ReCaptcha support has also been added.<span id="more-57"></span></p>
<p>You can see a <strong>very basic</strong> implementation of the WordPress plugin version of this script on this site&#8217;s <a href="http://www.dagondesign.com/contact/">contact page</a>.</p>
<h3>Notice: non-WordPress Users</h3>
<p><a href="http://www.dagondesign.com/articles/secure-php-form-mailer-script/">Information on the PHP version of this script</a></p>
<h3>Languages</h3>
<p>As of the latest release, this script contains language files for:</p>
<blockquote><p>English, Brazilian Portuguese, Catalan, Danish, Dutch, Finnish, French, German, Greek, Italian, Norwegian BokmÃ¥l, Polish, Portuguese, Romanian, Russian, Slovak, Slovene, Spanish, Swedish, Turkish</p></blockquote>
<p>If you would like to submit a language file please <a href="/contact/">contact me</a>.</p>
<h3>WordPress vs PHP Versions</h3>
<p>To make things easier to find, the two versions of this script share much of the same documentation. While the basic features are the same, there are several differences, so be sure to reference the proper page.</p>
<h3>Table of Contents</h3>
<p>Due to the size of this page, I have split everything up into sections:</p>
<ul>
<li><a href="#download">Download</a></li>
<li><a href="#changelog">Changelog</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#quick">Quick and Basic Configuration</a></li>
<li><a href="#initial">Initial Configuration</a></li>
<li><a href="#form">Form Configuration</a></li>
<li><a href="#otherconfig">Other Configuration Options</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#advancedrecip">Advanced Recipient Options</a></li>
<li><a href="#advancedform">Advanced Form Structure</a></li>
<li><a href="#manualcode">Manual Form Code</a></li>
<li><a href="#autoreply">Auto Reply Feature</a></li>
<li><a href="#othermods">Other Modifications</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
<li><a href="#comments">Comments</a></li>
</ul>
<hr /><a name="download"><br />
<h3>Download</h3>
<p></a></p>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-formmailer-wp.zip">Latest Release</a> <strong>(For WordPress 2.0 through 2.5)</strong>
</li>
</ul>
<hr /><a name="changelog"><br />
<h3>Changelog</h3>
<p></a></p>
<p>Since both the WordPress and non-WordPress versions of this script are updated together, the changelog below reflects both versions.</p>
<ul>
<li><strong>11-25-07 - v5.4</strong> Added support for ReCaptcha, manual form code entry, 5 new languages (Catalan, Danish, Polish, Romanian, and Turkisk), several html and css tweaks, and other misc. updates.</li>
<li><strong>07-27-07 - v5.33</strong> Few minor bugs fixed. Finnish language file added.</li>
<li><strong>07-08-07 - v5.32</strong> Error messages affecting form alignment issue resolved. Italian and Slovak language files added.</li>
<li><strong>06-18-07 - v5.3</strong> &#8216;undefined index&#8217; errors fixed, image verification adjustments, p tags removed from fieldsets, changes to help html validity, various other fixes.</li>
<li><strong>05-09-07 - v5.25</strong> &#8216;Thank you&#8217; message now allows for form field inputs as well.</li>
<li><strong>05-08-07 - v5.24</strong> Auto-reply message now allows for form field inputs. Language selection issue resolved. str_replace errors (on certain servers) fixed. Norwegian BokmÃ¥l language file added.</li>
<li><strong>05-01-07</strong> Not a version update. Greek and Swedish language files added.</li>
<li><strong>04-18-07 - v5.23</strong> Renamed email verification function (to fix conflicts with other scripts). The GD check is now disabled if you are not using image verification. Added two new language files - Portuguese and Russian.</li>
<li><strong>04-18-07</strong> Not a version update. Brazilian Portuguese language file has been added.</li>
<li><strong>04-03-07 - v5.22</strong> Email generation code has been modified to try to work with more servers. French language file has also been updated.</li>
<li><strong>03-28-07 - v5.21</strong> Highly recommended update - Fixed an issue with the verification code not being handled properly. Nothing else has been changed.</li>
<li><strong>03-25-07 - v5.2</strong> Email generation improved - should work better in more email clients. Many issues with message generation and field types have been fixed. Better support added for field requirement options. CSS for various fields updated. Issue with submit button fixed. Dutch and French language files added. Checkbox and drop-down issues resolved. Email verification method improved. Undefined index errors fixed, and much more. Be sure to read the updated instructions for the field types. </li>
<li><strong>03-13-07 - v5.1</strong> Lots of updates: Slash escaping has been improved, p tags are now added around form elements, each form instance can have its own language setting, the language selection issue has been fixed, improved foreign character support in messages, check box handling improved, and a new optional auto reply feature has been added.</li>
<li><strong>02-06-07 - v5.0</strong> This is a <strong>major</strong> update from version 4, and because of this, I have completely re-written this page, and removed the old changelog to save space.</li>
</ul>
<hr /><a name="installation"><br />
<h3>Installation</h3>
<p></a></p>
<ul>
<li><strong>1)</strong> Download and uncompress dd-formmailer-wp.zip</li>
<li><strong>2)</strong> Upload the entire dd-formmailer directory to your WordPress plugins directory</li>
<li><strong>3)</strong> Activate the plugin</li>
<li><strong>4)</strong> Configure your options (explained below)</li>
<li><strong>5)</strong> Add the form to your page (explained below)</li>
</ul>
<hr /><a name="quick"><br />
<h3>Quick and Basic Configuration</h3>
<p></a></p>
<p>While this plugin is highly configurable, some of you may just want to get up and running quickly with a simple (and secure) contact form. If so, these are the minimum configuration changes you must make:</p>
<p>Create a new WordPress page, and type in the trigger text: </p>
<p><code>&lt;!-- ddfm1 --&gt;</code></p>
<p>Under <strong>Options -> DDFM1</strong>, fill in the following options:</p>
<blockquote><p><strong>Contact page</strong> - Enter the <strong>full</strong> URL of your newly created contact page.</p>
<p><strong>Recipients</strong> - Enter your email address.</p></blockquote>
<p>Click <strong>Update options</strong> and you are finished! If you would like to learn more about the other features of this plugin, please continue reading.</p>
<hr /><a name="initial"><br />
<h3>Initial Configuration</h3>
<p></a></p>
<p>After activating the plugin, you will have a new options page in the admin panel - <strong>DDFM-Main</strong>. These are the settings that apply to all instances of the plugin:</p>
<blockquote><p><strong>Instances</strong> - The number of contact forms this plugin will generate. If you just need a single contact form, leave this set to 1.</p>
<p><strong>Image Verification Method</strong> - There are three choices for image verification. It can be disabled, you can use the script&#8217;s built-in system (a simple captcha - requires GD support on the server), or you can use the ReCaptcha system (requires signing up for a free account at <a href="http://recaptcha.net">recaptcha.net</a>)</p>
<p><strong>Basic Method Options</strong> - If using the basic image verification method, you can choose the text and background color for the image (3 or 6 digit hex codes). By default, the script will try and choose the best file format for the verification image, but if it gives you any problems, you can manually specify the format to see what works best for your server.</p>
<p><strong>ReCaptcha Method Options</strong> - If using the ReCaptcha image verification method, you must enter the public and private keys given to you at the ReCaptcha website. These are used to generate the verification form, and the keys are specific to the website under your account (meaning if you use this script on multiple sites, you need a set of keys for each).</p>
<p>A &#8216;Load Default Options&#8217; button is available if you wish to reset the settings on this page.</p>
<p>Each instance you create will have its own options page - <strong>DDFM1</strong>, <strong>DDFM2</strong>, etc. This is where you configure the settings for each individual form. These settings are listed below.</p></blockquote>
<hr /><a name="form"><br />
<h3>Form Configuration</h3>
<p></a></p>
<p>These are the settings found on the options page for each instance:</p>
<blockquote><p><strong>Language</strong> - The language you want to use. To create a new language, simply duplicate the existing English.php file (in the plugins <strong>lang</strong> subdirectory), give it a new name, and edit it for your language. It will then automatically appear in this list (after reloading the page).</p>
<p><strong>Contact page</strong> - This is the full URL of the page the form is actually going to be displayed on.</p>
<p><strong>Recipients</strong> - If sending to a single recipient, all you have to do is enter the email address. This plugin supports multiple recipients, including CC and BCC, and even a drop-down box for recipient selection. Information on these configurations can be found further down on this page.</p>
<p><strong>Form Structure</strong> - This is where you define the fields that will be used on this form. There are a lot of options available for this, and they will be explained further down as well.</p>
<p><strong>Manual Form Code</strong> - This is a very advanced option that has its own section on this page.</p>
<p><strong>Sender name, Sender email, and Email subject</strong> - These options help generate the email headers. If you enter a field name, it will be replaced by user input from that field. For example, if you have a form field called fm_name and you use that as the Sender name option, the visitor&#8217;s name will be used as the From field in the email. You can also combine them. If you have a field called fm_firstname and fm_lastname you could enter &#8216;fm_lastname, fm_firstname&#8217; - For the Sender email option, just use your email field.</p>
<p>The Email subject option works the same way. For example, you could enter &#8216;Contact: fm_subject&#8217; and it will use the subject that the visitor entered, with the &#8216;Contact:&#8217; prefix.</p>
<p><strong>Message Structure</strong> - This feature is optional. If left blank, the script will generate the email message itself, which will include all the data the visitor submits. If you choose to use this option, it will act as the message template. Simply enter your custom text, including your field names. When the message is generated, the field names will be replaced by the user input from those fields. Note: Since the script will just do a search and replace for field names, be sure they are unique enough. Example: A check for fm_message2 would also get triggered by fm_message when the script adds in the input.</p>
<p><strong>Auto Reply</strong> - This is an optional feature that allows you to automatically send a pre-defined message back to those who contact you. More information on this is below.</p>
<p><strong>Success Message</strong> - This is the text that is shown after the email has been sent. You can also use field names in this, and the user input from those fields will be used to generate the message.</p>
<p><strong>Show required</strong> - If enabled, required fields will be marked with an asterisk.</p>
<p><strong>Show IP and Hostname</strong> - If enabled, the visitor&#8217;s IP and hostname are added to the message.</p>
<p><strong>Wrap messages</strong> - This option wraps message lines to 70 characters to comply with RFC specifications.</p>
<p><strong>Max upload size</strong> - This allows you to set the maximum file size (in bytes) for attachment uploads. This option only applies if the setting is lower than the value already set in your php.ini file. </p>
<p>The option page for each inststance also has a &#8216;Load Default Options&#8217; button.</p></blockquote>
<hr /><a name="otherconfig"><br />
<h3>Other Configuration Options</h3>
<p></a></p>
<p>With the exception of the text defined in the options pages, all text visible to the visitor is contained within the language file.</p>
<p>Visual changes to the form can be made in the included CSS file. The class names used in the examples below already exist within the CSS.</p>
<hr /><a name="usage"><br />
<h3>Usage</h3>
<p></a></p>
<p>To show the form on your page, simply add the trigger text (followed by the instance number) to your page, just like you would any text:</p>
<pre>&lt;!&#45;- ddfm1 &#45;-&gt;</pre>
<p>For those of you who want to display the form directly from a template file, you can use the following code:</p>
<pre>&lt;?php global $ddfm; echo $ddfm{1}-&gt;generate_data(); ?&gt;</pre>
<p>(where &#8216;1&#8242; is the instance number)</p>
<hr /><a name="advancedrecip"><br />
<h3>Advanced Recipient Options</h3>
<p></a></p>
<p>As mentioned above, if you want to send the messages to a single recipient, just enter the email address in the recipients field. To send to multiple recipients, separate the addresses with a <strong>|</strong> (pipe) character, and use one of the following prefixes for each: <strong>to= cc= bcc=</strong></p>
<p><strong>Examples:</strong></p>
<pre>to=user1@domain.com|to=user2@domain.com
to=user1@domain.com|cc=user2@domain.com
to=user1@domain.com|cc=user2@domain.com|bcc=user3@domain.com</pre>
<p>You can have as many of each type (to, cc, bcc) as you like, and they can be in any order, although the first one in the list is the always the primary recipient, and must use <strong>to=</strong></p>
<p>For those of you who want to let the vistor choose the recipient from a drop-down box, first you must enter <strong>selrecip</strong> in the recipients field. Then you must add a new line in the form structure box. Example:</p>
<pre>type=selrecip|class=fmselect|label=Recipient|data=(select),User1,
user1@domain.com,User2,user2@domain.com</pre>
<p>The type must be <strong>selrecip</strong>, but you can use whatever you like as the CSS class, and label. The first item in the data parameter is the default (unselected) option. After that are the names and email addresses. You can add in as many as you like - just keep them in the proper order (name,email,name,email,etc..). Only the names are visible within the HTML for privacy reasons. </p>
<p>The &#8216;(select)&#8217; item is the default selection, which the user must change to submit the form. You can change the &#8216;(select)&#8217; text if you choose.</p>
<hr /><a name="advancedform"><br />
<h3>Advanced Form Structure</h3>
<p></a><br />
This plugin uses a dynamic form generation system, which means that by simply adding a new line to the form structure, you will have a new field in your form. You can have as many fields as you like, and in any order. The only field type that you must absolutely have is the <strong>verify</strong> field if you are using the image verification option. All of the fields are explained below, with examples. Separate each field type with a single newline in the form structure option. (Some of the examples below are bit long, so they are wrapped to the next line - be sure that the only newlines are after each field type when adding them to your form structure.)</p>
<p>These are the different parameters that apply to most of the field types (Special exceptions and parameters unique to a particular field are listed under each field type):</p>
<ul>
<li><strong>type</strong> - This tells the plugin what type of field you are adding.</li>
<li><strong>class</strong> - The CSS class used to style the field. The classes used in the examples below already exist in the CSS file.</li>
<li><strong>label</strong> - Text that is shown next to the field.</li>
<li><strong>fieldname</strong> - The name of the form field (must be unique).</li>
<li><strong>max</strong> - Maximum number of characters allowed.</li>
<li><strong>req</strong> - (OPTIONAL) If you want to require a field, set this to true. If not, do not add it.</li>
<li><strong>default</strong> - (OPTIONAL) This allows you to specify the default value of a field.</li>
</ul>
<hr />
<h4>TEXT</h4>
<p>This is a standard text input field.</p>
<pre>type=text|class=|label=|fieldname=|max=|[req=true]|[ver=]|[default=]</pre>
<p>The text field type has a special parameter - <strong>ver</strong> - which can be used to verify the input. You can choose <i>email</i> (which checks that the input is a proper email address) or <i>url</i> (which checks that the input is not only a proper URL, but that it actually exists). If you do not want to use either validation option, do not add this parameter.</p>
<p><strong>Examples</strong>:</p>
<pre>type=text|class=fmtext|label=Name|fieldname=fm_name|max=100|req=true 

type=text|class=fmtext|label=Age|fieldname=fm_age|max=100|
default=Enter your age! 

type=text|class=fmtext|label=Email|fieldname=fm_email|max=100|req=true|
ver=email 

type=text|class=fmtext|label=URL|fieldname=fm_url|max=100|ver=url</pre>
<hr />
<h4>PASSWORD</h4>
<p>This is a standard password field. It is exactly like a text field, except it shows asterisks when the user types.</p>
<pre>type=password|class=|label=|fieldname=|max=|[req=true]|[confirm=true]</pre>
<p>The password field type also has a special parameter - <strong>confirm</strong> - which if set to true, it duplicates the password field, so that the visitor has to confirm their input. If you do not want to use this, do not add the confirm parameter.</p>
<p><strong>Examples</strong>:</p>
<pre>type=password|class=fmtext|label=Password|fieldname=fm_pass|max=100|
req=true|confirm=true
&nbsp;
type=password|class=fmtext|label=Secret Word|fieldname=fm_secret|max=100</pre>
<hr />
<h4>TEXTAREA</h4>
<p>This is a standard text area, for multiple lines of text.</p>
<pre>type=textarea|class=|label=|fieldname=|max=|rows=|[req=true]|[default=]</pre>
<p>The textarea field type has a special parameter - <strong>rows</strong> which defines the number of rows in the field (required for valid html).</p>
<p><strong>Examples</strong>:</p>
<pre>type=textarea|class=fmtextarea|label=Message|fieldname=fm_message|
max=1000|rows=6
&nbsp;
type=textarea|class=fmtextarea|label=Message|fieldname=fm_message|max=1000|
rows=4|req=true
&nbsp;
type=textarea|class=fmtextarea|label=Message|fieldname=fm_message|max=1000|
rows=10|req=true|default=Type here!</pre>
<hr />
<h4>WIDETEXTAREA</h4>
<p>This is exactly the same as the standard textarea, except that it&#8217;s wider, and the label is above it instead of to the side.</p>
<pre>type=widetextarea|class=|label=|fieldname=|max=|rows=|[req=true]|[default=]</pre>
<p><strong>Example</strong>:</p>
<pre>type=widetextarea|class=fmtextwide|label=Message|fieldname=fm_message|
max=1000|rows=10|req=true</pre>
<p><strong>*</strong> Note that the normal textarea, and wide textarea fields use a different CSS class for formatting.</p>
<hr />
<h4>VERIFY</h4>
<p>This field is required if you are using the <strong>basic</strong> verification method. It does not apply if you are using the ReCaptcha method. It is used for placement of the verification image (and associated text box) in the form.</p>
<pre>type=verify|class=|label=</pre>
<p><strong>Example</strong>:</p>
<pre>type=verify|class=fmverify|label=Verify</pre>
<hr />
<h4>FULLBLOCK and HALFBLOCK</h4>
<p>These are not standard form fields, but simply a way you can add text to your form. The full block is as wide as a wide textarea, while the half block is aligned with other standard fields. You can use basic HTML in your text if you like.</p>
<pre>type=fullblock|class=|text=
type=halfblock|class=|text=</pre>
<p><strong>Examples</strong>:</p>
<pre>type=fullblock|class=fmfullblock|text=This could be some sort of 
introduction message.
&nbsp;
type=halfblock|class=fmhalfblock|text=This could be used to explain a field 
in greater depth.</pre>
<hr />
<h4>OPENFIELDSET and CLOSEFIELDSET</h4>
<p>These do just what the name implies - they open and close a fieldset in your form so you can help group fields together. It also allows you to specify a legend for the fieldset (required for valid HTML).</p>
<pre>type=openfieldset|legend=
type=closefieldset</pre>
<p><strong>Examples</strong>:</p>
<pre>type=openfieldset|legend=Your Information
&nbsp;
(other field would go between these)
&nbsp;
type=closefieldset</pre>
<hr />
<h4>CHECKBOX</h4>
<p>The checkbox field can be used to generate a single checkbox, or a group of them. The usage is a bit different than the other fields.</p>
<pre>type=checkbox|class=|label=|data=
(fieldname),(text),(checked),(REQUIRED),
(fieldname),(text),(CHECKED),(REQUIRED)&#46;..</pre>
<p>As you can see, the checkbox data is a comma separated list of four items per checkbox:</p>
<ul>
<li><strong>fieldname</strong> - A unique fieldname for each checkbox in the form.</li>
<li><strong>text</strong> - The text shown to the right of each checkbox.</li>
<li><strong>checked</strong> - <strong>true</strong> or <strong>false</strong>. This allows you to make checkboxes checked by default.</li>
<li><strong>required</strong> - <strong>true</strong> or <strong>false</strong>. If true, it means that the user must check the box to send the message. Mainly useful for &#8216;check here to agree&#8217; type situations.</li>
</ul>
<p><strong>Examples</strong></p>
<pre>type=checkbox|class=fmcheck|label=I Agree|data=fm_agree,I agree to the 
terms,false,true
&nbsp;
type=checkbox|class=fmcheck|label=Interests|data=fm_i1,Computers,false,
false,fm_i2,Art,false,false,fm_i3,Music,false,false</pre>
<hr />
<h4>RADIO</h4>
<p>This field generates a group of radio buttons. Radio buttons are similar to checkboxes, except that they are treated as a group, and only one option may be selected. </p>
<pre>type=radio|class=|label=|fieldname=|[req=true]|[default=]|data=(text),(text),
(text)&#46;..</pre>
<p>The <strong>req</strong> and <strong>default</strong> items are optional. <strong>req</strong>, if set to true, makes the field required. <strong>default</strong> can be set to the option number you want to be selected by default (starting at 1).</p>
<p><strong>Examples</strong>:</p>
<pre>type=radio|class=fmradio|label=Gender|fieldname=fm_gender|data=Male,Female
&nbsp;
type=radio|class=fmradio|label=Color|fieldname=fm_color|req=true|default=1|
data=Unspecified,Red,Green,Blue</pre>
<hr />
<h4>SELECT</h4>
<p>The select field generates either a standard drop-down box, or a multi-select box, depending on the <strong>multi</strong> option. Option groups are supported as well.</p>
<pre>type=select|class=|label=|fieldname=|[multi=true]|[req=true]|data=(#group),
(text),(text),(#group),(text)&#46;..</pre>
<p>The <strong>multi</strong> and <strong>req</strong> options are optional. </p>
<p>If the field is required, the first option you have in the data paramater will be the default, which tells the user they need to select one of the options. If they do not change the default option, and it is required, they will receive an error.</p>
<p>The data field is just a list of the options, separated by a comma. To define the start of an option group, just prefix the group name with a # as shown below.</p>
<p><strong>Examples</strong>:</p>
<pre>type=select|class=fmselect|label=Age|fieldname=fm_age|req=true|
data=(select),0-30,31-60,61-90,91-120

type=select|class=fmselect|label=Colors|fieldname=fm_colors|
multi=true|req=true|data=(select),Red,Green,Blue

type=select|class=fmselect|label=Choose|fieldname=fm_choose|
data=#Category1,item1,item2,#Category2,item3,item4</pre>
<hr />
<h4>FILE</h4>
<p>The file field generates a file upload box. As with all other fields, you can add as many of these as you like, as this script supports not only attachments, but multiple attachments. The only thing to keep in mind is that you may need to find out the limit your server has set for file upload sizes.</p>
<pre>type=file|class=|label=|fieldname=|[req=true]|[allowed=1,2,3]</pre>
<p>The <strong>allowed</strong> field is optional, and lets you define a (comma separated) list of file extensions that are allowed to be uploaded. Otherwise, all file types will be allowed.</p>
<p><strong>Examples</strong>:</p>
<pre>type=file|class=fmfile|label=Upload|fieldname=fm_upload
&nbsp;
type=file|class=fmfile|label=Upload|fieldname=fm_upload|req=true|
allowed=jpg,jpeg,gif,png</pre>
<hr /><a name="manualcode"><br />
<h3>Manual Form Code</h3>
<p></a></p>
<p>This feature allows you to manually specify the code used to generate your form. By default, this script uses the form structure information to dynamically generate the form. While this makes it easier for most people, since they do not have to write any code, it can limit those who need a bit more flexibility in their form structure.</p>
<p><strong>Notice</strong>: Usage of this feature is a bit tricky. If you do not have a good amount of experience with html forms and CSS, I do not recommend attempting it.</p>
<ul>
<li><strong>1)</strong> Customize your form using the &#8216;Form Structure&#8217; option as you would normally - this is required even when using the manual code entry, as it allows for processing of the form.</li>
<li><strong>2)</strong> Be sure you have all your options exactly as you want them, and view your newly created form page.</li>
<li><strong>3)</strong> View the source of the page, so you can copy the generated html. The code you need is between the following lines:
<pre>&lt;!&#45;- START of Dagon Design Formmailer output &#45;-&gt;
&lt;!&#45;- END of Dagon Design Formmailer output &#45;-&gt;</pre>
</li>
<li><strong>4)</strong> You can now customize this form code however you like, as long as the core elements of the form and fields are still in place.</li>
<li><strong>5)</strong> Enter your new code into the &#8216;Manual Form Code&#8217; field in the options and save.</li>
<li><strong>6)</strong> If everything worked properly, your page will now use the custom form code. Once again, the standard form structure option is still required, as it is still for processing of the form.</li>
</ul>
<p>You can also adjust the included CSS file to better fit your needs, or completely clear it out and manually create an entire new CSS structure for your task. Keep in mind that if you change any field items (or any options which affect the form code generation), you will have to repeat this process.</p>
<p>To disable the manual form code feature, just clear out the option for it.</p>
<hr /><a name="autoreply"><br />
<h3>Auto Reply Feature</h3>
<p></a><br />
The options page for each instance includes fields to define an auto reply message. This is a pre-defined message that is sent back to the visitor. </p>
<p>To use this option, simply enter the name, email address, subject line, and message for your auto response. To disable this feature, just leave the message field blank.</p>
<p>You can also use field names in the auto reply message, and the user input from those fields will be used to generate the message.</p>
<hr /><a name="othermods"><br />
<h3>Other modifications</h3>
<p></a></p>
<h4>Redirect after form submission - Method 1</h4>
<p>It is possible to use Javascript to redirect the user after the form has been filled out. While this method is not 100% valid (Javascript redirection should go in the HEAD section of the page), it works. To add this feature, first find the following line in the script:</p>
<pre>$o .= $sent_message;</pre>
<p>And replace it with this:</p>
<pre>$o .= &#039;&lt;script&gt;&lt;!&#45;- 
window.location= &quot;http://www.mysite.com/&quot; 
//&#45;-&gt;&lt;/script&gt;&#039;;</pre>
<p>(where mysite.com is the URL you want to redirect to)</p>
<h4>Redirect after form submission - Method 2</h4>
<p>This is another method you can use to redirect the user after the form has been submitted. First, find this line:</p>
<pre>$o .= $sent_message;</pre>
<p>And after it, add this:</p>
<p><code>$o .= '&lt;META HTTP-EQUIV="REFRESH" CONTENT="4;URL=http://www.yoursite.com"&gt;';</code></p>
<p>Where &#8216;4&#8242; is the number of seconds to wait before refresh, and the &#8216;http://www.yoursite.com&#8217; is the URL you want to redirect to.</p>
<h4>Passing values to the form</h4>
<blockquote><p>To allow values to be passed directly to the form, all you have to do is change all references of $_POST to $_REQUEST (The REQUEST superglobal contains the values of both POST and GET items)</p></blockquote>
<h4>Modifying the script to use HII for image verification</h4>
<p>Miro has posted instructions for users wanting to use HII: <a href="http://www.dagondesign.com/articles/secure-php-form-mailer-script/#comment-67245">Read the comment</a>. <strong>Notice</strong>: Modifications listed in the comments may not apply for new versions of the script.</p>
<h4>Using SELRECIP and BCC together</h4>
<p>The easiest way to do this, is to find the following line in the script:</p>
<p><code>$send_status = mail($send_to, $email_subject, $msg, $headers);</code></p>
<p>If you are using SELRECIP, the message will be sent to whoever the visitor chooses. If you would also like the message to go to someone else, no matter who is chosen, just duplicate that line like so, adding in the address of the secondary recipient:</p>
<p><code>$send_status = mail("user2@domain.com", $email_subject, $msg, $headers);</code></p>
<hr /><a name="troubleshooting"><br />
<h3>Troubleshooting</h3>
<p></a></p>
<h4>Verification image not showing up</h3>
<p>The first thing to do is check to make sure your paths are set correctly in the options.</p>
<p>This plugin automatically chooses the best file type to generate the verification image. If your verification image is not displaying, the problem could be that your server will not properly generate that type of file. You can manually set this using the &#8216;Force image type&#8217; option under the <strong>DDFM-Main</strong> options page. It allows you to manually specify <strong>jpeg</strong>, <strong>gif</strong>, or <strong>png</strong>.</p>
<p>Try all the options to see which works best for you.</p>
<h4>Problems sending email</h4>
<p>The most common question I receive is &#8216;Why am I not receiving email from the script?&#8217;</p>
<p>There are many reasons this can happen. The first thing to do is make sure you have access to the PHP mail function on your web server, and that there are no restrictions in place that might prevent certain features of this script from working. If you are not sure, please ask your host for information. Unfortunately, I am not able to spend the time troubleshooting general server issues for everyone.</p>
<p>Also try having the script send the messages to another email address (on another domain), just to be sure the problem is not with your email account.</p>
<p>If you believe you can use the PHP mail function and have already tried a different email address, create a small PHP file with the following contents (be sure to use your own email address):</p>
<p><code>&lt;?php mail('you@domain.com', 'test subject', 'test message'); ?&gt;</code></p>
<p>Open the file in your browser and then check your mail. If you did not receive the message, something is not set properly on your server, and the trouble is not with this script. Even if other mail scripts work for you, that does not mean this one will, as there are several methods to send mail in PHP.</p>
<p>If you <strong>do</strong> receive the message, it most likely means that your server is configured to not allow the use of the fourth parameter (extra headers) in the mail() function. To work around this,  replace this line:</p>
<p><code>$send_status = mail($send_to, $email_subject, $msg, $headers);</code></p>
<p>With this:</p>
<p><code>$send_status = mail($send_to, $email_subject, $msg);</code></p>
<p>The only downside is that certain features (such as some header information, and the ability to send to multiple recipients) will be disabled. You may be able to contact your host and have them change this though. Many hosts add in this restriction for security reasons, to protect against unsafe scripts.</p>
<p>Lastly, some servers require an extra parameter for the mail function that specifies who the message is from. In many cases, this must be an email address on the server itself. Example:</p>
<p><code>$send_status = mail($send_to, $email_subject, $msg, $headers",
"-f user@domain.com");</code></p>
<h4>&#8216;Headers already sent&#8217; error</h4>
<p>Another common question is the &#8216;headers already sent&#8217; error message. Without getting into the details, this generally happens when something is output to the browser before a call to set_cookie, header, or a number of other PHP functions. Be sure there is no extra whitespace at the top of your file.</p>
<p>For WordPress users, it is also always a good idea to disable your other plugins temporarily to make sure that nothing is conflicting.</p>
<h4>Mail headers showing up in message body / attachments not working</h4>
<p>This issue can be caused if your server does not like the return/newline character set being used to end lines of the email headers. If you are experiencing this problem, try changing this line: </p>
<p><code>if (!defined('PHP_EOL')) 
define ('PHP_EOL', strtoupper(substr(PHP_OS,0,3) == 'WIN') ? "\r\n" : "\n");</code></p>
<p>To this:</p>
<p><code>if (!defined('PHP_EOL')) 
define ('PHP_EOL', strtoupper(substr(PHP_OS,0,3) == 'WIN') ? "\n" : "\n");</code></p>
<h4>If you require special SMTP settings for mail to be sent</h4>
<p>If you have to manually specify the SMTP settings, you can do so with the following code. This is only recommended for advanced users.</p>
<pre>ini_set(&quot;SMTP&quot;,&quot;mail.MYDOMAIN.com&quot;);
ini_set(&quot;smtp_port&quot;,&quot;587&quot;);
ini_set(&quot;username&quot;,&quot;MYUSERNAME@MYDOMAIN.com&quot;);
ini_set(&quot;password&quot;,&quot;MYPASSWORD&quot;); 
ini_set(&#039;sendmail_from&#039;, $sender_email);
$send_status = mail($send_to, $email_subject, $msg, $headers);
ini_restore(&#039;sendmail_from&#039;);</pre>
<p>(Just search for the reference to the mail() function to see where to add it)</p>
<h3>Conclusion</h3>
<p>Please be sure to read the entire article before asking a question. I spend a lot of time on the scripts and plugins available on this site, and it can be hard to keep up with all the requests. If you need modifications or a custom version, please <a href="/contact/">contact me</a>. Thanks for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Free Text Host</title>
		<link>http://www.dagondesign.com/articles/free-text-host/</link>
		<comments>http://www.dagondesign.com/articles/free-text-host/#comments</comments>
		<pubDate>Tue, 23 Oct 2007 00:50:43 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/free-text-host/</guid>
		<description><![CDATA[The Free Text Host website is a new project by Dagon Design. The site allows visitors to host text without having to sign up or give any personal information. One possible usage for this is to host code snippets, but it can be used for just about anything really. Options include the ability to enter [...]]]></description>
			<content:encoded><![CDATA[<p>The Free Text Host website is a new project by Dagon Design. The site allows visitors to host text without having to sign up or give any personal information. One possible usage for this is to host code snippets, but it can be used for just about anything really. Options include the ability to enter a password to allow you to edit or delete your text, and the choice to use preformatted text and make links clickable. <span id="more-114"></span></p>
<h3>Try it out</h3>
<ul>
<li><a href="http://freetexthost.com/">Free Text Host</a></li>
</ul>
<h3>Changelog</h3>
<ul>
<li><strong>10-22-07</strong> - Option added to make links clickable, and to enable/disable preformatted output. You can also now edit the text with the edit/delete password.</li>
<li><strong>10-20-07</strong> - First public release</li>
</ul>
<h3>Usage</h3>
<p>Just enter your text and the verification code (to help prevent spam) and you will be given a randomly generated URL that only you will know.</p>
<p>There is currently a 50000 character limit. I will see how this works before I raise it higher.</p>
<h3>Options</h3>
<p>If you choose, you can enter a password when submitting your text. This password will allow you to make changes or delete your page. If you do not include a password, the page cannot be modified.</p>
<p>You can also choose to use preformatted text, which means extra whitespace and linebreaks will appear exactly as you type them, and a fixed width font will be used.</p>
<p>Lastly, you can choose to make links in your text clickable. These links will contain the nofollow attribute.</p>
<h3>Questions/Answers</h3>
<h4>Privacy Information</h4>
<blockquote><p>Only one cookie is used on the site, and it is for the verification code. The only information it contains is the code itself, and it is used to help prevent spam.</p>
<p>This site does not use any Javascript or Flash, and it has no tracking or logging features.</p></blockquote>
<h4>Is my hosted text visible by others?</h4>
<blockquote><p>Only if you give them the URL, or they guess it. The URL contains a 10 digit random alphanumeric ID, which allows for up to 3656158440062976 unique IDs, so it would be hard to guess.</p>
<p>The hosted text pages also use the noindex, nofollow, and noarchive robot directives to prevent search engine robots from indexing them.</p></blockquote>
<h4>Can I print my text?</h4>
<blockquote><p>Yes. If you print your page, it will only print the text itself. Everything else will be removed from the page.</p></blockquote>
<h4>Can I edit/delete my text?</h4>
<blockquote><p>Yes. When you enter your text, you have an option for a password. If you enter one, you can use it to edit or delete your page later.</p></blockquote>
<h4>What if I lose my URL?</h4>
<blockquote><p>Then it is lost. This is by design.</p></blockquote>
<h3>Possible Future Features</h3>
<p>These are things that I may add at a later date. I plan to keep the interface relatively simple though, as it is part of my goal with this project.</p>
<ul>
<li>Option to make pages auto-delete after a given period of time</li>
</ul>
<h3>Disclaimer</h3>
<p>While the generated pages are relatively private unless you give out the URL, Dagon Design cannot guarantee that no one will see your text by guessing the URL, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/free-text-host/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Multi Column Category List Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/multi-column-category-list-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/multi-column-category-list-plugin-for-wordpress/#comments</comments>
		<pubDate>Sat, 29 Sep 2007 20:24:23 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/multi-column-category-list-plugin-for-wordpress/</guid>
		<description><![CDATA[This plugin generates an alphabetical listing of your WordPress categories in multiple columns. You can choose the number of columns to display, with an option to split up the list of categories by letter. It also supports the use of a custom header to help separate the categories. For example, you could have it say [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin generates an alphabetical listing of your WordPress categories in multiple columns. You can choose the number of columns to display, with an option to split up the list of categories by letter. It also supports the use of a custom header to help separate the categories. For example, you could have it say &#8216;Topics: A&#8217; and then list the topics that start with &#8216;A&#8217;, etc. The category list can easily be added to any post or page with the trigger text, or called directly from a template file. A CSS file is also included for easy style changes.<span id="more-93"></span></p>
<h3>Related Plugins</h3>
<p>There is also a plugin available to generate a <a href="http://www.dagondesign.com/articles/multi-column-link-list-plugin-for-wordpress/">multi-column list of your WordPress links</a>.</p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-multi-col-cats.zip">Latest Release</a> <strong>(For WordPress 2.0 through 2.5)</strong>
</li>
</ul>
<h3>Installation</h3>
<ul>
<li>Download the above file and uncompress</li>
<li>Upload <strong>dd-multi-col-cats.php</strong> to your plugins directory</li>
<li>Upload <strong>dd-multi-col-cats.css</strong> to your theme directory</li>
<li>Activate the plugin from the WordPress admin panel</li>
<li>Configure the options under the admin panel: <strong>Options - DDMultiColCats</strong>
</ul>
<h3>Usage</h3>
<p>To use this plugin, simply add the following trigger text to a post or page:</p>
<p><code>&lt;!-- multicolcats --&gt;</code></p>
<p>If you prefer, you can also call the function directly from a template file with the following command:</p>
<p><code>&lt;?php echo ddmcc_generate(); ?&gt;</code></p>
<h3>Change Log</h3>
<ul>
<li><strong>09-29-07 Version 1.3</strong> - Updated for WordPress 2.3. Added &#8216;Load Default Options&#8217; button. Removed javascript expand code because it was too buggy.</li>
<li><strong>05-16-07 Version 1.2</strong> - Updated for WordPress 2.2.</li>
<li><strong>03-02-07 Version 1.1</strong> - Option added to allow click-to-expand lists. Special thanks to <a href="http://www.richardkmiller.com/">Richard K Miller</a> for submitting the code!</li>
<li><strong>02-03-07 Version 1.0</strong> - First release.</li>
</ul>
<h3>Options</h3>
<p>Here are the options available for this plugin under the WordPress admin panel</p>
<p><b>Number of columns</b></p>
<blockquote><p>The number of columns that the categories will be shown in. If you want to show more columns than your layout width will handle, you can adjust the width of each column in the CSS file.</p></blockquote>
<p><b>Separate items</b></p>
<blockquote><p>Here you can choose to separate the categories by letter, with a custom separation header, or no separation at all.</p></blockquote>
<p><b>Separation header</b></p>
<blockquote><p>If the separation option is enabled, this is where you enter your separation text, which will be shown above each set of items. You can use <strong>%L</strong> to show the letter. For example, if you enter <strong>Topics: %L</strong> then it will show <strong>Topics: A, (list of cats), Topics: B, (list of cats), etc&#8230;</strong></p></blockquote>
<p><b>Excluded categories</b></p>
<blockquote><p>This is a comma-separated list of the category IDs you want to exclude from the list.</strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/multi-column-category-list-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Multi Column Link List Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/multi-column-link-list-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/multi-column-link-list-plugin-for-wordpress/#comments</comments>
		<pubDate>Sat, 29 Sep 2007 20:23:19 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/multi-column-link-list-plugin-for-wordpress/</guid>
		<description><![CDATA[This plugin generates an alphabetical listing of your WordPress links in multiple columns. You can choose the number of columns to display, with an option to split up the list of links by letter. It also supports the use of a custom header to help separate the links. For example, you could have it say [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin generates an alphabetical listing of your WordPress links in multiple columns. You can choose the number of columns to display, with an option to split up the list of links by letter. It also supports the use of a custom header to help separate the links. For example, you could have it say &#8216;Links: A&#8217; and then list the links that start with &#8216;A&#8217;, etc. The link list can easily be added to any post or page with the trigger text, or called directly from a template file. A CSS file is also included for easy style changes.<span id="more-97"></span></p>
<h3>Related Plugins</h3>
<p>There is also a plugin available to generate a <a href="http://www.dagondesign.com/articles/multi-column-category-list-plugin-for-wordpress/">multi-column list of your WordPress categories</a>.</p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-multi-col-links.zip">Latest Release</a> <strong>(For WordPress 2.0 through 2.5)</strong>
</li>
</ul>
<h3>Notes</h3>
<p>The purpose of this plugin is to generate a full list of links (with the exception of the link categories you exclude). This means that it does not sort links by category, only by name.</p>
<h3>Installation</h3>
<ul>
<li>Download the above file and uncompress</li>
<li>Upload <strong>dd-multi-col-links.php</strong> to your plugins directory</li>
<li>Upload <strong>dd-multi-col-links.css</strong> to your theme directory</li>
<li>Activate the plugin from the WordPress admin panel</li>
<li>Configure the options under the admin panel: <strong>Options - DDMultiColLinks</strong>
</ul>
<h3>Usage</h3>
<p>To use this plugin, simply add the following trigger text to a post or page:</p>
<p><code>&lt;!-- multicollinks --&gt;</code></p>
<p>If you prefer, you can also call the function directly from a template file with the following command:</p>
<p><code>&lt;?php echo ddmcl_generate(); ?&gt;</code></p>
<h3>Change Log</h3>
<ul>
<li><strong>09-29-07 Version 1.3</strong> - Updated for WordPress 2.3. Added &#8216;Load Default Options&#8217; button. Removed javascript expand code because it was too buggy.</li>
<li><strong>05-16-07  Version 1.2</strong> - Updated for WordPress 2.2.</li>
<li><strong>03-02-07 Version 1.1</strong> - Option added to allow click-to-expand lists. Special thanks to <a href="http://www.richardkmiller.com/">Richard K Miller</a> for submitting the code!</li>
<li><strong>02-13-07 Version 1.0</strong> - First release.</li>
</ul>
<h3>Options</h3>
<p>Here are the options available for this plugin under the WordPress admin panel</p>
<p><b>Number of columns</b></p>
<blockquote><p>The number of columns that the links will be shown in. If you want to show more columns than your layout width will handle, you can adjust the width of each column in the CSS file.</p></blockquote>
<p><b>Separate items</b></p>
<blockquote><p>Here you can choose to separate the links by letter, with a custom separation header, or no separation at all.</p></blockquote>
<p><b>Separation header</b></p>
<blockquote><p>If the separation option is enabled, this is where you enter your separation text, which will be shown above each set of items. You can use <strong>%L</strong> to show the letter. For example, if you enter <strong>Links: %L</strong> then it will show <strong>Links: A, (list of links), Links: B, (list of links), etc&#8230;</strong></p></blockquote>
<p><b>Excluded link categories</b></p>
<blockquote><p>This is a comma-separated list of the link category IDs you want to exclude from the list.</strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/multi-column-link-list-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Change Default Thumbnail Size in WordPress</title>
		<link>http://www.dagondesign.com/articles/change-default-thumbnail-size-in-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/change-default-thumbnail-size-in-wordpress/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 02:40:56 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/change-default-thumbnail-size-in-wordpress/</guid>
		<description><![CDATA[One question I get asked quite often is how to change the default size of the thumbnails that WordPress creates when you upload an image. It is actually quite easy to change - it just requires modification of one WordPress file. When WordPress 2.1 was released, it changed the way this was done, and once [...]]]></description>
			<content:encoded><![CDATA[<p>One question I get asked quite often is how to change the default size of the thumbnails that WordPress creates when you upload an image. It is actually quite easy to change - it just requires modification of one WordPress file. When WordPress 2.1 was released, it changed the way this was done, and once again with the release of WordPress 2.3, so I have included instructions below for versions 2.0 through 2.3. If you are using WordPress 2.5, there is now a built-in option to change the thumbnail size.<span id="more-100"></span></p>
<h3>Instructions for:</h3>
<ul>
<li><a href="#20">WordPress 2.0</a></li>
<li><a href="#2122">WordPress 2.1 - 2.2</a></li>
<li><a href="#23">WordPress 2.3</a></li>
<li><a href="#25">WordPress 2.5</a></li>
</ul>
<hr />
<h3><a name="20">WordPress 2.0</a></h3>
<p>Open <strong>/wp-admin/inline-uploading.php</strong> and look for the following code:</p>
<pre>if ( $imagedata[&#039;width&#039;] &gt; 128 &amp;&amp; 
$imagedata[&#039;width&#039;] &gt;= $imagedata[&#039;height&#039;] * 4 / 3 )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumb = wp_create_thumbnail($file, 128);
&nbsp;&nbsp;&nbsp;&nbsp;elseif ( $imagedata[&#039;height&#039;] &gt; 96 )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumb = wp_create_thumbnail($file, 96);</pre>
<p>The default max size is 128 x 96. You can change these numbers to whatever you like, although you must keep the proper aspect ratio (4 / 3).</p>
<p>For example, to double the size of the thumbnails, replace 128 with 256, and 96 with 192. Be sure to change both sets of numbers - they are each listed in the code twice.</p>
<hr />
<h3><a name="2122">WordPress 2.1 - 2.2</a></h3>
<p>Open <strong>/wp-admin/admin-functions.php</strong> and look for the following code:</p>
<pre>$max_side = apply_filters( &#039;wp_thumbnail_max_side_length&#039;, 
128, $attachment_id, $file );</pre>
<p>The number specified here (128 by default) is the maximum size of either dimension. Just change this to whatever you like.</p>
<hr />
<h3><a name="23">WordPress 2.3</a></h3>
<p>Open <strong>/wp-admin/includes/image.php</strong> and look for the following code:</p>
<pre>$max_side = apply_filters( &#039;wp_thumbnail_max_side_length&#039;, 
128, $attachment_id, $file );</pre>
<p>The number specified here (128 by default) is the maximum size of either dimension. Just change this to whatever you like.</p>
<h3><a name="25">WordPress 2.5</a></h3>
<p>WordPress 2.5 now includes a built-in option to change the size of thumbnails. In your dashboard, just go to &#8216;Settings -> Miscellaneous&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/change-default-thumbnail-size-in-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Color Select Tool</title>
		<link>http://www.dagondesign.com/articles/color-select-tool/</link>
		<comments>http://www.dagondesign.com/articles/color-select-tool/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 01:21:09 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/color-select-tool/</guid>
		<description><![CDATA[The Color Select Tool is a small utility that allows you to quickly copy the hex code of a color on your screen. I originally created this program because I was tired of having to take a screenshot and open photoshop just to capture a color, and I was not happy with similar programs. Simply [...]]]></description>
			<content:encoded><![CDATA[<p>The Color Select Tool is a small utility that allows you to quickly copy the hex code of a color on your screen. I originally created this program because I was tired of having to take a screenshot and open photoshop just to capture a color, and I was not happy with similar programs. Simply run the program, move the mouse to the color you want to capture, and press the shift key. The hex color code will then be copied to your clipboard. You can also choose to have it add the # symbol in front of the code, and/or have it stay on top of other windows.<span id="more-33"></span></p>
<h3>Requirements</h3>
<p>This program has been tested in Windows XP, XP 64, and Vista. It may work in previous Windows versions as well. If you receive any messages about VB runtime DLLs being required, these can easily be found on the internet.</p>
<h3>Notice</h3>
<p>The previous version of this program (2.0) required the .NET framework to be installed. The current version no longer requires this. </p>
<p>While I have tested this release, there may still be bugs, so if you encounter a problem please leave a comment below.</p>
<h3>Download</h3>
<ul>
<li>
<a href="/files/Color_Select_Tool.zip">Color_Select_Tool.zip</a>
</li>
</ul>
<h3>Changelog</h3>
<ul>
<li><strong>09-27-07 Version 3.1</strong> - Bug fixed with color code generation.</li>
<li><strong>09-23-07 Version 3.0</strong> - Re-written. New instructions below.</li>
<li><strong>10-19-05 Version 2.0</strong> - First public release.</li>
</ul>
<h3>Installing</h3>
<p>No installation is needed. Just extract the executable from the ZIP file and run it.</p>
<h3>Usage</h3>
<p><img class="alignright" src='/uploads/colorselecttool.gif' alt='Color Select Tool' /> </p>
<p>To use the program, just move the mouse to the color on your screen that you want to capture and press the <strong>SHIFT</strong> key. The color will automatically be added to your clipboard.</p>
<p>If you would like the <strong>#</strong> symbol to be added in front of the color code, just check the &#8216;<strong>add #</strong>&#8216; checkbox, or press the <strong>A</strong> key on your keyboard.</p>
<p>To force the program to stay on top of other windows, check the &#8216;<strong>stay on top</strong>&#8216; checkbox, or press the <strong>T</strong> key.</p>
<p><strong>Note</strong>: In order for the hotkeys (SHIFT, A, T) to work, the program has to have focus. This means it needs to be the currently active program. If the hotkeys do not work, just click on the title bar of the program to set it active.</p>
<p>If you minimize the program, it goes to the system tray. You can click on the system tray icon to show/hide the program, or right click to exit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/color-select-tool/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Drop-Down Post List Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/drop-down-post-list-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/drop-down-post-list-plugin-for-wordpress/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 00:33:51 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/drop-down-post-list-plugin-for-wordpress/</guid>
		<description><![CDATA[This plugin allows you to easily display drop-down boxes containing the posts for specified categories. You can use this plugin by entering the trigger text in a post or page, or by adding the function call directly to your theme files. You can display as many drop-down boxes as you like, and you have a [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin allows you to easily display drop-down boxes containing the posts for specified categories. You can use this plugin by entering the trigger text in a post or page, or by adding the function call directly to your theme files. You can display as many drop-down boxes as you like, and you have a choice between a standard select box (with button), or a &#8216;jump menu&#8217; (as the visitor clicks on a post, they will immediately be taken to that page without having to click a button). Other options are also available. <span id="more-109"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-drop-down-post-list.txt">Latest Release</a> <strong>(For WordPress 2.0 through 2.5)</strong>
</li>
</ul>
<h3>Demo</h3>
<p>This is a generated drop-down post list, listing the posts of a particular category:</p>
<p><strong>Topic:</strong> WordPress Plugins and Mods<br /><form class="ddpl-form" name="catform11 " id="catform11 "><select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)"><option value="">(select a post)</option><option value="http://www.dagondesign.com/articles/add-signature-plugin-for-wordpress/">Add Signature Plugin for WordPress</option><option value="http://www.dagondesign.com/articles/change-default-thumbnail-size-in-wordpress/">Change Default Thumbnail Size in WordPress</option><option value="http://www.dagondesign.com/articles/draft-notification-plugin-for-wordpress/">Draft Notification Plugin for WordPress</option><option value="http://www.dagondesign.com/articles/drop-down-post-list-plugin-for-wordpress/">Drop-Down Post List Plugin for WordPress</option><option value="http://www.dagondesign.com/articles/import-users-plugin-for-wordpress/">Import Us