[FX.php List] dashboard widgets and fx.php

Alex Gates alex at gandrpublishing.com
Mon Jan 22 18:18:12 MST 2007


Hi everyone-

I managed to get something working today that I was quite pleased with.

Most of you probably know that Apple released a beta of Dashcode - the 
dashboard widget authoring tool that will be a part of Leopard.
You can download it here:
http://developer.apple.com/tools/dashcode/
(this is a newer version than the Dashcode that was leaked last year.)

There is a template that will allow you to make a widget from an RSS 
feed... you can simply enter the URL for the RSS feed and Dashcode will 
make everything work for you....

After a few tests today I was able to display FileMaker data in a widget 
using fx.php

I made a php file that outputs an xml file -
like this:
-------------------------------------------------------------

<?xml version="1.0"?>
<rss version="2.0">
    <channel>
       <title>Web Tracker</title>

       <description>My Web Tracker</description>
       <language>en-us</language>


<?php
include_once('FX/FX.php');						
include_once('FX/server_data.php');
include_once('FX/FMErrors.php');

$lookup=new FX($serverIP,$webCompanionPort,'FMPro7');
$lookup->SetDBData('dbfile.fp7','layout');
$lookup->SetDBPassword('xxxxx','xxxxxx');
$lookupResult=$lookup->FMFindAll();
$foundResult=$lookupResult['foundCount'];

?>
<?php echo "
       <item>
<title>Found Count:</title>

          <description>".$foundResult."</description>

       </item>";
?>

	  </channel>
</rss>

---------------------------------------------------------------


I uploaded this file and used the URL to the php page as the .xml 
address.  To my surprise, it worked.

I know this is simply showing the foundcount, but for a beginner, I was 
happy.  I'm sure it would be possible to do lots of cool stuff....

As far as I know, it should be possible to take the xml output from Web 
Publishing Engine to use for the widget... but I didn't think about this 
until after I had done this...

I'd really be interested in hearing if any of you have made dashboard 
widgets from FileMaker data and how you did it..... or if you have any 
suggestions as to a better method...

Alex


More information about the FX.php_List mailing list