<?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>Stuff &#187; javascript</title>
	<atom:link href="http://dmallonee.com/stuff/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://dmallonee.com/stuff</link>
	<description>Miscellaneous Miscellany</description>
	<lastBuildDate>Thu, 01 Apr 2010 17:29:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flash overlapping Javascript elements</title>
		<link>http://dmallonee.com/stuff/2008/11/09/flash-overlapping-javascript-elements/</link>
		<comments>http://dmallonee.com/stuff/2008/11/09/flash-overlapping-javascript-elements/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 02:17:11 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[dhtml]]></category>
		<category><![CDATA[dolphin]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash overlap]]></category>
		<category><![CDATA[flash overlapping javascript]]></category>
		<category><![CDATA[flash z-order]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[z-order]]></category>
		<category><![CDATA[zorder]]></category>

		<guid isPermaLink="false">http://dmallonee.com/stuff/?p=28</guid>
		<description><![CDATA[On a particular Dolphin CMS setup I was working with, my Flash illustration was overlapping the DHTML drop-down menu, so that I couldn&#8217;t see all of that menu. That menu was a necessity to run the site cleanly, so I had to find some means of getting the Flash and DHTML to play well together.
So, [...]]]></description>
			<content:encoded><![CDATA[<p>On a particular Dolphin CMS setup I was working with, my Flash illustration was overlapping the DHTML drop-down menu, so that I couldn&#8217;t see all of that menu. That menu was a necessity to run the site cleanly, so I had to find some means of getting the Flash and DHTML to play well together.</p>
<p>So, in searching Google for something to the effect of &#8220;Flash z-order&#8221;, I ultimately came to some pages explaining that the more recent browsers/browser versions came equipped with capabilities which allow Flash swfs to operate alongside DHTML elements as if the two were meant to work together.</p>
<p>Basically, the code calling the Flash swf just needs to state something to the effect of <code>&lt;param value="opaque" name="wmode" /&gt;</code>.</p>
<p>The following is the precise code used to call my particular swf, reformers.swf:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;object</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;150&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;920&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">codebase</span>=<span style="color: #ff0000;">&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;</span> <span style="color: #000066;">classid</span>=<span style="color: #ff0000;">&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;/media/reformers.swf&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;src&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;opaque&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;wmode&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;embed</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;150&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;920&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">wmode</span>=<span style="color: #ff0000;">&quot;opaque&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;/media/reformers.swf&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;application/x-shockwave-flash&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/embed<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/object<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>I&#8217;m not sure how long this site will be in its current state, but for now at least, the following link should illustrate the meshing of the DHTML and Flash swf.</p>
<p><a title="HaveATulip Chat" href="http://haveatulip.com" target="_blank">http://haveatulip.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dmallonee.com/stuff/2008/11/09/flash-overlapping-javascript-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use HTML and Javascript in Wordpress Multi-user</title>
		<link>http://dmallonee.com/stuff/2008/10/26/use-html-and-javascript-in-wordpress-multi-user/</link>
		<comments>http://dmallonee.com/stuff/2008/10/26/use-html-and-javascript-in-wordpress-multi-user/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 05:41:49 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[allow html]]></category>
		<category><![CDATA[allow html in wpmu]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[multi]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[wordpress mu]]></category>
		<category><![CDATA[wordpress multi-user]]></category>
		<category><![CDATA[wpmu]]></category>

		<guid isPermaLink="false">http://dmallonee.com/stuff/?p=14</guid>
		<description><![CDATA[I really needed to be able to contain MXML markup code in my Flex blog, yet Wordpress MU (Multi-user) has some HTML and Javascript filtering in effect for security purposes. Since my blogs aren&#8217;t used by others, I figured it would be safe to disable that functionality, but it really is not the easiest thing [...]]]></description>
			<content:encoded><![CDATA[<p>I really needed to be able to contain MXML markup code in my Flex blog, yet Wordpress MU (Multi-user) has some HTML and Javascript filtering in effect for security purposes. Since my blogs aren&#8217;t used by others, I figured it would be safe to disable that functionality, but it really is not the easiest thing to achieve.</p>
<p>I searched on Google and found a blog dealing with the matter at <a href="http://dev.robertmao.com/2007/07/18/get-rid-of-boring-wpmus-post-htmljavascript-filtering/">http://dev.robertmao.com/2007/07/18/get-rid-of-boring-wpmus-post-htmljavascript-filtering/</a>. Since the blogger&#8217;s English wasn&#8217;t the greatest, I figured I can offer similar information here, hopefully, in a way that is easier to understand.</p>
<p>To achieve this, a very slight modification of one of WPMU&#8217;s (Wordpress Multi-user) PHP files, <code>kses.php</code>, which resides in the <code>wp-include</code> folder, will be necessary to achieve this. Using any plain text editor with a basic search function should suffice to edit the file.</p>
<p>Doing a simple text search of <code>wp-include/kses.php</code> for the word &#8220;filtering&#8221; should yield something similar to the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1028
1029
1030
1031
1032
1033
1034
1035
1036
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> kses_init_filters<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">// Normal filtering.</span>
	add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pre_comment_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_filter_kses'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_save_pre'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_filter_kses'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Post filtering</span>
	add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'content_save_pre'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_filter_post_kses'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'excerpt_save_pre'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_filter_post_kses'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'content_filtered_save_pre'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_filter_post_kses'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>To remove the HTML/Javascript filtering, just comment out the <code>add_filter</code> lines below the <code>// Post filtering</code> by inserting a set of <code>//</code> backslashes, resulting in the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1028
1029
1030
1031
1032
1033
1034
1035
1036
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> kses_init_filters<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">// Normal filtering.</span>
	add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pre_comment_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_filter_kses'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_save_pre'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_filter_kses'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Post filtering</span>
	<span style="color: #666666; font-style: italic;">//add_filter('content_save_pre', 'wp_filter_post_kses');</span>
	<span style="color: #666666; font-style: italic;">//add_filter('excerpt_save_pre', 'wp_filter_post_kses');</span>
	<span style="color: #666666; font-style: italic;">//add_filter('content_filtered_save_pre', 'wp_filter_post_kses');</span></pre></td></tr></table></div>

<p>As of this writing, the version of WPMU is 2.6.3, so these lines will reflect that version, though the search for the keyword &#8220;filtering&#8221; should still yield similar results in other versions.</p>
]]></content:encoded>
			<wfw:commentRss>http://dmallonee.com/stuff/2008/10/26/use-html-and-javascript-in-wordpress-multi-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
