<?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>John Congdon &#187; PHP Snippets</title>
	<atom:link href="http://www.johncongdon.com/category/php-snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johncongdon.com</link>
	<description>My life as an IT &#34;Professional&#34;</description>
	<lastBuildDate>Thu, 09 Feb 2012 16:12:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Solved: vBulletin Quick Reply Not Working (ckeditor.js unable to get value of the property &#8216;label&#8217;)</title>
		<link>http://www.johncongdon.com/solved-vbulletin-quick-reply-not-working-ckeditor-js-unable-to-get-value-of-the-property-label/</link>
		<comments>http://www.johncongdon.com/solved-vbulletin-quick-reply-not-working-ckeditor-js-unable-to-get-value-of-the-property-label/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 13:26:19 +0000</pubDate>
		<dc:creator>John Congdon</dc:creator>
				<category><![CDATA[PHP Snippets]]></category>
		<category><![CDATA[Programmer's Mindset]]></category>

		<guid isPermaLink="false">http://www.johncongdon.com/?p=608</guid>
		<description><![CDATA[I have a vBulletin board that I manage and while recently had users complain about the Quick Reply not working.  They had to go into the advanced editor to make it work. Doing my due diligence as an IT professional quickly narrowed it down to&#8230;. IE of course.  I spent hours digging, using a debugger [...]]]></description>
			<content:encoded><![CDATA[<p>I have a vBulletin board that I manage and while recently had users complain about the Quick Reply not working.  They had to go into the advanced editor to make it work.</p>
<p>Doing my due diligence as an IT professional quickly narrowed it down to&#8230;. IE of course.  I spent hours digging, using a debugger I kept getting the error in the title of this post.  I kept going through the Call Stack trying to figure out what was going on, but the javascript is minified very tightly, so following it became daunting.</p>
<p>Two days later another user complained about not being able to update their profile.  While debugging this, both problems became very clear.</p>
<p>I had recently put in some rewrite rules to make the forum more SEO friendly.  However there are a couple situations where the rewrite rules broke down.  I was missing the two lines colored in green below.</p>
<p style="padding-left: 30px;">RewriteEngine On<br /> RewriteRule ^/videos.html /forums/36-Bowling-Videos-amp-Pictures<br /> <span style="color: #339966;">RewriteRule ^/threads/ckeditor.php /ckeditor.php?t=$1 [L]<br /> </span>RewriteRule ^/threads/(.*) /showthread.php?t=$1 [L]<br /> RewriteRule ^/forums/(.*) /forumdisplay.php?$1 [L]<br /> RewriteRule ^/entries/(.*) /entry.php?$1 [L]<br /> RewriteRule ^/blogs/(.*) /blog.php?$1 [L]<br /><span style="color: #339966;"> RewriteRule ^/members/ajax.php /ajax.php?$1 [L]<br /></span> RewriteRule ^/members/(.*) /member.php?$1 [L]<br /> RewriteRule ^/list/(.*) /list.php?$1 [L]<br /> RewriteRule ^/list/author/(.*) /list.php?$1 [L]<br /> RewriteRule ^/$ <a href="http://www.bowlingboards.com/forum.php " rel="nofollow">http://www.bowlingboards.com/forum.php </a> [R,L]</p>
<p>It was that simple.  I am sure I am missing some other rules, and will try to get them corrected in due time.</p>
<p> </p>]]></content:encoded>
			<wfw:commentRss>http://www.johncongdon.com/solved-vbulletin-quick-reply-not-working-ckeditor-js-unable-to-get-value-of-the-property-label/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculating This Day Last Year in PHP</title>
		<link>http://www.johncongdon.com/calculating-this-day-last-year-in-php/</link>
		<comments>http://www.johncongdon.com/calculating-this-day-last-year-in-php/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 15:37:15 +0000</pubDate>
		<dc:creator>John Congdon</dc:creator>
				<category><![CDATA[PHP Snippets]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.johncongdon.com/2008/06/calculating-this-day-last-year-in-php/</guid>
		<description><![CDATA[Have you ever wanted to know what the date was last year on this day? Example: You want to compare sales from Wednesday of this year to the same Wednesday of last year. There is a very simple solution in PHP. [code]function ThisDateLastYear($date_in) { // date_in = input date in form of YYYY-MM-DD $days = [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to know what the date was last year on this day?</p>
<p>Example:  You want to compare sales from Wednesday of this year to the same Wednesday of last year.  There is a very simple solution in PHP.</p>
<p>[code]<br />function ThisDateLastYear($date_in) {<br />    // date_in = input date in form of YYYY-MM-DD<br />    $days = 364;<br />    return date('Y-m-d', strtotime("-364 days", mktime(0,0,0,$m,$d,$y)));<br />}<br />[/code]</p>]]></content:encoded>
			<wfw:commentRss>http://www.johncongdon.com/calculating-this-day-last-year-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

