<?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>thesaucymare &#187; PHP</title>
	<atom:link href="http://thesaucymare.co.za/category/developer/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://thesaucymare.co.za</link>
	<description></description>
	<lastBuildDate>Tue, 02 Aug 2011 09:22:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Integrate a blank BuddyBar into bbPress</title>
		<link>http://thesaucymare.co.za/integrate-a-blank-buddybar-into-bbpress/</link>
		<comments>http://thesaucymare.co.za/integrate-a-blank-buddybar-into-bbpress/#comments</comments>
		<pubDate>Fri, 07 May 2010 10:54:59 +0000</pubDate>
		<dc:creator>Booth Warwick</dc:creator>
				<category><![CDATA[BuddPress]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[bbpress.]]></category>
		<category><![CDATA[buddybar]]></category>
		<category><![CDATA[buddypress buddybar]]></category>
		<category><![CDATA[buddypress integrate bbpress]]></category>

		<guid isPermaLink="false">http://www.thesaucymare.co.za/?p=148</guid>
		<description><![CDATA[First add this line of]]></description>
			<content:encoded><![CDATA[<p>First add this line of code to your bb-config.php</p>
<pre>require_once(dirname(__FILE__) . '/../wp-load.php'); (PS my forums is set up in a forums directory in the root of my site.
You may need to change the path to your wp-load.php file)
</pre>
<p>Next create a functions.php file for your theme if not already there. Then add this line of code to the functions.php file.</p>
<pre>add_action( 'bb_foot', 'bp_core_admin_bar');</pre>
<p>Now create your menus and add them to the bar.</p>
<p>PS because the buddypress plugin is not activated on a forum, it will load the buddybar with nothing in it. If you are going to copy the default buddypress functions then make sure to change the function name or you will get and error.</p>
<p>Alternatively you could try include the bp-core-adminbar.php file inside buddypress/bp-core if you do not want a blank bar.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesaucymare.co.za/integrate-a-blank-buddybar-into-bbpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FeedMyMedia WPMU Recent Posts</title>
		<link>http://thesaucymare.co.za/feedmymedia-wpmu-recent-posts/</link>
		<comments>http://thesaucymare.co.za/feedmymedia-wpmu-recent-posts/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 09:37:18 +0000</pubDate>
		<dc:creator>Booth Warwick</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[FMM]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WPMU Recent Posts]]></category>

		<guid isPermaLink="false">http://www.thesaucymare.co.za/?p=144</guid>
		<description><![CDATA[Recent posts are great, but]]></description>
			<content:encoded><![CDATA[<p>Recent posts are great, but on a WPMU install you sometimes want to pull through blog posts from a specific sub-blog. Attached to this post is just that. A widget that will allow you to set what blog you want to pull from based on its id, how many posts you want to pull, and lastly set a title.</p>
<p>This is just a skeleton, you can always add in calls to custom fields and other amazing goodies.</p>
<p>NB Not for commercial USE</p>
<p>Download: <a href="../files/2010/04/fmm-wpmu-recent-posts.txt">fmm-wpmu-recent-posts</a> (rename to .php)</p>
<p>Download: <a href="http://thesaucymare.feedmydemo.co.za/files/2010/04/fmm-wpmu-recent-postsv1.1.txt">fmm-wpmu-recent-posts v1.1</a> (rename to .php)</p>
]]></content:encoded>
			<wfw:commentRss>http://thesaucymare.co.za/feedmymedia-wpmu-recent-posts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disable your BuddyBar</title>
		<link>http://thesaucymare.co.za/disable-your-buddybar/</link>
		<comments>http://thesaucymare.co.za/disable-your-buddybar/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 11:51:54 +0000</pubDate>
		<dc:creator>Booth Warwick</dc:creator>
				<category><![CDATA[BuddPress]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[buddybar]]></category>
		<category><![CDATA[buddypress]]></category>
		<category><![CDATA[disable]]></category>

		<guid isPermaLink="false">http://www.thesaucymare.co.za/?p=139</guid>
		<description><![CDATA[Somtimes you do not want]]></description>
			<content:encoded><![CDATA[<p>Somtimes you do not want the buddybar to display on your site. You can hide it with css but WordPress will still process all the info for it.</p>
<p>Add the following line to your functions.php file to disable the BuddyBar</p>
<pre>define ('BP_DISABLE_ADMIN_BAR', false);</pre>
]]></content:encoded>
			<wfw:commentRss>http://thesaucymare.co.za/disable-your-buddybar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Activation Key</title>
		<link>http://thesaucymare.co.za/wordpress-activation-key/</link>
		<comments>http://thesaucymare.co.za/wordpress-activation-key/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 07:34:00 +0000</pubDate>
		<dc:creator>Booth Warwick</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[activation]]></category>
		<category><![CDATA[key]]></category>

		<guid isPermaLink="false">http://www.thesaucymare.co.za/?p=132</guid>
		<description><![CDATA[This is how WordPress uses]]></description>
			<content:encoded><![CDATA[<p>This is how WordPress uses the new user ID and an MD5 hash to generate the activation key</p>
<pre>$newuser_key = substr( md5( $user_id ), 0, 5 );</pre>
]]></content:encoded>
			<wfw:commentRss>http://thesaucymare.co.za/wordpress-activation-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress/BuddyPress &#8211; Meta title tag not working</title>
		<link>http://thesaucymare.co.za/wordpressbuddypress-meta-title-tag-not-working/</link>
		<comments>http://thesaucymare.co.za/wordpressbuddypress-meta-title-tag-not-working/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 13:16:57 +0000</pubDate>
		<dc:creator>Booth Warwick</dc:creator>
				<category><![CDATA[BuddPress]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[buddypress]]></category>

		<guid isPermaLink="false">http://www.thesaucymare.co.za/?p=127</guid>
		<description><![CDATA[If your buddypress child theme]]></description>
			<content:encoded><![CDATA[<p>If your buddypress child theme or customized parent theme does not work properly, in otherwords does you title tag output &#8220;[Blogname] &#8211; Blog&#8221; then use the code below to remedy the error.</p>
<p>Whats happening is if you use bp_title_tag() is will output the default string as seen above. If you lean towards using the WordPress conditional tags to test the pages, WordPress will see the BuddyPress pages as normal static pages.</p>
<p>Using bp_get_title_tag we can test to see if its a WordPress page or a BuddyPress page and use the appropriate title tag.</p>
<pre>&lt;title&gt;&lt;?php
if ( is_home() ) { bloginfo('name'); echo '&amp;nbsp;|&amp;nbsp;'; bloginfo('description'); }
elseif ( is_search() ) { bloginfo('name'); echo '&amp;nbsp;|&amp;nbsp;'; _e('Search Results'); }
elseif ( is_author() ) { bloginfo('name'); echo '&amp;nbsp;|&amp;nbsp;'; _e('Author Archives'); }
elseif ( is_single() ) { bloginfo('name'); echo '&amp;nbsp;|&amp;nbsp;'; wp_title(''); }

// Entering the buddypress tags
elseif ( is_page() ) {

 $page_title = rtrim(ltrim(bp_get_page_title()));

 if ( $page_title == "[INSETRT YOUR WP_TITLE HERE] &#8212; Blog" ) { bloginfo('name'); echo '&amp;nbsp;|&amp;nbsp;'; wp_title('');}
 else{ bp_page_title(); }
}
elseif ( is_category() ) { bloginfo('name'); echo '&amp;nbsp;|&amp;nbsp;'; _e('Archive'); echo '&amp;nbsp;|&amp;nbsp;'; single_cat_title(); }
elseif ( is_month() ) {  bloginfo('name'); echo '&amp;nbsp;|&amp;nbsp;'; _e('Archive'); echo '&amp;nbsp;|&amp;nbsp;'; the_time('F'); }
elseif (function_exists('is_tag')) { if ( is_tag() ) { bloginfo('name'); echo '&amp;nbsp;|&amp;nbsp;'; _e('Tag Archive'); echo '&amp;nbsp;|&amp;nbsp;';  single_tag_title("", true); } }
else {  } ?&gt;&lt;/title&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://thesaucymare.co.za/wordpressbuddypress-meta-title-tag-not-working/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Login Redirect to your Buddypress user profile on login</title>
		<link>http://thesaucymare.co.za/login-redirect-to-your-buddypress-user-profile-on-login/</link>
		<comments>http://thesaucymare.co.za/login-redirect-to-your-buddypress-user-profile-on-login/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 14:47:46 +0000</pubDate>
		<dc:creator>Booth Warwick</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[login redirect]]></category>
		<category><![CDATA[wpmudev]]></category>

		<guid isPermaLink="false">http://www.thesaucymare.co.za/?p=123</guid>
		<description><![CDATA[Using the Login Redirect plugin]]></description>
			<content:encoded><![CDATA[<p>Using the Login Redirect plugin by Login Redirect, which can be found at http://premium.wpmudev.org/project/login-redirect</p>
<p>As this is a paid for plugin I will only be placing the line i changed to achive what i wanted.</p>
<p>First change the login redirect url var to /members/ ( Line 32 )</p>
<pre>$login_redirect_url = '/members/.$_POST['log']'; // the url you want users to be redirected too after logging in</pre>
<p>The $_POST['log'] var is the username that was posted from the User Login form to the next page. This is just a basic implementation, if you have Facebook connect, OpenID etc you will have to put in some variations for that.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesaucymare.co.za/login-redirect-to-your-buddypress-user-profile-on-login/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Trouble with the Site Members Loop?</title>
		<link>http://thesaucymare.co.za/trouble-with-the-site-members-loop/</link>
		<comments>http://thesaucymare.co.za/trouble-with-the-site-members-loop/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 08:16:18 +0000</pubDate>
		<dc:creator>Booth Warwick</dc:creator>
				<category><![CDATA[BuddPress]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[buddypress]]></category>
		<category><![CDATA[members-loop]]></category>

		<guid isPermaLink="false">http://www.thesaucymare.co.za/?p=88</guid>
		<description><![CDATA[I have been having some]]></description>
			<content:encoded><![CDATA[<p>I have been having some trouble with the site members loop. Originally i had the template as normal, i simply changed the &#8220;type&#8221; variable to active for the widget loop. But what was heppening was the widget was being paginated aswell and only displaying the users that were on the Member-Directory column. ( Basically the widget was using the directories loop for information.)</p>
<p>The easiest way to overcome this error is to copy the widget code and place it in a file of its own, then simply call the file. I did that and got my loops to work independently.</p>
<p>Another thing to help would be to set the members directory loop to call all &#8220;alphabetical&#8221; users and not just the &#8220;active&#8221;, whats the point of having two loops calling recently active users.</p>
<p><strong>Members Directory Files</strong></p>
<p><a href="http://thesaucymare.feedmydemo.co.za/files/2009/10/members-loop.php">members-loop.php</a></p>
<p><a href="http://thesaucymare.feedmydemo.co.za/files/2009/10/index.php">index.php</a></p>
<p><a href="http://thesaucymare.feedmydemo.co.za/files/2009/10/active-members.php">active-members.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thesaucymare.co.za/trouble-with-the-site-members-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conversion Thank You page for BuddyPress Registration</title>
		<link>http://thesaucymare.co.za/conversion-thank-you-page-for-buddypress-registration/</link>
		<comments>http://thesaucymare.co.za/conversion-thank-you-page-for-buddypress-registration/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 10:21:59 +0000</pubDate>
		<dc:creator>Booth Warwick</dc:creator>
				<category><![CDATA[BuddPress]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress MU]]></category>

		<guid isPermaLink="false">http://www.thesaucymare.co.za/?p=82</guid>
		<description><![CDATA[I recently had to create]]></description>
			<content:encoded><![CDATA[<p>I recently had to create a second step &#8220;Thank you&#8221; page for a client so they could add their Conversion Tracking code to it. Most people will simply add the tracking code to the registration page and set the URLs in your Conversion Tracking software.</p>
<p>Some tracking software programs have trouble when it comes to using the same url for the start and the conversion goal.  Here&#8217;s what i did to create a &#8220;Thank You&#8221; page.</p>
<ul>
<li>Open up your theme folder and copy the register.php template</li>
<li>Rename it to thank-you.php (or anything you want really)</li>
<li>Next open up thank-you.php and paste the following into it right at the top (line 1) to create a static page template.</li>
</ul>
<pre>
&lt;?php /* Template Name: Thank You Template*/ ?&gt;</pre>
<ul>
<li>Log into your backend and create a static page called &#8220;Thank-you&#8221; and select the &#8220;Thank Your Template&#8221; from the list.</li>
<li>Next open up the register.php and insert the following line straight after the call for the register form. This uses javascript to change the action of the form to send to the thank-you page.</li>
</ul>
<pre>
&lt;script type="text/javascript"&gt; var changer = document.getElementById('setupform'); changer.action = 'http://yoursite.org.za/thank-you';&lt;/script&gt;</pre>
<ul>
<li>Lastly to make sure no one visits this page except during the registration process add the following lines of code just below the &lt;body&gt; tag</li>
</ul>
<p>I have attached the two file register.php and thank-you.php so you can see how i did it.</p>
<ul>
<li><a href="../files/2009/10/thank-you.php">thank-you</a></li>
<li><a href="http://thesaucymare.feedmydemo.co.za/files/2009/10/register.php">register</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://thesaucymare.co.za/conversion-thank-you-page-for-buddypress-registration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running quick tags outside of the loop</title>
		<link>http://thesaucymare.co.za/running-quick-tags-outside-of-the-loop/</link>
		<comments>http://thesaucymare.co.za/running-quick-tags-outside-of-the-loop/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 10:25:30 +0000</pubDate>
		<dc:creator>Booth Warwick</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[quick tag]]></category>

		<guid isPermaLink="false">http://www.thesaucymare.co.za/?p=80</guid>
		<description><![CDATA[For anyone who has had]]></description>
			<content:encoded><![CDATA[<p>For anyone who has had the same frustration I have where you need tocall a function from a plugin, but they only have a quick tag you insert into the post/page.</p>
<p><strong>Solution</strong></p>
<p>&lt;?php echo apply_filters(&#8220;the_content&#8221;,&#8221;[Insert Your Quick Tag Here]&#8220;); ?&gt;</p>
<p>This will apply the filter that is usually applied when a post is queried, and display the quick tag as it would normall if you inserted via the backend.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesaucymare.co.za/running-quick-tags-outside-of-the-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Form Security</title>
		<link>http://thesaucymare.co.za/form-security/</link>
		<comments>http://thesaucymare.co.za/form-security/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 07:51:15 +0000</pubDate>
		<dc:creator>Booth Warwick</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[bots]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.thesaucymare.co.za/?p=78</guid>
		<description><![CDATA[I recently learnt that there]]></description>
			<content:encoded><![CDATA[<p>I recently learnt that there are two methods of bots messing around with forms on your website.</p>
<p>The following test is quoted from <a title="HTML Form Gods" href="http://www.html-form-guide.com" target="_blank">HTML Form Guide</a></p>
<blockquote><p><strong>a) As a relay for sending bulk unsolicited emails</strong><br />
If you are not validating your form fields (on the serve side) before sending the emails, then hackers can alter your email headers to send the bulk unsolicited emails. (also known as email injection) For example, hackers can place the following code in one of your form fields and make your form processor script send an email to an unintended recipient:</p>
<p>sender@theirdomain.com%0ABcc:NewRecipient@anotherdomain.com</p>
<p>The code above is adding another email address to the CC list of the email. Spammers can send thousands of emails using this exploit. Your host will not be happy with this and may warn you or even ban your web site.</p>
<p>The best way to prevent this spammer exploit is to validate the fields used in the mail() function(fields like email, subject of the email, name etc). Check for the presence of any &#8220;new line&#8221; (rn) in those fields. The email form article contains sample code that does the same.<br />
<strong>b) For Sending spam messages to you</strong></p>
<p>There are programs known as &#8216;spam-bots&#8217; that leech through the web pages looking for web forms. When found, those &#8216;bots&#8217; just fills the fields with a spam message and submits. Eventually you will start getting many hundred submissions send by those spam bots and you will find it difficult to separate genuine submissions from spam messages.</p>
<p>The solution for this problem is to use a mechanism to identify human submitters from &#8216;bots&#8217;. CAPTCHA is one of such tests.</p></blockquote>
<p>I have included two links in my Resources category to help against these two types of attack</p>
]]></content:encoded>
			<wfw:commentRss>http://thesaucymare.co.za/form-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

