<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" version="2.0">

<channel>
	<title>Dagon Design</title>
	
	<link>http://www.dagondesign.com</link>
	<description>Welcome to Dagon Design. We offer free scripts, Wordpress plugins, and articles.</description>
	<pubDate>Thu, 02 Jul 2009 02:40:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/DagonDesign" type="application/rss+xml" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">DagonDesign</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><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>Thu, 02 Jul 2009 01:34: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.8+)




	

	

	If you have found this [...]]]></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.8+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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>07-01-09 Version 1.22</strong> - You can now choose to send the emails to all users on or above a certain level (eg: editors).</li>
<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 - <strong>This includes auto-saves</strong>. A solution to this is being researched.</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>Changing the user level for notifications</h3>
<p>In the script, look for this line:</p>
<p><code>$email_user_level = 7;</code></p>
<p>This tells the script to send notification emails to anyone on, or above, that user level. Just change this for your particular needs.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=SB_hS9_E0oA:nwVS7TMsFRM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/draft-notification-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Add Signature Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/add-signature-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/add-signature-plugin-for-wordpress/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 01:04:31 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/add-signature-plugin-for-wordpress/</guid>
		<description><![CDATA[This plugin lets you display a custom signature at the bottom of your posts. Simply type the text you want in the options page and configure it to display on every post, or manually display it by adding the trigger text wherever you like. You can also add in author information using the included variables [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin lets you display a custom signature at the bottom of your posts. Simply type the text you want in the options page and configure it to display on every post, or manually display it by adding the trigger text wherever you like. You can also add in author information using the included variables - login name, first name, last name, nickname, email address, website, and description/bio. It get this information from the author&#8217;s account settings. It currently supports up to three different signature templates.<span id="more-81"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-add-sig.txt">Latest Release</a> <strong>(For WordPress 2.0 through 2.8+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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 DDAddSig).</li>
<li>Test it out by viewing a post.</li>
</ul>
<h3>Change Log</h3>
<ul>
<li><strong>07-01-09 Version 1.32</strong> - Fixed bug when using more than 3 sigs. Sigs are now wrapped in a div with the class <strong>ddsig_wrap</strong>.</li>
<li><strong>02-17-09 Version 1.31</strong> - Added five extra signature fields (7 total now), updated display of options.</li>
<li><strong>09-22-07 Version 1.3</strong> - Added two extra signature fields. Added &#8216;Load Default Options&#8217; button. Added option to display signature on search pages.</li>
<li><strong>11-27-06 Version 1.2</strong> - Added option to show the signature on date/category archive pages.</li>
<li><strong>07-26-06 Version 1.1</strong> - You can now choose to show the signature on the index, posts, and/or pages.</li>
<li><strong>07-23-06 Version 1.0</strong> - First release.</li>
</ul>
<h3>Signatures</h3>
<p>You can use HTML and CSS in your signatures. The following variables can also be used to display author information (they are case-sensitive):</p>
<ul>
<li>%LOGIN% - Login name </li>
<li>%FIRST% - First name </li>
<li>%LAST% - Last name </li>
<li>%NICK% - Nickname </li>
<li>%EMAIL% - Email address </li>
<li>%URL% - Website </li>
<li>%DESC% - Description/Bio </li>
</ul>
<h3>Standard Usage</h3>
<p>To show the signature on a post or page, simply type in the proper trigger text.</p>
<p><strong>Primary signature:</strong><br />
<code>&lt;!-- ddsig --&gt;</code></p>
<p><strong>Signature 2:</strong><br />
<code>&lt;!-- ddsig2 --&gt;</code></p>
<p><strong>Signature 3:</strong><br />
<code>&lt;!-- ddsig3 --&gt;</code></p>
<p>Etc..</p>
<p><strong>Note:</strong> Be sure you enter the trigger text using the &#8216;Code View&#8217; in WordPress - not the new visual text editor.</p>
<h3>Automatic Usage</h3>
<p>If you prefer, you can have the plugin automatically display the signature on the pages you specify with the options below. <strong>Note:</strong> These options only apply to the <strong>primary</strong> signature. </p>
<blockquote><p><strong>Display on index page</strong><br />
When enabled, this option will show the signature after each post on your index page.</p></blockquote>
<blockquote><p><strong>Display on posts</strong><br />
When enabled, this option will show the signature on each single post page.</p></blockquote>
<blockquote><p><strong>Display on static pages</strong><br />
When enabled, this option will show the signature on each static page.</p></blockquote>
<blockquote><p><strong>Display on archive pages</strong><br />
When enabled, this option will show the signature on each archive page. This includes both date and category archives.</p></blockquote>
<blockquote><p><strong>Display on search pages</strong><br />
When enabled, this option will show the signature on each search results page.</p></blockquote>
<h3>Other Uses</h3>
<p>What if you want to show an image of the author at the bottom of the posts? Standard WordPress profiles do not include an option for an author image, but it is easy to do with this plugin.</p>
<p>Just add something like this to your signature field:</p>
<p><code>&lt;img src="/authors/%NICK%.jpg" /&gt;</code></p>
<p>Then all you have to do is create an &#8216;authors&#8217; directory on your server, containing an image for each author (with their nickname for the filename).</p>
<h3>Modifications</h3>
<p><strong>Disable automatic line breaks in signatures</strong><br />
Find this code in the script:<br />
<code>$ddsig_data = get_option('ddsig_data');</code>After it, add the following:<br />
<code>$ddsig_data = str_replace(array("\n","\r"), array("", ""), $ddsig_data);</code>That will strip out the newline/return characters from the signature. To do the same to the other signature fields, just duplicate that line with the other variable names (ddsig_data2, etc..)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=DrF4aldIDN0:AHOcNpE19EU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/add-signature-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Secure Guestbook Script with Image Verification</title>
		<link>http://www.dagondesign.com/articles/secure-guestbook-script-with-image-verification/</link>
		<comments>http://www.dagondesign.com/articles/secure-guestbook-script-with-image-verification/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 00:11:08 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[PHP Scripts]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/secure-guestbook-script-with-image-verification/</guid>
		<description><![CDATA[This is the latest version of my secure PHP guestbook script. A lot of new features have been added since the last release including support for entry moderation, separate configuration and language files, improved code and session handling, and much more. The purpose of this script is to provide an easy to use, yet secure [...]]]></description>
			<content:encoded><![CDATA[<p>This is the latest version of my secure PHP guestbook script. A lot of new features have been added since the last release including support for entry moderation, separate configuration and language files, improved code and session handling, and much more. The purpose of this script is to provide an easy to use, yet secure guestbook which features image verification to keep out spam bots as well as other security measures. It uses a flat-file storage method so that it will work for users without database access and contains many other features not found in most standard guestbook scripts. <span id="more-53"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/ddgb.zip">ddgb.zip</a></li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<h3>Included Languages</h3>
<p>The script current includes files for the following languages: English, Dutch, Formal German, French, Italian, Norwegian, Portuguese, Romanian, Spanish, Swedish, Turkish</p>
<h3>See it in action</h3>
<p>I have a demo guestbook here: <a href="http://www.dagondesign.com/demo/ddgb/ddgb.php">Demo guestbook</a></p>
<h3>Installation</h3>
<ul>
<li>Download <strong>ddgb.zip</strong> and uncompress</li>
<li>Upload all files into a directory of your choosing</li>
<li>Give write-access to <b>/dat/.entries</b> and <b>/dat/.banlist</b> (chmod 666 or 777)</li>
<li>Configure the options in <b>config.php</b></li>
<li>Run the script by calling <strong>ddgb.php</strong></li>
</ul>
<h3>Changelog</h3>
<div class="scrollbox">
<ul>
<li><strong>07-01-09 </strong> - Not a version update, but the spanish language file has been updated, and the missing header.php file (when used in stand-alone mode) has been restored.</li>
<li><strong>02-22-09 v2.45</strong> - Several new features from contributor Hans Nordhaug, including: alt attributes added for valid xhtml, increased spam protection (honeypot field), made page navigation translateable, various visual changes.</li>
<li><strong>07-27-07 Vv2.44</strong> - PHP short-tag bug fixed. Italian language file added.</li>
<li><strong>06-20-07 v2.43</strong> - File locking feature is now an option (disabled by default), instead of automatically enabled</li>
<li><strong>06-13-07 v2.42</strong> - Security update</li>
<li><strong>04-04-07</strong> - Spanish language file has been added</li>
<li><strong>03-24-07</strong> - Romanian language file has been added</li>
<li><strong>01-14-07 v2.41</strong> - Fixed bug related to display of entries</li>
<li><strong>11-01-06 v2.4</strong> - Moderation/display issues 100% resolved - Smilies are now clickable - Various bug fixes</li>
<li><strong>10-22-06 v2.31</strong> - Further improvements to the session code - Should work better on Windows servers now</li>
<li><strong>10-21-06 v2.3</strong> - Fixed bug with display of entries when moderating -  Improved session code - Dutch language file has been added</li>
<li><strong>10-17-06</strong> - Not a version update - Swedish and Portuguese language files have been added</li>
<li><strong>09-07-06 v2.2</strong> - Bug fixed (verification problems in non-standalone mode)</li>
<li><strong>09-01-06 v2.1</strong> - Various minor fixes - Added Norwegian language file</li>
<li><strong>08-24-06 v2.0</strong> - This is a very big update. Because of this, almost all of this page has been rewritten. Unfortunately, previous data files will not work with this release because of the new data structure. The advantage is that new fields can be added in the future without loosing the old data! The new data file is also simple enough that you should be able to manually add your old entries into it. New features include:<br />
- Separate config and language files<br />
- Option to require manual approval/moderation of entries<br />
- Improved session handling (no more separate verification file!)<br />
- Option to run as stand-alone script, or through another page<br />
- Secure data file storage method already implemented<br />
- Now supports basic smilies<br />
- Can disable image verification if not supported<br />
- New option to protect email addresses<br />
- And more - read below</li>
<li><strong>05-17-06</strong> - Not a version update, but I added instructions on making the guestbook even more secure.</li>
<li><strong>05-03-06 v1.31</strong> - Fixed a bug when editing entries - Name, website, and email fields can now be modified on existing entries.</li>
<li><strong>03-16-06 v1.3</strong> - Revised layout a tiny bit - Now checks for GD support and gives error if missing - Adds http:// prefix if not entered in web address - IP addresses of posters shown in admin box - Can now ban posters by IP (removes all of their posts too) - Added confirmation before deleting and banning</li>
<li><strong>02-16-06 v1.2</strong> - Added option to allow or disallow html in posts - Fixed a magic quotes bug</li>
<li><strong>02-06-06 v1.1</strong> - Added option to prevent search engine robots from following links posted by visitors (using the nofollow tag)</li>
<li><strong>02-02-06 v1.0</strong> - First public release!</li>
</ul>
</div>
<h3>Some of the features</h3>
<ul>
<li>Flat-file storage with precautions in place to prevent data files from being viewed.</li>
<li>Various security measures to prevent abuse.</li>
<li>Separate config and language files.</li>
<li>Image verification support (can be disabled if your server does not support the GD library).</li>
<li>Administrative interface to edit and delete entries, ban IPs (and automatically remove entries from that IP), and an option to enable manual approval of entries.</li>
<li>Implements &#8216;nofol&#8217; tag to prevent search engine spiders from following links in entries (discourages some spammers).</li>
<li>HTML in posts disabled by default - you can enable this if you like, but it is a big risk.</li>
<li>Option to run as stand-alone script or included through another page.</li>
<li>Smilies are supported (either enter in the code, or click to add!)</li>
</ul>
<h3>Notes</h3>
<p>If you want to include this script inside another page, be sure to set the proper &#8217;stand alone&#8217; setting in the config file. You may also need to include the session_start function at the very top of the PHP file you are including the script from:</p>
<p><code>&lt;?php session_start(); ?&gt;</code></p>
<p>Then just include the script in your file like this:</p>
<p><code>&lt;?php include 'ddgb.php'; ?&gt;</code></p>
<h3>Overview of the options</h3>
<p>These options can be set in <b>config.php</b> file</p>
<p><strong>Path to ddgb.php</strong></p>
<blockquote><p>This needs to be set to the <b>full url</b> of the ddgb.php file on your server. Example: http://www.yoursite.com/ddgb/ddgb.php</p></blockquote>
<p><strong>Path to ddgb-verify.php</strong></p>
<blockquote><p>This needs to be set to the <b>full url</b> of the ddgb-verify.php file on your server. Example: http://www.yoursite.com/ddgb/ddgb-verify.php</p></blockquote>
<p><strong>Locale Setting</strong></p>
<blockquote><p>This allows you to choose the language file the script will use. The current version includes English and Formal German. You can also create your own by using one of the existing files as a template. Just set this option to the name of the file (without the .php) that you want to use.</p></blockquote>
<p><strong>Administrator Password</strong></p>
<blockquote><p>This is the password used to perform the administrative functions - editing, deleting, banning, and moderating. Be sure to change the default password.</p></blockquote>
<p><strong>Administrator Email</strong></p>
<blockquote><p>Used for new entry notification, if the feature is enabled.</p></blockquote>
<p><strong>Send Notifications of New Entries</strong></p>
<blockquote><p>If enabled, admin will receive email for all new entries.</p></blockquote>
<p><strong>Run as Stand-Alone Script</strong></p>
<blockquote><p>If you plan to run this script by itself, leave this option set to TRUE. If you want to include it in another page, set it to FALSE, and take a look at the information above under the &#8216;Notes&#8217; section.</p></blockquote>
<p><strong>Title Tag</strong></p>
<blockquote><p>This is the title of the page when the script is used in stand-alone mode.</p></blockquote>
<p><strong>Path to Data File</strong></p>
<blockquote><p>This is the location of the data file used to store entries. Be sure to give it write-access (chmod 666 or 777).</p></blockquote>
<p><strong>Path to Ban File</strong></p>
<blockquote><p>This is the location of the data file used to store banned IPs. Be sure to give it write-access (chmod 666 or 777).</p></blockquote>
<p><strong>Requre Manually Entry Approval</strong></p>
<blockquote><p>If enabled, this will require that the admin manually approve posts. To do this, simply log in using the admin link and you will see all of the posts (including the ones not yet approved). Just click the appropriate link to approve them, or delete them instead if you wish.</p></blockquote>
<p><strong>Enable Smiles</strong></p>
<blockquote><p>If enabled, this option will convert text-smilies into images. It will also show the available smilies on the &#8216;new entry&#8217; page.</p></blockquote>
<p><strong>Show Introduction Text</strong></p>
<blockquote><p>This is an optional intro which can be shown above the guestbook. The text it uses can be found in the language file you are using. This is disabled by default.</p></blockquote>
<p><strong>Disable Image Verification</strong></p>
<blockquote><p>If this script tells you that your server does not support image verification because you do not have access to the GD library, or you simply wish to disable image verification, set this to TRUE.</p></blockquote>
<p><strong>Image Verification Colors</strong></p>
<blockquote><p>This allows you to easily change the colors of the verification image. You can enter either 3 or 6 character hex color codes.</p></blockquote>
<p><strong>Path to CSS File</strong></p>
<blockquote><p>This is the location of the script&#8217;s CSS file, which controls the look of the guestbook.</p></blockquote>
<p><strong>Entries Per Page</strong></p>
<blockquote><p>Determines how many entries will be shown on each page. If there are more entries than this number, the guestbook will be split up into multiple pages.</p></blockquote>
<p><strong>Allow HTML in Messages</strong></p>
<blockquote><p>This option is dangerous because it allows visitors to enter HTML, which is a big security risk. It is disabled by default.</p></blockquote>
<p><strong>Protect Email Addresses</strong></p>
<blockquote><p>With this option enabled, email addresses will be shown in the following format instead of as traditional links: someone [at] somewhere [dot] net.</p></blockquote>
<p><strong>Enable File Locking</strong></p>
<blockquote><p>File locking is not supported by all servers. If you would like to use this feature, set this to TRUE.</p></blockquote>
<h3>Email Notification of Posts</h3>
<p>For those of you who would like to receive email notification anytime someone adds a new entry, here is a simple mod. First, find this line in the main script file (ddgb.php):</p>
<p><code>echo '&lt;p&gt;' . _ADDED_THX . '&lt;/p&gt;';</code></p>
<p>Right after it, add the following:</p>
<p><code>mail('user@domain.com', 'New Guestbook Entry', 'A New Guestbook Entry was added!');</code></p>
<p>Be sure to set your email address. The second parameter is the subject, and the third parameter is the message.</p>
<p>You can also use the following variables for your email&#8217;s subject or message: $fm_name $fm_website $fm_email $fm_location $fm_message. For example:</p>
<p><code>mail('user@domain.com', 'New Guestbook Entry', 'A New Guestbook Entry was added by' . $fm_name);</code></p>
<p>If this method does not work for you, it may have to do with the way your server is configured. Some hosts require that you manually configure the sendmail parameters for the PHP mail function to work properly. If you think this might be the case, you can try the following code instead:</p>
<pre>$to = &quot;user@domain.com&quot;;
$from = &quot;user@domain.com&quot;;
$subject = &quot;New Guestbook Entry&quot;;
$body = &quot;A new guestbook entry has been added to your site.&quot;;
ini_set(&quot;SMTP&quot;,&quot;localhost&quot;);
ini_set(&quot;sendmail_from&quot;,$from);
$result = mail($to, $subject, $body, &quot;From: $from&quot;);</pre>
<h3>Changing the timezone</h3>
<p>If you would like to change the timezone setting for the script, edit <strong>config.php</strong> and find the following line:</p>
<p><code>// *** START OF OPTIONS ***</code></p>
<p>After it, add the following:</p>
<p><code>date_default_timezone_set('TIMEZONE');</code></p>
<p>Where <strong>TIMEZONE</strong> is a <a href="http://www.php.net/manual/en/timezones.php">valid timezone identifier.</a></p>
<h3>Troubleshooting</h3>
<p>If you are having trouble getting the verification code to display, one thing to try is setting the $verify_path option to the filename of the verfication file, instead of the full URL to it. Example:</p>
<pre>$verify_path = &quot;ddgb-verify.php&quot;;</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=evukxmtHWs0:l3LnSP8kd9c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/secure-guestbook-script-with-image-verification/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>Thu, 25 Jun 2009 01:44:43 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[Tools and Utilities]]></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>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<h3>Changelog</h3>
<ul>
<li><strong>06-24-09</strong> - Support for BBCode has been added. Just click the option to enable it for your page. A listing of the supported tags is given.</li>
<li><strong>08-12-08</strong> - Added a &#8216;Viewing password&#8217; option. If you set one, it is required for your text to be viewed.</li>
<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 to use this option, you can enter an admin password when submitting your text. This password will allow you to make changes or delete your page. If you do not include an admin password, the page cannot be modified.</p>
<p>A viewing password can also be set, which if used, will require visitors to know the password to view your text.</p>
<p>Preformatted text can be selected, which means extra whitespace and linebreaks will appear exactly as you type them, and a fixed width font will be used.</p>
<p>Links in your text can be made clickable (turned into actual html links). These links will contain the nofollow attribute.</p>
<p>BBCode is also now supported (if the option is selected). A list of currently supported BBCode tags can be found here: <a href="http://freetexthost.com/bbcode.php">http://freetexthost.com/bbcode.php</a></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>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>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=fcjqusL_zVU:e1SIplGaYd8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/free-text-host/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Stock Quotes Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/stock-quotes-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/stock-quotes-plugin-for-wordpress/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 01:01:52 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/?p=371</guid>
		<description><![CDATA[This WordPress plugin allows you to easily display stock quotes on your website. The output of the plugin is designed to be minimal - the stock symbol, last price, and change amount are shown. You can configure the output in the options page for the plugin. The data is retrieved from Yahoo finance.
Download

Latest Release (For [...]]]></description>
			<content:encoded><![CDATA[<p>This WordPress plugin allows you to easily display stock quotes on your website. The output of the plugin is designed to be minimal - the stock symbol, last price, and change amount are shown. You can configure the output in the options page for the plugin. The data is retrieved from Yahoo finance.<span id="more-371"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-stock-quotes.txt">Latest Release</a> <strong>(For WordPress 2.0 through 2.7+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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>DDStockQuotes</strong>)</li>
</ul>
<h3>Demo</h3>
<p><strong>MSFT</strong> 23.37 [<strong><span style="color: #FF0000;">-0.67</span></strong>]<br />
<strong>GOOG</strong> 408.49 [<strong><span style="color: #FF0000;">-10.50</span></strong>]</p>
<h3>Change Log</h3>
<ul>
<li><strong>03-22-09 Version 1.0</strong> - First release</li>
</ul>
<h3>Usage</h3>
<p>There are two ways this plugin can be used:</p>
<p><strong>In a post or page:</strong><br />
<code>[stock SYMBOL]</code></p>
<p><strong>From a template file:</strong><br />
<code>&lt;?php echo ddsq_get_quote('SYMBOL'); ?&gt;</code></p>
<p>* where SYMBOL is the stock symbol you want to use</p>
<h3>Important note regarding symbols</h3>
<p>For most stocks, you can simply use the standard symbol, but for some cases (such as indexes) you will have to use the proper tags from Yahoo Finance. First, use this URL to search for your stock/index/etc..</p>
<p><a href="http://finance.yahoo.com/">http://finance.yahoo.com/</a></p>
<p>Then when the results are shown, look at the URL. For example, searching for the Dow Jones Industrial Average. From the &#8217;s&#8217; parameter in the URL, and the symbol shown next to the name, you will see that it uses <strong>^DJI</strong>. For the S&#038;P 500, the tag is <strong>^GSPC</strong>.</p>
<h3>Options</h3>
<p>Here are the options available in this plugin&#8217;s options page in the WordPress admin panel.</p>
<h4>Output Format</h4>
<blockquote><p>This is the format of the plugin output. You can use any HTML you want, using the placeholders for the values: <strong>%NAME% %LAST% %CHANGE%</strong></p>
<p><strong>Example:</strong> <code>&lt;strong&gt;%NAME%&lt;/strong&gt; %LAST% [&lt;strong&gt;%CHANGE%&lt;/strong&gt;] </code></p></blockquote>
<h4>Up Color</h4>
<blockquote><p>Color to use for price change when up (leave blank to disable)</p></blockquote>
<h4>Down Color</h4>
<blockquote><p>Color to use for price change when down (leave blank to disable)</p></blockquote>
<h3>Non-WordPress usage of the code</h3>
<p>If you would like to use this script in your own PHP code, outside of WordPress, it is easy to do. All you need is the ddsq_get_quote function from the plugin, replacing the three lines at the start of the function (which pull the option settings from WordPress),  with the actual option strings. Example:</p>
<pre>$quote_format = &#039;&lt;strong&gt;%NAME%&lt;/strong&gt; %LAST% [&lt;strong&gt;%CHANGE%&lt;/strong&gt;]&#039;;
$up_color = &#039;00BB00&#039;;
$down_color = &#039;FF0000&#039;;</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=CEsc_1o_YhI:fgKMZU_He6Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/stock-quotes-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>User Bio Popup plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/user-bio-popup-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/user-bio-popup-plugin-for-wordpress/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 01:49:30 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/user-bio-popup-plugin-for-wordpress/</guid>
		<description><![CDATA[This WordPress plugin searches posts and pages for the nicknames of authors. When it finds one, it turns it into a link which brings up a popup window with the author&#8217;s bio and image. It uses the contents of the &#8216;About Yourself&#8217; field in the user&#8217;s profile for the actual bio, and the image used [...]]]></description>
			<content:encoded><![CDATA[<p>This WordPress plugin searches posts and pages for the nicknames of authors. When it finds one, it turns it into a link which brings up a popup window with the author&#8217;s bio and image. It uses the contents of the &#8216;About Yourself&#8217; field in the user&#8217;s profile for the actual bio, and the image used depends on which of the two methods you select. The options page for this plugin allows you to configure the popup&#8217;s heading, width, height, and more. It also is fully customizable with the built-in CSS in the popup template file. <span id="more-66"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-user-bio-popup.zip">Latest Release</a> <strong>(For WordPress 2.0 through 2.7+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<h3>Instructions</h3>
<ul>
<li>Download <strong>dd-user-bio-popup.zip</strong> and uncompress</li>
<li>Upload <b>dd-user-bio-popup.php</b> to your plugin directory</li>
<li>Upload <b>ddub-template.php</b> to your theme directory</li>
<li>Enable the plugin</li>
<li>Configure the plugin options (under <strong>DDUserBioPopup</strong>). More information on that is below</li>
</ul>
<h3>Upgrading</h3>
<p>Be sure to download both files when you upgrade, and check the options and the information on this page to make sure something has not been changed.</p>
<h3>Change Log</h3>
<ul>
<li><strong>09-29-07 Version 2.4</strong> - &#8216;Load Default Options&#8217; button added. Tested with WP 2.3</li>
<li><strong>05-16-07 Version 2.3</strong> - Updated for WordPress 2.2.</li>
<li><strong>04-06-06 Version 2.2</strong> - Now in the options, you enter the FULL URL to the images directory. It should help make things a bit more standard. Everything validates now as well.</li>
<li><strong>04-05-06 Version 2.1</strong> - Image detection code improved, gravatar code improved, and a few other little things.</li>
<li><strong>04-04-06 Version 2.0</strong> - Popup code completely redone. Now popup window has it&#8217;s own template file. Images are now supported (Uploaded and Gravatars), as well as many other fixes and updates.</li>
<li><strong>04-02-06 Version 1.0</strong> - First release.</li>
</ul>
<h3>Using images</h3>
<p>The image used depends on your settings. This plugin allows you to create a directory, and upload images to it. You must simply specify the full URL to this directory in the options.</p>
<p>If you like, you could use a directory that your other author&#8217;s have access to, so they can upload their images themselves.</p>
<p>For image file names, simply use the author&#8217;s nickname - <b>lower case, with spaces removed</b>. The plugin will search for matching files that are either jpg, gif, or png.</p>
<h4>Example</h4>
<p>Let&#8217;s say your wordpress installation is at <strong>http://www.somesite.com/wp/</strong> and you create a subdirectory called <strong>authors</strong> for the images. In your options page you would enter <strong>http://www.somesite.com/wp/authors/</strong> for the directory.</p>
<p>Let&#8217;s also say that you have a user called <strong>Some User</strong>. You would want to call the image <strong>someuser.jpg</strong> (or gif or png). That&#8217;s it!</p>
<p>Now if the plugin cannot find a matching image, and Gravatars are enabled, it will try to find one by using the author&#8217;s email address (in their profile).</p>
<p><b>This plugin uses its own code for Gravatars, so you do not have to install anything else. If you are already using a Gravatar plugin, that is fine. They will not conflict.</b></p>
<h3>Configuring</h3>
<p>The CSS code for the popup window is contained in the template file (<strong>ddub-template.php</strong>). Feel free to change this to fit your site.</p>
<h3>Options</h3>
<p>Here are the settings available in this plugin&#8217;s options page in the WordPress admin panel.</p>
<h4>Author images directory</h4>
<blockquote><p>This is the full url to your author image directory. This is where you can choose to store images for each author.</p></blockquote>
<h4>Use Gravatars?</h4>
<blockquote><p>If enabled, and an author image cannot be found in the specified directory, the author&#8217;s gravatar will be used. If you want to always use gravatars, just leave the &#8216;author images directory&#8217; option blank.</p></blockquote>
<h4>Heading for the popup</h4>
<blockquote><p>This will be shown at the top of the popup window. If you want to include the user&#8217;s name, use <b>%U</b>.</p></blockquote>
<h4>Hover text for link</h4>
<blockquote><p>This will be shown when the visitor&#8217;s mouse is hovered over the link. If you want to include the user&#8217;s name, use <b>%U</b>.</p></blockquote>
<h4>Popup window width</h4>
<blockquote><p>Self-explanatory.</p></blockquote>
<h4>Popup window height</h4>
<blockquote><p>Self-explanatory.</p></blockquote>
<h4>CSS for popup window</h4>
<blockquote><p>This allows you to completely customize the popup window. The #wrapper div is around the content.</p></blockquote>
<h3>Other Modifications</h3>
<p>If you would like the popup window to have a scroll bar, just search for the following code in the main script file:</p>
<pre>scrollbars=0</pre>
<p>And change it to this:</p>
<pre>scrollbars=1</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=K_Z32QfkD1c:Er0DPnfV6SA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/user-bio-popup-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>This Day Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/wordpress-plugin-this-day/</link>
		<comments>http://www.dagondesign.com/articles/wordpress-plugin-this-day/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 01:48:54 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/wordpress-plugin-this-day/</guid>
		<description><![CDATA[After every post, this plugin will list other posts on the same day from other years. Options include adjusting the number of posts to show, changing the sort order, the header text, hiding password protected posts, and more.
Download

Latest Release (For WordPress 2.0 through 2.7+)




	

	

	If you have found this page useful, please consider donating. Thanks!

	

	
Instructions

Download the [...]]]></description>
			<content:encoded><![CDATA[<p>After every post, this plugin will list other posts on the same day from other years. Options include adjusting the number of posts to show, changing the sort order, the header text, hiding password protected posts, and more.<span id="more-65"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-this-day.txt">Latest Release</a> <strong>(For WordPress 2.0 through 2.7+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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>DDThisDay</strong>)</li>
<li>Test it out by viewing a post. Of course for it to display anything, there must be at least one other post with the same month and day as the one you are looking at</li>
</ul>
<h3>Change Log</h3>
<ul>
<li><strong>09-22-07 Version 1.4</strong> - Option added to hide password protected posts (they were hidden by default before). Non-published posts no longer show up in the list. Added &#8216;Load Default Options&#8217; button.</li>
<li><strong>05-16-07 Version 1.3</strong> - Updated for WordPress 2.2</li>
<li><strong>04-07-07 Version 1.2</strong> - Updated for WordPress 2.1</li>
<li><strong>01-02-07 Version 1.1</strong> - Modified to only list posts</li>
<li><strong>04-04-06 Version 1.0</strong> - First release</li>
</ul>
<h3>Notes</h3>
<p>This plugin will not display anything (not even the specified header text) if there are no matching posts. So if it does not seem to be working, make sure you are viewing at a post that has other posts on the same day.</p>
<h3>Options</h3>
<p>Here are the options available in this plugin&#8217;s options page in the WordPress admin panel.</p>
<h4>Max posts to show</h4>
<blockquote><p>This allows you to set a limit on the number of posts that will be displayed. Set this to 0 for no limit.</p></blockquote>
<h4>Sorting</h4>
<blockquote><p>You can choose to list newest or oldest posts first.</p></blockquote>
<h4>Header text</h4>
<blockquote><p>This will be shown before the list of posts.</p></blockquote>
<h4>Show other posts from today</h4>
<blockquote><p>Enabling this will show other posts from the exact same date as the post being viewed (otherwise it will only check other years).</p></blockquote>
<h4>Show the year</h4>
<blockquote><p>If enabled, this will show the post year after each post in the list.</p></blockquote>
<h4>Hide password protected posts</h4>
<blockquote><p>If enabled, password protected posts will not show up in the list.</p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=oAqMb6egJd8:M3fkd7IR1Gc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/wordpress-plugin-this-day/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>Mon, 23 Feb 2009 01:43: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://www.dagondesign.com/files/sitemap-generator.zip">Latest Release</a><br />
<strong>(For WordPress 2.1 through 2.7+)</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>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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, Arabic, Brazilian-Portuguese, Bulgarian, Catalan, Czech, Danish, Dutch, French, German, Italian, Japanese, Lithuanian, Norwegian, Polish, Romanian, Russian, Simplified Chinese, Serbian, SerbianLatin, 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>
<div class="scrollbox">
<ul>
<li><strong>02-22-09 Version 3.16</strong> - I have switched back to hosting this plugin on this site, instead of the WP plugin repository. This should cause less confusion. New language files have been added: Arabic, Catalan, Danish, Norwegian, Serbian, and SerbianLatin. An issue has been fixed with the Czech lang file. An issue with the previous/next links not being translated has been fixed as well. Tested in WP 2.7.1</li>
<li><strong>09-17-08 Version 3.15</strong> - This is a minor update that fixes the issue some users were having with permalinks when using multiple sitemap pages.</li>
<li><strong>05-12-08 Version 3.14</strong> - Fixed an issue for xhtml compliance. Removed trailing whitespace in plugin file (was cause of &#8216;headers already sent&#8217; error for some). Adjusted code to handle permalinks better.</li>
<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>
</div>
<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. <strong>Notice:</strong> After changing the sitemap page slug setting, be sure to update your permalink structure.</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. <strong>Notice:</strong> After changing the sitemap page slug setting, be sure to update your permalink structure </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>
<h4>Troubleshooting</h4>
<p>If you are using the permalinks for multiple sitemap pages, be sure that you have updated your permalink structure after changing the page slug option so that it will recognize the new permalinks generated by the plugin.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=5W6palQNF8E:JbQ024J0dqk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Show the Intro to Password Protected Posts in WordPress</title>
		<link>http://www.dagondesign.com/articles/show-the-intro-to-password-protected-posts-in-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/show-the-intro-to-password-protected-posts-in-wordpress/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 01:11:06 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Hacks and Info]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/show-the-intro-to-password-protected-posts-in-wordpress/</guid>
		<description><![CDATA[This is a small hack for WordPress that allows you to show the first part of password protected posts. It will display the content you have before the &#8216;more&#8217; tag, followed by the standard password box. I wrote this up for a member of the WordPress forum, and I thought I would share it here. [...]]]></description>
			<content:encoded><![CDATA[<p>This is a small hack for WordPress that allows you to show the first part of password protected posts. It will display the content you have before the &#8216;more&#8217; tag, followed by the standard password box. I wrote this up for a member of the WordPress forum, and I thought I would share it here. Update: Instructions are now provided for WordPress 2.2<span id="more-68"></span></p>
<h3>Before you begin</h3>
<p>The instructions below have been verified in WordPress versions 2.0 through 2.7. The only difference between these versions is the file you have to edit.</p>
<h3>Instructions</h3>
<p>For WordPress 2.0 or 2.1, open <strong>/wp-includes/template-functions-post.php</strong></p>
<p>For WordPress 2.2 through 2.7+, open <strong>/wp-includes/post-template.php</strong></p>
<p>Find the following text:</p>
<pre>$output = get_the_password_form();
return $output;</pre>
<p>Replace it with this:</p>
<pre>$content = $pages[$page-1];
$content = explode(&#039;&lt;!&#45;-more&#45;-&gt;&#039;, $content, 2);
$output = &quot;&quot;;
$output .= $content[0];
$output .= get_the_password_form();
return $output;</pre>
<p>This next step is optional, but I think it makes it nicer.</p>
<p>In the <strong>get_the_password_form</strong> function, find the following text (may vary between versions):</p>
<p><code>This post is password protected.</code></p>
<p>And replace it with this:</p>
<p><code>The rest of this post is password protected.</code></p>
<p>Or whatever text you would like it to show.</p>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=JJYRiXDZ1eU:-L_HQk7mvAM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/show-the-intro-to-password-protected-posts-in-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>Mon, 23 Feb 2009 01:08:56 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Hacks and Info]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/change-default-thumbnail-size-in-wordpress/</guid>
		<description><![CDATA[WordPress 2.5 and later include a built-in option to change the size of thumbnails, but for those of you out there using an older version, it is quiet 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 [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 2.5 and later include a built-in option to change the size of thumbnails, but for those of you out there using an older version, it is quiet 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 multiple versions. <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 and later</a></li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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 and later</a></h3>
<p>Version 2.5 and later have built-in support for the thumbnail size in the options.</p>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=TaUrCh-jxfg:Pd951MC0IKI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/change-default-thumbnail-size-in-wordpress/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>Mon, 23 Feb 2009 00:53: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, as well as support for storing the data in a delimited file.<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, Belarussian, Brazilian Portuguese, Catalan, Czech, Danish, Dutch, Finnish, French, German, Greek, Italian, Japanese, Norwegian Bokmaal, Polish, Portuguese, Romanian, Russian, Slovak, Slovene, Spanish, Swedish, Turkish, Vietnamese</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="#csv">Saving Data to a File</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.6+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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>
<div class="scrollbox">
<ul>
<li><strong>02-22-09 - v5.7</strong> Fixed issues regarding the saving of attached files, data selection values not being recorded, and various minor fixes. Inline styles have been removed from the two field items that contained them. Tested and works in WordPress 2.7.1</li>
<li><strong>10-19-08 - v5.6</strong> Added javascript date chooser field. Added html code field. Adjustments for better character set support. Fixed bug with spaces in selrecip. Commas can now be used in check boxes, radio buttons, and select boxes (see field info below). Timestamp option added for saving to data file. New email validation code (from http://code.google.com/p/php-email-address-validation/). WP Specific updates: Instances listed on main settings page - with descriptions of each instance (more info below). Updated display of options pages. Better support for multiple forms on one page. New language added: Vietnamese</li>
<li><strong>09-18-08 - v5.51</strong> Captcha now displays properly in Safari and Chrome. All of the auto-reply issues should now be resolved. Few changes to headers for compatibility. The path for language files should now be auto-detected properly in all cases</li>
<li><strong>08-24-08 - v5.5</strong> Fixed various undefined index errors, code changes to improve xhtml validity, attachments can now be saved to the server (not just emailed), improved email header handling for language support, can now show url (of form) in message, fixed issue with required select boxes, added Belarussian, Czech, and Japanese languages, clickable labels for radio and checkbox items, and various other fixes.</li>
<li><strong>05-13-08 - v5.41</strong> Added support for saving form data to a delimited file. Fixed a few issues including the loading of recaptcha files, and attachment support.</li>
<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>
</div>
<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><strong>Important:</strong> Make sure you add this using the html/code editor in WordPress, not the visual editor. In new versions of WordPress, just click the ‘html’ button above the edit box. If you use the visual editor it will not work, as the actual code you entered will be seen on the page, instead of being processed by the script.</p>
<p>Under <strong>Options -> DDFM1</strong>, fill in the following options:</p>
<blockquote><p><strong>Instance Description</strong> - This is a brief description of what you are using the instance for. All instances, and their descriptions, are listed on the main (DDFM-Main) options page, so you can easily keep track of them.</p>
<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>Current Instances</strong> - This is a list of the instances you currently have activated. It also displays the description for each instance. You can easily navigate to a particular instance from this page.</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>Save attachments</strong> - If enabled, attached files will be saved to a directory on the server instead of attached to the email.</p>
<p><strong>Save attachment path</strong> - Where files will be saved, if &#8217;save attachments&#8217; is enabled. This is the full path on the server, with a trailing slash. Directory must have write permissions. Example: /home/user/public_html/uploads/</p>
<p><strong>Show required</strong> - If enabled, required fields will be marked with an asterisk.</p>
<p><strong>Show URL</strong> - If enabled, the URL the script is running from will be added to the message</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><strong>Save Data to File</strong> - When enabled, the form input will be saved to a delimited file.</p>
<p><strong>Still Send Email</strong> - When using the delimited file feature, this option determines whether or not the script still sends the email.</p>
<p><strong>Data Path</strong> - The path to the file the data will be written to - relative to the script&#8217;s directory. Be sure to give this file write access.</p>
<p><strong>Delimiter</strong> - Fields will be separated by this character. If this character is found in the actual data, it will be removed for simplicity.</p>
<p><strong>Newlines</strong> - Newlines in input, such as text areas, will be replaced by this, to keep the data on a single line in the file.</p>
<p><strong>Timestamp</strong> - Adds the date/time to the beginning of each line in your data file. This uses the <a href="http://us.php.net/date">PHP date format</a>. Leave blank to disable.</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>DATE</h4>
<p>This is a javascript pop-up date chooser.</p>
<pre>type=date|class=|label=|fieldname=|[req=true]</pre>
<p>This field type generates a text box with a calendar icon next to it. The user can enter a date manually, or click on the icon to see a small calendar that they can choose a date from.</p>
<p>To change this image, just replace calendar.gif in the script directory. Either give your file the same name, or search and replace the name in the script file.</p>
<p><strong>Example</strong>:</p>
<pre>type=date|class=fmdate|label=Event Date|fieldname=fm_date|req=true </pre>
<hr />
<h4>HTML</h4>
<p>This field type lets you insert html, or other code, anywhere in your form.</p>
<pre>type=html|text=</pre>
<p><strong>Example</strong>:</p>
<pre>type=html|text=&lt;p&gt;Hello!&lt;/p&gt; </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>*NOTE*</strong> Because this field type uses commas to separate data, if you would like a comma to be displayed in your data, simply use two. It will be replaced later in the code.</p>
<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>*NOTE*</strong> Because this field type uses commas to separate data, if you would like a comma to be displayed in your data, simply use two. It will be replaced later in the code.</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>*NOTE*</strong> Because this field type uses commas to separate data, if you would like a comma to be displayed in your data, simply use two. It will be replaced later in the code.</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>Important Notice</strong>: Because this method means you will be writing the form code yourself, and it will not be generated by the script, there is no way for it to automatically insert the PHP code needed to put the user&#8217;s input back into the form when there is a validation error. It is just not possible for this to be done automatically due to the nature of the option. The only way this can be accomplished is if you know enough about PHP to insert the code manually yourself. In other words, this is a very advanced option - only for those who are very familiar with HTML forms and PHP.</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="csv"><br />
<h3>Saving Data to a File</h3>
<p></a></p>
<p>This option allows you to save the form input in a delimited file. Please see above for a full explanation of the options.</p>
<p>With the WordPress version of this script, the path to the data file is relative to the root directory of your WordPress installation. Be sure to give this file write access.</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>Fields not working properly/Form is not displaying properly</h4>
<p>As stated above, each field item needs to be on a single line in your form structure. Many of the examples above are long, so they do not show up on a single line. Be sure to remove any linebreaks when adding them to your form. <strong>One form field statement per line</strong>.</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>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=p3WuXGHal4E:lAzbpjg-Lm4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/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>Mon, 23 Feb 2009 00:52:49 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[PHP 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, as well as support for storing the data in a delimited file.<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, Belarussian, Brazilian Portuguese, Catalan, Czech, Danish, Dutch, Finnish, French, German, Greek, Italian, Japanese, Norwegian Bokmaal, Polish, Portuguese, Romanian, Russian, Slovak, Slovene, Spanish, Swedish, Turkish, Vietnamese</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="#csv">Saving Data to a File</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>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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>
<div class="scrollbox">
<ul>
<li><strong>02-22-09 - v5.7</strong> Fixed issues regarding the saving of attached files, data selection values not being recorded, and various minor fixes. Inline styles have been removed from the two field items that contained them.</li>
<li><strong>10-19-08 - v5.6</strong> Added javascript date chooser field. Added html code field. Adjustments for better character set support. Fixed bug with spaces in selrecip. Commas can now be used in check boxes, radio buttons, and select boxes (see field info below). Timestamp option added for saving to data file. New email validation code (from http://code.google.com/p/php-email-address-validation/). New language added: Vietnamese</li>
<li><strong>09-18-08 - v5.51</strong> Captcha now displays properly in Safari and Chrome. All of the auto-reply issues should now be resolved. Few changes to headers for compatibility.</li>
<li><strong>08-24-08 - v5.5</strong> Fixed various undefined index errors, code changes to improve xhtml validity, attachments can now be saved to the server (not just emailed), improved email header handling for language support, can now show url (of form) in message, fixed issue with required select boxes, added Belarussian, Czech, and Japanese languages, clickable labels for radio and checkbox items, and various other fixes.</li>
<li><strong>05-13-08 - v5.41</strong> Added support for saving form data to a delimited file. Fixed a few issues including the loading of recaptcha files, and attachment support.</li>
<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>
</div>
<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>
<p>If you plan to use the javascript date field, you will also have to include the following line:</p>
<p><code>&lt;script type="text/javascript" src="(location of date_chooser.js)"&gt;&lt;/script&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>Save attachments</strong> - If enabled, attached files will be saved to a directory on the server instead of attached to the email.</p>
<p><strong>Save attachment path</strong> - Where files will be saved, if attach_save is enabled. This is the full path on the server, with a trailing slash. Directory must have write permissions. Example: /home/user/public_html/uploads/</p>
<p><strong>Show required</strong> - If enabled, required fields will be marked with an asterisk</p>
<p><strong>Show URL</strong> - If enabled, the URL the script is running from will be added to the message</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>
<p><strong>Save Data to File</strong> - When enabled, the form input will be saved to a delimited file.</p>
<p><strong>Still Send Email</strong> - When using the delimited file feature, this option determines whether or not the script still sends the email.</p>
<p><strong>Data Path</strong> - The path to the file the data will be written to - relative to the script&#8217;s directory. Be sure to give this file write access.</p>
<p><strong>Delimiter</strong> - Fields will be separated by this character. If this character is found in the actual data, it will be removed for simplicity.</p>
<p><strong>Newlines</strong> - Newlines in input, such as text areas, will be replaced by this, to keep the data on a single line in the file.</p>
<p><strong>Timestamp</strong> - Adds the date/time to the beginning of each line in your data file. This uses the <a href="http://us.php.net/date">PHP date format</a>. Leave blank to disable.</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>DATE</h4>
<p>This is a javascript pop-up date chooser.</p>
<pre>type=date|class=|label=|fieldname=|[req=true]</pre>
<p>This field type generates a text box with a calendar icon next to it. The user can enter a date manually, or click on the icon to see a small calendar that they can choose a date from.</p>
<p>To change this image, just replace calendar.gif in the script directory. Either give your file the same name, or search and replace the name in the script file.</p>
<p><strong>Example</strong>:</p>
<pre>type=date|class=fmdate|label=Event Date|fieldname=fm_date|req=true </pre>
<hr />
<h4>HTML</h4>
<p>This field type lets you insert html, or other code, anywhere in your form.</p>
<pre>type=html|text=</pre>
<p><strong>Example</strong>:</p>
<pre>type=html|text=&lt;p&gt;Hello!&lt;/p&gt; </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>*NOTE*</strong> Because this field type uses commas to separate data, if you would like a comma to be displayed in your data, simply use two. It will be replaced later in the code.</p>
<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>*NOTE*</strong> Because this field type uses commas to separate data, if you would like a comma to be displayed in your data, simply use two. It will be replaced later in the code.</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>*NOTE*</strong> Because this field type uses commas to separate data, if you would like a comma to be displayed in your data, simply use two. It will be replaced later in the code.</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>Important Notice</strong>: Because this method means you will be writing the form code yourself, and it will not be generated by the script, there is no way for it to automatically insert the PHP code needed to put the user&#8217;s input back into the form when there is a validation error. It is just not possible for this to be done automatically due to the nature of the option. The only way this can be accomplished is if you know enough about PHP to insert the code manually yourself. In other words, this is a very advanced option - only for those who are very familiar with HTML forms and PHP.</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="csv"><br />
<h3>Saving Data to a File</h3>
<p></a></p>
<p>This option allows you to save the form input in a delimited file. Please see above for a full explanation of the options.</p>
<p>With the PHP version of this script, the path to the data file is relative to the location of the script. Be sure to give this file write access.</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>Fields not working properly/Form is not displaying properly</h4>
<p>As stated above, each field item needs to be on a single line in your form structure. Many of the examples above are long, so they do not show up on a single line. Be sure to remove any linebreaks when adding them to your form. <strong>One form field statement per line</strong>.</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>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=msA4cEC5Vjk:AZOQNvEn0AY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/secure-php-form-mailer-script/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scheduled Draft Publish Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/scheduled-draft-publish-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/scheduled-draft-publish-plugin-for-wordpress/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 23:25:40 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/?p=186</guid>
		<description><![CDATA[This plugin uses the built-in scheduling feature of WordPress to periodically take a draft post and publish it. You can define the time between occurrences, and choose to have it publish the oldest draft each time, or a random draft. By default, it publishes drafts in any category, but you can define one, or multiple, [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin uses the built-in scheduling feature of WordPress to periodically take a draft post and publish it. You can define the time between occurrences, and choose to have it publish the oldest draft each time, or a random draft. By default, it publishes drafts in any category, but you can define one, or multiple, categories for it to take the drafts from.<span id="more-186"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-scheduled-draft-publish.txt">Latest Release</a> <strong>(For WordPress 2.1 through 2.7+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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>DDSchedDraft</strong>)</li>
<li>Click the &#8216;Enable Draft Publish&#8217; button to start</li>
</ul>
<h3>Disabling the Schedule</h3>
<p>To stop the schedule, simply click the &#8216;Disable Draft Publish&#8217; button on the options page.</p>
<h3>Change Log</h3>
<ul>
<li><strong>02-22-09 Version 1.3</strong> - Updated to work better in recent WordPress versions. Log file support added, and several other updates. Can also shift posts when no drafts are available. (version number skip is intentional)</li>
<li><strong>08-28-08 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>Draft Publish Delay</h4>
<blockquote><p>This is the number of hours between the publishing of drafts. The schedule will start as soon as you click the &#8216;Enable Draft Publish&#8217; button.</p></blockquote>
<h4>Category IDs</h4>
<blockquote><p>If left blank, the plugin will operate on all of your posts. If you enter a comma-separated list of category ID&#8217;s, it will only publish drafts in those categories.</p></blockquote>
<h4>Random</h4>
<blockquote><p>If enabled, the plugin will publish a random draft each time the schedule runs. If disabled, it will publish the oldest draft each time.</p></blockquote>
<h4>Shift Posts</h4>
<blockquote><p>If checked, the oldest published post will be re-published as a new post,<br />
ONLY if there are no drafts left to publish. </p></blockquote>
<h4>Log File</h4>
<blockquote><p>Full path on your server where you would like the log saved. You can leave this specific to this blog, or set up a global log for multiple blogs. Leave blank to disable this feature. <strong>Be sure to give this file write-access</strong></p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=VORe52SFc_E:XIPZgiYALZU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/scheduled-draft-publish-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<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>Sun, 22 Feb 2009 23:20: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 specific categories. You can currently [...]]]></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 specific categories. 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.7+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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>02-22-09 Version 1.3</strong> - Updated to work better in recent WordPress versions. Log file support added, and several other updates. Can also shift posts when no drafts are available.</li>
<li><strong>08-28-08 Version 1.22</strong> - A few bugs fixed. Now supports multiple category rotation.</li>
<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 IDs</h4>
<blockquote><p>If left blank, the plugin will operate on all of your posts. If you enter a comma-separated list of category ID&#8217;s, it will only update posts in those categories.</p></blockquote>
<h4>Log File</h4>
<blockquote><p>Full path on your server where you would like the log saved. You can leave this specific to this blog, or set up a global log for multiple blogs. Leave blank to disable this feature. <strong>Be sure to give this file write-access</strong></p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=HpR_S5evTqo:4xOibAm0oYE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/scheduled-post-shift-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Retrieve Data Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/retrieve-data-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/retrieve-data-plugin-for-wordpress/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 22:45:51 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/?p=302</guid>
		<description><![CDATA[This plugin provides a simple way to include the contents of data files into your posts or pages. The data files can be local to your server, or on remote servers (if your PHP configuration allows it). In the options page for the plugin, just define the trigger text and the file the data will [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin provides a simple way to include the contents of data files into your posts or pages. The data files can be local to your server, or on remote servers (if your PHP configuration allows it). In the options page for the plugin, just define the trigger text and the file the data will be retrieved from. When that trigger text appears in a post or page, the contents of the specified data file will be shown. <span id="more-302"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-retrieve-data.txt">Latest Release</a> <strong>(For WordPress 2.0 through 2.7+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<h3>Installation</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 under the <strong>DDRetrieveData</strong> options page</li>
</ul>
<h3>Requirements</h3>
<p>This plugin uses the file_get_contents function in PHP. While this function supports the reading of files on remote servers, the allow_url_fopen option must be enabled in PHP. Additionally, firewall software on the server may block remote access.</p>
<h3>Change Log</h3>
<ul>
<li><strong>12-27-08 Version 1.0</strong> - First release.</li>
</ul>
<h3>Usage Notes</h3>
<p>From the plugin&#8217;s options page (<strong>DDRetrieveData</strong>), simply enter the trigger text and the path to the data file for each set of data you would like to use. If you need more fields, just click &#8216;Update Options&#8217; to save your changes, and more fields will appear. There is no limit to how many fields you can have.</p>
<p>If using a local file, the path is relative to the WordPress installation directory. Examples:</p>
<pre>file.txt
path/to/data/file.txt</pre>
<p>If using a remote file, be sure to include the full path. Examples:</p>
<pre>http://example.com/file.txt
ftp://example.com/file.txt
ftp://user:pass@example.com/file.txt</pre>
<p>The default options show an example of each type. Just clear them out to use your own.</p>
<p>The trigger text can be anything you like. The default options show the trigger text being wrapped inside html comment tags. This is optional, but it prevents the trigger text from being shown if the plugin is disabled (as it will just be treated as a comment).</p>
<p><strong>Note:</strong> Make sure you add this to your posts/pages using the html/code editor in WordPress, not the visual editor. In new versions of WordPress, just click the ‘html’ button above the edit box. If you use the visual editor it will not work, as the actual code you entered will be seen on the page, instead of being processed by the script.</p>
<h3>Data Output</h3>
<p>Currently the output of the data is rather simple. It can be seen in this function:</p>
<pre>function ddrd_fetch_data($url) {
&nbsp;&nbsp;return htmlspecialchars(file_get_contents($url));
}</pre>
<p>As you can see, the htmlspecialchars function is used to force the data to show up exactly like it does in the file. If you would rather have html processed, remove that function. If you want to modify the way that the script retrives data (to use CURL for example), this is the function you need to change. The function is given the $url parameter, and returns the contents of the file.</p>
<h3>Possible Future Updates</h3>
<p>Currently there is no local caching of remote files. This may be added in the future. Other options may be added as well.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=Pxm3aEV5kRg:stmqq6aVaCY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/retrieve-data-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Report Comments Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/report-comments-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/report-comments-plugin-for-wordpress/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 21:12:20 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/report-comments-plugin-for-wordpress/</guid>
		<description><![CDATA[This plugin provides a way for visitors to report inappropriate comments on a WordPress powered site. It does this by automatically adding a link to each comment, which (after asking for confirmation) notifies the administrator by email. There are several options available, including customization of the text, the email message generated (you can choose to [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin provides a way for visitors to report inappropriate comments on a WordPress powered site. It does this by automatically adding a link to each comment, which (after asking for confirmation) notifies the administrator by email. There are several options available, including customization of the text, the email message generated (you can choose to include the post title, url, date, author, etc..), and more. Now supports Recaptcha image verification.<span id="more-104"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-report-comments.zip">Latest Release</a> <strong>(For WordPress 2.0 through 2.7+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<h3>Installation</h3>
<ul>
<li>Download and unzip the above file</li>
<li>Upload the entire <strong>dd-report-comments</strong> directory 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 - DDReport</strong>
</ul>
<h3>Usage</h3>
<p>Once activiated, links are added to the comments automatically. The only option you must change is your email address. Other options are available as well, and are explained below.</p>
<h3>Change Log</h3>
<ul>
<li><strong>02-22-09 Version 1.2</strong> - Now uses a popup window to report comments. Recaptcha image verification support added, and a few other options. See updated options list below.</li>
<li><strong>06-20-07 Version 1.1</strong> - Added an optional textarea so the personal reporting the comment can include a message.</li>
<li><strong>06-16-07 Version 1.0</strong> - First release.</li>
</ul>
<h3>Options</h3>
<h4>Link Display Options</h4>
<blockquote><p>
<strong>Link text</strong> - The text shown for the link.</p>
<p><strong>Code before/after link</strong> - This allows you to add code around the link for formatting. The default option wraps the link in p tags aligned to the right.</p>
<p><strong>Open in new window</strong> - If checked, the confirmation pages will open in a new window.
</p></blockquote>
<h4>Email Options</h4>
<blockquote><p>
<strong>Email address</strong> - Where the notifications are sent.</p>
<p><strong>Email subject &#038; message</strong> - These options are used to generate the email. You can use the pre-defined tags for this:</p>
<p>%COMMENT_ID% - The ID number of the comment<br />
%COMMENT_URL% - The URL of the comment<br />
%POST_ID% - The ID of the post<br />
%POST_URL% - The URL of the post<br />
%POST_TITLE% - The title of the post<br />
%COMMENT_AUTHOR% - The author of the comment<br />
%COMMENT_DATE% - The date of the comment<br />
%COMMENT_TEXT% - The comment text<br />
%VISITOR_COMMENT% - Optional message from the person reporting this comment
</p></blockquote>
<h4>Recaptcha Options</h4>
<blockquote><p>If you do not want to use image verification, leave these options blank.</p>
<p>Otherwise, enter your Recaptcha public and private key (for your domain). If you do not have a Recaptcha account, you can sign up for free at <a href="http://recaptcha.net/whyrecaptcha.html">http://recaptcha.net/whyrecaptcha.html</a></p></blockquote>
<h4>Confirmation Page Options</h4>
<blockquote><p>
<strong>Confirmation text</strong> - The text shown on the confirmation page.</p>
<p><strong>Confirmation button</strong> - The text shown on the confirmation button.</p>
<p><strong>Success message</strong> - The text shown to the user after the notification has been sent.</p>
<p><strong>Validation error message</strong> - If using the Recaptcha image verification option, this is the message that will be shown if the code is not entered properly.</p>
<p><strong>Popup width</strong> - The width of the popup window.</p>
<p><strong>Popup height</strong> - The height of the popup window.
</p></blockquote>
<h3>Troubleshooting</h3>
<p>Some servers are configured to only allow PHP to send mail to an email address on the server itself. If you do not receive email sent from this script, try using an email address on the same domain. </p>
<h3>Get IP and hostname of form submitters</h3>
<p>Open up <strong>report.php</strong>, and look for this line:</p>
<pre>mail($addr, $subject, $msg, &#039;From: &#039; . get_option(&#039;admin_email&#039;));</pre>
<p>Before it, add this:</p>
<pre>$msg .= &quot;\n\n&quot; . &#039;IP: &#039; . $_SERVER[&#039;REMOTE_ADDR&#039;] . &quot;\n&quot; . &#039;HOST: &#039; . 
gethostbyaddr($_SERVER[&#039;REMOTE_ADDR&#039;]) . &quot;\n\n&quot;;</pre>
<p>And the IP address and hostname of the person who submitted your form will be at the bottom of the email message.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=CQTCmkNCVYM:Fck6OLxHp_4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/report-comments-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Recent Categories Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/recent-categories-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/recent-categories-plugin-for-wordpress/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 19:51:02 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/?p=183</guid>
		<description><![CDATA[This plugin generates a simple list of the most recently created categories in your WordPress installation. You can specify the number of categories listed, and the titles link to the category archives. This plugin can be called from a post or page, or directly from a template file. You can also choose to show the [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin generates a simple list of the most recently created categories in your WordPress installation. You can specify the number of categories listed, and the titles link to the category archives. This plugin can be called from a post or page, or directly from a template file. You can also choose to show the date the category was created.<span id="more-183"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-recent-cats.txt">Recent Categories</a> <strong>(For WordPress 2.3 through 2.7+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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 DDRecentCats).</li>
</ul>
<h3>Change Log</h3>
<ul>
<li><strong>02-22-09 Version 1.1</strong> - Added options page. Can now choose to display date of category creation, and format the date display.</li>
<li><strong>08-28-08 Version 1.0</strong> - First release.</li>
</ul>
<h3>Usage</h3>
<p>There are two ways you can use this plugin. With both methods, &#8216;X&#8217; is the number of categories you would like to display. They will be sorted with the most recent first.</p>
<blockquote><p><b>1)</b> In a post or page, insert the following line:</p>
<p><code>&lt;!-- recentcats X --&gt;</code></p></blockquote>
<blockquote><p><b>2)</b> In a template file, insert the following code:</p>
<p><code>&lt;?php echo dd_recent_cats(X); ?&gt;</code></p></blockquote>
<p><strong>Important:</strong> If you use the first method, make sure you add this using the html/code editor in WordPress, not the visual editor. In new versions of WordPress, just click the ‘html’ button above the edit box. If you use the visual editor it will not work, as the actual code you entered will be seen on the page, instead of being processed by the script.</p>
<h3>Options</h3>
<p>Here are the options available in this plugin&#8217;s options page in the WordPress admin panel.</p>
<h4>Show Date</h4>
<blockquote><p>If enabled, the creation date will be shown next to each category. Since WordPress does not store the actual date a category is created, the value used is the date of the earliest published post in that category.</p></blockquote>
<h4>Date Format</h4>
<blockquote><p>If showing the date, it can be customized using this option, which follows the standard <a href="http://us3.php.net/date">PHP date format</a> structure.</p></blockquote>
<h3>Customization</h3>
<p>This plugin generates a standard html list. If you would like text above or below the list, you can add it to your post or page, or directly into the template file you call the function from.</p>
<p>Additionally, the CSS class <strong>ddrc</strong> is given to the &lt;UL&gt;</p>
<pre>&lt;ul class=&quot;ddrc&quot;&gt;
&lt;li&gt;..cat link..&lt;/li&gt;
&lt;li&gt;..cat link..&lt;/li&gt;
&lt;li&gt;..cat link..&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>You can use this to customize the list display in your theme&#8217;s CSS file.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=rCmDjVepn8w:wpoC0dAJotA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/recent-categories-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Posts from Last X Days Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/posts-from-last-x-days-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/posts-from-last-x-days-plugin-for-wordpress/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 19:00:19 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/?p=161</guid>
		<description><![CDATA[This WordPress plugin displays all posts from the last X days that contained posts. You can define the display template used to generate the list, choosing what data to display by inserting tags. Future-dated and private posts are hidden by default. This plugin can be called from a post or page, or directly from your [...]]]></description>
			<content:encoded><![CDATA[<p>This WordPress plugin displays all posts from the last X days that contained posts. You can define the display template used to generate the list, choosing what data to display by inserting tags. Future-dated and private posts are hidden by default. This plugin can be called from a post or page, or directly from your theme&#8217;s template file, adding it to the sidebar, or wherever else you like. <span id="more-161"></span></p>
<p>Keep in mind, that this plugin does not list all the posts from the last X days, but rather the last X days that contained posts. For example, if you have it show the last 3 days, but you only have once post a month, it will list the latest 3 posts, because those were the latest 3 unique dates containing posts.</p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-last-x-days.txt">Latest Release</a> <strong>(For WordPress 2.3 through 2.7+)</strong>
</li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<h3>Installing</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 DDLastXDays).</li>
</ul>
<h3>Usage</h3>
<p>There are two ways you can use this plugin. In both usage methods, &#8216;X&#8217; is the number of days you would like to display posts from.</p>
<blockquote><p><b>1)</b> In a post or page, insert the following line:</p>
<p><code>&lt;!-- lastxdays X --&gt;</code></p></blockquote>
<blockquote><p><b>2)</b> In a template file, insert the following code:</p>
<p><code>&lt;?php echo lastxdays_generate(X); ?&gt;</code></p></blockquote>
<p><strong>Important:</strong> If you use the first method, make sure you add this using the html/code editor in WordPress, not the visual editor. In new versions of WordPress, just click the ‘html’ button above the edit box. If you use the visual editor it will not work, as the actual code you entered will be seen on the page, instead of being processed by the script.</p>
<h3>Change Log</h3>
<ul>
<li><strong>08-26-08 Version 1.0</strong> - First release.</li>
</ul>
<h3>Options</h3>
<p>Here are the options available on this plugin&#8217;s options page in the WordPress admin panel. </p>
<p>The default plugin options show a basic example of the template system, which should help make sense of it.</p>
<p><b>Hide private posts</b></p>
<blockquote><p>If enabled, password-protected posts will be hidden.</p></blockquote>
<p><b>Hide future-dated posts</b></p>
<blockquote><p>If enabled, posts that have been dated in the future (to display on the site later) will be hidden.</p></blockquote>
<p><b>Code added before list</b></p>
<blockquote><p>This is the HTML that will be shown before the list generation.</p></blockquote>
<p><b>Template code</b></p>
<blockquote><p>This block of code is repeated for each post. You can also add the special tags, which will display the data about the post.<br />
<strong>Tags</strong>:  %POST_AUTHOR% %POST_DATE% %POST_TITLE% %POST_URL%</p></blockquote>
<p><b>Code added after list</b></p>
<blockquote><p>This is the HTML that will be shown after the list generation.</p></blockquote>
<p><b>Date format for %POST_DATE%</b></p>
<blockquote><p>This allows you to customize the date/time format for posts, when you are using this tag in your template. It uses the <a href="http://us3.php.net/date">standard PHP date format</a>.</p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=wig8GmRTqBY:kMTXcmnZeqw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/posts-from-last-x-days-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Posts by Author Plugin for WordPress</title>
		<link>http://www.dagondesign.com/articles/posts-by-author-plugin-for-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/posts-by-author-plugin-for-wordpress/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 18:48:33 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Plugins and Mods]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/posts-by-author-plugin-for-wordpress/</guid>
		<description><![CDATA[This plugin will show the last X posts by the current author either 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 [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin will show the last X posts by the current author either 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. Other options have been added since the first release.<span id="more-64"></span></p>
<h3>Download</h3>
<ul>
<li><a href="http://www.dagondesign.com/files/dd-posts-by-author.txt">Latest Release</a> <strong>(For WordPress 2.0 through 2.7+)</strong></li>
<li><a href="http://www.dagondesign.com/files/dd-posts-by-author1.3.txt">Version 1.3</a> <strong>(For WordPress 1.5)</strong></li>
</ul>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<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 DDPostsByAuthor).</li>
<li>Test it out by viewing a post.</li>
</ul>
<h3>Change Log</h3>
<ul>
<li><strong>02-22-09 Version 1.7</strong> - Added option to exclude selected categories from showing the post list (previous option was just to exclude posts in cats from being shown in the list - not where the list itself would show).</li>
<li><strong>09-26-07 Version 1.6</strong> - Updated for WordPress 2.3. &#8216;Load Default Options&#8217; button added. Fixed bug where pages would sometimes be listed.</li>
<li><strong>05-16-07 Version 1.5</strong> - Updated for WordPress 2.2.</li>
<li><strong>05-22-06 Version 1.4</strong> - The author&#8217;s &#8216;display name&#8217; is now shown instead of their login name. Also, future-dated posts no longer show up in the lists.</li>
<li><strong>05-21-06 Version 1.3</strong> - A bug was fixed where posts would show up multiple times if they were in multiple categories.</li>
<li><strong>04-19-06 Version 1.2</strong> - Option added to sort posts by date - newest or oldest first. I have also added support for category exclusion. So posts from specified categories will not show up in the recent post lists. A bug was also fixed where the list would also include pages and attachments. It now just shows published posts.</li>
<li><strong>04-05-06 Version 1.1</strong> - Comments bug fixed - they will now work properly when this plugin is enabled. Added option to enable/disable post list on every page. You can also now call the plugin manually in a post. A few other fixes as well, including a new option to include the current post in the list.</li>
<li><strong>03-30-06 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>Show at the bottom of every post</h4>
<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;!-- ddpostsbyauthor --&gt;</code></p></blockquote>
<h4>Number of posts to show by author</h4>
<blockquote><p>This is the number of posts by the current author that will be shown at the bottom of each post.</p></blockquote>
<h4>Text to show before list</h4>
<blockquote><p>This is the header for the post list. If you want to use the author&#8217;s name in this text, use <b>%A</b>.</p></blockquote>
<h4>Category IDs to exclude from post lists</h4>
<blockquote><p>This is a comma-separated list of categories IDs you want to exclude from the recent post lists (this option does not prevent the list from being shown on posts in those categories, but rather just the useage of categories in the list - see the option below for that).</p></blockquote>
<h4>Category IDs to not display list on</h4>
<blockquote><p>This is a comma-separated list of categories IDs for categories that you do not want the post list to display on (when using the option to show it on every post).</p>
<h4>Show date after listed posts</h4>
<blockquote><p>This will show the post date after each post in the list.</p></blockquote>
<h4>Date format</h4>
<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>
<h4>Include current post in list</h4>
<blockquote><p>This sets whether or not the post being viewed should show up in the list of recent posts by the current author.</p></blockquote>
<h4>Show newest posts first</h4>
<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>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=dhptP2KDggs:pqomM_WZqxc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/posts-by-author-plugin-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WordPress Search Form without Search Button</title>
		<link>http://www.dagondesign.com/articles/wordpress-search-form-without-search-button/</link>
		<comments>http://www.dagondesign.com/articles/wordpress-search-form-without-search-button/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 18:45:45 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
		
		<category><![CDATA[WordPress Hacks and Info]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/wordpress-search-form-without-search-button/</guid>
		<description><![CDATA[This article explains a method for displaying a WordPress search form without a search button. The user simply enters they text they would like to search for, and hits enter. While this is easy to do with the use of a hidden submit button, this method also allows for the use of a default message [...]]]></description>
			<content:encoded><![CDATA[<p>This article explains a method for displaying a WordPress search form without a search button. The user simply enters they text they would like to search for, and hits enter. While this is easy to do with the use of a hidden submit button, this method also allows for the use of a default message in the search box (such as &#8220;Enter your search&#8221;), which keeps you from having to display a label next to the form explaining what it is for. This default message automatically clears when the user clicks to start typing, and puts itself back if the user clicks away. This allows you to have a search form that looks nice and clean, and is still just as functional.<span id="more-98"></span></p>
<h3>The code</h3>
<p>(extra newlines have been added to the code to make it fit the page properly)</p>
<pre>&lt;?php $search_text = &quot;Search&quot;; ?&gt; 
&lt;form method=&quot;get&quot; id=&quot;searchform&quot;&nbsp;&nbsp;
action=&quot;&lt;?php bloginfo(&#039;home&#039;); ?&gt;/&quot;&gt; 
&lt;input type=&quot;text&quot; value=&quot;&lt;?php echo $search_text; ?&gt;&quot;&nbsp;&nbsp;
name=&quot;s&quot; id=&quot;s&quot;&nbsp;&nbsp;
onblur=&quot;if (this.value == &#039;&#039;)&nbsp;&nbsp;
{this.value = &#039;&lt;?php echo $search_text; ?&gt;&#039;;}&quot;&nbsp;&nbsp;
onfocus=&quot;if (this.value == &#039;&lt;?php echo $search_text; ?&gt;&#039;)&nbsp;&nbsp;
{this.value = &#039;&#039;;}&quot; /&gt; 
&lt;input type=&quot;hidden&quot; id=&quot;searchsubmit&quot; /&gt; 
&lt;/form&gt;</pre>
<h3>Usage</h3>
<p>Most WordPress themes have a file called <strong>searchform.php</strong> which contains the code that generates the search form. All you generally have to do is replace the existing code with the code above. </p>
<p>For themes without the <strong>searchform.php</strong> file, you can place this code directly into your theme files, wherever you would like the search to go. </p>
<h3>Changing the default text</h3>
<p>To change the default text of the form, you just have to configure the <strong>$search_text</strong> variable in the first line of the code.</p>
<h3>Styling the form</h3>
<p>Using CSS, it is easy to adjust your form. For example, if you want to define the exact width of the search field, you could wrap a div around it like this:</p>
<pre>&lt;div class=&quot;search-form&quot;&gt;
(form code goes here)
&lt;/div&gt;</pre>
<p>And then in your CSS file, add the following:</p>
<pre>.search-form input {
&nbsp;&nbsp;width: 150px;
}</pre>
<h3>Example</h3>
<p>You can see an example of this method in the left sidebar of this website.</p>
<p>

	<div style="margin: 10px 0 6px 0;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif"></a>

	<span style="color: #777777;">If you have found this page useful, please consider donating. Thanks!</span>

	</div>

	</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DagonDesign?a=X0sAwGv6oTs:t7FuwyLhJVQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DagonDesign?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/wordpress-search-form-without-search-button/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
