<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.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>Metaclarity Blog - Filemaker, Web, Applescript and more...</title>
	<link>http://www.metaclarity.com/blog</link>
	<description>Metaclarity - Filemaker Pro Developers - UK and USA</description>
	<pubDate>Sun, 20 Jul 2008 21:59:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>Using Adobe Lightroom with Apple&#8217;s MobileMe and OSX&#8217;s Media Browser</title>
		<link>http://www.metaclarity.com/blog/2008/07/20/using-adobe-lightroom-with-apples-mobileme-and-osxs-media-browser/</link>
		<comments>http://www.metaclarity.com/blog/2008/07/20/using-adobe-lightroom-with-apples-mobileme-and-osxs-media-browser/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 21:57:14 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
		
		<category><![CDATA[Photo]]></category>

		<category><![CDATA[Adobe Lightroom]]></category>

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

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

		<guid isPermaLink="false">http://www.metaclarity.com/blog/2008/07/20/using-adobe-lightroom-with-apples-mobileme-and-osxs-media-browser/</guid>
		<description><![CDATA[Love Adobe Lightroom but wish it integrated better with Apple&#8217;s MobileMe services and Mac OSX&#8217;s Media Browser for applications like Pages, Mail, iWeb etc.? There is a way! In this short video tutorial we explain how to get your images from Lightroom to iPhoto and beyond quickly and easily without cluttering up your disk&#8230;
&#160;
Click here [...]]]></description>
			<content:encoded><![CDATA[<p>Love Adobe Lightroom but wish it integrated better with Apple&#8217;s MobileMe services and Mac OSX&#8217;s Media Browser for applications like Pages, Mail, iWeb etc.? There is a way! In this short video tutorial we explain how to get your images from Lightroom to iPhoto and beyond quickly and easily without cluttering up your disk&#8230;</p>
<p>&nbsp;<br />
<a href="http://www.metaclarity.com/users/pat/movies/lr_usingMobileMe/lr_mobileme.mov">Click here to see the movie</a><br />
<br />&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaclarity.com/blog/2008/07/20/using-adobe-lightroom-with-apples-mobileme-and-osxs-media-browser/feed/</wfw:commentRss>
<enclosure url="http://www.metaclarity.com/users/pat/movies/lr_usingMobileMe/lr_mobileme.mov" length="18260545" type="video/quicktime" />
		</item>
		<item>
		<title>Filemaker Pro AppleScript - Part 2 (sort of!)</title>
		<link>http://www.metaclarity.com/blog/2008/05/20/filemaker-pro-applescript-part-2-sort-of/</link>
		<comments>http://www.metaclarity.com/blog/2008/05/20/filemaker-pro-applescript-part-2-sort-of/#comments</comments>
		<pubDate>Tue, 20 May 2008 21:14:07 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
		
		<category><![CDATA[Filemaker]]></category>

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

		<category><![CDATA[Filemaker Pro]]></category>

		<guid isPermaLink="false">http://www.metaclarity.com/blog/2008/05/20/filemaker-pro-applescript-part-2-sort-of/</guid>
		<description><![CDATA[We were just about to write the second article in our planned series of articles on using AppleScript with Filemaker Pro. Doing some online research we came across an article on a website called Mactech that is so good it makes our planned Part 2 article pretty redundant, so we thought we&#8217;d point you to [...]]]></description>
			<content:encoded><![CDATA[<p>We were just about to write the second article in our planned series of articles on using AppleScript with Filemaker Pro. Doing some online research we came across an article on a website called Mactech that is so good it makes our planned Part 2 article pretty redundant, so we thought we&#8217;d point you to it instead and get down to thinking about Part 3 instead.</p>
<p>Here&#8217;s the article - really excellent! Thanks Mactech:</p>
<p><a href="http://www.mactech.com/articles/mactech/Vol.22/22.04/ScriptingFileMakerPro/index.html">http://www.mactech.com/articles/mactech/Vol.22/22.04/ScriptingFileMakerPro/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaclarity.com/blog/2008/05/20/filemaker-pro-applescript-part-2-sort-of/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Use FileMaker Pro 9 to connect to a SQL / MySQL data source</title>
		<link>http://www.metaclarity.com/blog/2008/04/11/use-filemaker-pro-9-to-connect-to-a-sql-mysql-data-source/</link>
		<comments>http://www.metaclarity.com/blog/2008/04/11/use-filemaker-pro-9-to-connect-to-a-sql-mysql-data-source/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 18:45:30 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
		
		<category><![CDATA[Filemaker]]></category>

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

		<category><![CDATA[Web Developer]]></category>

		<category><![CDATA[Filemaker Pro]]></category>

		<guid isPermaLink="false">http://www.metaclarity.com/blog/2008/04/11/use-filemaker-pro-9-to-connect-to-a-sql-mysql-data-source/</guid>
		<description><![CDATA[One of the really powerful features of FileMaker Pro 9 is the ability to connect directly to an SQL data source. This means you can create a FileMaker 9 interface for your clients and allow them to add/modify/browse/delete records on a SQL data source. 
Setting up FileMaker Pro 9 to connect to a SQL data [...]]]></description>
			<content:encoded><![CDATA[<p>One of the really powerful features of FileMaker Pro 9 is the ability to connect directly to an SQL data source. This means you can create a FileMaker 9 interface for your clients and allow them to add/modify/browse/delete records on a SQL data source. </p>
<p>Setting up FileMaker Pro 9 to connect to a SQL data source is actually a little more complicated than the FileMaker marketing would have you believe. In this short tutorial, we&#8217;ll talk you through the steps of connecting to a MySQL data source using FileMaker Pro 9 on a Mac and Actual Technology&#8217;s ODBC drivers (yep, you need third party software - surprised?)</p>
<p>There are two steps to setting up your FileMaker to MySQL connection:</p>
<p><strong>1) Set up your ODBC preferences<br />
2) Set up FileMaker Pro 9</strong></p>
<p>&#8212;</p>
<h2>1) Set up your ODBC preferences</h2>
<p>The first thing to do here is to go to <a href="http://www.actualtechnologies.com/">Actual Technologies</a> and get a copy of the ODBC driver you require. (NB. Metaclarity is not affiliated with Actual Technologies in any way - we just like their software). We&#8217;re running MySQL so we bought a copy of the Open Source Databases driver. If you don&#8217;t want to spend money on a driver there are some free drivers available on the internet, but for $29 Actual will make your task a LOT easier.</p>
<ul>
<li>Run the Actual ODBC Driver Pack installer</li>
<li>Go through the legal steps then click customize and choose the driver you want to install: we only installed the &#8220;Actual ODBC Driver for Open Source Databases&#8221; as that was all we required to connect to MySQL</li>
<li>With the installation finished successfully go to the Utilities folder on your drive and open the application called: &#8220;ODBC Administrator&#8221;</li>
<li>Click on User DSN  then click on the &#8220;Add&#8230; button&#8221;</li>
<li>Select Actual&#8217;s Driver in the list that appears.</li>
<li>Press &#8220;Continue&#8221; in the new pop-up window.</li>
<li>Choose an easy to remember name for your connection and description - these are not critical to the connection. For DSN type, choose System.</li>
<li>Choose your database type (here we chose MySQL)</li>
<li>Enter the IP for your MySQL server in the Server field. Port is usually 3306.</li>
<li>Set your username and password for connecting to your online MySQL database in Login ID and Password.</li>
<li>In the next window the name of your database should be available in the Database popup field. Select it now then press continue. Then press &#8220;Done&#8221;</li>
</ul>
<p>Now in the ODBC Administrator application under the System DSN tab you&#8217;ll see your data source and you&#8217;re ready to connect with FileMaker Pro 9</p>
<h2>2) Set up FileMaker Pro 9 to connect to SQL / MySQL</h2>
<ul>
<li>Launch FileMaker Pro 9</li>
<li>Create a new empty database.</li>
<li>Open the define database dialog: File>Manage>Database&#8230;</li>
<li>Go to Relationships and double click on the existing &#8220;test&#8221; table</li>
<li>For Data Source, choose Add ODBC data source&#8230;.</li>
<li>Choose your MySQL source from the list and press &#8220;Continue&#8230;&#8221;</li>
<li>Most of the defaults in the following screen are fine though if you don&#8217;t want to be prompted for a password each time you connect then use &#8220;Specify user name and password&#8221;</li>
<li>Now choose the table you want to connect to and read. Your table will populate with the fields from this remote table.</li>
<li>Press OK and watch what happens - you&#8217;re using FileMaker Pro 9 to access a remote SQL data source! You can now use FileMaker&#8217;s layout functions etc. to make this layout more attractive and get to work on learning how to better integrate Filemaker Pro 9 and MySQL!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.metaclarity.com/blog/2008/04/11/use-filemaker-pro-9-to-connect-to-a-sql-mysql-data-source/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Customize a SMF forum to look like your site</title>
		<link>http://www.metaclarity.com/blog/2008/03/27/customize-a-smf-forum-to-look-like-your-site/</link>
		<comments>http://www.metaclarity.com/blog/2008/03/27/customize-a-smf-forum-to-look-like-your-site/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 01:33:47 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
		
		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[Web Developer]]></category>

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

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

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

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

		<guid isPermaLink="false">http://www.metaclarity.com/blog/2008/03/27/customize-a-smf-forum-to-look-like-your-site/</guid>
		<description><![CDATA[SMF (Simple Machines Forum) is a standard install for many users of Fantastico. It&#8217;s a robust, easy to configure, PHP/MySQL-based discussion forum that is common all over the web. What&#8217;s more, there are lots of templates available to allow you to customize the look of your SMF forum. These templates vary greatly from the austere [...]]]></description>
			<content:encoded><![CDATA[<p>SMF (<a href="http://www.simplemachines.org/" title="Simple Machine Forum - Home Page">Simple Machines Forum</a>) is a standard install for many users of Fantastico. It&#8217;s a robust, easy to configure, PHP/MySQL-based discussion forum that is common all over the web. What&#8217;s more, there are lots of templates available to allow you to customize the look of your SMF forum. These templates vary greatly from the austere to the plain bizarre, but what if you want your SMF forum to fit nicely into your existing website? Read on&#8230;</p>
<p>[<em>Note: this article requires familiarity with HTML/CSS and a bit of PHP</em>]</p>
<p>A client of ours recently asked us to do precisely that - take the SMF back end and fit it into the site we had built for him. Well, after some rummaging around in the SMF installed files we discovered that you only need to modify one PHP file and add a few CSS tweaks in order to get the forum fitting into your website. (We&#8217;ll show you our own results here as soon as the site in question goes live.) Meanwhile, here&#8217;s how you do it.</p>
<h2>Step 1: set up SMF with a new theme</h2>
<ul>
<li>Install a SMF forum on your site (use Fantasico if you can - it&#8217;s really easy)</li>
<li>Now find a forum theme that is close to what you want for your site. There are hundreds of themes <a href="http://custom.simplemachines.org/themes/" title="SMF Themes"><u>here</u></a>. Many more can be found by doing a quick internet search.</li>
<li>Download the .ZIP file of the theme you like then login into your SMF administrator interface.</li>
<li>In the sidebar click on &#8220;Themes and Layouts&#8221; and follow the instructions to install your theme from the .ZIP file (no need to decompress). The options are at the bottom of the page.</li>
<li>Set the newly installed theme as the default theme for your site: &#8220;Overall forum default&#8221; and &#8220;Reset everyone to&#8221; [name of your theme]. At the same time, make sure users can&#8217;t chose to modify their viewing theme or they might break out of your modifications. This is done by unchecking &#8220;Allow members to select their own themes&#8221; and &#8220;Allow members to select the &#8220;Default&#8221; theme.&#8221; Now they can only use your theme.</li>
</ul>
<h2>Step 2: modify the index.template.php file</h2>
<ul>
<li>FTP into your web site and navigate to the location where you installed SMF. In there is a folder called &#8220;Themes&#8221; and in it you should see a file called &#8220;index.template.php&#8221; This is the only file you&#8217;ll need to modify to get your SMF forum wrapped up in you site.</li>
<li>The HTML of you document is buried quite deep in PHP tags but it should be navigable. Start by adding links to your CSS file(s) in the head of the page.</li>
<li>To modify the HTML, we wrapped the whole content of the body tag in our standard page template and it worked great. Give it a go!</li>
<li>If you&#8217;re using a CSS file for your site with a global reset that removes all padding and margins from HTML elements, including table, tr and td&#8217;s, you may find that it ruins the formatting of your tables in your forum. The solution? Create a separate stlye sheet for your forum that does not include table, tr and td zeroing.</li>
<li>Your forum should now look like your site</li>
</ul>
<h2>Step 3: final adjustments</h2>
<ul>
<li>Return to the SMF admin interface and click on &#8220;Current Theme&#8221; in the sidebar. Rename your theme to the name of your site.</li>
<li>Walk through the SMF admin interface setting up any other options you require - it&#8217;s pretty simple.</li>
</ul>
<p>And that&#8217;s it. Your forum is now wrapped up in your site template - it&#8217;s really that simple!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaclarity.com/blog/2008/03/27/customize-a-smf-forum-to-look-like-your-site/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Filemaker Pro and ImageMagick</title>
		<link>http://www.metaclarity.com/blog/2008/02/19/filemaker-pro-and-imagemagick/</link>
		<comments>http://www.metaclarity.com/blog/2008/02/19/filemaker-pro-and-imagemagick/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 16:54:29 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
		
		<category><![CDATA[AppleScript]]></category>

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

		<category><![CDATA[Web Developer]]></category>

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

		<guid isPermaLink="false">http://www.metaclarity.com/blog/2008/02/19/filemaker-pro-and-imagemagick/</guid>
		<description><![CDATA[Filemaker Pro can store images in container fields. Wouldn&#8217;t it be great if it could also perform standard image manipulations on those stored images? Well with a combination of Filemaker Pro, ImageMagick and a little UNIX scripting, you can.
Here&#8217;s how:
1) Install ImageMagick on your system
2) Create a Filemaker Pro database with fields similar to the [...]]]></description>
			<content:encoded><![CDATA[<p>Filemaker Pro can store images in container fields. Wouldn&#8217;t it be great if it could also perform standard image manipulations on those stored images? Well with a combination of Filemaker Pro, ImageMagick and a little UNIX scripting, you can.</p>
<p>Here&#8217;s how:</p>
<p>1) Install <a href="http://www.imagemagick.org/">ImageMagick</a> on your system</p>
<p>2) Create a Filemaker Pro database with fields similar to the ones in the example file below or simply use our example</p>
<p>3) Copy the script from the example records below into your own version and Process your images.</p>
<p>Here&#8217;s the working example to download:<br />
<a href="http://www.metaclarity.com/dl/2008_02Blog-FMPwithImageMagick.zip">Filemaker and ImageMagick Example</a></p>
<p>You can also run ImageMagick image processing with AppleScript using &#8220;do shell script&#8221;. Here&#8217;s an example:</p>
<p>
<pre><code>do shell script "cd ~/; ls"
do shell script &#8220;cd ~/; export MAGICK_HOME=\&#8221;$HOME/ImageMagick-6.3.2\&#8221; ;export PATH=\&#8221;$MAGICK_HOME/bin:$PATH\&#8221; ;export DYLD_LIBRARY_PATH=\&#8221;$MAGICK_HOME/lib\&#8221;; convert donj.bmp donj.jpg&#8221;</code></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaclarity.com/blog/2008/02/19/filemaker-pro-and-imagemagick/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Filemaker Pro AppleScript - Part 1</title>
		<link>http://www.metaclarity.com/blog/2008/01/25/filemaker-pro-applescript-part-1/</link>
		<comments>http://www.metaclarity.com/blog/2008/01/25/filemaker-pro-applescript-part-1/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 22:43:57 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
		
		<category><![CDATA[AppleScript]]></category>

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

		<guid isPermaLink="false">http://www.metaclarity.com/blog/2008/01/25/filemaker-pro-applescript-part-1/</guid>
		<description><![CDATA[If you are a Filemaker Pro developer working on Macs will know that this versatile database has had AppleScript support built in for many years. It&#8217;s a versatile and simple way to extend the functionality of Filemaker Pro allowing you to perform complex scripting tasks within the application or even link Filemaker Pro to other [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a Filemaker Pro developer working on Macs will know that this versatile database has had AppleScript support built in for many years. It&#8217;s a versatile and simple way to extend the functionality of Filemaker Pro allowing you to perform complex scripting tasks within the application or even link Filemaker Pro to other applications.</p>
<p>If you&#8217;re coming to Filemaker Pro Applescript for the first time, these script samples will hopefully help you get started.</p>
<p>&#8212;&#8211;</p>
<p>Let&#8217;s assume we&#8217;ve built a Filemaker database called &#8220;mcContacts&#8221; with a table called &#8220;Contacts&#8221; and four fields: &#8220;First Name&#8221;, &#8220;Last Name&#8221;, &#8220;email&#8221; and &#8220;Postal Code&#8221;</p>
<p>You can download the sample database <a href="http://www.metaclarity.com/dl/mcContacts.zip" title="Download sample database">here</a></p>
<p><strong>How to create a new record:</strong></p>
<pre><code>tell application "FileMaker Pro"

 create new record in database "mcContacts"

end tell</code></pre>
<p><strong>How to create a new record and insert content:</strong></p>
<pre><code>tell application "FileMaker Pro"

 set newRecord to create new record in database "mcContacts"

 tell newRecord

 	set cell "First Name" to "Henry"

 	set cell "Last Name" to "Higgins"

 	set cell "Postal Code" to "HH1 3HH"

 	set cell "email" to "hhiggins@email.com"

 end tell

end tell</code></pre>
<p><strong>How to modify the current record:</strong></p>
<pre><code>set newFirstName to "Horace"

set newLastName to "Walpole"

tell application "FileMaker Pro"

 set cell "First Name" of current record to newFirstName

 set cell "Last Name" of current record to newLastName

end tell</code></pre>
<p><strong>How to get and display information from a record:</strong></p>
<pre><code>tell application "FileMaker Pro"

 tell database "mcContacts"

 	set firstName to the contents of field "First Name" of current record

 	display dialog "First Name in this record is: " &amp; firstName

 end tell

end tell</code></pre>
<p><strong>How to delete the current record:</strong></p>
<pre><code>tell application "FileMaker Pro"

 tell database "mcContacts"

 	delete current record --be careful, there's no warning

 end tell

end tell</code></pre>
<p><strong>How to search for a record:</strong></p>
<pre><code>

tell application "FileMaker Pro"

 tell database "mcContacts"

 	show (every record whose cell "First Name" = "Henry")

 end tell

end tell

</code></pre>
<p><strong>How to search for a record with multiple search terms:</strong></p>
<pre><code>

tell application "FileMaker Pro"

 tell database "mcContacts"

 	show (every record whose cell "First Name" = "Henry" and cell "Last Name" = "Higgins")

 end tell

end tell

</code></pre>
<p><strong>How to show all records:</strong></p>
<pre><code>tell application "FileMaker Pro"

 tell database "mcContacts"

 	show every record

 end tell

end tell</code></pre>
<p><strong>How to sort the current records:</strong></p>
<pre><code>tell application "FileMaker Pro"

 tell database "mcContacts"

 	sort layout "Contacts" by field "Last Name" in order ascending

 end tell

end tell</code></pre>
<p><strong>How to show a particular record:</strong></p>
<pre><code>tell application "FileMaker Pro"

 tell database "mcContacts"

 	show record 2

 end tell

end tell</code></pre>
<p><strong>Also useful - perform a menu command:</strong></p>
<pre><code>tell application "FileMaker Pro"

 do menu menu item "Hide Window" of menu "Window"

end tell</code></pre>
<p><strong>Also useful - perform a script:</strong></p>
<pre><code>tell application "FileMaker Pro"

 tell database "mcContacts"

 	do script "Test"

 end tell

end tell</code></pre>
<p><strong>Finally, how to get Filemaker to make the tea:</strong></p>
<pre><code>tell application "FileMaker Pro"

 tell Metaclarity CEO "Paul Tuckey"

 	go an make the tea with delay 0

 end tell

end tell</code></pre>
<p>We hope this helps you get up and running with AppleScript and Filemaker Pro. Stay tuned - we&#8217;ll be publishing Part 2 very soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaclarity.com/blog/2008/01/25/filemaker-pro-applescript-part-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Filemaker Pro 9&#8217;s best, easy-to-use new features</title>
		<link>http://www.metaclarity.com/blog/2008/01/17/filemaker-pro-9s-best-easy-to-use-new-features/</link>
		<comments>http://www.metaclarity.com/blog/2008/01/17/filemaker-pro-9s-best-easy-to-use-new-features/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 16:10:25 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
		
		<category><![CDATA[Filemaker]]></category>

		<category><![CDATA[Web Developer]]></category>

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

		<category><![CDATA[Cool features]]></category>

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

		<category><![CDATA[Filemaker Pro 9]]></category>

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

		<guid isPermaLink="false">http://www.metaclarity.com/blog/2008/01/17/filemaker-pro-9s-best-easy-to-use-new-features/</guid>
		<description><![CDATA[Metaclarity&#8217;s core work is Filemaker Pro development and Web Development. When Filemaker Pro 9 came out we were really impressed by several new features.
If you&#8217;re a developer or a user and haven&#8217;t moved to Filemaker Pro 9 yet, we think these are compelling reasons to do so:

Conditional formatting! This is cool. It means a field [...]]]></description>
			<content:encoded><![CDATA[<p>Metaclarity&#8217;s core work is Filemaker Pro development and Web Development. When Filemaker Pro 9 came out we were really impressed by several new features.</p>
<p>If you&#8217;re a developer or a user and haven&#8217;t moved to Filemaker Pro 9 yet, we think these are compelling reasons to do so:</p>
<ul>
<li>Conditional formatting! This is cool. It means a field can go red or yellow or whatever when a user enters invalid data. Sounds little - it&#8217;s very, very useful!</li>
<li>The installation of FileMaker Server and FileMaker Server Advanced used to be a serious headache. FileMaker have really simplified things and you should be able to get FileMaker Server up and running in about 20 minutes - though you might want to set an hour aside!!</li>
<li>Don&#8217;t want FileMaker Server? If you use a FileMaker Pro client to share your databases,  you&#8217;re now allowed up to nine peer-to-peer connections again (it dropped to four in previous versions).</li>
<li>The Append to PDF command that allows you to bring together a wide range of layout data into a single PDF report.</li>
<li>Layout objects can now be set to resize automatically (and correctly!!) on screen.</li>
<li>Developers also have folders to store their scripts in - at last!</li>
<li>And best of all, is FileMaker Pro 9&#8217;s ability to connect to and use external SQL data sources. We use mySQL a lot for web development. This is going to change radically the way we integrate our clients&#8217; office solutions with their web sites. And it&#8217;s going to be good!</li>
</ul>
<p>It&#8217;s well worth a look: <a href="http://www.filemaker.com/products/fmp/index.html" title="External: Filemaker Inc." target="_blank">Filemaker Pro 9</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaclarity.com/blog/2008/01/17/filemaker-pro-9s-best-easy-to-use-new-features/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Use BBEdit UNIX Filters to Format Javascript</title>
		<link>http://www.metaclarity.com/blog/2008/01/17/use-bbedit-to-format-javascript-with-a-unix-filter/</link>
		<comments>http://www.metaclarity.com/blog/2008/01/17/use-bbedit-to-format-javascript-with-a-unix-filter/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 15:41:45 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
		
		<category><![CDATA[Utility]]></category>

		<category><![CDATA[Web Developer]]></category>

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

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

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

		<guid isPermaLink="false">http://www.metaclarity.com/blog/2008/01/17/use-bbedit-to-format-javascript-with-a-unix-filter/</guid>
		<description><![CDATA[Here&#8217;s a tip specifically for people who use BBEdit to write Javascript.
If you copy a lot of Javascript examples from the web you probably end up with code that hugs the left edge of your BBEdit window like this (for example):
var txt=""
function message()
{
try
{
adddlert("Hey There!")
}
catch(err)
{
txt="An error has occurred"
alert(txt)
}
}
But you want it indented and nicely formatted, right?
Well, [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a tip specifically for people who use <a href="http://www.barebones.com/products/bbedit/" title="External Link: Bare Bone Software - BBEdit" target="_blank">BBEdit</a> to write Javascript.</p>
<p>If you copy a lot of Javascript examples from the web you probably end up with code that hugs the left edge of your BBEdit window like this (for example):</p>
<pre><code>var txt=""
function message()
{
try
{
adddlert("Hey There!")
}
catch(err)
{
txt="An error has occurred"
alert(txt)
}
}</code></pre>
<p>But you want it indented and nicely formatted, right?</p>
<p>Well, we found a link on the web [ <a href="http://attaboy.tumblr.com/post/20570385" target="_blank">http://attaboy.tumblr.com/post/20570385</a> ] that sort of explained how to put together a BBEdit UNIX Filter to do just that, but we also bashed our brains out for about an hour before realising that to call a PHP Shell Script in a UNIX Filter you need to wrap this around the code:</p>
<pre><code>#!/usr/bin/php
&lt;?php
[... your code...]
?&gt;</code></pre>
<p>Obvious to some - not to all of us!!</p>
<p>So we&#8217;ve put together the complete script to format Javascript from BBEdit here for downloading:</p>
<p><a href="http://www.metaclarity.com/dl/JavaScriptFormatPHP.zip">http://www.metaclarity.com/dl/JavaScriptFormatPHP.zip</a></p>
<p>Unzip it and put it in this folder:<br />
~/Library/Application Support/BBEdit/Unix Support/Unix Filters/</p>
<p>Select your &#8220;flat&#8221; Javascript in the BBEdit window. Run the filter (from the !# menu or from Palettes&gt;UNIX Filters) and it should format your Javascript!</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaclarity.com/blog/2008/01/17/use-bbedit-to-format-javascript-with-a-unix-filter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to move from Google Checkout&#8217;s HTML API to the XML API (in PHP)</title>
		<link>http://www.metaclarity.com/blog/2007/12/11/how-to-move-from-google-checkouts-html-api-to-the-xml-api-in-php/</link>
		<comments>http://www.metaclarity.com/blog/2007/12/11/how-to-move-from-google-checkouts-html-api-to-the-xml-api-in-php/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 03:10:37 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
		
		<category><![CDATA[Web Developer]]></category>

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

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

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

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

		<guid isPermaLink="false">http://www.metaclarity.com/blog/2007/12/11/how-to-move-from-google-checkouts-html-api-to-the-xml-api-in-php/</guid>
		<description><![CDATA[We recently moved a client&#8217;s Google Checkout solution from the HTML API to the XML API. It seemed tough when we were doing it but if we had to do it again now it would be a breeze. So the goal of this article is to save you the hassle of learning the steps of [...]]]></description>
			<content:encoded><![CDATA[<p>We recently moved a <a href="http://www.myflipperusa.com/">client&#8217;s</a> Google Checkout solution from the HTML API to the XML API. It seemed tough when we were doing it but if we had to do it again now it would be a breeze. So the goal of this article is to save you the hassle of learning the steps of how to move from the HTML API to the XML API.</p>
<h3>What you&#8217;ll need:</h3>
<ul>
<li>A Google Merchant account</li>
<li>A Google Sandbox account (can be part of the Merchant account)</li>
</ul>
<h3>Procedure:</h3>
<h4>Step 1 - Get the Google Libraries and Example carts</h4>
<p>First stop, take a quick look <a href="https://checkout.google.com/seller/developers.html">the Google Developer page for Checkout users</a> - this is your portal into Google as a Google Checkout developer.</p>
<p>Now take a look at the <a href="http://code.google.com/apis/checkout/developer/index.html">XML API page</a>. We built our cart using PHP, so we used the PHP examples. Examples in other languages can be found here. Again, it&#8217;s worth taking a minute to familiarize yourself with this page.</p>
<p>And now for the good news - <a href="http://code.google.com/apis/checkout/samplecode.html">Google Sample Code for creating an XML API cart</a>. We went to the PHP category and clicked on the <a href="http://code.google.com/p/google-checkout-php-sample-code/downloads/list">download</a> link to get the sample code. This little bundle contains pretty much everything you need to build a Google XML API cart quickly and easily.</p>
<h4>Step 2 - Open the sample code and take a look inside</h4>
<p>Inside the folder you just downloaded you&#8217;ll see a lot of stuff. There are only two folders that you need concern yourself with however.</p>
<ul>
<li><em><strong>Library</strong></em> - Our favourite because it contains all of the code you&#8217;ll need to create you XML documents and yet you will probably <strong>never have to touch a single line of the code in here</strong>. It&#8217;s all ready for you - these are libraries, code that is prepared for you, if you like.</li>
<li><em><strong>Demo</strong></em> - Almost as good! All you have to do is look at the examples in here, tweak them so they use your own data instead and test it in your Google Sandbox.</li>
</ul>
<h4>Step 3 - Setting it up</h4>
<p>Now you&#8217;ve got your code Libraries and Demo files, you&#8217;re ready to upload them, modify them and test them in your Sandbox. Here&#8217;s how:</p>
<ul>
<li>Upload the sample code to your server. We created a folder called Google_Checkout and dropped the &#8220;demo&#8221;, &#8220;library&#8221; and &#8220;unitTest&#8221; folders in there.</li>
<li>Navigate to Demo>cartdemo.php and make a backup before we start hacking at it</li>
<li>Open cartdemo.php from on your server and scroll down to where you see this:
<pre><code> // Invoke any of the provided use cases
//  UseCase1();
//   UseCase2();
//   UseCase3();
  Usecase();
  DigitalUsecase();
  CarrierCalcUsecase();
</code></pre>
<p>The Google coders have thoughtfully provided you with various different types of cart to play with all in this single file. We&#8217;re only going to  use one of them, so comment the code so it looks like this. You can experiment with the other options later once you&#8217;ve understood the basics.:</p>
<pre><code> // Invoke any of the provided use cases
//  UseCase1();
//   UseCase2();
//   UseCase3();
  Usecase();
//  DigitalUsecase();
//  CarrierCalcUsecase();
</code></pre>
<p>Great! Step one is complete and your cart will only use one calculation method: the one called Usecase();
</li>
<li>Now we need to go and get our Sandbox merchant ID and Key. Where? <a href="http://checkout.google.com/sell">Login to your Google Checkout merchant&#8217;s account</a> click on &#8220;My Account&#8221; then &#8220;Checkout Sandbox&#8221; then go to your &#8220;Settings&#8221; tab. Your Sandbox ID and Key should be on the right or under the integration link (bottom left)</li>
<li>Return to cartdemo.php and a few lines down from where we left off you&#8217;ll see:
<pre><code>
      $merchant_id = "";  // Your Merchant ID
      $merchant_key = &#8220;&#8221;;  // Your Merchant Key
      $server_type = &#8220;sandbox&#8221;;
      $currency = &#8220;USD&#8221;;</code></pre>
<p>Just fill in your sandbox info for Merchant ID and Key and we&#8217;re good to go!
</li>
<li>
Now we&#8217;ll check the Sandbox is working. Load the cartdemo.php page into your browser via the server (http://anExample.com/Google_Checkout/Demo/cartdemo.php</p>
<p>You should see a Google Button. Click on it and you&#8217;ll be taken to the Sandbox checkout and in the background&#8230; your site created the requisite XML!!!
</li>
</ul>
<h4>Step 4 - Integrate your basket</h4>
<p>Now the Sandbox is working in XML mode all you have to do is modify the predefined cart items that Google provides with your own. Here&#8217;s how:</p>
<ul>
<li>Navigate to the lines of code just a little further down in the cartdemo.php page. You should see this:
<pre><code>$item_1 = new GoogleItem("item name", // Item name
                     &#8220;item desc&#8221;, // Item description
                     $total_count, // Quantity
                     10); // Unit price
      $cart->AddItem($item_1);</code></pre>
<p>And happily, from here on in it&#8217;s really simple. Just create a loop for however many different items there are in your basket and build your basket. Here&#8217;s a possible example:</p>
<pre><code>
foreach ($_SESSION['theCart'] as $line){ //The 'theCart' session is a basket array.
	$num_items = $line[&#8217;Qty&#8217;]; //Basic info about each item
	$item_price = ($line[&#8217;unit_price&#8217;]);
	$item_name = strtoupper(($line[&#8217;unit_name&#8217;]));
	$item_category = ($line[&#8217;unit_category&#8217;]); //Something like the Google Description

	  // Create cart item
	 //The curly braces allow the appending of 
			 //a numeric suffix to a varible you are creating
	 ${&#8221;item_&#8221;.$x} = new GoogleItem($item_name, // Item name
					 $item_category, // Item description
					 //If you use Carrier Calculated shipping you must provide weight
					 $the_weight = (($line[&#8217;unit_weight&#8217;])/16); 
					 $num_items, // Quantity
					 $item_price, // Unit price
					 &#8216;LB&#8217;,
					 $the_weight //Item Weight
					 ); 

	// Add items to the cart
	 $cart->AddItem(${&#8221;item_&#8221;.$x});

		$x++; //Increase count

	} //end foreach line item

} else {

	echo &#8220;No Valid Basket - Sorry!!!!!&#8221;;
}   

</code></pre>
</li>
</ul>
<h4>Step 5 - Getting ready to go live</h4>
<p>OK, you&#8217;ve done the above but your wondering how to put all of this into your checkout page. Take a look! Just put this line of code where your existing HTML API Google Checkout button is:</p>
<pre><code>&lt;?php include '/Google_Checkout/Demo/cartdemo.php'; ?&gt;</code></pre>
<p>We&#8217;re kidding, right? Nope! You can now throw away all those input hidden statements you were using previously and put this single line. THe XML is all generated by that single include.</p>
<p>If you want to see the XML being created for debugging, go to the bottom of your usecase() function (not necessarily the bottom of the document) and uncomment this:</p>
<pre><code>// Display XML data
   //  echo &#8220;&lt;pre&gt;&#8221;;
   //  echo htmlentities($cart->GetXML());
   //   echo &#8220;&lt;/pre&gt;&#8221;;</code>
</pre>
<h4>Step 6 - Set Shipping and Tax options</h4>
<p>One of the big advantages of using the XML API is that it allows you a lot more control over shipping and taxes. There are a multitude of possibilities here and to get the most out of them you should take a look at the <a href="http://code.google.com/apis/checkout/developer/index.html">Google XML API guide</a>. There are further documents linked to that deal with Carrier Calculated shipping, Taxes, etc. </p>
<p>If you&#8217;re using our Usecase() example basket, you&#8217;ll see some shipping and tax options have already been set:</p>
<pre>  <code>// Add shipping options
  if($total_count < 3){
		 $ship_1 = new GoogleFlatRateShipping("USPS Priority Mail", 4.55);
  }else{
		 $ship_1 = new GoogleFlatRateShipping("USPS Priority Mail", 6.2);
  }
  $Gfilter = new GoogleShippingFilters();
  $Gfilter->SetAllowedCountryArea(&#8217;CONTINENTAL_48&#8242;);

  $ship_1->AddShippingRestrictions($Gfilter);

  $cart->AddShipping($ship_1);

  // Add tax rules
  $tax_rule = new GoogleDefaultTaxRule(0.05);
  $tax_rule->SetStateAreas(array(&#8221;MA&#8221;));
  $cart->AddDefaultTaxRules($tax_rule);

  // Specify <edit-cart-url>
  $cart->SetEditCartUrl(&#8221;https://www.example.com/cart/&#8221;);

  // Specify &#8220;Return to xyz&#8221; link
  $cart->SetContinueShoppingUrl(&#8221;https://www.example.com/goods/&#8221;);

  // Request buyer&#8217;s phone number
  $cart->SetRequestBuyerPhone(true);

  // Display Google Checkout button
  echo $cart->CheckoutButtonCode(&#8221;SMALL&#8221;);</code>
</pre>
<p>This should all be fairly self explanatory. There are loads more examples throughout the demo file so scroll on down and take a look.</p>
<h4>Step 7 - Put it live</h4>
<p>If everything is happening as expected you can then put your basket live.</p>
<ul>
<li>Return to your <a href="http://checkout.google.com/sell">Google Merchant&#8217;s Account</a>, leave the Sandbox area and go to your actual account information. Get your ID and Key and use them instead of the Sandbox values (see step 3 point 5 above). You&#8217;ll also need to change the line $server_type = &#8220;sandbox&#8221;; to $server_type = &#8220;checkout&#8221;; </li>
<li>That&#8217;s it - you&#8217;re live!</li>
</ul>
<h4>Disclaimer</h4>
<p><em>Metaclarity does everything it can to ensure the information we post is accurate. However, Metaclarity can accept no responsibilty for any damage or loss of data use of the above information might cause.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaclarity.com/blog/2007/12/11/how-to-move-from-google-checkouts-html-api-to-the-xml-api-in-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Use rsync to backup your Mac to a remote server via SSH</title>
		<link>http://www.metaclarity.com/blog/2007/12/09/use-rsync-to-backup-your-mac-to-a-remote-server-via-ssh/</link>
		<comments>http://www.metaclarity.com/blog/2007/12/09/use-rsync-to-backup-your-mac-to-a-remote-server-via-ssh/#comments</comments>
		<pubDate>Sun, 09 Dec 2007 18:08:10 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
		
		<category><![CDATA[Utility]]></category>

		<category><![CDATA[Web Developer]]></category>

		<guid isPermaLink="false">http://www.metaclarity.com/blog/2007/12/09/use-rsync-to-backup-your-mac-to-a-remote-server-via-ssh/</guid>
		<description><![CDATA[If you find online backup solutions expensive and heavy on your system, you might be pleased to hear there is a cheap, easy way to create a mirror backup your Mac (or other UNIX variant) to a secure online server. And as of Mac OS X Leopard, rsync will even transfer metadata associated with your [...]]]></description>
			<content:encoded><![CDATA[<p>If you find online backup solutions expensive and heavy on your system, you might be pleased to hear there is a cheap, easy way to create a mirror backup your Mac (or other UNIX variant) to a secure online server. And as of Mac OS X Leopard, rsync will even transfer metadata associated with your files like Tags and Comments.</p>
<p>This method does not allow you to roll back to previous dated backups like certain backup solutions do (<a href="http://www.apple.com/macosx/features/timemachine.html">Time Machine</a>, for example). What it does is create a mirrored backup of your Mac on a remote server, so it&#8217;s best used in conjunction with a local hard-drive based incremental backup solution.</p>
<p>Still, if the house burns down your files will be safe and once you&#8217;ve done the initial backup, rsync is very efficient at keeping your remote backup mirrored with your disk.</p>
<p>In this example we&#8217;re going to backup the currently logged-in user&#8217;s <strong>Documents</strong> folder.</p>
<h3>What you&#8217;ll need:</h3>
<p>-rsync running on you Mac (it&#8217;s there on 10.4 and 10.5)<br />
-An Internet Service Provider (ISP) who allow you to connect via SSH. [examples <a href="http://www.hostmonster.com">1</a> <a href="http://www.bluehost.com">2</a> <a href="http://www.dreamhost.com">3</a>]</p>
<h3>Procedure:</h3>
<h4>Step 1 - Set up the remote server</h4>
<ul>
<li>You&#8217;re going to need shell access to your server. If you don&#8217;t already have it and you use cPanel to administer your server then there is often a &#8220;Request Shell Access/Remote Login&#8221; option. If there isn&#8217;t, contact your ISP directly.</li>
<li>With shell access set up, create a folder that is outside of the scope of your webserver. You could use FTP to do this, if you prefer. For example, set up a folder called private_BKP at the root level of your server and put a folder in there called Mac_One_BKP. The path is then /home/private_BKP/Mac_One_BKP and its in there that we&#8217;re going to put the contents of our Documents folder.</li>
</ul>
<h4>Step 2 - Set up your Mac</h4>
<ul>
<li>Launch the Terminal application (found in your Utilities folder).</li>
<li>Type <code>rsync -avz -e ssh /Users/yourUserName/Documents yourLoginName@yourServer.com:'/home/private_BKP/Mac_One_BKP'</code><br />
An easy way to do the first part is to type <code>rsync -avz -e ssh</code> then drag and drop your Documents folder right into the Terminal window. Watch out that your system does not add a slash &#8216;/&#8217; after the word &#8216;Documents&#8217;. If it does, just remove it. Why? The slash will mean rysnc will copy the contents of the Documents folder rather than copying the whole folder.</li>
<li>For the second part, you need to guarantee that <em>&#8216;yourLoginName@yourServer.com:&#8217;/home/private_BKP/Mac_One_BKP&#8217;</em> is pointing to the folder you created on your remote server.</li>
<li>Before starting the transfer, you may want to exclude certain files and folders from being sent to the server (very private stuff, caches, etc.) To do this, see <em>Step 3 - Deletes and Excludes</em> below.</li>
<li>Press Return and you&#8217;ll be asked for your password. Provide it and you should see a long list of files scrolling in the Terminal window. These are the files moving from your machine to the remote server.</li>
</ul>
<p><em><strong>Note 1: </strong>If you want to checkout what the <strong>-avz -e</strong> stuff does, take a look at the</em> <a href="http://samba.anu.edu.au/ftp/rsync/rsync.html">rsync man page</a><br />
<em><strong>Note 2: </strong>Your first backup can take hours, if not days (don&#8217;t worry - it&#8217;ll be MUCH faster the second time round thanks to rsync&#8217;s ability to transfer only the parts of files that have changed. Take a break from the computer and have a buy a real copy of this instead) <a href="http://books.google.com/books?id=PUkxlmZGwikC&amp;dq=mark+twain+huckleberry+finn&amp;pg=PP1&amp;ots=_UrjaGWmzP&amp;sig=zUwXV7SeNr9svUZLBODfZOe0OvA&amp;prev=http://www.google.com/search?client=safari&amp;rls=en-us&amp;q=mark+twain+huckleberry+finn&amp;ie=UTF-8&amp;oe=UTF-8&amp;sa=X&amp;oi=print&amp;ct=title&amp;cad=one-book-with-thumbnail&amp;hl=en%23PPA2-IA1,M1">this</a> instead</em></p>
<h4>Step 3 - Deletes and Excludes</h4>
<p>One you&#8217;ve backed-up your Mac&#8217;s Documents folder using the method above there will come a time when you will want to run the script again - like when you add new content to your folder! However, you many also have deleted some content from your Documents.</p>
<ul>
<li>To have rsync <strong>delete</strong> files on the remote server that are no longer on your machine, add <code>--delete</code><br />ex: <code>rsync -avz --delete -e ssh /Users/yourUserName/Documents [etc.]</code> </li>
<li>To have rsync <strong>exclude</strong> the transfer of certain files to the remote server , add <code>--exclude='myFileName'</code><br />ex: <code>rsync -avz --delete --exclude='myFileName' -e ssh /Users/yourUserName/Documents [etc.]</code> <br />You can add multiple <em>&#8211;exclude</em> statements or add a list via an <em>&#8211;exclude_from</em> file (see the <a href="http://samba.anu.edu.au/ftp/rsync/rsync.html">manual</a>)</li>
</ul>
<h4>Disclaimer</h4>
<p><em>Metaclarity does everything it can to ensure the information we post is accurate. However, Metaclarity can accept no responsibilty for any damage or loss of data use of the above information might cause.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaclarity.com/blog/2007/12/09/use-rsync-to-backup-your-mac-to-a-remote-server-via-ssh/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Welcome to the Metaclarity Blog!</title>
		<link>http://www.metaclarity.com/blog/2007/12/01/blog-test/</link>
		<comments>http://www.metaclarity.com/blog/2007/12/01/blog-test/#comments</comments>
		<pubDate>Sat, 01 Dec 2007 21:43:02 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
		
		<category><![CDATA[Announcement]]></category>

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

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

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[Web Developer]]></category>

		<guid isPermaLink="false">http://www.metaclarity.com/blog/2007/12/01/blog-test/</guid>
		<description><![CDATA[Welcome to the new Metaclarity.com and, in particular, the Metaclarity Blog (powered by Wordpress), where we&#8217;ll be posting developer tips and other stuff relating to Filemaker Pro, Web Design &#38; Development, AppleScript and a range of other topics.
And if you have a request for a tutorial relating to any of the technologies above, just post [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the new Metaclarity.com and, in particular, the Metaclarity Blog (powered by <a href="http://wordpress.org" title="Go to the WordPress home page">Wordpress</a>), where we&#8217;ll be posting developer tips and other stuff relating to Filemaker Pro, Web Design &amp; Development, AppleScript and a range of other topics.</p>
<p>And if you have a request for a tutorial relating to any of the technologies above, just post a comment and we&#8217;ll try to help out.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaclarity.com/blog/2007/12/01/blog-test/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
