<?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>The Barking Dog</title>
	<atom:link href="http://www.thedroolingdog.com/blog/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thedroolingdog.com/blog</link>
	<description>News and articles by The Drooling Dog</description>
	<pubDate>Sun, 22 Mar 2009 22:25:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>FileMaker AutoUpdate Mac - Check for StuffIt</title>
		<link>http://www.thedroolingdog.com/blog/index.php/2009/01/03/filemaker-autoupdate-mac-check-for-stuffit/</link>
		<comments>http://www.thedroolingdog.com/blog/index.php/2009/01/03/filemaker-autoupdate-mac-check-for-stuffit/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 02:06:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[AutoUpdate]]></category>

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

		<category><![CDATA[FileMaker Server]]></category>

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

		<category><![CDATA[Stuffit]]></category>

		<guid isPermaLink="false">http://www.thedroolingdog.com/blog/?p=51</guid>
		<description><![CDATA[At some point in time we&#8217;ve either faced it or are just discovering it, FileMaker AutoUpdate. You want to use plug-ins but you don&#8217;t want to manually install them onto all of your machines. So, you learn and build a little script. Load your plug-ins to the server and test it on your workstation. Everything [...]]]></description>
			<content:encoded><![CDATA[<p>At some point in time we&#8217;ve either faced it or are just discovering it, FileMaker AutoUpdate. You want to use plug-ins but you don&#8217;t want to manually install them onto all of your machines. So, you learn and build a little script. Load your plug-ins to the server and test it on your workstation. Everything is fine! Maybe&#8230; The newer versions of Mac OS X no longer ship with StuffIt preinstalled.</p>
<p>No biggy, right? Wrong. FileMaker AutoUpdate for Mac requires StuffIt Expander to extract the plug-in file. Because of that, I wrote this little AppleScript you can call from your FileMaker AutoUpdate script, to check if StuffIt is installed.</p>
<blockquote><p>property stuffit_url : &#8220;http://www.stuffit.com/detect_expander.html&#8221;<br />
set mySearch to &#8220;StuffIt&#8221;</p>
<p>set defaultDelim to text item delimiters<br />
set text item delimiters to return<br />
tell application &#8220;Finder&#8221;<br />
&nbsp;&nbsp;set myFolders to get name of folders of folder &#8220;Applications&#8221; of the startup disk as list<br />
&nbsp;&nbsp;set myFolders to myFolders as string<br />
end tell<br />
set text item delimiters to defaultDelim</p>
<p>if myFolders contains mySearch then<br />
else<br />
&nbsp;&nbsp;set userResponse to display dialog &#8220;Stuffit Expander was not found and is required for proper  operation of this application! Please click on Get Stuffit and you will be directed to their website for download.&#8221; buttons {&#8221;Continue&#8221;, &#8220;Get StuffIt&#8221;} default button {&#8221;Get Stuffit&#8221;}<br />
&nbsp;&nbsp;if button returned of userResponse is &#8220;Get StuffIt&#8221; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;tell application &#8220;Finder&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;open location stuffit_url<br />
&nbsp;&nbsp;&nbsp;&nbsp;end tell<br />
&nbsp;&nbsp;end if<br />
end if</p></blockquote>
<p>The following AppleScript will search through the users Applications folder to see if StuffIt exists. If it&#8217;s not found it throws up a dialog alerting the user to download it. I hope this helps in your deployment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedroolingdog.com/blog/index.php/2009/01/03/filemaker-autoupdate-mac-check-for-stuffit/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Getting Google Directions In Your Application</title>
		<link>http://www.thedroolingdog.com/blog/index.php/2008/11/01/getting-google-directions-in-your-application/</link>
		<comments>http://www.thedroolingdog.com/blog/index.php/2008/11/01/getting-google-directions-in-your-application/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 17:59:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FileMaker]]></category>

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

		<category><![CDATA[Lasso Professional]]></category>

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

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

		<category><![CDATA[scrape]]></category>

		<guid isPermaLink="false">http://www.thedroolingdog.com/blog/?p=45</guid>
		<description><![CDATA[I know this has been an issue for a lot of developers out there, both in the FileMaker realm and the Web application realm.
The solution I came up with still uses Google Maps, it&#8217;s easier to work with, and it seems to be more reliable than scrapping the Google Maps page itself.
First, lets look at [...]]]></description>
			<content:encoded><![CDATA[<p>I know this has been an issue for a lot of developers out there, both in the FileMaker realm and the Web application realm.</p>
<p>The solution I came up with still uses Google Maps, it&#8217;s easier to work with, and it seems to be more reliable than scrapping the Google Maps page itself.</p>
<p>First, lets look at the URL we are working with (I am using two test addresses you MAY be familiar with):</p>
<blockquote><p>http://maps.google.com?saddr=1+Infinite+Loop+95014&amp;daddr=one+microsoft+way+98052&amp;output=kml</p></blockquote>
<p>Here is a simple Google Maps URL with one exception. It&#8217;s the exception that makes this work. Output=kml. KML is the XML like structure that Google Earth uses to pull in directions. If you go to that URL it will prompt you to download the KML file. This is less them optimal, although still can be used. The reason for that is the browser doesn&#8217;t know how to handle it.</p>
<p>If we take another approach and use Lasso or PHP or any flavor of middle-ware you would like, we can do some pretty easy parsing with this.</p>
<p>I will use Lasso for this example:</p>
<blockquote><p>&lt;?LassoScript</p>
<p>//Grab Action Params from URL<br />
Var: &#8217;saddr&#8217; = (Action_Param:&#8217;saddr&#8217;);<br />
$saddr-&gt;(Replace: &#8216; &#8216;, &#8216;+&#8217;);<br />
Var: &#8216;daddr&#8217; = (Action_Param:&#8217;daddr&#8217;);<br />
$daddr-&gt;(Replace: &#8216; &#8216;, &#8216;+&#8217;);</p>
<p>//Load Settings for Communication<br />
Var: &#8216;url&#8217; = &#8216;http://maps.google.com/?&#8217;;</p>
<p>//Transmit to Google<br />
Var: &#8216;return&#8217; = (Include_url: $url + &#8216;&amp;saddr=&#8217; + $saddr + &#8216;&amp;daddr=&#8217; + $daddr + &#8216;&amp;output=kml&#8217;);<br />
Var: &#8216;xml&#8217; = (xml: $return);</p>
<p>//Extract XML Nodes<br />
Var: &#8216;directions&#8217; = ( XML_extract: -XML=$xml, -XPath=&#8217;//*[local-name() = \'name\']/text()&#8217; );</p>
<p>Var: &#8216;distance&#8217; = ( XML_extract: -XML=$xml, -XPath=&#8217;//*[local-name() = \'description\']/text()&#8217; );</p>
<p>//Remove the last node<br />
$directions-&gt;RemoveLast;</p>
<p>//Load first node to variable and remove<br />
Var: &#8217;start&#8217; = $directions-&gt;(Get: 1);<br />
$directions-&gt;RemoveFirst;</p>
<p>?&gt;</p></blockquote>
<p>Let&#8217;s talk about the LassoScript I entered above. The first few chunks are pretty self explanatory. We make sure our GET parameters have no spaces. If they do, they are replaced with a +. Then we load our default URL into a variable.</p>
<p>Now the fun begins! The transmit to Google section has two very important parts. The first, is making sure that our URL ends with, &#8220;output=kml&#8221;, AND our result is set as XML. Because Google specifies its output as KML, it&#8217;s different enough to not be automatically cast as XML.</p>
<p>Now that we&#8217;ve returned our result we can start extracting nodes from the structure. Because we cast it to XML, we can use standard X-Path parsing to pull out the nodes we need. In this case, directions and distance!</p>
<p>We build our variables directions and distance with the corresponding XML nodes. That way we can iterate through them later on for output.</p>
<p>The last two chunks are clean up. If you don&#8217;t get rid of the first and last lines of the directions, the output doesn&#8217;t line up when you reassemble for display.</p>
<p>So now, let&#8217;s see the HTML associated with this page:</p>
<blockquote><p>&lt;body&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;[Output: $start]&lt;/li&gt;<br />
[Iterate: $directions, (Var: 'temp0')]<br />
&lt;li&gt;[Output: $temp0]  [Output: Decode_HTML: (String_Replace:(String_Replace:(String_Replace:($distance-&gt;(Get: (Loop_Count))), -Find='&lt;![CDATA[',-Replace=''), -Find=']]&gt;&#8217;, -Replace=&#8221;), -Find=&#8217;&lt;br/&gt;&#8217;, -Replace=&#8217; &#8216;)]&lt;/li&gt;<br />
[/Iterate]<br />
&lt;/ul&gt;<br />
&lt;/body&gt;</p></blockquote>
<p>The HTML above displays the results as an unordered list. This can be very easy to parse or just display. Our first list item is the variable &#8220;start&#8221;. Remember in our LassoScript we cast the first node into that variable before we removed it. What I am doing is showing it outside of the Iterator. This is the header that will show the From and To addresses before the directions are displayed.</p>
<p>Next we start to iterate through the variables &#8220;directions&#8221; and &#8220;distance&#8221;. Because the distance nodes are HTML encoded, I use the Decode_HTML tag to make sure it&#8217;s displayed right. I also do some string replaces to clean up the way the distance information is displayed.</p>
<p>Here is my example in action. Please feel free to use it with your solution.</p>
<p><a title="The Drooling Dog, LLC. - Google Directions" href="http://www.thedroolingdog.com/api/google/directions.lasso?saddr=1+Infinite+Loop+95014&amp;daddr=one+microsoft+way+98052" target="_blank">http://www.thedroolingdog.com/api/google/directions.lasso?saddr=1+Infinite+Loop+95014&amp;daddr=one+microsoft+way+98052</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedroolingdog.com/blog/index.php/2008/11/01/getting-google-directions-in-your-application/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Custom IWP Login Pages</title>
		<link>http://www.thedroolingdog.com/blog/index.php/2008/10/10/custom-iwp-login-pages/</link>
		<comments>http://www.thedroolingdog.com/blog/index.php/2008/10/10/custom-iwp-login-pages/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 22:15:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FileMaker Server]]></category>

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

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

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

		<category><![CDATA[instant web publishing]]></category>

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

		<category><![CDATA[login]]></category>

		<guid isPermaLink="false">http://www.thedroolingdog.com/blog/?p=32</guid>
		<description><![CDATA[Have you ever wanted to make your own login pages for FileMaker Server&#8217;s Instant Web Publishing? Or maybe give your users a single click login from a URL?
Here is the code that will get you there:
1.) The first is a custom login form page. There are several hidden form elements that are required when submitting [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to make your own login pages for FileMaker Server&#8217;s Instant Web Publishing? Or maybe give your users a single click login from a URL?</p>
<p>Here is the code that will get you there:<br />
1.) The first is a custom login form page. There are several hidden form elements that are required when submitting to the FileMaker Server authentication CGI. The example code below will show you.</p>
<blockquote><p><code>&lt;form action="http://fmserver.example.com/fmi/iwp/cgi" method="get"&gt;<br />
&lt;input type="hidden" name="dbpath" value="/fmi/iwp/cgi?-db=exampledb&amp;-startsession"&gt;<br />
&lt;input type="hidden" name="acct" value="account"&gt;<br />
&lt;input type="hidden" name="-authdb"&gt;<br />
&lt;label&gt;Account&lt;/label&gt;</code><code>&lt;br /&gt;<br />
&lt;input type="text" name="name"&gt;&lt;br /&gt;<br />
&lt;label&gt;Password&lt;/label&gt;&lt;br /&gt;<br />
&lt;input type="password" name="password"&gt;&lt;br /&gt;<br />
&lt;input type="submit" name="login" value="Login"&gt;<br />
&lt;/form&gt;</code></p></blockquote>
<p>That basic form will allow you to host your own login page for your FileMaker IWP solution. Here is a working example: <a title="IWP Custom Login Page" href="http://www.thedroolingdog.com/examples/custom-login/" target="_blank">Login Form</a></p>
<p>2.) You can also initiate an auto login from a link! Just follow the example code below:</p>
<blockquote><p><code>&lt;a href="http://fmserver.example.com/fmi/iwp/cgi?dbpath=%2Ffmi%2Fiwp%2Fcgi%3F-db%3Dexampledb%26-startsession&amp;amp;acct=account&amp;amp;name=userName&amp;amp;password=Password&amp;amp;login=Login&amp;amp;-authdb"&gt;Your Login Link&lt;/a&gt;</code></p></blockquote>
<p>Notice the use of URL friendly characters in certain places. This encoding is key to the success of the link.</p>
<p>That is the basic URL syntax to access your FileMaker IWP solution via a direct link! Here is a working example: <a title="IWP Custom Login - Link" href="http://bos01.thedroolingdog.com/fmi/iwp/cgi?dbpath=%2Ffmi%2Fiwp%2Fcgi%3F-db%3DEvent%20Management%26-startsession&amp;acct=account&amp;name=webuser&amp;password=webuser&amp;login=Login&amp;-authdb" target="_blank">Click me to login!</a></p>
<p>These examples were created and tested using FileMaker Server 9 Advanced! Although I haven&#8217;t tested these methodes with previous versions, they still may work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedroolingdog.com/blog/index.php/2008/10/10/custom-iwp-login-pages/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
