<?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>Mark Headrick&#039;s Blog &#187; MIDI</title>
	<atom:link href="http://blog.markheadrick.com/category/midi/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.markheadrick.com</link>
	<description>My ramblings about what&#039;s new on my website and whatever else comes to mind.</description>
	<lastBuildDate>Mon, 26 Jul 2010 12:30:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Updated MIDI embedding method on DVD pages.</title>
		<link>http://blog.markheadrick.com/2009/12/02/updated-midi-embedding-method-on-dvd-pages/</link>
		<comments>http://blog.markheadrick.com/2009/12/02/updated-midi-embedding-method-on-dvd-pages/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 20:25:09 +0000</pubDate>
		<dc:creator>MarkRH</dc:creator>
				<category><![CDATA[MIDI]]></category>
		<category><![CDATA[Website Update]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://blog.markheadrick.com/?p=592</guid>
		<description><![CDATA[I&#8217;ve updated the method I&#8217;m using to embed MIDI files in my DVD pages that had them. A couple of example pages are The Best of Benny Hill and Star Wars I: The Phantom Menace. I am using the JavaScript &#8230; <a href="http://blog.markheadrick.com/2009/12/02/updated-midi-embedding-method-on-dvd-pages/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated the method I&#8217;m using to embed MIDI files in my DVD pages that had them. A couple of example pages are <em><a href="http://www.markheadrick.com/dvd/BennyHill.shtml">The Best of Benny Hill</a></em> and <em><a href="http://www.markheadrick.com/dvd/StarWars-ThePhantomMenace.shtml">Star Wars I: The Phantom Menace</a></em>. I am using the JavaScript method that is described at <a title="MIDI Studio Max auto code generator" href="http://midistudio.com/MPlayer9/CodeGen-MP9.htm" target="_blank">MIDIStudio.com</a>. It&#8217;s basically the same thing I was doing before directly within the page&#8217;s code without JavaScript; however, this script now adjusts the code based upon the browser it detects which should make it more compatible.  I did modify their code slightly by adding an optional <strong>autostart</strong> parameter with a default value of <strong>0</strong> if no value is given so that it does not automatically start playing.  Here&#8217;s my modified code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// This script determines correct code required to embed MEDIA files </span>
<span style="color: #006600; font-style: italic;">// for a large number of browsers, including AOL and WebTV</span>
<span style="color: #006600; font-style: italic;">// Windows Media Player is required and always used, except for WebTV</span>
<span style="color: #006600; font-style: italic;">// Written by Les Gorven, http://midistudio.com/ </span>
<span style="color: #006600; font-style: italic;">// Ver. 4.0 (simple) auto-start parameter is true - Created: February 2, 2008</span>
<span style="color: #006600; font-style: italic;">// autostart parameter added by Mark Headrick December 2, 2009</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> playMedia<span style="color: #009900;">&#40;</span>mediaURL<span style="color: #339933;">,</span>rpt<span style="color: #339933;">,</span>height<span style="color: #339933;">,</span>width<span style="color: #339933;">,</span>autostart<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> mediaURL<span style="color: #339933;">,</span>rpt<span style="color: #339933;">,</span>height<span style="color: #339933;">,</span>width<span style="color: #339933;">,</span>autostart<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> autostart <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;undefined&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	autostart <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>GetBrowser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;IE&quot;</span><span style="color: #009900;">&#41;</span>
	playAll<span style="color: #009900;">&#40;</span>mediaURL<span style="color: #339933;">,</span>rpt<span style="color: #339933;">,</span>height<span style="color: #339933;">,</span>width<span style="color: #339933;">,</span>autostart<span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span>  
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>GetBrowser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;unknown&quot;</span><span style="color: #009900;">&#41;</span>
	embedSource<span style="color: #009900;">&#40;</span>mediaURL<span style="color: #339933;">,</span>rpt<span style="color: #339933;">,</span>height<span style="color: #339933;">,</span>width<span style="color: #339933;">,</span>autostart<span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">appName</span>.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;WebTV&quot;</span><span style="color: #009900;">&#41;</span>
	embedSource<span style="color: #009900;">&#40;</span>mediaURL<span style="color: #339933;">,</span>rpt<span style="color: #339933;">,</span>height<span style="color: #339933;">,</span>width<span style="color: #339933;">,</span>autostart<span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">else</span>
	playAll<span style="color: #009900;">&#40;</span>mediaURL<span style="color: #339933;">,</span>rpt<span style="color: #339933;">,</span>height<span style="color: #339933;">,</span>width<span style="color: #339933;">,</span>autostart<span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> embedSource<span style="color: #009900;">&#40;</span>mediaURL<span style="color: #339933;">,</span>rpt<span style="color: #339933;">,</span>height<span style="color: #339933;">,</span>width<span style="color: #339933;">,</span>autostart<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> CodeGen <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> mediaURL<span style="color: #339933;">,</span>rpt<span style="color: #339933;">,</span>height<span style="color: #339933;">,</span>width<span style="color: #339933;">,</span>autostart<span style="color: #339933;">;</span>
&nbsp;
	CodeGen <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;embed src=&quot;'</span> <span style="color: #339933;">+</span> mediaURL <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot;'</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span> <span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>autostart <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	 	CodeGen <span style="color: #339933;">+=</span> <span style="color: #3366CC;">' height='</span> <span style="color: #339933;">+</span> height <span style="color: #339933;">+</span> <span style="color: #3366CC;">' width='</span> <span style="color: #339933;">+</span> width <span style="color: #339933;">+</span> <span style="color: #3366CC;">' autostart=&quot;false&quot;'</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
		CodeGen <span style="color: #339933;">+=</span> <span style="color: #3366CC;">' height='</span> <span style="color: #339933;">+</span> height <span style="color: #339933;">+</span> <span style="color: #3366CC;">' width='</span> <span style="color: #339933;">+</span> width <span style="color: #339933;">+</span> <span style="color: #3366CC;">' autostart=&quot;true&quot;'</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: #339933;">;</span>	
	<span style="color: #009900;">&#125;</span>
	CodeGen <span style="color: #339933;">+=</span> <span style="color: #3366CC;">' LOOP='</span> <span style="color: #339933;">+</span> rpt <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&gt;'</span><span style="color: #339933;">;</span>
	document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>CodeGen<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> playAll<span style="color: #009900;">&#40;</span>mediaURL<span style="color: #339933;">,</span>rpt<span style="color: #339933;">,</span>height<span style="color: #339933;">,</span>width<span style="color: #339933;">,</span>autostart<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> CodeGen <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span> 
&nbsp;
	CodeGen <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;embed type=&quot;application/x-mplayer2&quot; '</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span> <span style="color: #339933;">;</span>
	CodeGen <span style="color: #339933;">+=</span> <span style="color: #3366CC;">' pluginspage=&quot;http://www.microsoft.com/Windows/MediaPlayer/&quot; '</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span> <span style="color: #339933;">;</span>
	CodeGen <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'Name=&quot;Player&quot; '</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'src=&quot;'</span> <span style="color: #339933;">+</span> mediaURL <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot; '</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span> <span style="color: #339933;">;</span>
	CodeGen <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'autoStart='</span> <span style="color: #339933;">+</span> autostart <span style="color: #339933;">+</span> <span style="color: #3366CC;">' '</span> <span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>height <span style="color: #339933;">==</span> <span style="color: #CC0000;">24</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>width <span style="color: #339933;">==</span> <span style="color: #CC0000;">299</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
		CodeGen <span style="color: #339933;">=</span> CodeGen <span style="color: #339933;">+</span> <span style="color: #3366CC;">'ShowStatusBar=1 '</span><span style="color: #339933;">;</span> 
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>height <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">50</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>height <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">75</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>width <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">200</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
		CodeGen <span style="color: #339933;">=</span> CodeGen <span style="color: #339933;">+</span> <span style="color: #3366CC;">'ShowStatusBar=1 '</span><span style="color: #339933;">;</span> 
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>height <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">75</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>width <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">200</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
		CodeGen <span style="color: #339933;">=</span> CodeGen <span style="color: #339933;">+</span> <span style="color: #3366CC;">'ShowStatusBar=0 '</span><span style="color: #339933;">;</span> 
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>height <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">49</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>width <span style="color: #339933;">!=</span> <span style="color: #CC0000;">299</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		CodeGen <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'ShowStatusBar=0 '</span><span style="color: #339933;">;</span> 
	CodeGen <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'enableContextMenu=1 cache=0'</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span> <span style="color: #339933;">;</span>
	CodeGen <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'playCount='</span> <span style="color: #339933;">+</span> rpt <span style="color: #339933;">+</span> <span style="color: #3366CC;">' '</span> <span style="color: #339933;">;</span>
	CodeGen <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'volume=-1 '</span> <span style="color: #339933;">;</span>
	CodeGen <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'HEIGHT='</span> <span style="color: #339933;">+</span> height <span style="color: #339933;">+</span> <span style="color: #3366CC;">' WIDTH='</span> <span style="color: #339933;">+</span> width <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&gt;'</span> <span style="color: #339933;">;</span>
	document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>CodeGen<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> GetBrowser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #003366; font-weight: bold;">var</span> agt<span style="color: #339933;">=</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>agt.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;msie&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>agt.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;opera&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
       <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;IE&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>agt.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'mozilla'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!=-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>agt.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'spoofer'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>
         <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>agt.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'compatible'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>agt.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'opera'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>
         <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>agt.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'webtv'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>agt.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'hotjava'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
       <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;Netscape&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">else</span>
       <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;unknown&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Within the page itself, I just put the following where I want the player to appear:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span> 
	playMedia<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;/midi/SomeFileToPlay.mid&quot;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #339933;">,</span><span style="color: #CC0000;">65</span><span style="color: #339933;">,</span><span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span>
	<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>If I want the song to automatically start playing, then I would change the code to:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span> 
	playMedia<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;/midi/SomeFileToPlay.mid&quot;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #339933;">,</span><span style="color: #CC0000;">65</span><span style="color: #339933;">,</span><span style="color: #CC0000;">300</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>
	<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Seems to work well in both Firefox 3.5.5 and Internet Explorer 8. <img src='http://blog.markheadrick.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markheadrick.com/2009/12/02/updated-midi-embedding-method-on-dvd-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Has hell frozen over? Website no longer using frames!</title>
		<link>http://blog.markheadrick.com/2007/12/15/has-hell-frozen-over-website-no-longer-using-frames/</link>
		<comments>http://blog.markheadrick.com/2007/12/15/has-hell-frozen-over-website-no-longer-using-frames/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 23:32:48 +0000</pubDate>
		<dc:creator>MarkRH</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[General Ramblings]]></category>
		<category><![CDATA[MIDI]]></category>
		<category><![CDATA[Website Update]]></category>

		<guid isPermaLink="false">http://blog.markheadrick.com/2007/12/15/has-hell-frozen-over-website-no-longer-using-frames/</guid>
		<description><![CDATA[I have finally done it!!! My website is no longer using frames after years and years. It&#8217;s now using a combination of CSS and DIV containers to control the layout. I think I have made changes to all the pages &#8230; <a href="http://blog.markheadrick.com/2007/12/15/has-hell-frozen-over-website-no-longer-using-frames/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have finally done it!!! My website is no longer using frames after years and years.  It&#8217;s now using a combination of CSS and DIV containers to control the layout.  I think I have made changes to all the pages and scripts that I needed to LOL.  As you&#8217;ll notice, I no longer have my embedded midi player on the bottom left.  Instead when clicking on a link to play a random midi file or any particular one, it will open a pop-up window with the midi player.  Any future midi files will be targeted to that same pop-up window and start playing.</p>
<p>As a result of this, I have had to modify my .htaccess file to redirect any links that might be going to my old index.shtml (the file that contained my frame information) or main.php (which was the home page file loaded into the right-hand side) to just the root at &#8220;/&#8221; so that it loads the new index.php.</p>
<p>The main thing that is bugging me so far is that with Firefox, the pages that have an embedded object such as a media player, flash player, or YouTube player causes the left menu to be redrawn&#8230; except for the <a href="http://www,markheadrick.com/nascar.php">NASCAR</a> page for some reason <img src="http://blog.markheadrick.com/wp-includes/images/smilies/icon_confused.gif" alt="Confused" title="Confused" border="0" />.  In IE, this does not happen.  Trying to make things behave the same or as close to possibly can be a real pain sometimes.  Anyway, now my website will be easier for search bots to handle and for people to bookmark and refresh pages! <img src="http://blog.markheadrick.com/wp-includes/images/smilies/icon_biggrin.gif" alt="Big Grin" title="Big Grin" border="0" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markheadrick.com/2007/12/15/has-hell-frozen-over-website-no-longer-using-frames/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog has been updated to WordPress v2.2.3 and other changes.</title>
		<link>http://blog.markheadrick.com/2007/09/08/blog-has-been-updated-to-wordpress-v223-and-other-changes/</link>
		<comments>http://blog.markheadrick.com/2007/09/08/blog-has-been-updated-to-wordpress-v223-and-other-changes/#comments</comments>
		<pubDate>Sat, 08 Sep 2007 08:53:47 +0000</pubDate>
		<dc:creator>MarkRH</dc:creator>
				<category><![CDATA[MIDI]]></category>
		<category><![CDATA[Website Update]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.markheadrick.com/2007/09/08/blog-has-been-updated-to-wordpress-v223-and-other-changes/</guid>
		<description><![CDATA[I&#8217;ve updated my blog to WordPress v2.2.3 which includes a few security updates, a couple of which were high priority, and some bug fixes. Like before, I only updated the changed files. Since vars.php was one of the updated files, &#8230; <a href="http://blog.markheadrick.com/2007/09/08/blog-has-been-updated-to-wordpress-v223-and-other-changes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated my blog to <a href="http://wordpress.org/development/2007/09/wordpress-223/" target="_blank">WordPress v2.2.3</a> which includes a few security updates, a couple of which were high priority, and some bug fixes.  Like before, I only updated the <a href="http://trac.wordpress.org/changeset?old_path=tags%2F2.2.2&#038;old=6063&#038;new_path=tags%2F2.2.3&#038;new=6063" target="_blank">changed files</a>.  Since <strong>vars.php</strong> was one of the updated files, I did have to edit it and force the <strong>$is_apache</strong> variable to be true since on my server, the server_software variable comes back with WebServerX instead of Apache.  Following is the part that I changed:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Server detection</span>
<span style="color: #666666; font-style: italic;">//$is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false;</span>
<span style="color: #000088;">$is_apache</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span></pre></div></div>

<p>If I do not do this, then it will not modify the .htaccess file if I change the permalink structure.</p>
<p>I have also decided to reduce the possible annoyance factor when loading my website by not automatically playing the random MIDI file that is loaded into in the media player in the bottom-left frame.  You now have to click play in order to hear the song.  All other &#8220;play&#8221; links on the site will cause the player to automatically start playing.</p>
<p>I am aware that my site still uses those evil frames and how taboo it is these days to use them, not to mention the difficulties some search engines have with them.  I&#8217;ll investigate my options&#8230; I just don&#8217;t like a seperate pop-up window, tab or browser to be created when clicking on a &#8220;play&#8221; link.  It just makes browsing the site so.. disjointed. Hmmm..  <img src='http://blog.markheadrick.com/wp-includes/images/smilies/icon_confused.gif' alt=':???:' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markheadrick.com/2007/09/08/blog-has-been-updated-to-wordpress-v223-and-other-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site performing normal again and some website updates.</title>
		<link>http://blog.markheadrick.com/2007/08/20/site-performing-normal-again-and-some-website-updates/</link>
		<comments>http://blog.markheadrick.com/2007/08/20/site-performing-normal-again-and-some-website-updates/#comments</comments>
		<pubDate>Mon, 20 Aug 2007 05:44:40 +0000</pubDate>
		<dc:creator>MarkRH</dc:creator>
				<category><![CDATA[MIDI]]></category>
		<category><![CDATA[Movie]]></category>
		<category><![CDATA[Website Update]]></category>

		<guid isPermaLink="false">http://blog.markheadrick.com/2007/08/20/site-performing-normal-again-and-some-website-updates/</guid>
		<description><![CDATA[Well, the server seems to be behaving ok again. Haven&#8217;t seen the symptom again for two days now. Watch it happen again as soon as I post this, or tomorrow. LOL. Anyway, to make my main page more efficient, I &#8230; <a href="http://blog.markheadrick.com/2007/08/20/site-performing-normal-again-and-some-website-updates/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well, the server seems to be behaving ok again.  Haven&#8217;t seen the symptom again for two days now. Watch it happen again as soon as I post this, or tomorrow. LOL. Anyway, to make my main page more efficient, I am going to keep just including a static text file that contains my blog entries. I&#8217;ll only update that file when I actually update my blog.. like right after I make this post. My gallery image is still using the PHP Curl method. I also used to have separate log and counter scripts. I have combined both operations into the counter script in a more efficient way. I realized a better method of getting the actual referer (where a visitor to my webpage came from) which allowed me to get rid of the log script which was being called via an IMG tag. It&#8217;s a little tricky when using a framed website because the referer of the &#8220;main&#8221; page is always the &#8220;index&#8221; page that sets up all the frames and loads the menu, midi, and main frames.  I am also now able to log the search bots as they visit my site. Normally, the search bots would not request my log script that was in an IMG tag. I also now save the count into a session variable so that it only counts a visitor once in a session. </p>
<p>In addition to all that, I have been playing around with Apache&#8217;s mod_rewrite and changed how my midi and some other items are handled so that now a normal looking link like <a href="http://www.markheadrick.com/midi/d/BeenThnk.mid">http://www.markheadrick.com/midi/d/BeenThnk.mid</a> is redirected to my midi database script for processing and the browser is none the wiser.  Works better with search engines as well.  Here&#8217;s what it looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">ifmodule</span> mod_rewrite.c&gt;
<span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
<span style="color: #adadad; font-style: italic;"># BEGIN Midi</span>
<span style="color: #00007f;">RewriteRule</span> ^midi/d/([A-Za-z_0-<span style="color: #ff0000;">9</span>\)\(\-]*)\.mid$ php/mididb.php?<span style="color: #00007f;">action</span>=download&amp;id=$1.mid [L]
<span style="color: #00007f;">RewriteRule</span> ^midi/d/([A-Za-z_0-<span style="color: #ff0000;">9</span>\)\(\-]*)\.kar$ php/mididb.php?<span style="color: #00007f;">action</span>=download&amp;id=$1.kar [L]
<span style="color: #adadad; font-style: italic;"># END Midi</span>
&lt;/<span style="color: #000000; font-weight:bold;">ifmodule</span>&gt;</pre></div></div>

<p>Well, I guess that&#8217;s about it as far as website updates go.  <img src='http://blog.markheadrick.com/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' />  </p>
<p>Oh yeah, if you haven&#8217;t seen it, go see <a href="http://www.imdb.com/title/tt0440963/" target="_blank">Bourne Ultimatum</a>! That movie rocks!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markheadrick.com/2007/08/20/site-performing-normal-again-and-some-website-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.markheadrick.com/midi/d/BeenThnk.mid" length="0" type="audio/midi" />
		</item>
	</channel>
</rss>
