Monthly Archives: August 2005

New Career Path for the MP3 Junky

I can’t believe our society can actually fashion a new type of job out of the Napster era. The days of people being obsessed with downloading music that didn’t belong to them turned many people into Playlist junkies. I have known many friends that would suck up the bandwidth their employer paid for by downloading gigs and gigs of music. So much so, they would never have time to listen to it all.

These same people would sit at home and burn mix CDs for all occasions and mail those CDs out to friends. This is essentially the making of playlists. The fact that Apple’s iTunes actually has a special playlist feature has made this process easier. Now these same people are able to continue this OCD behavior with much less effort.

As a society, we have recognized this new OCD and decided to give it a job description – “MP3 Playlist consultant”. Large companies hire these people to create playlists that will be played through their venue as mood music. It is a pretty odd thing to pay for since a lot of music genres can be streamed for free from services like Shoutcast. The streams can be captures as MP3 files and saved. Recording streaming radio is like recording analog radio – there is no law against it. Why pay someone $30 – $200 an hour for a service someone in the marketing dept can pull off? Anyway…. here is a link to the article that spawned my little rant.

WordPress Plugin – Draft Control

Plugin Name: Draft Control
Description:

A simple and flexible Manage control for WordPress Drafts
Version: 0.96
Author: Ken Villines
Author URI: http://www.kenvillines.com/
License: GPL

The WordPress Plugin “Draft Control” allows users above level 5 to view drafts in a nice row paging system.

Features:

  • Change the Owner of a draft for individual entrys without leaving Draft Control.
  • Change the Category of a draft for individual entrys without leaving Draft Control.
  • Delete individual Drafts from Draft Control
  • Also multi-delete if you need that kind of power

Installation:

  • Save the draftcontrol.php file to your wp-content/plugins/directory
  • Activate the plugin within WordPress in the Plugins section

Usage:

  • Go to the Manage section of WP and then select “Drafted Posts”.
  • The controls are pretty much self explanatory.

Download:
Draft Control 0.96

Using InnerHTML correctly within IE and Firefox

I have put this sample together so other programmers don’t run into the pitfalls I have.

Problem:
IE supports innerHTML for table cells and FireFox doesn’t.

Solution:
You have to embed a div within the table cell and perform all innerHTML calls on that. IE and FireFox both support this method.

Sample code below:

<html>
<head></head>
<body>
<script language="JavaScript">
<!--
/* This works for both IE and Firefox */
function toggleValue()
{
if(document.getElementById("currentItem").innerHTML != "1")
{
document.getElementById("currentItem").innerHTML = "1";
}else
{
document.getElementById("currentItem").innerHTML = "2";
}
}

//-->
</script>

<table width =" 200" border="0">
<tr>
<td colspan=2><br><center>
<a href="javascript:toggleValue()">Toggle Value</a>
</center></td>

</tr>
<tr>
<td>
<strong>Value:</strong>
</td><td>
<div id="currentItem">1</div>

</td>
</tr>
</table>
</body>
</html>

FireFox or IE Gotcha:
FireFox does not support table tags when changing the value of a div using innerHTML()- when the div is within a table cell. Form tags along with most other tags are supported

*IE does support table tags when changing the value of a div using innerHTML() when the div is within a table cell.

I am not really sure who is right and who is wrong with the Gotcha…

QuickTime Scripting – Object.SetRate()

I have seen several forum posts where users say SetRate() doesn’t work. What has worked for me is this:

Definition:


function playFwd(anObj, rate)
{
anObj.Play(); //Have to call play first
anObj.SetRate(rate);

}

Usage:


<a href="javascript:playFwd(document.quicktimemov, 0.03)">
<image src="images/fps_button.jpg" border="0">
</a>

When dealing with rtsp this will only cause the video to slow (The audio plays at full speed – bug reported to Apple). When using this code with a progressive download QT file it works great.

If you take your streaming file and run it through the http protocol everything works great!! But then you don’t get the features of the QTSS. Another topic…

The bottomline: Play() has to be called before using SetRate().

Still not working: Check in other browsers and how you are passing the javascript object. Make sure the object is not NULL. Different browser DOMs can cause you to think it isn’t working.