<?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>myGUIDE</title>
	<atom:link href="http://myguide.bagarinao.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://myguide.bagarinao.com</link>
	<description>Random Notes on Random Thoughts</description>
	<pubDate>Tue, 15 Apr 2008 06:11:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>My blog as my OpenID identity</title>
		<link>http://myguide.bagarinao.com/2008/04/15/my-blog-as-my-openid-identity/</link>
		<comments>http://myguide.bagarinao.com/2008/04/15/my-blog-as-my-openid-identity/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 06:11:43 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
		
		<category><![CDATA[Howto]]></category>

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

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

		<guid isPermaLink="false">http://myguide.bagarinao.com/2008/04/15/my-blog-as-my-openid-identity/</guid>
		<description><![CDATA[To understand openID, you only need to consider the number of Internet accounts you currently maintain. Maybe you have one email account in Yahoo or Google, another account in Flickr for your photos, an account in YouTube for videos, another one in Friendster, Facebook, or MySpace for your social network, and many many more. For [...]]]></description>
			<content:encoded><![CDATA[<p>To understand <a href="http://www.openid.net/">openID</a>, you only need to consider the number of Internet accounts you currently maintain. Maybe you have one email account in Yahoo or Google, another account in Flickr for your photos, an account in YouTube for videos, another one in Friendster, Facebook, or MySpace for your social network, and many many more. For each of this site, you need to have a username and a password in order to use the provided services. As your online presence expands, keeping tab of all these accounts becomes more difficult. I have several so I know how difficult it is to remember all username-password combinations. This is the issue <a href="http://www.openid.net/">openID</a> is trying to solve. </p>
<p>According to their website, &quot;OpenID is a free and easy way to use a <strong>single digital identity</strong> across the Internet.&quot; Ideally, with one OpenID you can login to all your favorite sites eliminating the need to maintain several usernames and passwords. Imagine the convenience of using a single username-password combination for all websites you would like to visit. Well, this is still ideal since not all websites have already adopted OpenID. Surprisingly, you may already have one without knowing it. If you have an account in wordpress.com, your OpenID is simply username.wordpress.com, or if you have one in flickr.com, your OpenID is www.flickr.com/photos/username, and several others. Check <a href="http://openid.net/get/">this site</a> on how to get one. The interesting thing is that you can use your own website or blog as your OpenID identity. How? Read on.</p>
<p><span id="more-31"></span></p>
<p>Following the instructions from <a href="http://www.intertwingly.net/blog/2007/01/03/OpenID-for-non-SuperUsers">this blog</a>, I configured my blog (<a href="http://myguide.bagarinao.com/">http://myguide.bagarinao.com/</a>) to be my OpenID identity. If you have one, you can also use it as your own. It is not really difficult, you only need to add the two lines below in the HTML header of your website or blog, that is within the &lt;head&gt; tag.&#160; </p>
<blockquote><p>&lt;link rel=&quot;openid.server&quot; href=http://myguide.bagarinao.com/id/index.php&gt;      <br />&lt;link rel=&quot;openid.delegate&quot; href=http://myguide.bagarinao.com/id/index.php&gt; </p>
</blockquote>
<p>The trick in the above is the use of delegation, which allows blog owners to use their blog&#8217;s URL (in my case, <a href="http://myguide.bagarinao.com/">http://myguide.bagarinao.com/</a>) as OpenID identifier while using third party OpenID provider. For this to work, two bits of information are needed. One is the OpenID server (openid.server), which you will specify in the href attribute of the link tag, and the other is the identifier issued by the provider (openid.delegate). The above simply means that you use your provider&#8217;s OpenID server specified in the href attribute of openid.server which knows you by the URL given in openid.delegate. To implement this in your own blog, you need to change the href attributes above to the correct one. </p>
<p>Another advantage of delegation is that when you want to change your OpenID provider for whatever reason, you can simply change the href attributes to point to the new provider and you can still use your own URL as your identifier. </p>
<p>If you have access to your webserver and also want to host your own OpenID server like me, you can use phpMyID. You can download it from <a title="phpMyID" href="http://siege.org/projects/phpMyID/">http://siege.org/projects/phpMyID/</a>. As of writing, the most recent version is 0.8 (phpMyID-0.8.zip). </p>
<p>To install it, extract the files into a temporary directory. You only need MyID.config.php and MyID.php. In my case, I renamed MyID.config.php to index.php and MyID.php to myid.php before uploading them to a subdirectory called id in my webserver. Because of the renaming, I also needed to edit index.php, and specified myid.php in the last line&#8217;s require() function. </p>
<p>Accessing index.php (<a href="http://myguide.bagarinao.com/id/index.php">http://myguide.bagarinao.com/id/index.php</a>) displayed</p>
<blockquote><p>This is an OpenID server endpoint. For more information, see http://openid.net/      <br />Server: <b>http://myguide.bagarinao.com/id/index.php</b>       <br />Realm: <b>phpMyID</b>       <br /><a href="http://myguide.bagarinao.com/id/index.php?openid.mode=login">Login</a></p>
</blockquote>
<p>So far, so good. Next, I generated a username and password in my linux box using openssl. The command line is</p>
<blockquote><p>[user] $ echo -n &#8216;username:realm:password&#8217; | openssl md5</p>
</blockquote>
<p>where username is the username you will specify when logging in, realm is phpMyID or whatever string is displayed in the Realm field, and password for your password. This will give you the md5 hash of the string enclosed in single quotes, which you will need later. If you&#8217;re using windows, you can download md5 and run the following command:</p>
<blockquote><p>md5.exe -d&quot;username:realm:password&quot;</p>
</blockquote>
<p>Finally, I changed the following information in index.php</p>
<p>&#8216;auth_username&#8217;&#160;&#160;&#160; =&gt; &#8216;myguide&#8217;,    <br />&#8216;auth_password&#8217; =&gt;&#160;&#160;&#160; &#8216;37fa04faebe5249023ed1f6cc867329b&#8217;,     <br />&#8216;auth_realm&#8217;&#160;&#160;&#160; =&gt;&#160;&#160;&#160; &#8216;myguide.bagarinao.com&#8217;, </p>
<p>where auth_password is the output of the command described above with the specified username and realm. </p>
<p>After these changes, accessing the index page displayed the following information:</p>
<blockquote><p>This is an OpenID server endpoint. For more information, see http://openid.net/     <br />Server: <b>http://myguide.bagarinao.com/id/index.php</b>      <br />Realm: <b>myguide.bagarinao.com</b>      <br /><a href="http://myguide.bagarinao.com/id/index.php?openid.mode=login">Login</a></p>
</blockquote>
<p>It is now possible to login by clicking the Login link. It will prompt you to enter your username and password. After several redirection if everything works fine, you will get a page that says: &quot;You are logged in as myguide&quot; or whatever username you used in the configuration. </p>
<p>Finally, you can check your configuration by visiting this URL: <a title="http://www.openidenabled.com/resources/openid-test/checkup" href="http://www.openidenabled.com/resources/openid-test/checkup">http://www.openidenabled.com/resources/openid-test/checkup</a></p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2008/04/15/my-blog-as-my-openid-identity/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My First Silverlight Video Player Application</title>
		<link>http://myguide.bagarinao.com/2008/03/24/my-first-silverlight-video-player-application/</link>
		<comments>http://myguide.bagarinao.com/2008/03/24/my-first-silverlight-video-player-application/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 09:23:01 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
		
		<category><![CDATA[Applications]]></category>

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

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

		<category><![CDATA[video player application]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/2008/03/24/my-first-silverlight-video-player-application/</guid>
		<description><![CDATA[I always wanted to create my own web-based video player to share vacation videos with relatives and friends back home. But I didn&#8217;t have an idea where to start. I initially considered Adobe Flash but it&#8217;s not free and I didn&#8217;t have a license for it. Of course it is easier to just store the [...]]]></description>
			<content:encoded><![CDATA[<p>I always wanted to create my own web-based video player to share vacation videos with relatives and friends back home. But I didn&#8217;t have an idea where to start. I initially considered Adobe Flash but it&#8217;s not free and I didn&#8217;t have a license for it. Of course it is easier to just store the video files in <a href="http://www.youtube.com/">YouTube</a> and it will be immediately accessible to everyone. But I don&#8217;t like splitting each video into 10-min segments, 10 minutes being the current maximum length of video clips allowed in YouTube.&#160; </p>
<p>Then I came across <a href="http://silverlight.net/">Silverlight</a>, Microsoft&#8217;s cross-browser and cross-platform plug-in for delivering rich interactive applications on the web. I read about it several months ago. And the first thing that came to mind was whether it could be used to create a self-hosted video player for sharing videos on the Internet. Last weekend, I finally had the time to try it out. I visited Silverlight&#8217;s web site and looked for some introductory materials to work on. Fortunately, I found a tutorial on how to use Silverlight for video playback. I tried it and it worked! </p>
<p>So here is an outline of my first Silverlight video player application. This is based on the tutorial from Silverlight.net. The brief explanation is based on my understanding of the original tutorial. </p>
<p><span id="more-30"></span></p>
<p>The application consists of five files plus the video file. These are:</p>
<ol>
<li>default.htm </li>
<li>my-script.js </li>
<li>createSilverlight.js </li>
<li>Silverlight.js </li>
<li>myxaml.xaml </li>
<li>myvideo.wmv </li>
</ol>
<p>default.htm is the HTML file hosting an instance of the Silverlight video player application. Silverlight.js is a JavaScript file included to enable Silverlight contents to be viewed on multiple platforms. This file is included in the <a title="Silverlight 1.0 SDK" href="http://go.microsoft.com/fwlink/?LinkID=88923&amp;clcid=0x409">Silverlight 1.0 SDK</a>. createSilverlight.js is a JavaScript file containing a single function to create an instance of the Silverlight application. my-script.js is another JavaScript file which contains other JavaScript functions that will be used in the application. myxaml.xaml is a XAML file defining the application&#8217;s interface. Finally, myvideo.wmv is the video file you would like to share. </p>
<p>The content of default.htm is shown below.</p>
<p>&#160;</p>
<p> <code>
<p>default.htm:</p>
<p>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;      <br />&lt;html&gt;       <br />&lt;head&gt;       <br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&gt;       <br />&lt;title&gt;My First Silverlight Application&lt;/title&gt;       <br />&lt;script type=&quot;text/javascript&quot; src=&quot;Silverlight.js&quot;&gt;&lt;/script&gt;       <br />&lt;script type=&quot;text/javascript&quot; src=&quot;createSilverlight.js&quot;&gt;&lt;/script&gt;       <br />&lt;script type=&quot;text/javascript&quot; src=&quot;my-script.js&quot;&gt;&lt;/script&gt;       <br />&lt;/head&gt; </p>
<p>&lt;body&gt;      <br />&lt;!&#8211; Where the Silverlight plug-in will go&#8211;&gt;       <br />&lt;div id=&quot;mySilverlightPluginHost&quot; align=&quot;center&quot;&gt;       <br />&lt;/div&gt;       <br />&lt;script type=&quot;text/javascript&quot;&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Retrieve the div element you created in the previous step.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var parentElement =       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; document.getElementById(&quot;mySilverlightPluginHost&quot;);&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; // This function creates the Silverlight plug-in.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; createMySilverlightPlugin();&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&lt;/script&gt; </p>
<p>&lt;/body&gt;      <br />&lt;/html&gt;</p>
<p> </code>
<p>&#160;</p>
<p>This is just your usual HTML file. Within the &lt;head&gt; tag, a reference to each of the JavaScript file is included so that they will also be retrieved when the page is loaded. Within the &lt;body&gt; tag, a container for the Silverlight application is defined. This is the &lt;div&gt; element with id called mySilverlightPluginHost. This is followed by a &lt;script&gt; block where an instance of the Silverlight application is actually created by calling the createSilverlightPlugin() function. A reference to the &lt;div&gt; element defined earlier is also obtained and assigned to the parentElement variable. This variable is used in the createSilverlightPlugin() function. </p>
<p>The createSilverlight.js file contains the function to create an instance of the Silverlight application. The code is given below. </p>
<p>&#160;</p>
<p> <code>
<p>createSilverlight.js:</p>
<p>function createMySilverlightPlugin()      <br />{&#160; <br />&#160;&#160;&#160; Silverlight.createObject(       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;myxaml.xaml&quot;,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Source property value.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; parentElement,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // DOM reference to hosting DIV tag.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;mySilverlightPlugin&quot;,&#160;&#160;&#160;&#160; // Unique plug-in ID value.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Per-instance properties.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width:&#8217;300&#8242;,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Width of rectangular region of&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // plug-in area in pixels.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; height:&#8217;300&#8242;,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Height of rectangular region of&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // plug-in area in pixels.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; inplaceInstallPrompt:false, // Determines whether to display&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // in-place install prompt if&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // invalid version detected.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; background:&#8217;#D6D6D6&#8242;,&#160; // Background color of plug-in.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; isWindowless:&#8217;false&#8217;,&#160; // Determines whether to display plug-in&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // in Windowless mode.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; framerate:&#8217;24&#8242;,&#160;&#160;&#160;&#160;&#160;&#160;&#160; // MaxFrameRate property value.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; version:&#8217;1.0&#8242;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Silverlight version to use.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; },       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; onError:null,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // OnError property value &#8211;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // event handler function name.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; onLoad:null&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // OnLoad property value &#8211;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // event handler function name.       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; },       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; null);&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Context value &#8212; event handler function name.       <br />}</p>
<p> </code>
<p>&#160;</p>
<p>To create the instance, the function calls the Silverlight.createObject function and passes along some parameters such as the filename of the XAML file (myxaml.xaml) defining the application&#8217;s interface, the reference to the hosting &lt;div&gt; tag parentElement, among others. A brief explanation of each parameter is included as a comment. This function creates an instance of the Silverlight application which is 300 x 300 in dimension, with a gray background, etc.</p>
</p>
<p>The specification of the application&#8217;s interface is given in the myxaml.xaml.&#160; For this video application, the code is shown next.</p>
<p>&#160;</p>
<p> <code>
<p>myxaml.xaml:</p>
<p>&lt;Canvas      <br />&#160;&#160; xmlns=&quot;http://schemas.microsoft.com/client/2007&quot;       <br />&#160;&#160; xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;&gt; </p>
<p>&lt;MediaElement x:Name=&quot;media&quot;      <br />&#160;&#160;&#160; Source=&quot;myvideo.wmv&quot; Width=&quot;300&quot; Height=&quot;300&quot; /&gt; </p>
<p>&#160; &lt;!&#8211; Stops media playback.&#8211;&gt;&#160;&#160;&#160; <br />&#160; &lt;Canvas MouseLeftButtonDown=&quot;media_stop&quot;       <br />&#160;&#160;&#160; Canvas.Left=&quot;70&quot; Canvas.Top=&quot;265&quot;&gt;       <br />&#160;&#160;&#160; &lt;Rectangle Stroke=&quot;Red&quot;       <br />&#160;&#160;&#160;&#160;&#160;&#160; Height=&quot;30&quot; Width=&quot;50&quot; RadiusX=&quot;5&quot; RadiusY=&quot;5&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Rectangle.Fill&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;RadialGradientBrush GradientOrigin=&quot;0.75,0.25&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;GradientStop Color=&quot;Orange&quot; Offset=&quot;0.0&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;GradientStop Color=&quot;Red&quot; Offset=&quot;1.0&quot; /&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/RadialGradientBrush&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;/Rectangle.Fill&gt;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; &lt;/Rectangle&gt;       <br />&#160;&#160;&#160; &lt;TextBlock Canvas.Left=&quot;5&quot; Canvas.Top=&quot;5&quot;&gt;stop&lt;/TextBlock&gt;       <br />&#160; &lt;/Canvas&gt; </p>
<p>&#160; &lt;!&#8211; Pauses media playback. &#8211;&gt;      <br />&#160; &lt;Canvas MouseLeftButtonDown=&quot;media_pause&quot;       <br />&#160;&#160;&#160;&#160; Canvas.Left=&quot;125&quot; Canvas.Top=&quot;265&quot;&gt;       <br />&#160;&#160;&#160; &lt;Rectangle Stroke=&quot;Orange&quot;       <br />&#160;&#160;&#160;&#160;&#160;&#160; Height=&quot;30&quot; Width=&quot;50&quot; RadiusX=&quot;5&quot; RadiusY=&quot;5&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Rectangle.Fill&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;RadialGradientBrush GradientOrigin=&quot;0.75,0.25&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;GradientStop Color=&quot;Yellow&quot; Offset=&quot;0.0&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;GradientStop Color=&quot;Orange&quot; Offset=&quot;1.0&quot; /&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/RadialGradientBrush&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;/Rectangle.Fill&gt;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; &lt;/Rectangle&gt;       <br />&#160;&#160;&#160; &lt;TextBlock Canvas.Left=&quot;5&quot; Canvas.Top=&quot;5&quot;&gt;pause&lt;/TextBlock&gt;       <br />&#160; &lt;/Canvas&gt;&#160; </p>
<p>&#160; &lt;!&#8211; Begins media playback. &#8211;&gt;      <br />&#160; &lt;Canvas MouseLeftButtonDown=&quot;media_begin&quot;       <br />&#160;&#160;&#160; Canvas.Left=&quot;180&quot; Canvas.Top=&quot;265&quot;&gt;       <br />&#160;&#160;&#160; &lt;Rectangle Stroke=&quot;Green&quot; RadiusX=&quot;5&quot; RadiusY=&quot;5&quot;       <br />&#160;&#160;&#160;&#160;&#160;&#160; Height=&quot;30&quot; Width=&quot;50&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;Rectangle.Fill&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;RadialGradientBrush GradientOrigin=&quot;0.75,0.25&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;GradientStop Color=&quot;LimeGreen&quot; Offset=&quot;0.0&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;GradientStop Color=&quot;Green&quot; Offset=&quot;1.0&quot; /&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/RadialGradientBrush&gt;       <br />&#160;&#160;&#160;&#160;&#160; &lt;/Rectangle.Fill&gt;       <br />&#160;&#160;&#160; &lt;/Rectangle&gt;       <br />&#160;&#160;&#160; &lt;TextBlock Canvas.Left=&quot;5&quot; Canvas.Top=&quot;5&quot;&gt;play&lt;/TextBlock&gt;       <br />&#160; &lt;/Canvas&gt; </p>
<p>&lt;/Canvas&gt;</p>
</p>
<p> </code>
<p>Every Silverlight XAML file should contain at least one &lt;Canvas&gt; object as the root element. Other objects can then be inserted between the &lt;Canvas&gt; tag. Here, the main &lt;Canvas&gt; contains four objects. The first object is the MediaElement with the Source property set to myvideo.wmv. This object will be used to control the included video&#8217;s playback. It is also assigned a name &quot;media&quot; so that it can be referenced in other JavaScript functions. The three other objects define the three buttons for controlling the video playback - stop, pause, and play. These are also &lt;Canvas&gt; objects with rectangles and texts as sub-elements. For these elements to function as buttons, it is necessary to capture mouse button events using the MouseLeftButtonDown property. Depending on which &lt;Canvas&gt; the button is clicked, a corresponding function is called to either stop (media_stop), pause (media_pause), or play (media_begin) the video. The implementation of these functions is in the my-script.js file, which is shown next:</p>
<p>&#160;</p>
<p> <code>
<p>my-script.js:</p>
<p>function media_stop(sender, args) {      <br />&#160;&#160;&#160; sender.findName(&quot;media&quot;).stop();       <br />} </p>
<p>function media_pause(sender, args) {      <br />&#160;&#160;&#160; sender.findName(&quot;media&quot;).pause();       <br />} </p>
<p>function media_begin(sender, args) {      <br />&#160;&#160;&#160; sender.findName(&quot;media&quot;).play();       <br />}</p>
<p> </code>
<p>&#160;</p>
<p>myxaml.xaml and my-script.js define the core video player application. The former provides the interface, while the latter provides the functionality. To control the video playback, the stop(), pause(), and play() functions are called depending on which button is pressed. </p>
<p>This basically covers all the files necessary for this Silverlight video player application. You can save the files into your computer, test the application locally by opening default.htm using your browser, and see for yourself how it works. You can also view this simple Silverlight video application in action <a href="http://www.bagarinao.com/video/default.htm">here</a>. It&#8217;s still very rudimentary but functional. Note that you will also need to install the Silverlight plug-in before you can run the application. Finally, if you want to learn more, you can visit <a href="http://silverlight.net/quickstarts/silverlight10/default.aspx">Silverlight&#8217;s Quick Start</a> page where some introductory materials about Silverlight can be found.</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2008/03/24/my-first-silverlight-video-player-application/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Migrating from Serendipity to Wordpress Using Windows Live Writer</title>
		<link>http://myguide.bagarinao.com/2008/03/12/migrating-from-serendipity-to-wordpress-using-windows-live-writer/</link>
		<comments>http://myguide.bagarinao.com/2008/03/12/migrating-from-serendipity-to-wordpress-using-windows-live-writer/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 15:43:09 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
		
		<category><![CDATA[Applications]]></category>

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

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

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

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

		<category><![CDATA[windows live writer]]></category>

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

		<guid isPermaLink="false">http://myguide.bagarinao.com/2008/03/12/migrating-from-serendipity-to-wordpress-using-windows-live-writer/</guid>
		<description><![CDATA[After months of inactivity, myGUIDE is now back with a new look and running on a different weblog platform. Yes, you read it right, I changed my blog platform from Serendipity to WordPress. This means that although I have migrated all my previous posts to WordPress, previous links will no longer work since Serendipity and [...]]]></description>
			<content:encoded><![CDATA[<p>After months of inactivity, myGUIDE is now back with a new look and running on a different weblog platform. Yes, you read it right, I changed my blog platform from <a href="http://www.s9y.org/">Serendipity</a> to <a href="http://www.wordpress.org/">WordPress</a>. This means that although I have migrated all my previous posts to WordPress, previous links will no longer work since Serendipity and WordPress have different link structure. Now if you&#8217;re looking for a particular post, you can still find it here. Just use the search box to locate it.</p>
<p>How did I do it? It was quite easy. Thanks to <a href="http://writer.live.com/">Windows Live Writer</a> (WLW). But before taking this approach, be warned that this may not be appropriate for your case. This worked for me because myGUIDE is relatively new and has only a small number of blog entries and I&#8217;ve been using WLW to post entries to this blog. A <a href="http://technosailor.com/2007/01/02/new-version-of-serendipity-s9y-to-wordpress-importer-available/">Serendipity importer plugin</a> is already available for WordPress. So maybe you&#8217;re better off using the plugin. But if you want an alternative approach, you can try this one. </p>
<p>The first thing to do is to create a weblog account in WLW to access your Serendipity-based blog, if you have not done it yet. Then setup another account in WLW to access your WordPress blog. After doing this, you&#8217;re ready to go. Simply read your blog entries, one at a time, from your old blog using WLW, then switch to your new blog, and click the Publish button to publish the entry you just retrieved. It is that easy! You can also use WLW to create the relevant categories in your new blog. You can even set the published date so that you can keep the original date of your posts.</p>
<p>But there are limitations to this approach. First, you will lose all your comments. WLW will not read the comments associated to each post.&#160; Second, WLW sometimes will not download the images in the post. Instead it will just get the link of the image from your original blog and use this link in the new one. Thus if you&#8217;ll remove your old blog, the images will also disappear. Finally, if you have many entries, transferring all of them can take some time since you have to manually repeat the process of reading your previous posts from Serendipity then publishing it to WordPress. Luckily for me, I have only 15 entries so this was not an issue. <img src='http://myguide.bagarinao.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>And that&#8217;s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2008/03/12/migrating-from-serendipity-to-wordpress-using-windows-live-writer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Creating Articles Using the Article Manager Module in Phpwebsite (Simplified Version)</title>
		<link>http://myguide.bagarinao.com/2007/12/09/creating-articles-using-the-article-manager-module-in-phpwebsite-simplified-version/</link>
		<comments>http://myguide.bagarinao.com/2007/12/09/creating-articles-using-the-article-manager-module-in-phpwebsite-simplified-version/#comments</comments>
		<pubDate>Mon, 10 Dec 2007 08:40:26 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
		
		<category><![CDATA[Articles]]></category>

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

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

		<category><![CDATA[article manager module]]></category>

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

		<guid isPermaLink="false">http://myguide.bagarinao.com/?p=28</guid>
		<description><![CDATA[I have a couple of websites running phpwebsite. In these websites, I used the Article Manager module to handle article submission. I came up with a guide to help users of these sites. I am reposting the article here, which initially appeared at the Philippines Today website. The article is as follows:
To submit an article [...]]]></description>
			<content:encoded><![CDATA[<p>I have a couple of websites running <a href="http://phpwebsite.appstate.edu/" title="PhpWebsite">phpwebsite</a>. In these websites, I used the Article Manager module to handle article submission. I came up with a guide to help users of these sites. I am reposting the <a href="http://www.philippinestoday.net/index.php?module=article&amp;view=745" title="Article in Philippines Today">article</a> here, which initially appeared at the <a href="http://www.philippinestoday.net/">Philippines Today</a> website. The article is as follows:</p>
<p>To submit an article in this website, you need to have a username. If you already have one, you can login using the <strong>Log In</strong> box, which can be found in the left column of this page. If you don&#8217;t have an account yet, you can get one by signing up <a href="http://www.philippinestoday.net/index.php?norm_user_op=signup&amp;account_signup=1&amp;module=users" title="Signup">here</a>. You only need a valid email address where your login credentials will be emailed.</p>
<p>After logging in, click <a href="http://www.philippinestoday.net/index.php?module=article&amp;edit=create" title="Submit An Article">here</a> or the <strong>Submit An Article</strong> link from the <strong>Main</strong> menu box. A page containing an empty article will be displayed. See images below. Enter the necessary information, such as the article&#8217;s title, summary, and content, and click the <strong>Save Article</strong> button at the bottom of the page to post your article. The home page will be automatically updated with the summary of your article posted at the top of the <strong>Recent Article&#8230;</strong> section. It is that easy!</p>
<p><span id="more-28"></span></p>
<p><img width="500" src="http://myguide.bagarinao.com/wp-content/uploads/2008/03/submit-article-img-1.gif" alt="New Article" height="638" style="margin: 5px 0px" /></p>
<p>Now, here is the description of each field:</p>
<p>(1) Enter the title of your article here. This is an important field and should not be left blank. The number of characters is limited so be sure to make your title brief but descriptive.</p>
<p>(2) The summary of the article can be entered here. Be concise. The text here will appear in the front page (summary section) of the website and in RSS feeds. [NOTE: If you paste the summary from MS Word, be sure to remove the double quotes, single quotes, or long dashes from MS Word. These characters will break down the RSS feed.]</p>
<p>(3) Section title is optional. If you don&#8217;t have a multi-section article, you can leave it blank. But you can enter the subtitle here if you have one.</p>
<p>(4) This is where the content of your article should be entered. Just type the text here. If you already have it in some text file or MS Word file, you can just copy the text and paste it in this section. Separate paragraphs using empty lines or use two line breaks. Remove line breaks, if any, in the middle of the paragraph.</p>
<p><img width="500" src="http://myguide.bagarinao.com/wp-content/uploads/2008/03/submit-article-img-2.gif" alt="New Article" height="629" style="margin: 5px 0px" /></p>
<p>(5) Select an appropriate category for your article. If you cannot find one, choose general categories like Misc, Announcements, etc. For press releases, select the Press Release category.</p>
<p>(6) Provide comma-separated keywords for your article. These will be used to index your article for search purposes.</p>
<p>(7) Click the <strong>Save Article</strong> button to publish your article. The article&#8217;s summary will be automatically posted at the front page. Be sure to review the article&#8217;s content before posting it. On the otherhand, if you don&#8217;t want to submit your article, you can instead click the <strong>Cancel Editing</strong> button.</p>
<p>And that&#8217;s it! Start contributing now.</p>
<p>(NOTE: For a more detailed description of the Article Manager, you can read this <a href="http://www.philippinestoday.net/index.php?module=article&amp;view=2" title="Introduction to Article Manager">article</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2007/12/09/creating-articles-using-the-article-manager-module-in-phpwebsite-simplified-version/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Yahoo! Messenger 9 Beta and Yahoo! Messenger for the Web</title>
		<link>http://myguide.bagarinao.com/2007/11/04/yahoo-messenger-9-beta-and-yahoo-messenger-for-the-web/</link>
		<comments>http://myguide.bagarinao.com/2007/11/04/yahoo-messenger-9-beta-and-yahoo-messenger-for-the-web/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 08:39:05 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
		
		<category><![CDATA[Applications]]></category>

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

		<category><![CDATA[yahoo messenger 9]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/?p=25</guid>
		<description><![CDATA[Yahoo! Messenger (YM) 9 is now available in public beta.  For those who would try this newest version of YM, you can download it from here. The new version has a completely new look for your contact list. You can choose a detailed view with larger Avatar images for your friends or a compact view [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://messenger.yahoo.com/">Yahoo! Messenger (YM) 9</a> is now available in public beta.  For those who would try this newest version of YM, you can download it from <a href="http://beta.messenger.yahoo.com/">here</a>. The new version has a completely new look for your contact list. You can choose a detailed view with larger Avatar images for your friends or a compact view if you want to minimize space. When in detailed view, you can just hover on your contact to send instant messages, SMS, or place a call. It has also brand new skins and emoticons.</p>
<p>Sharing videos becomes a lot easier. With an inline media player, you can just send the URL of the video you want to share and it will play within YM.  There is no need to open a new browser to play the video. <a href="http://flickr.com">Flickr</a> is also integrated in the photo sharing feature. You can now share photos uploaded to flickr or save photos shared by others to your flickr account. Of course, sharing photos stored in your desktop is still possible.</p>
<p>YM 9 also offers localized versions for more countries including our very own the Philippines, and other countries such as Thailand, Indonesia, etc. I wonder what localization is available in the Philippine version. The menu in Tagalog? The Philippine version can be downloaded from <a href="http://ph.beta.messenger.yahoo.com/">here</a>.</p>
<p><span id="more-25"></span></p>
<p>Here is a brief video showing YM 9&#8217;s new features.</p>
<p><embed flashvars="id=4764261&amp;emailUrl=http%3A%2F%2Fvideo.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D1383762&amp;imUrl=http%25253A%25252F%25252Fvideo.yahoo.com%25252Fvideo%25252Fplay%25253Fei%25253DUTF-8%252526vid%25253D1383762&amp;imTitle=Yahoo%252521%252BMessenger%252B9.0%252BBeta%252Bdemo%252Bvideo&amp;searchUrl=http://video.yahoo.com/search/video?p=&amp;profileUrl=http://video.yahoo.com/video/profile?yid=&amp;creatorValue=eW1lc3NlbmdlcmJsb2c%3D&amp;vid=1383762" height="350" width="425" src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf"></embed></p>
<p>Since this is still a beta version, expect some bugs. But these should be minimal.</p>
<p>Well, if you don&#8217;t like downloading and installing YM in your desktop, you can use the web version, which can be found here: <a href="http://webmessenger.yahoo.com/">http://webmessenger.yahoo.com/</a> This version is lighter on features compared to the full version but it can be used anywhere with an Internet connection. Just visit the site, login using your YM account and start sending your messages. This is handy when YM is not installed in a terminal you are using.</p>
<p><img border="0" width="400" src="http://myguide.bagarinao.com/wp-content/uploads/2008/03/webmessenger.jpg" alt="webmessenger" height="261" style="margin: 5px 0px; border-width: 0px" /></p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2007/11/04/yahoo-messenger-9-beta-and-yahoo-messenger-for-the-web/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Blogging from Google docs</title>
		<link>http://myguide.bagarinao.com/2007/10/06/blogging-from-google-docs/</link>
		<comments>http://myguide.bagarinao.com/2007/10/06/blogging-from-google-docs/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 08:38:01 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
		
		<category><![CDATA[Applications]]></category>

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

		<category><![CDATA[google docs]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/?p=23</guid>
		<description><![CDATA[Google Docs (GD) is an online word processor, presentation, and spreadsheet application offered for free by Google. According to its documentation, it is possible to post created documents to a blog, which can be configured by the writer. Curious, I setup GD to point to my serendipity-based blog myGUIDE. After entering the required information, GD [...]]]></description>
			<content:encoded><![CDATA[<p><a id="pc4j" title="Google Docs" href="http://www.google.com/docs">Google Docs</a> (GD) is an online word processor, presentation, and spreadsheet application offered for free by <a id="ys86" title="Google" href="http://www.google.com/">Google</a>. According to its documentation, it is possible to post created documents to a blog, which can be configured by the writer. Curious, I setup GD to point to my serendipity-based blog <a id="d:3k" title="myguide" href="http://myguide.bagarinao.com/">myGUIDE</a>. After entering the required information, GD appeared to communicate successfully with my blog&#8217;s XMLRPC server. So I am testing it now if this document will get posted. (NOTE: This is an experimental post.) </p>
</p>
<p>But before doing that, let me explore a bit some of GDs features. Inserting a table is very easy. Just click the insert link and then table. Below is an example table, center aligned, with two columns and two rows. You can right-click on the table to cut, copy, or paste selected items or change table properties. You can move rows up or down, insert rows or columns, or delete the entire table. You can also specify the alignment of the table, or its float property. </p>
</p>
<div align="center">
<table id="mvd1" cellspacing="0" cellpadding="3" width="50%" bgcolor="#ffffff" border="0">
<tbody>
<tr>
<td width="50%">This is row 1, column 1 </td>
<td width="50%">This is row 1, column 2 </td>
</tr>
<tr>
<td width="50%">This is row 2, column 2 </td>
<td width="50%">This is row 2, column 2 </td>
</tr>
</tbody>
</table></div>
</p>
<p><img id="fqwn" style="float: left; margin: 1em 1em 0px 0px; width: 300px; height: 225px" src="http://docs.google.com/File?id=dcqs8w8r_3c465r6ct" /> </p>
</p>
<p>It is also possible to insert an image from my computer. The image on the left is an example. I can change the size of the image, its alignment, among other properties. It is also possible to drag the image wherever you like to place it in the document. </p>
</p>
<p>I can also insert page formatting like superscript<sup>1</sup> or subscript<sub>2</sub>. I miss this feature in Windows Live Writer, the blogging software I am currently using. I don&#8217;t know if I can compose equations using GD (I wish). But it is possible to insert special characters. Here are example Wingdings characters: <font face="WingDings">Q<font face="WingDings">1<font face="WingDings">&#186;<font face="WingDings">V</font></font></font></font> </p>
</p>
<p>While editing, you can also move from WYSIWYG editor to raw HTML editor. It is interesting, for the Wingdings characters above, the HTML source uses the &lt;font&gt; tag with the &#8216;face&#8217; attribute set to &#8216;WingDings&#8217;. I dont know if this will be displayed properly in browsers which do not support the font type. </p>
</p>
<p>Okay, here it is!</p>
<p>&#160;</p>
<p><b>UPDATE:</b> The document did get posted, but without the title. So I have to add the title from here. Hmmm&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2007/10/06/blogging-from-google-docs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Search Philippines! A Google custom search engine</title>
		<link>http://myguide.bagarinao.com/2007/09/20/search-philippines-a-google-custom-search-engine/</link>
		<comments>http://myguide.bagarinao.com/2007/09/20/search-philippines-a-google-custom-search-engine/#comments</comments>
		<pubDate>Fri, 21 Sep 2007 08:37:03 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
		
		<category><![CDATA[Applications]]></category>

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

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

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

		<category><![CDATA[google custom search engine]]></category>

		<category><![CDATA[search philippines]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/?p=22</guid>
		<description><![CDATA[Interested in creating your own search engine? Try google custom search engine (CSE)! With google&#8217;s CSE, you can customized your search experience, including in the search only sites that are relevant to you. You can also host both the search box and search results in your site. You can even create custom search engine on [...]]]></description>
			<content:encoded><![CDATA[<p>Interested in creating your own search engine? Try <a href="http://www.google.com/coop/cse/" title="google custom search engine">google custom search engine</a> (CSE)! With google&#8217;s CSE, you can customized your search experience, including in the search only sites that are relevant to you. You can also host both the search box and search results in your site. You can even create custom search engine on the fly. (For example, creating a search engine for sites included in your blogroll.) For those interested, you can visit this webpage on <a href="http://googlecustomsearch.blogspot.com/2007/06/custom-search-engine-apis.html">CSE&#8217;s API</a>.</p>
<p>It&#8217;s really easy to configure but you need to have a google account. If you already have one, follow the link above, login, and start building your own search engine. I already made one and called it <strong>Search Philippines!</strong> SP! can be found in this URL: <a href="http://search.philippinestoday.net/">http://search.philippinestoday.net/</a> This search engine only includes Philippine-related websites (well, that&#8217;s the target). For now, I have only a couple of websites included. I plan to include more Philippine news sites, pinoy blogs, etc.  Here is the image of the site.</p>
<p><a href="http://search.philippinestoday.net/"><img border="0" width="500" src="http://myguide.bagarinao.com/wp-content/uploads/2008/03/searchphilippines.jpg" alt="searchphilippines" height="423" style="margin: 5px 0px; border-width: 0px" /></a></p>
<p>What is this for users? Since the number of sites to search are limited and focused (say, only for Philippine news sites), users will be able to get more relevant search results as compared to using the entire google search engine. For website owners, this will give more visibility to your website. For instance, search the term &#8216;phpwebsite&#8217; in google. This blog (myguide.bagarinao.com) appears in the 5th page. Search it again in my custom search engine <a href="http://search.philippinestoday.net/" title="Search Philippines">Search Philippines</a>! This blog is now on the first page.  This is because I included my blog in the list of websites for <a href="http://search.philippinestoday.net/" title="Search Philippines">Search Philippines</a>.</p>
<p>Any way, if you are interested in helping build <strong>Search Philippines!</strong> or want to include an SP! search box in your website or blog, drop me a note! It will be great to have our very own custom search engine.</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2007/09/20/search-philippines-a-google-custom-search-engine/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows live writer&#8217;s &#34;Invalid response document&#34; error</title>
		<link>http://myguide.bagarinao.com/2007/08/19/windows-live-writers-invalid-response-document-error/</link>
		<comments>http://myguide.bagarinao.com/2007/08/19/windows-live-writers-invalid-response-document-error/#comments</comments>
		<pubDate>Mon, 20 Aug 2007 08:35:31 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
		
		<category><![CDATA[Applications]]></category>

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

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

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

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

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

		<category><![CDATA[windows live writer]]></category>

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

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

		<guid isPermaLink="false">http://myguide.bagarinao.com/?p=20</guid>
		<description><![CDATA[In my previous post, I outlined my unsuccessful attempt to use windows live writer (WLW) to connect to the XmlRpc server of PhpWebsite&#8217;s article manager module. I experimented using both the Metaweblog API and the Movable Type API but with no success. When attempting to post an entry, WLW always returned the following error message [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous <a href="http://myguide.bagarinao.com/2007/08/03/using-windows-live-writer-in-phpwebsite/">post</a>, I outlined my unsuccessful attempt to use <a href="http://get.live.com/en-us/betas/writer_betas" title="Windows Live Writer">windows live writer</a> (WLW) to connect to the XmlRpc server of <a href="http://phpwebsite.appstate.edu/" title="PhpWebsite">PhpWebsite</a>&#8217;s article manager module. I experimented using both the Metaweblog API and the Movable Type API but with no success. When attempting to post an entry, WLW always returned the following error message &#8220;<em>The response to the metaWeblog.newPost method received from the weblog server was invalid: Invalid response document returned from XmlRpc server</em>.&#8221; However, the entry did get posted. Republishing the same entry would create a new post instead of replacing the one posted earlier. And each time, WLW gave the same error. </p>
<p>I searched the Internet for possible solutions. I found out that the problem is quite common and not unique to PhpWebsite (PWS).  The same problem has also been observed in other blogging platforms such as <a href="http://www.wordpress.com" title="wordpress">wordpress</a>. Luckily for wordpress users, there are already solutions posted in several blogs for some of the problems with WLW. Unfortunately for me, the solutions were not applicable for PWS. I could not even find other sites or blogs talking about PWS and WLW except this one. It seems I am the only soul trying to do this in the entire world wide web.</p>
<p>Since most of the websites I&#8217;m maintaining are powered by PWS, I thought it is worth the time and effort to figure out the cause of the problem. I am also in need of a good editing application that I can use with PWS. The provided text editor is only good for basic editing and not for more advanced formatting. For instance, using tables in entries can really take a lot of time. Anyway, since I am using WLW in my other blogs, I thought it would be great if I could also use it in my PWS-based websites.</p>
<p><span id="more-20"></span></p>
<p>And so I started investigating (debugging). First, I checked the data returned by the XmlRpc server. I inserted a code in the server&#8217;s source file to write its output to a file. By comparing the written output with the specification available on the Internet, I confirmed that the error did not originate from the XmlRpc server since the output was according to specification. So I wondered what WLW was complaining about. Well, unless something happened to the returned data before reaching WLW. I started looking for ways to know the actual data received by WLW. Fortunately, I discovered this tool called <a href="http://www.fiddlertool.com/fiddler/" title="fiddler">fiddler</a>, an HTTP debugging tool that logs all HTTP traffic between your computer and the Internet. Fiddler is a freeware and can be used to debug HTTP traffic.</p>
<p>Using fiddler to monitor the traffic between WLW and the HTTP server where the PWS XmlRpc server is running, I posted an entry to PWS. As expected, WLW gave the same error. And this is what I got from fiddler&#8217;s log:</p>
<blockquote><p>&lt;br /&gt;<br />
&lt;b&gt;Warning&lt;/b&gt;:  Cannot modify header information - headers already sent by (output started at D:\phpwebsite\mod\article\inc\validate_login.php:62) in &lt;b&gt;D:\phpwebsite\mod\article\lib\XML-RPC\IXR_Library.inc.php&lt;/b&gt; on line &lt;b&gt;366&lt;/b&gt;&lt;br /&gt;<br />
&lt;br /&gt;<br />
&lt;b&gt;Warning&lt;/b&gt;:  Cannot modify header information - headers already sent by (output started at D:\phpwebsite\mod\article\inc\validate_login.php:62) in &lt;b&gt;D:\phpwebsite\mod\article\lib\XML-RPC\IXR_Library.inc.php&lt;/b&gt; on line &lt;b&gt;367&lt;/b&gt;&lt;br /&gt;<br />
&lt;br /&gt;<br />
&lt;b&gt;Warning&lt;/b&gt;:  Cannot modify header information - headers already sent by (output started at D:\phpwebsite\mod\article\inc\validate_login.php:62) in &lt;b&gt;D:\phpwebsite\mod\article\lib\XML-RPC\IXR_Library.inc.php&lt;/b&gt; on line &lt;b&gt;368&lt;/b&gt;&lt;br /&gt;<br />
&lt;br /&gt;<br />
&lt;b&gt;Warning&lt;/b&gt;:  Cannot modify header information - headers already sent by (output started at D:\phpwebsite\mod\article\inc\validate_login.php:62) in &lt;b&gt;D:\phpwebsite\mod\article\lib\XML-RPC\IXR_Library.inc.php&lt;/b&gt; on line &lt;b&gt;369&lt;/b&gt;&lt;br /&gt;<br />
&lt;?xml version=&#8221;1.0&#8243;?&gt;<br />
&lt;methodResponse&gt;<br />
  &lt;params&gt;<br />
    &lt;param&gt;<br />
      &lt;value&gt;<br />
        &lt;int&gt;4&lt;/int&gt;<br />
      &lt;/value&gt;<br />
    &lt;/param&gt;<br />
  &lt;/params&gt;<br />
&lt;/methodResponse&gt;</p></blockquote>
<p>The HTTP server returned a series of <a href="http://www.php.net/" title="PHP">PHP</a> warnings together with the xml document expected by WLW! Since WLW did not recognize the warnings and could not just extract the xml part of the returned document, it threw an invalid response document error! So there it is, the source of all my troubles!</p>
<p>Using the above log, it is also possible to know the cause of the problem. As it turned out, the validate_login.php file contained several line breaks after the closing php tag &#8220;?&gt;&#8221; causing the HTTP server to start sending the returned document when the file was included. A call to the <em><a href="http://www.php.net/manual/en/function.header.php" title="PHP header function">header</a></em> function by the XmlRpc server generated the warnings, which together with the xml output were sent back by the HTTP server to WLW.</p>
<p>After fixing the validate_login.php file, I still encountered several &#8220;invalid response document&#8221; errors mostly due to PHP warnings. For instance, some loops using <em><a href="http://www.php.net/manual/en/control-structures.foreach.php" title="PHP foreach construct">foreach</a></em> returned warnings when the provided argument was not valid. Fortunately, it was a lot easier locating the source of the problem using fiddler&#8217;s log. After fixing the code, I can now successfully post entries to my PWS-based website using WLW. There are still many things that can be improved, but the important thing is the setup is already working. </p>
<p>So the next time you encounter this problem and you are sure that your XmlRpc server is working fine, check those included files for extra line breaks before the PHP opening tag &#8220;&lt;?&#8221; or after the closing tag &#8220;?&gt;&#8221;. Those &#8220;invalid document response&#8221; errors could just be due to those extra line breaks. Also verify whether PHP warnings are suppressed or not. Somewhere in your code some functions maybe returning warnings when the supplied parameters are not properly validated. Or if you cannot pinpoint the problem, try using fiddler to log the traffic between WLW and your XmlRpc server. Then check the data being sent back and forth for clues. Finally, for WLW developers, it would also be nice if WLW has a capability to display the raw data it receives from the XmlRpc server if the user wishes to view it. In this way, it will be a lot easier to debug problems encountered when configuring WLW.</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2007/08/19/windows-live-writers-invalid-response-document-error/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Windows Live Writer in PhpWebsite</title>
		<link>http://myguide.bagarinao.com/2007/08/03/using-windows-live-writer-in-phpwebsite/</link>
		<comments>http://myguide.bagarinao.com/2007/08/03/using-windows-live-writer-in-phpwebsite/#comments</comments>
		<pubDate>Sat, 04 Aug 2007 08:34:05 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
		
		<category><![CDATA[Applications]]></category>

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

		<category><![CDATA[windows live writer]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/?p=19</guid>
		<description><![CDATA[Anyone using Windows Live Writer (WLW) in PhpWebsite (PWS)? I searched the web but got no relevant result. I asked the question in phpwsforums, and am still waiting for replies.&#160; So I tried it myself. 
PWS has a third party module called article manager, which has an XML-RPC capability. This should enable PWS users to [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone using Windows Live Writer (WLW) in <a href="http://phpwebsite.appstate.edu/">PhpWebsite</a> (PWS)? I searched the web but got no relevant result. I asked the question in <a title="phpWebsite support forums" href="http://www.phpwsforums.com/">phpwsforums</a>, and am still waiting for replies.&#160; So I tried it myself. </p>
<p>PWS has a third party module called article manager, which has an <a href="http://en.wikipedia.org/wiki/XML-RPC">XML-RPC</a> capability. This should enable PWS users to post entries to a PWS-based website with the article manager module installed using offline blogging tools such as WLW. But I wonder why nobody has tried doing this yet. So using a local test installation of PWS, I configured my WLW to connect to the article manager&#8217;s XML-RPC server. This can be done by simply pointing WLW to http://localhost/index.php?module=article&amp;xmlrcp=1 (NOTE: replace &quot;localhost&quot; with the actual domain name of your PWS installation.) First, I used the metaweblog API. </p>
<p><span id="more-19"></span></p>
<p>The results? During the configuration, I already encountered a couple of problems. First, WLW was not able to download the website&#8217;s style template. But this is minor. This will only disable WLW&#8217;s web preview feature. You will not be able to see how your entry will look like when it is published in your site. Second, WLW was unable to delete the temporary entry it posted in the site during the configuration. WLW usually does this to know the template used in the target website. Third, WLW also failed to retrieve the set of categories. </p>
<p>Posting a new entry resulted in an invalid server response. The following is the error message &quot;The response to the metaWeblog.newPost method received from the weblog server was invalid: Invalid response document returned from XmlRpc server.&quot; However, the entry did get posted. The entire entry went to the summary of the article, and the body was empty. Re-publishing the same entry gave the same invalid server response error. But this time, instead of replacing the previously posted entry, a new one was created. </p>
<p>Next, I tried a different configuration. This time, I used the Movable Type API. WLW was still unable to download the website template and still unable to delete the temporary entry posted during the configuration. But it did retrieve the list of categories from the website. Hmm, some progress! </p>
<p>With MT, the excerpt section and the split post feature were enabled. But posting a new entry still gave the same error described above. The entry still got published with the excerpt part stored in the summary and the entire content in the body of the article. Reposting an edited entry, however, generated a new article instead of overwriting the original one. Basically, I obtained the same behavior as when using the metaweblog API.&#160; </p>
<p>Well, I guess XML-RPC is still not for phpWebsite.</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2007/08/03/using-windows-live-writer-in-phpwebsite/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Organizing Emails II: Yahoo! Mail Filters</title>
		<link>http://myguide.bagarinao.com/2007/07/03/organizing-emails-ii-yahoo-mail-filters/</link>
		<comments>http://myguide.bagarinao.com/2007/07/03/organizing-emails-ii-yahoo-mail-filters/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 08:32:28 +0000</pubDate>
		<dc:creator>baggy</dc:creator>
		
		<category><![CDATA[Howto]]></category>

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

		<category><![CDATA[mail filter]]></category>

		<category><![CDATA[yahoo! mail]]></category>

		<guid isPermaLink="false">http://myguide.bagarinao.com/?p=18</guid>
		<description><![CDATA[In case you haven&#8217;t noticed yet, Yahoo! now offers unlimited storage for Yahoo! Mail. This means that you don&#8217;t have to delete old emails to keep your Inbox under the storage limit. You can now keep your emails for as long as you like and enjoy limitless storage for attachments and photos. Well, that is, [...]]]></description>
			<content:encoded><![CDATA[<p>In case you haven&#8217;t noticed yet, Yahoo! now offers unlimited storage for <a href="http://mail.yahoo.com/">Yahoo! Mail</a>. This means that you don&#8217;t have to delete old emails to keep your Inbox under the storage limit. You can now keep your emails for as long as you like and enjoy limitless storage for attachments and photos. Well, that is, if you comply with their <a href="http://help.yahoo.com/l/us/yahoo/mail/yahoomail/tools/tools-08.html">anti-abuse limits</a>.</p>
<p>With an unlimited storage, the number of emails in your Inbox can increase considerably with time. Sorting these emails manually into different folders can take a lot of your time. In this post, I will outline how to use Yahoo! Mail filters to automatically perform this task for you. Like in the previous <a href="http://myguide.bagarinao.com/index.php?/archives/12-Organizing-emails-in-outlook-express.html">post</a>, we will create an example filter such that emails from family members will be automatically stored in a &#8220;family&#8221; folder.</p>
<p><span id="more-18"></span></p>
<table border="0" width="610" cellPadding="0" cellSpacing="0">
<tr>
<td width="608" align="center" vAlign="top"><img width="600" src="http://myguide.bagarinao.com/wp-content/uploads/2008/03/yahoomail.gif" alt="Yahoo! Mail" height="432" style="margin: 5px 0px" /></td>
</tr>
<tr>
<td width="608" align="center" vAlign="top">Figure 1. Yahoo! Mail</td>
</tr>
</table>
<p>To start with, login to your Yahoo! Mail account. Open your web browser and point it to this URL: <a href="http://mail.yahoo.com/">http://mail.yahoo.com/</a>. Sign in to Yahoo! using your Yahoo! ID and password (see Fig. 1). If you don&#8217;t have a Yahoo! account yet, you can also sign up for an account from this page. After signing in, the <strong>Welcome</strong> page shown below will be displayed.</p>
<table border="0" width="600" cellPadding="0" cellSpacing="0">
<tr>
<td width="600" align="center" vAlign="top"><img width="600" src="http://myguide.bagarinao.com/wp-content/uploads/2008/03/optionsyahoomail.gif" alt="Welcome Page" height="432" style="margin: 5px 0px" /></td>
</tr>
<tr>
<td width="600" align="center" vAlign="top">Figure 2. Welcome Page</td>
</tr>
</table>
<p>First, create the &#8220;Family&#8221; folder. To do this, click the <strong>Edit</strong> link in the <strong>Folders</strong> box located on the left-hand side of the <strong>Welcome</strong> page. This will display the <strong>Folders</strong> page shown below. On the left-hand-side, you can find an <strong>Add Folder</strong> box. Enter &#8220;Family&#8221; in the text box and click the <strong>Add Folder</strong> button to create the &#8220;Family&#8221; folder.</p>
<p><img width="400" src="http://myguide.bagarinao.com/wp-content/uploads/2008/03/addfolderyahoomail.gif" alt="Add Folder" height="203" style="margin: 5px 0px" /></p>
<p>Now that we have the destination folder for our filter, let us create the filter itself. To add a new filter, look for the <strong>Options</strong> link located in the upper right corner of the <strong>Welcome</strong> page (see Fig. 2), just above the <strong>Search the Web</strong> button. Click this link to go to the <strong>Mail Options</strong> page shown below.</p>
<p><img width="600" src="http://myguide.bagarinao.com/wp-content/uploads/2008/03/filtersyahoomail.gif" alt="Mail Options" height="432" style="margin: 5px 0px" /></p>
<p>Under the <strong>Management</strong> column, click the <strong>Filters</strong> link to open the <strong>Filters</strong> page (see image below). You can find three buttons here: the <strong>Add</strong> button that can be used to create a new filter, the <strong>Edit</strong> button to edit existing ones, and the <strong>Delete</strong> button to delete unused filters. Click the <strong>Add</strong> button to retrieve the <strong>Add Message Filter</strong> page.</p>
<p><img width="400" src="http://myguide.bagarinao.com/wp-content/uploads/2008/03/filterpageyahoomail.gif" alt="Filter" height="211" style="margin: 5px 0px" /></p>
<p>In the <strong>Add Message Filter</strong> page, enter a name for this filter in the <strong>Filter Name</strong> text entry. For example, enter &#8220;Family&#8221; as the filter name. In the next row, assign the set of conditions for this filter by specifying:</p>
<ol>
<li>What part of the email the filter will scan (From header, To/Cc header, Subject, Body)</li>
<li>What text to look for or the target text (this can be entered in the provided text entry), and</li>
<li>How to match the target text (contains, does not contain, begins with, or ends with). You can also specify whether to match the case of the target text by ticking the <strong>match case</strong> check box.</li>
</ol>
<p><img width="500" src="http://myguide.bagarinao.com/wp-content/uploads/2008/03/addmsgfilteryahoomail.gif" alt="Add Message Filter" height="386" style="margin: 5px 0px" /></p>
<p>In this example, we will require the <strong>From header</strong> to contain the email address of a family member, say, <a href="mailto:mother@family.org">mother@family.org</a>. We then specify the destination folder to be the &#8220;Family&#8221; folder we&#8217;ve created earlier. This can be selected from the drop-down list after the <strong>Move the message to:</strong> label.</p>
<p>Finally, click the <strong>Add Filter</strong> button to create the new filter. This will bring you back to the <strong>Filters</strong> page now displaying the newly created filter as shown below.</p>
<p><img width="500" src="http://myguide.bagarinao.com/wp-content/uploads/2008/03/familyfilterfilterpage.gif" alt="familyfilterfilterpage" height="272" style="margin: 5px 0px" /></p>
<p>Repeat the above steps for additional filters. Don&#8217;t forget to test the filters you&#8217;ve just created by sending a test email to your account. And by the way, Yahoo! offers a maximum of 15 filters for free accounts. That said, be sure to use those filters wisely and efficiently for the emails you consider important.</p>
<p>That&#8217;s it! Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://myguide.bagarinao.com/2007/07/03/organizing-emails-ii-yahoo-mail-filters/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
