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

<channel>
	<title>Stephen Rushing</title>
	<atom:link href="http://blog.stephenrushing.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stephenrushing.com</link>
	<description>Apples without worms.</description>
	<pubDate>Thu, 15 Jul 2010 21:45:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Using TinyMCE content_css, body_class, etc settings in Magento</title>
		<link>http://blog.stephenrushing.com/index.php/magento/using-tinymce-content_css-body_class-etc-settings-in-magento/</link>
		<comments>http://blog.stephenrushing.com/index.php/magento/using-tinymce-content_css-body_class-etc-settings-in-magento/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 21:45:31 +0000</pubDate>
		<dc:creator>stephen</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Magento]]></category>

		<category><![CDATA[settings]]></category>

		<category><![CDATA[styling]]></category>

		<category><![CDATA[TinyMCE]]></category>

		<category><![CDATA[WYSIWYG]]></category>

		<guid isPermaLink="false">http://blog.stephenrushing.com/?p=299</guid>
		<description><![CDATA[I needed to add a stylesheet and body class to the Magento TinyMCE editor, and had some trouble figuring out why my settings weren&#8217;t working. Here&#8217;s what I ended up doing&#8230;
First, rename /js/tiny_mce/themes/advanced/editor_template_src.js to editor_template.js (delete or rename the one that&#8217;s already there to something like editor_template.js.bak). Look for this block in the init method [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to add a stylesheet and body class to the Magento TinyMCE editor, and had some trouble figuring out why my settings weren&#8217;t working. Here&#8217;s what I ended up doing&#8230;</p>
<p>First, rename /js/tiny_mce/themes/advanced/editor_template_src.js to editor_template.js (delete or rename the one that&#8217;s already there to something like editor_template.js.bak). Look for this block in the init method around line 65:</p>
<p><code>// Default settings<br />
t.settings = s = extend({<br />
theme_advanced_path : true,<br />
theme_advanced_toolbar_location : 'bottom',<br />
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",<br />
theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",<br />
theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap",<br />
theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",<br />
theme_advanced_toolbar_align : "center",<br />
theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",<br />
theme_advanced_more_colors : 1,<br />
theme_advanced_row_height : 23,<br />
theme_advanced_resize_horizontal : 1,<br />
theme_advanced_resizing_use_cookie : 1,<br />
theme_advanced_font_sizes : "1,2,3,4,5,6,7",<br />
readonly : ed.settings.readonly<br />
}, ed.settings);</code></p>
<p>For general class selectors that you want to show in the dropdown, you can use the &#8220;theme_advanced_style_formats&#8221; setting.</p>
<p><code>theme_advanced_style_formats : "alert-text, happy-text",</code></p>
<p>I proceeded to add body_class and content_css settings to this object, then dug around for an hour or two trying to find why they weren&#8217;t being applied. There&#8217;s a hierarchy at work here that I&#8217;m sure would be apparent if I were more familiar with TinyMCE&#8217;s inner workings.From the looks of it, maybe it&#8217;s only properties that start with &#8220;theme_&#8221; that should be added here (readonly is probably a generic prop for all/many settings object). Anyways, I basically found that we have to edit the editor&#8217;s settings directly, rather than the theme&#8217;s. So, above t.settings = s = &#8230;, I added this:</p>
<p><code>extend(ed.settings, {<br />
content_css:"/skin/frontend/enterprise/gf/css/content.css",<br />
body_class:"main"<br />
});</code></p>
<p>And there you have it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stephenrushing.com/index.php/magento/using-tinymce-content_css-body_class-etc-settings-in-magento/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Banner Widget sequence is out of order</title>
		<link>http://blog.stephenrushing.com/index.php/magento/banner-widget-sequence-is-out-of-order/</link>
		<comments>http://blog.stephenrushing.com/index.php/magento/banner-widget-sequence-is-out-of-order/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 03:44:52 +0000</pubDate>
		<dc:creator>stephen</dc:creator>
		
		<category><![CDATA[Magento]]></category>

		<category><![CDATA[Banner Widget]]></category>

		<category><![CDATA[Magento Enterprise]]></category>

		<category><![CDATA[v1.8.0.0]]></category>

		<guid isPermaLink="false">http://blog.stephenrushing.com/?p=292</guid>
		<description><![CDATA[I noticed that when displaying the Enterprise Banner Widget in &#8220;fixed&#8221; mode, the order is ignored. I thought it might have something to do with my template, but the template that ships with the Widget (/app/design/frontend/enterprise/template/banner/widget/block.phtml) does the same thing.
I tracked the order issue down to Enterprise_Banner_Block_Widget_Banner::getBannerIds() in /app/code/core/Enterprise/Banner/Block/Widget/Banner.php, line 137.
$bannerIds = $this-&#62;_bannerResource-&#62;getExistingBannerIdsBySpecifiedIds($bannerIds);
That&#8217;s Enterprise_Banner_Model_Mysql4_Banner::getExistingBannerIdsBySpecifiedIds() in [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed that when displaying the Enterprise Banner Widget in &#8220;fixed&#8221; mode, the order is ignored. I thought it might have something to do with my template, but the template that ships with the Widget (/app/design/frontend/enterprise/template/banner/widget/block.phtml) does the same thing.</p>
<p>I tracked the order issue down to Enterprise_Banner_Block_Widget_Banner::getBannerIds() in /app/code/core/Enterprise/Banner/Block/Widget/Banner.php, line 137.</p>
<p>$bannerIds = $this-&gt;_bannerResource-&gt;getExistingBannerIdsBySpecifiedIds($bannerIds);</p>
<p>That&#8217;s Enterprise_Banner_Model_Mysql4_Banner::getExistingBannerIdsBySpecifiedIds() in /app/code/core/Enterprise/Banner/Model/Mysql4/Banner.php. It&#8217;s making a call to the database to see which of the banners are enabled, and then returning the id column, sorted, so the items always end up ordered by the banner id, rather than the specified order.</p>
<p>To fix this, I copied /app/code/<strong>core</strong>/Enterprise/Banner/Model/Mysql4/Banner.php to /app/code/<strong>local</strong>/Enterprise/Banner/Model/Mysql4/Banner.php and changed getExistingBannerIdsBySpecifiedIds() to the following:</p>
<p><code>public function getExistingBannerIdsBySpecifiedIds($bannerIds, $isActive = true)<br />
{<br />
	$adapter = $this->_getReadAdapter();<br />
	$select = $adapter->select()<br />
		->from($this->getMainTable(), array('banner_id'))<br />
		->where('banner_id IN (?)', $bannerIds);<br />
	if ($isActive) {<br />
		$select->where('is_enabled = ?', (int)$isActive);<br />
	}<br />
	$existingIds = $adapter->fetchCol($select);<br />
	foreach($bannerIds as $key=>$bannerId){<br />
		if(array_search($bannerId, $existingIds) === false){<br />
			unset($bannerIds[$key]);<br />
		}<br />
	}<br />
	return array_values($bannerIds);<br />
}<br />
</code></p>
<p>The only changes are from $existingIds = &#8230; return array_values($bannerIds). </p>
<p>Instead of returning the column straight from the database, we loop through the $bannerIds that were passed to the function, unset the keys that don&#8217;t exist in the database col, then return a 0-N indexed array with array_values().</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stephenrushing.com/index.php/magento/banner-widget-sequence-is-out-of-order/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jQuery.animate &#8220;too much recursion&#8221; from complete callback</title>
		<link>http://blog.stephenrushing.com/index.php/jquery/jqueryanimate-too-much-recursion-from-complete-callback/</link>
		<comments>http://blog.stephenrushing.com/index.php/jquery/jqueryanimate-too-much-recursion-from-complete-callback/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 16:32:32 +0000</pubDate>
		<dc:creator>stephen</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[jQuery.animate]]></category>

		<category><![CDATA[jQuery.extend]]></category>

		<category><![CDATA[too much recursion]]></category>

		<guid isPermaLink="false">http://blog.stephenrushing.com/?p=286</guid>
		<description><![CDATA[I was working on a class for sequencing a set of DOM elements, and ran into a snag using the animate function like this:
$.fn.animate.apply($item, this.transitionOutArgs);
My animate args (properties, options) looked something like this:
[{opacity:.1}, {duration:1500, complete: function(){ $(this).css("display","none"); }}]
Firebug kept saying &#8220;too much recursion&#8221;, and only after the second time the code was run. After a [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a class for sequencing a set of DOM elements, and ran into a snag using the animate function like this:</p>
<p>$.fn.animate.apply($item, this.transitionOutArgs);</p>
<p>My <a title="jQuery.animate() Documentation" href="http://api.jquery.com/animate/" target="_blank">animate args</a> (properties, options) looked something like this:</p>
<p>[{opacity:.1}, {duration:1500, complete: function(){ $(this).css("display","none"); }}]</p>
<p>Firebug kept saying &#8220;too much recursion&#8221;, and only after the second time the code was run. After a bit of head scratching and some digging into the jQuery code, I saw that it copies the options.complete callback and replaces it with a function that calls the old callback. So, after passing in my complete callback the first time, this.transitionOutArgs[1].complete() was reassigned to the proxy-ish function, and each time after, the proxy-ish function was calling itself.</p>
<p>It&#8217;d be nice if jQuery created another callback, such as options.$complete(), that proxies for our explicitly defined options.complete callback, instead of reassigning it, but they may have their reasons. <strong>To work around this</strong>, I just copied the args before passing them to the function.</p>
<p>$.fn.animate.apply($item, $.extend(true, [], this.transitionOutArgs));</p>
<p>If you&#8217;re declaring the transitionOutArgs in the same scope as where the animate function is called, there is no need to copy it, since it is not being referenced and reused. That is the typical use case.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stephenrushing.com/index.php/jquery/jqueryanimate-too-much-recursion-from-complete-callback/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Custom Events in JavaScript</title>
		<link>http://blog.stephenrushing.com/index.php/javascript/custom-events-in-javascript/</link>
		<comments>http://blog.stephenrushing.com/index.php/javascript/custom-events-in-javascript/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 17:09:30 +0000</pubDate>
		<dc:creator>stephen</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://blog.stephenrushing.com/?p=261</guid>
		<description><![CDATA[Usually I use jQuery for custom events, but recently I&#8217;ve been working on a library that I want to be independent of other libraries, so I needed to create something to handle events on custom classes/objects.
For this sample, I changed the namespace to &#8220;ns&#8221;. You can change that to whatever you&#8217;d like.
Eventify
To &#8220;eventify&#8221; an object, [...]]]></description>
			<content:encoded><![CDATA[<p>Usually I use jQuery for custom events, but recently I&#8217;ve been working on a library that I want to be independent of other libraries, so I needed to create something to handle events on custom classes/objects.</p>
<p>For this sample, I changed the namespace to &#8220;ns&#8221;. You can change that to whatever you&#8217;d like.</p>
<h3>Eventify</h3>
<p>To &#8220;eventify&#8221; an object, you&#8217;ll use the ns.events.eventify(obj) method. Once that is done, your object will have &#8220;events&#8221; and &#8220;__listeners&#8221; properties, in addition to &#8220;dispatchEvent(eventType, eventData)&#8221;, &#8220;addEventListener(eventType, callback, bubbles)&#8221;, and &#8220;removeEventListener(eventType, callback||listener)&#8221; methods.</p>
<p>You may pass one or many objects to the eventify() method.<br />
<code>ns.events.eventify(obj);</code><br />
or<br />
<code>ns.events.eventify(obj1, obj2, obj3);</code></p>
<p>You do not need to interact with the &#8220;events&#8221; and &#8220;__listeners&#8221; properties at all, unless you want to predefine a set of events for a particular object, usually for documentation purposes. Here&#8217;s an example of a custom class that uses this event class and predefines its events. Just to clarify, I am using the &#8220;id&#8221; property in this class for the event bubbling example that follows. It is not needed at all for the events to work.</p>
<h3>addEventListener() / dispatchEvent()</h3>
<p><code><br />
ns.MyClass = ({<br />
function MyClass(id){<br />
ns.events.eventify(MyClass.prototype);<br />
this.id=id;<br />
}<br />
MyClass.prototype={<br />
id:null,<br />
events:{<br />
ready:new ns.events.Event("ready"),<br />
error:new ns.events.Event("error")<br />
},<br />
property:null,<br />
method:function(){}<br />
}<br />
return MyClass;<br />
})();<br />
</code><br />
If you do not define the events explicitly in the events property, they will be added automatically when a listener is added to the object. For instance:<br />
<code><br />
var my = new ns.MyClass("my");<br />
my.addEventListener("ready", function(){<br />
alert(this.id+" is ready");<br />
});<br />
</code><br />
Would define my.events.ready.</p>
<h3>dispatchEvent() and passing data</h3>
<p>To dispatch an event, use the dispatchEvent() method. To pass data with a dispatched event, use the eventData parameter. For example:<br />
<code><br />
my.addEventListener("ready", function(evt, data){<br />
alert(data.hello);<br />
});<br />
my.dispatchEvent("ready", {hello:"Hello from dispatcher."});<br />
</code></p>
<h3>Event bubbling</h3>
<p>Event bubbling is manually assigned in an event&#8217;s &#8220;bubbleTo&#8221; property, because these are custom objects with no inherent heirarchy. The object defined as the &#8220;bubbleTo&#8221; property must share the event type that is being dispatched on the current object (they do not need to be instances of the same class). Implement bubbling as follows:<br />
<code><br />
var parent = new ns.MyClass("parent");<br />
var child = new ns.MyClass("child");<br />
child.events.ready.bubbleTo = parent;</code></p>
<p>child.addEventListener(&#8221;ready&#8221;, function(evt){<br />
alert(&#8221;sincerely, &#8220;+evt.target.id+&#8221;.&#8221;);<br />
});<br />
parent.addEventListener(&#8221;ready&#8221;, function(evt){<br />
alert(&#8221;Sincerely, &#8220;+evt.target.id+&#8221;. With regards, &#8220;+evt.currentTarget.id+&#8221;.&#8221;);<br />
});</p>
<p>child.dispatchEvent(&#8221;ready&#8221;);</p>
<p>To prevent subsequent callbacks on an object, call evt.stopImmediatePropagation(). To stop the bubbling, call evt.stopPropagation().</p>
<p>You may also prevent the bubbling of an event when creating the listener by using the &#8220;bubbles&#8221; parameter of the &#8220;addEventListener()&#8221; method.<br />
<code><br />
var listener = child.addEventListener("ready", function(evt){<br />
alert("sincerely, "+evt.target.id+".");<br />
}, false);<br />
</code></p>
<h3>removeEventListener()</h3>
<p>Finally, to remove a listener from an object, use the removeEventListener(listener||callback) method. This method will accept the listener or the callback function used. Note that in the above example I have assigned the listener to &#8220;var listener&#8221;.<br />
<code>child.removeEventListener("ready", listener);</code><br />
You may also use the remove() method of the listener itself.<br />
<code>listener.remove();</code></p>
<h3>Download</h3>
<p>Right click and choose &#8220;Save Target As&#8221; to download <a title="Custom Events in JavaScript" href="/wp-content/uploads/javascript/customEvents/events.js" target="_blank">events.js</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stephenrushing.com/index.php/javascript/custom-events-in-javascript/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Javascript Date difference as milliseconds, minutes, hours, days, weeks, months, or years</title>
		<link>http://blog.stephenrushing.com/index.php/javascript/javascript-date-difference-as-milliseconds-minutes-hours-days-weeks-months-or-years/</link>
		<comments>http://blog.stephenrushing.com/index.php/javascript/javascript-date-difference-as-milliseconds-minutes-hours-days-weeks-months-or-years/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 15:58:58 +0000</pubDate>
		<dc:creator>stephen</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Compare]]></category>

		<category><![CDATA[Date]]></category>

		<category><![CDATA[Date Comparison]]></category>

		<guid isPermaLink="false">http://blog.stephenrushing.com/?p=247</guid>
		<description><![CDATA[I needed to figure out the difference between two dates in Javascript, so I wrote up this function. It takes into account the days in each month as well as leap years. It will calculate years, months, weeks, days, hours, minutes, seconds, and milliseconds, or any combination of those. For example, if you want months [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to figure out the difference between two dates in Javascript, so I wrote up this function. It takes into account the days in each month as well as leap years. It will calculate years, months, weeks, days, hours, minutes, seconds, and milliseconds, or any combination of those. For example, if you want months and hours, this&#8217;ll do ya.</p>
<p>Let me know if anyone finds a discrepancy in the calculations.</p>
<p><a title="timeSpan Javascript function by Stephen Rushing" href="http://blog.stephenrushing.com/wp-content/uploads/javascript/timeSpan/sample.html" target="_blank">sample.html</a><br />
<a title="timeSpan Javascript function by Stephen Rushing" href="http://blog.stephenrushing.com/wp-content/uploads/javascript/timeSpan/timeSpan.js" target="_blank">timeSpan.js</a></p>
<p>View source of the sample page above for usage. Samples include a date comparison and a date countown.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stephenrushing.com/index.php/javascript/javascript-date-difference-as-milliseconds-minutes-hours-days-weeks-months-or-years/feed/</wfw:commentRss>
		</item>
		<item>
		<title>IE6 and form.submit() bug workaround</title>
		<link>http://blog.stephenrushing.com/index.php/javascript/ie6-and-formsubmit-bug-workaround/</link>
		<comments>http://blog.stephenrushing.com/index.php/javascript/ie6-and-formsubmit-bug-workaround/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 15:53:31 +0000</pubDate>
		<dc:creator>stephen</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[form.submit()]]></category>

		<category><![CDATA[IE6]]></category>

		<guid isPermaLink="false">http://blog.stephenrushing.com/?p=234</guid>
		<description><![CDATA[IE6&#8230;&#8230;&#8230;one of life&#8217;s great mysteries. I think we may need some federally enforced browser standards more than a new health care system, but that&#8217;s just me.
In IE6, programatically triggering the submit() method of a form element doesn&#8217;t *always* seem to work. There&#8217;s no logical reason - it just doesn&#8217;t. I&#8217;ve run into this problem twice [...]]]></description>
			<content:encoded><![CDATA[<p>IE6&#8230;&#8230;&#8230;one of life&#8217;s great mysteries. I think we may need some federally enforced browser standards more than a new health care system, but that&#8217;s just me.</p>
<p>In IE6, programatically triggering the submit() method of a form element doesn&#8217;t *always* seem to work. There&#8217;s no logical reason - it just doesn&#8217;t. I&#8217;ve run into this problem twice now. The first time, I just ended up building a query string out of the form variables and using window.location to send them to the action page. That was with a static form. I just hit this wall again with a form I&#8217;m building dynamically.</p>
<p>For *whatever* reason, delaying the submit action by 100ms works like a charm. I wish I could tell you more, but as with all IE6 bug fixes, when they work, I try not to ask questions.</p>
<p>Here&#8217;s what I ended up doing:</p>
<p>I tried building the form through the browser&#8217;s native methods, using document.createElement() and element.appendChild(), which didn&#8217;t make a difference, so I reverted back to created the form with jQuery. So, here&#8217;s what I ended up doing&#8230;.</p>
<pre>
/* ....build form elements using jQuery... */
$j("body").append(form);

setTimeout(function(){
	form.submit();
}, 100);
</pre>
<p>Hope this saves someone some time! If you&#8217;re dealing with a form that is not being built dynamically, I have an inkling that this may not work. Still, delaying the event another way might. Try this, and if it works for you, let me know!</p>
<pre>
&lt;a href="javascript:;" onclick="setTimeout(function(){ form.submit() }, 100)">Submit&lt;/a>
</pre>
<p>
That&#8217;s the onclick event of an anchor tag, but the same would apply for the onclick of any element.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stephenrushing.com/index.php/javascript/ie6-and-formsubmit-bug-workaround/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Apache 2.2.14, PHP 5.2.11 on Windows 2003</title>
		<link>http://blog.stephenrushing.com/index.php/php/apache-2214-php-5211-on-windows-2003/</link>
		<comments>http://blog.stephenrushing.com/index.php/php/apache-2214-php-5211-on-windows-2003/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 16:48:54 +0000</pubDate>
		<dc:creator>stephen</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Apache 2.2.14]]></category>

		<category><![CDATA[PHP 5.2.11]]></category>

		<category><![CDATA[Windows 2003]]></category>

		<guid isPermaLink="false">http://blog.stephenrushing.com/?p=232</guid>
		<description><![CDATA[I just spent (feels like wasted) 6 hours trying to do a simple Apache/PHP install on a Win2K3 server.
I installed Apache without a hitch. Got the lovely &#8220;It works!&#8221; page, and then moved on to the PHP install. After trying the auto-install and binary packages, Apache simply would not start and would throw the following [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent (feels like wasted) 6 hours trying to do a simple Apache/PHP install on a Win2K3 server.</p>
<p>I installed Apache without a hitch. Got the lovely &#8220;It works!&#8221; page, and then moved on to the PHP install. After trying the auto-install and binary packages, Apache simply would not start and would throw the following error in the Windows Application log:</p>
<p><span style="color: #808080;">Faulting application httpd.exe, version 2.2.14.0, faulting module php5ts.dll, version 5.2.11.11, fault address 0&#215;000f330d.</span></p>
<p>I tried to Start &gt; Run &gt; &#8220;cmd&#8221; &gt; &#8220;C:\php\php.exe -v&#8221; [enter] and kept getting DLL errors like &#8220;<span style="color: #808080;">This application has failed to start because xyz.dll was not found. Re-installing the application may fix this problem.</span>&#8221; I started tracking down the DLLs, but every one I fixed would expose another missing one.</p>
<p>Finally, I stumbled onto this <a title="PHP Bug #28137" href="http://bugs.php.net/bug.php?id=28137" target="_blank">PHP bug report</a> where bwacker listed some of the same DLLs I was having trouble with. I commented out the lines referencing those DLLs in the php.ini file. The errors disappeared, and Apache started right up!</p>
<p>Here is bwacker&#8217;s list. Not all of the references were in my php.ini, but removing the ones that were there did the trick.</p>
<pre class="note">;extension=php_ifx.dll 		needs ISQLT09A.DLL
;extension=php_iisfunc.dll	not in /extensions
;extension=php_mcrypt.dll	needs LIBMCRYPT.DLL
;extension=php_oci8.dll		needs OCI.DLL
;extension=php_oracle.dll	needs OCIW32.DLL
;extension=php_printer.dll	not in /extensions
;extension=php_sybase_ct.dll needs LIBCT.DLL and LIBCS.DLL</pre>
<p>Obviously, if your application requires any of those DLLs, you will need to resolve the absences, but most of you will not need them.</p>
<p>Hope this saves you some time!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stephenrushing.com/index.php/php/apache-2214-php-5211-on-windows-2003/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jquery.tabPane()</title>
		<link>http://blog.stephenrushing.com/index.php/jquery/jquerytabpane/</link>
		<comments>http://blog.stephenrushing.com/index.php/jquery/jquerytabpane/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 17:55:10 +0000</pubDate>
		<dc:creator>stephen</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[jQuery plugins]]></category>

		<category><![CDATA[jquery.tabPane]]></category>

		<guid isPermaLink="false">http://blog.stephenrushing.com/?p=223</guid>
		<description><![CDATA[Everyone enjoys a good set of tabbed panes. I wrote jquery.tabPane to give us a simple way to do that, because this particular site is using Adobe Contribute as the CMS. Basically, you create some links to anchors, then tell this function what the containing elements for those are.
Usage
jQuery.tabPane(tabPaneSettings, callback);
Example
This isn&#8217;t so much of an [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone enjoys a good set of tabbed panes. I wrote jquery.tabPane to give us a simple way to do that, because this particular site is using <a title="Adobe Contribute" href="http://www.adobe.com/products/contribute/" target="_blank">Adobe Contribute</a> as the CMS. Basically, you create some links to anchors, then tell this function what the containing elements for those are.</p>
<p><strong>Usage</strong></p>
<p>jQuery.tabPane(tabPaneSettings, callback);</p>
<p><strong>Example</strong></p>
<p>This isn&#8217;t so much of an example as a clarified description. If you want to see a sample, <a title="jquery.tabPane() sample" href="http://blog.stephenrushing.com/wp-content/uploads/jquery/tabPane/sample.html" target="_blank">go here</a>. It also has some HTML and CSS selectors you can use as a base, if you&#8217;d like.</p>
<p>Let&#8217;s say you have a list of anchor links, and several divs with content. You can point the tabPane settings at the containers of the links to those anchors (tabs), and the containers of those anchors (pane). The display/hide functionaly is handled for you, and you can style it any way you want.</p>
<p>Here you have it:</p>
<pre id="line1">var paneSettings = {
	tabContainers:"div.pane-buttons li",
	contentContainers:"div.pane-content div.content-pane"
};
j.tabPane(paneSettings);</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.stephenrushing.com/index.php/jquery/jquerytabpane/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Javascript CSS Formatter</title>
		<link>http://blog.stephenrushing.com/index.php/javascript/javascript-css-formatter/</link>
		<comments>http://blog.stephenrushing.com/index.php/javascript/javascript-css-formatter/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 18:12:31 +0000</pubDate>
		<dc:creator>stephen</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[CSS Format]]></category>

		<category><![CDATA[Modular CSS]]></category>

		<guid isPermaLink="false">http://blog.stephenrushing.com/?p=212</guid>
		<description><![CDATA[I&#8217;ll probably post more on this later, but I just want to get it up for now.
Sometimes my CSS gets auto-formatted, which adds a whole bunch of &#8220;clutter&#8221; space that I don&#8217;t want. I find CSS easier to read when there is a visual hierarchy of the selectors and the HTML elements they represent, and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll probably post more on this later, but I just want to get it up for now.</p>
<p>Sometimes my CSS gets auto-formatted, which adds a whole bunch of &#8220;clutter&#8221; space that I don&#8217;t want. I find CSS easier to read when there is a visual hierarchy of the selectors and the HTML elements they represent, and if there is consistency in the order of the selector attributes.</p>
<p>The following CSS Formatter will place all of your selectors and their contents on a single line, and sort their attributes alphabetically.</p>
<p>For instance&#8230;</p>
<p>div#whatever, div.whatnot {<br />
display:block;<br />
background:transparent;<br />
float:left;<br />
}</p>
<p>becomes&#8230;</p>
<p>div#whatever,<br />
div.whatnot {background:transparent; display:block; float:left;}</p>
<p><em>The formatter will IGNORE any space outside of the selector and its contents.</em></p>
<p><strong>Try it out here:</strong></p>
<p><a title="cssFormat - A Javascript CSS Formatter" href="http://blog.stephenrushing.com/wp-content/uploads/2009/02/cssFormat/cssformat.html" target="_blank">http://blog.stephenrushing.com/wp-content/uploads/2009/02/cssFormat/cssformat.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stephenrushing.com/index.php/javascript/javascript-css-formatter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Getting an element&#8217;s html, not just the innerHTML</title>
		<link>http://blog.stephenrushing.com/index.php/jquery/getting-the-selected-elements-html-with-jquery-not-just-the-innerhtml/</link>
		<comments>http://blog.stephenrushing.com/index.php/jquery/getting-the-selected-elements-html-with-jquery-not-just-the-innerhtml/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 18:23:29 +0000</pubDate>
		<dc:creator>stephen</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Get Element Html]]></category>

		<category><![CDATA[Get/Set]]></category>

		<category><![CDATA[HTML]]></category>

		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[outerHTML]]></category>

		<guid isPermaLink="false">http://blog.stephenrushing.com/?p=112</guid>
		<description><![CDATA[The original content of this post involved a little function I wrote called &#8220;getNodeHtml&#8221;, which basically wrapped a given HTML element with a parent node, got the innerHTML of that temporary parent node, reset the DOM to its previous state, then returned the HTML string. I also used jQuery in the function, which seemed unnecessary [...]]]></description>
			<content:encoded><![CDATA[<p>The original content of this post involved a little function I wrote called &#8220;getNodeHtml&#8221;, which basically wrapped a given HTML element with a parent node, got the innerHTML of that temporary parent node, reset the DOM to its previous state, then returned the HTML string. I also used jQuery in the function, which seemed unnecessary to me.</p>
<p>Today I saw that IE has an outerHTML property, which does exactly what I need. I generally avoid giving IE credit, but they get a chocolaty kudos bar for this one.</p>
<p>The <a title="Array.indexOf()" href="http://soledadpenades.com/2007/05/17/arrayindexof-in-internet-explorer/" target="_blank">Array.indexOf()</a> function I have gave me the idea to extend the prototype of the HTMLElement object so I could have it at my fingertips, and use the same property call in FF and IE (amoung others). After spending some time trying to add a &#8220;get outerHTML&#8221; property to the HTMLElement object, I found some <a title="John Resig's take on Getters and Setters" href="http://ejohn.org/blog/javascript-getters-and-setters/" target="_blank">useful info</a> on <a title="Javascript Getters and Setters" href="https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide/Creating_New_Objects/Defining_Getters_and_Setters" target="_blank">Javascript Getters and Setters</a> that pointed me in the right direction. The result&#8230;<br />
if(document.__defineGetter__ &amp;&amp; !HTMLElement.outerHTML){<br />
HTMLElement.prototype.__defineGetter__(&#8221;outerHTML&#8221;, function(){<br />
var parent = this.parentNode;<br />
var span = document.createElement(&#8221;span&#8221;);<br />
span.appendChild(this);<br />
var HTML = span.innerHTML;<br />
parent.appendChild(this);<br />
delete span;<br />
return HTML;<br />
});<br />
}</p>
<p>The __define[SG]etter__ methods do not exist in IE, so I&#8217;m still curious how to add a getter/setter to an existing prototype there. We could just create functions like value(&#8217;test&#8217;, &#8217;set&#8217;) / value(null, &#8216;get&#8217;) or setValue(&#8217;test&#8217;) / getValue(), but bleh&#8230;those are methods, not properties.</p>
<p>********************UPDATE************************</p>
<p>I have found that manipulating the DOM momentarily to get the outerHTML of an element can cause some problems when you&#8217;re doing alot of DOM manipulation simultaneously. Instead, the following method builds the HTML of the current element by looping through its attributes - much more reliable!</p>
<pre>
if (document.__defineGetter__ &#038;&#038; !HTMLElement.outerHTML) {
    HTMLElement.prototype.__defineGetter__("outerHTML", function(){
        var emptyTags = {
		   "img":   true,
		   "br":    true,
		   "input": true,
		   "meta":  true,
		   "link":  true,
		   "param": true,
		   "hr":    true
		};

		var attrs = this.attributes,
		tagName = this.tagName.toLowerCase(),
		str = "<" + tagName;
		for (var a = 0; a < attrs.length; a++)
		  str += " " + attrs[a].name + "=\"" + attrs[a].value + "\"";

		if (emptyTags[tagName])
		  return str + "/>";

		return str + ">" + this.innerHTML + "</" + tagName + ">";

    });
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.stephenrushing.com/index.php/jquery/getting-the-selected-elements-html-with-jquery-not-just-the-innerhtml/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
