<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>memeLab &#187; php</title>
	<atom:link href="http://memelab.com.au/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://memelab.com.au</link>
	<description>Search Engine Marketing and Web Publishing Services</description>
	<lastBuildDate>Tue, 06 Dec 2011 11:57:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Custom Admin Branding: code update</title>
		<link>http://memelab.com.au/custom-admin-branding/</link>
		<comments>http://memelab.com.au/custom-admin-branding/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 13:07:12 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Custom Admin Branding]]></category>
		<category><![CDATA[customisation]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://memelab.com.au/?p=140</guid>
		<description><![CDATA[<p><p><a href="http://http://memelab.com.au/">Wordpress Customisation Melbourne</a></p><p>I love the WordPress plugin Custom Admin Branding by Josh Byers..  who doesn&#8217;t love seeing their shiny, official name at the top of their admin panel? I noticed, though, that when when I updated the plugin to 1.3.5, my custom files were overwritten.. Doh!  It defeats the purpose of auto-update if we have to resurrect [...]</p></p><p><a href="http://http://memelab.com.au/">Wordpress Training Melbourne</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://http://memelab.com.au/">Wordpress Customisation Melbourne</a></p><p>I love the WordPress plugin <a title="Download the plugin from WordPress.org" href="http://wordpress.org/extend/plugins/custom-admin-branding" target="_blank">Custom Admin Branding</a> by <a title="Josh Byers, author of the Custom Admin Branding" href="http://pressingpixels.com/wordpress-custom-admin-branding" target="_blank">Josh Byers</a>..  who doesn&#8217;t love seeing their shiny, official name at the top of their admin panel?</p>
<p>I noticed, though, that when when I updated the plugin to 1.3.5, my custom files were overwritten.. Doh!  It defeats the purpose of auto-update if we have to resurrect our settings afterwards, clearly, but every journey progresses one step at a time, and I&#8217;ve been rapt to have such a great plugin, complete with annotated photoshop templates.<span id="more-140"></span></p>
<p>Still, it would be great if the custom files survived an update, so I&#8217;ve had a fiddle, and come up with a crude solution&#8230; and while I was at it, I&#8217;ve added an option to change the Header background colour (which is simpler than using the custom stylesheet which is currently an option hidden in the code of the plugin).</p>
<p>I&#8217;m hoping that he&#8217;ll like the changes, and we might get another update soon!</p>
<p><a href="http://http://memelab.com.au/">Wordpress Training Melbourne</a></p>]]></content:encoded>
			<wfw:commentRss>http://memelab.com.au/custom-admin-branding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure formmail.php more easily</title>
		<link>http://memelab.com.au/configure-formmail/</link>
		<comments>http://memelab.com.au/configure-formmail/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 07:00:25 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[formmail.php]]></category>
		<category><![CDATA[install]]></category>

		<guid isPermaLink="false">http://memelab.com.au/?p=29</guid>
		<description><![CDATA[<p><p><a href="http://http://memelab.com.au/">Wordpress Customisation Melbourne</a></p><p>Formmail.php is a free script which delivers a user's details from a form on your site's contact page to your email inbox.  It can do file uploads, it is spam savvy, it does captcha text.. phew, it threatens to fold your washing!

The file itself is more heavily documented than any other script I've seen: comments just about outweigh the code, which ironically makes it tedious to configure manually.  Thankfully, Tectite offers a Configuration Wizard, which offers a free trial, or 7 day access for a measly US$4.95.  I highly recommend that you use it.

If, however, you find yourself configuring it repeatedly, I'd suggest making your own configuration file.  The purpose of this is to gather the 15 odd lines you actually need to edit on one page.  Why is this so useful?  Because the whole script weighs in at over 10,200 lines of code!  That's a lot of scanning through code.</p></p><p><a href="http://http://memelab.com.au/">Wordpress Training Melbourne</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://http://memelab.com.au/">Wordpress Customisation Melbourne</a></p><p>Formmail.php is a free script which delivers a user&#8217;s details from a form on your site&#8217;s contact page to your email inbox. It can do file uploads, it is spam savvy, it does captcha text.. phew, it threatens to fold your washing!</p>
<p>The file itself is more heavily documented than any other script I&#8217;ve seen: comments just about outweigh the code, which ironically makes it tedious to configure manually.  Thankfully, Tectite offers a Configuration Wizard, which offers a free trial, or 7 day access for a measly US$4.95.  I highly recommend that you use it.</p>
<p>If, however, you find yourself configuring it repeatedly, I&#8217;d suggest making your own configuration file.  The purpose of this is to gather the 15 odd lines you actually need to edit on one page.  Why is this so useful?  Because the whole script weighs in at over 10,200 lines of code!  That&#8217;s a lot of scanning through code.<span id="more-29"></span></p>
<h3>Configuring formmail.php</h3>
<p>First, enter your <strong>$TARGET_EMAIL</strong>, and define <strong>DEF_ALERT</strong> around line 230 in the script.  This is well <a title="formmail documentation" href="http://www.tectite.com/fmdoc/index.php" target="_blank">documented</a>.</p>
<p>The essential step is to trigger formmail&#8217;s test function, which will email you the paths that it detects on your server.    Do this by visiting the script directly in your browser:</p>
<pre>name-of-your-formmail.php?testalert=1</pre>
<p>then check your email.  This will provide you with the correct path to use when configuring further options.  I found recently, on a particularly convoluted server, that I needed the value <strong>PATH_TRANSLATED</strong>. Strip the trailing slash, and the script name off the end, so that you&#8217;re left with the a string ending in the directory containing the script:</p>
<pre>PATH_TRANSLATED: <strong>/home/www/01/mydomain.com.au/www/formmail</strong><span style="text-decoration: line-through;">/formmail.php</span></pre>
<h3>Hijacking the Configuration</h3>
<p>Enter the following line into formmail.php before the comments begin (line 3)</p>
<pre class="php">include('config.php');</pre>
<p>Now create a new file in the same directory as formmail.php, and name it, surprise.. config.php.</p>
<p>Browse through the script (the configuration is roughly between lines 230 and 520) and identify the variables that you want to set, and with each of them:</p>
<ul>
<li>copy the line to your config.php</li>
<li>comment out the original line</li>
</ul>
<p>My config file looks like so:</p>
<pre class="brush:php">&lt;?php
$TARGET_EMAIL = array(EMAIL_NAME."@mydomain\.com$");
define("DEF_ALERT","tim@mydomain.com");

$LOGDIR             = "/home/www/formmail/log";
$CSVDIR             = "/home/www/formmail/csv";
$TEMPLATEDIR        = "/home/www/formmail/templates";
$FORM_INI_FILE      = "/home/www/formmail/formmail.ini";

define("FILEUPLOADS",true);
$FILE_REPOSITORY     = "/home/www/uploads";

define("CHECK_FOR_NEW_VERSION",true);
define("CHECK_DAYS",30);

$SCRATCH_PAD         = "/home/www/formmail/scratchpad";
define("ALERT_ON_USER_ERROR",true);
?&gt;</pre>
<p>A few thoughts before signing off:</p>
<ul>
<li>I think you&#8217;d be <span style="text-decoration: line-through;">crazy</span> negligent not to use the <a title="formmail.ini documentation" href="http://www.tectite.com/fmdoc/form_ini_file.php" target="_blank">formmail.ini</a> option, which protects your email address being harvested by separating it from the html form itself</li>
<li>I recommend having <strong>ALERT_ON_USER_ERROR </strong>set to true for the first week of operation, then set it to false when you tire of receiving a stream of mail notifying that someone has forgotten to enter a required field.</li>
</ul>
<h3>Caveats</h3>
<p>This, of course, will need to be repeated if you upgrade.  In the meantime, it could save you quite a bit of frustration if you&#8217;re running backwards and forwards between your configuration, your form, and your inbox.  Tectite provides a really handy <a title="Upgrade Wizard" href="http://www.tectite.com/wizards/fmconf.php" target="_blank">Upgrade Wizard</a>, if you plan to follow the beaten path.</p>
<h3>In Conclusion</h3>
<p>I can&#8217;t help but think the formmail has been created obscure to scare people into using, and ultimately subscribing to the Configuration Wizard, but I don&#8217;t begrudge its author Russell Robinson this.  Ten thousand lines of code don&#8217;t come from nowhere!</p>
<p>Formmail is a great product, and comes at the ultimate price, and it&#8217;s saved me a number of times.</p>
<p>Formmail.php is available as a free download from <a title="Download formmail.php" href="http://www.tectite.com/formmailpage.php" target="_blank">Tectite.com</a>, and they offer a <a title="Configuration Wizard" href="http://www.tectite.com/wizards/fmconf.php" target="_blank">Configuration Wizard</a>.</p>
<p>Note: Of course, you&#8217;ll need to have PHP installed and running on your host (it&#8217;s free, and almost universal in budget setups).</p>
<p><a href="http://http://memelab.com.au/">Wordpress Training Melbourne</a></p>]]></content:encoded>
			<wfw:commentRss>http://memelab.com.au/configure-formmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

