<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.1" -->
<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/"
	>

<channel>
	<title>Donutland</title>
	<link>http://thejoshis.org/donutello</link>
	<description>Random writings from me</description>
	<pubDate>Thu, 02 Mar 2006 18:39:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.1</generator>
	<language>en</language>
			<item>
		<title>CableCARD</title>
		<link>http://thejoshis.org/donutello/?p=7</link>
		<comments>http://thejoshis.org/donutello/?p=7#comments</comments>
		<pubDate>Thu, 02 Mar 2006 18:39:41 +0000</pubDate>
		<dc:creator>donutello</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://thejoshis.org/donutello/?p=7</guid>
		<description><![CDATA[So I finally got my Philips TV set up with CableCARD woo hoo!
I went over to the Comcast store and picked up a CableCard. I stuck it in the TV and it said it had detected the CableCARD and synched the channel list to the favorites as described on the CableCARD. However, changing channels would [...]]]></description>
			<content:encoded><![CDATA[<p>So I finally got my Philips TV set up with CableCARD woo hoo!</p>
<p>I went over to the Comcast store and picked up a CableCard. I stuck it in the TV and it said it had detected the CableCARD and synched the channel list to the favorites as described on the CableCARD. However, changing channels would only switch between the external inputs.</p>
<p>I spent a lot of time with Comcast support and Philips support trying to get it to work with both sides just pointing to each other. Finally, Comcast said they would send a tech over to get it figured out. We scheduled the appointment and then I decided to try one last time. I stuck the CableCARD back in and left the dialog up. I came back after 15 minutes and all the digital channels were there!</p>
<p>Now if only I could figure out a way to record those channels&#8230;
</p>
]]></content:encoded>
			<wfw:commentRSS>http://thejoshis.org/donutello/?feed=rss2&amp;p=7</wfw:commentRSS>
		</item>
		<item>
		<title>Postie image width mod</title>
		<link>http://thejoshis.org/donutello/?p=6</link>
		<comments>http://thejoshis.org/donutello/?p=6#comments</comments>
		<pubDate>Sun, 26 Feb 2006 06:48:20 +0000</pubDate>
		<dc:creator>donutello</dc:creator>
		
	<category>wordpress</category>
		<guid isPermaLink="false">http://thejoshis.org/donutello/?p=6</guid>
		<description><![CDATA[I don&#8217;t like the way Postie resizes images. It only lets you specify the maximum width. What this does is result in images that are in landscape mode ending up a lot smaller than images that are in portrait mode. Aesthetically, it&#8217;s not a good look. I made the following changes to fix it. I [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t like the way Postie resizes images. It only lets you specify the maximum width. What this does is result in images that are in landscape mode ending up a lot smaller than images that are in portrait mode. Aesthetically, it&#8217;s not a good look. I made the following changes to fix it. I work around that problem by using the value for maximum width as the value for the maximum height also. </p>
<p>The following code changes are needed in postie-functions.php</p>
<p>Replace the function ResizeImage with:</p>
<p>
<pre><code>
function ResizeImage($file,$type) {
    $config = GetConfig();
    $sizeInfo = DetermineImageSize($file);
    $fileName = basename($file);
    if (($sizeInfo[0] &gt; $config["MAX_IMAGE_WIDTH"]) || ($sizeInfo[1] &gt; $config["MAX_IMAGE_WIDTH"])) {
        if ($config["USE_IMAGEMAGICK"]) {
            return(ResizeImageWithImageMagick($file,$type));
        }
        else {
            return(ResizeImageWithGD($file,$type));
        }
    }
    return(array("",$fileName));
</code></pre>
</p>
<p>Replace the function ResizeImageWithImageMagick with:</p>
<p>
<pre><code>
function ResizeImageWithImageMagick($file,$type) {
    //print("&lt;h1&gt;Using ImageMagick&lt;/h1&gt;");
    $config = GetConfig();
    $sizeInfo = DetermineImageSize($file);
    $fileName = basename($file);
    $scaledFileName = "";
    if ((($sizeInfo[0] &gt; $config["MAX_IMAGE_WIDTH"]) || ($sizeInfo[1] &gt; $config["MAX_IMAGE_WIDTH"]))
            &amp;&amp; file_exists($config["IMAGEMAGICK_CONVERT"]))  {
            $yscale = $config["MAX_IMAGE_WIDTH"]/$sizeInfo[1];
            $xscale = $config["MAX_IMAGE_WIDTH"]/$sizeInfo[0];
            $scale = min($xscale, $yscale);
            $scaledH = round($sizeInfo[1] * $scale );
            $scaledW = round($sizeInfo[0] * $scale );
            $scaledFileName =  "thumb.".$fileName;
            $scaledFile = $config["REALPHOTOSDIR"] . $scaledFileName;
            @exec (escapeshellcmd($config["IMAGEMAGICK_CONVERT"]) .
                        " -resize " .
                        $scaledW .
                        "x" .
                        $scaledH  .
                        " " .
                        escapeshellarg($file) .
                        " " .
                        escapeshellarg($scaledFile) );

            @exec ('chmod 755 ' . escapeshellarg($scaledFile));
    }
    return(array($scaledFileName,$fileName));
</code></pre>
</p>
<p>Replace the function ResizeImageWithGD with:</p>
<p>
<pre><code>
function ResizeImageWithGD($file,$type) {
    $config = GetConfig();
    $sizeInfo = DetermineImageSize($file);
    $fileName = basename($file);
    $scaledFileName = "";
    if (($sizeInfo[0] &gt; $config["MAX_IMAGE_WIDTH"]) || ($sizeInfo[1] &gt; $config["MAX_IMAGE_WIDTH"])) {
        $sourceImage = NULL;
        switch($type) {
            case "jpeg":
            case "jpg":
            case "pjpeg":
                $sourceImage = imagecreatefromjpeg($file);
                break;
            case "gif":
                $sourceImage = imagecreatefromgif($file);
                break;
            case "png":
                $sourceImage = imagecreatefrompng($file);
                break;
        }
        if ($sourceImage) {
            $yscale = $config["MAX_IMAGE_WIDTH"]/$sizeInfo[1];
            $xscale = $config["MAX_IMAGE_WIDTH"]/$sizeInfo[0];
            $scale = min($xscale, $yscale);
            $scaledH = round($sizeInfo[1] * $scale );
            $scaledW = round($sizeInfo[0] * $scale );
            $scaledFileName =  "thumb.".$fileName;
            $scaledFile = $config["REALPHOTOSDIR"] . $scaledFileName;
            $scaledImage = imagecreatetruecolor($scaledW,$scaledH);
            imagecopyresized($scaledImage,$sourceImage,0,0,0,0,
                            $scaledW,$scaledH,
                            $sizeInfo[0],$sizeInfo[1]);
			imagejpeg($scaledImage,$scaledFile,$config["JPEGQUALITY"]);
            @exec ('chmod 755 ' . escapeshellarg($scaledFile));
            imagedestroy($scaledImage);
            imagedestroy($sourceImage);
        }
    }
    return(array($scaledFileName,$fileName));

}
</code></pre>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://thejoshis.org/donutello/?feed=rss2&amp;p=6</wfw:commentRSS>
		</item>
		<item>
		<title>Postie image click fix</title>
		<link>http://thejoshis.org/donutello/?p=4</link>
		<comments>http://thejoshis.org/donutello/?p=4#comments</comments>
		<pubDate>Sun, 26 Feb 2006 06:30:28 +0000</pubDate>
		<dc:creator>donutello</dc:creator>
		
	<category>wordpress</category>
		<guid isPermaLink="false">http://thejoshis.org/donutello/?p=4</guid>
		<description><![CDATA[The HTML that Postie generates for thumbnail images didn&#8217;t quite work right for me. Clicking on the thumbnail just scrolled to the top of the page rather than opening the larger image. If you are experiencing the same problem, you can do what I did. Make the following changes to postie-functions.php and the larger images [...]]]></description>
			<content:encoded><![CDATA[<p>The HTML that Postie generates for thumbnail images didn&#8217;t quite work right for me. Clicking on the thumbnail just scrolled to the top of the page rather than opening the larger image. If you are experiencing the same problem, you can do what I did. Make the following changes to postie-functions.php and the larger images will be loaded in the same window.</p>
<p>Replace:</p>
<p>
<pre><code>
if ($thumbImage) {
    $attachments["html"][] .= $mimeTag.'&lt;a href="#" onclick=" window.open(' ."'"
    . $config["URLPHOTOSDIR"] . $fullImage . "','"
    . $part-&gt;ctype_parameters['name'] . "','"
    . "toolbar=0,scrollbar=0,location=0,statusbar=0,menubar=0,resizable=1" . "');"
    . '"&gt;&lt;img src="' . $config["URLPHOTOSDIR"] . $thumbImage . '" alt="'
    . $part-&gt;ctype_parameters['name'] . '" style="'.$config["IMAGESTYLE"].'" class="'.$config["IMAGECLASS"].'" /&gt;&lt;/a&gt;' . "n";
</code></pre>
</p>
<p>with</p>
<pre><code>
if ($thumbImage) {
    $attachments["html"][] .= $mimeTag.'&lt;a href="' . $config["URLPHOTOSDIR"] . $fullImage
    . '"&gt;&lt;img src="' . $config["URLPHOTOSDIR"] . $thumbImage . '" alt="'
    . $part-&gt;ctype_parameters['name'] . '" style="'.$config["IMAGESTYLE"].'" class="'.$config["IMAGECLASS"].'" /&gt;&lt;/a&gt;' . "\n";
</code></pre>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://thejoshis.org/donutello/?feed=rss2&amp;p=4</wfw:commentRSS>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://thejoshis.org/donutello/?p=1</link>
		<comments>http://thejoshis.org/donutello/?p=1#comments</comments>
		<pubDate>Sun, 26 Feb 2006 05:29:08 +0000</pubDate>
		<dc:creator>donutello</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false"></guid>
		<description><![CDATA[Welcome to my new blog. I don&#8217;t have an agenda for this blog. I&#8217;m just going to post whatever I feel like expressing or sharing with the rest of the world.

]]></description>
			<content:encoded><![CDATA[<p>Welcome to my new blog. I don&#8217;t have an agenda for this blog. I&#8217;m just going to post whatever I feel like expressing or sharing with the rest of the world.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://thejoshis.org/donutello/?feed=rss2&amp;p=1</wfw:commentRSS>
		</item>
	</channel>
</rss>

