[FX.php List] dashboard widgets and fx.php
Carl Anderson
Carl.Anderson at asu.edu
Thu Feb 15 09:57:52 MST 2007
Sure, why not? I've attached it.
The htaccess stuff is my hack at authentication; because the PHP script is
on an internal server, this is necessary. Version 1.2 will probably have
that moved to a preference area (I'm so very new to Dashcode stuff,
obviously).
Also, most of the magic is done by the PHP script, with FX.php doing the
work. I have some of my own legerdemain that lets a user search by any of
"firstname lastname", "lastname, firstname" or "lastname" and the script is
smart enough to know the difference and pass the right things to FX.php.
Like I said, right now all it's doing is pulling data. Next project is to
push data instead. That should be fun. :)
--
Carl Anderson
Technical Support Analyst
Distance Learning
Herberger College of Fine Arts
Arizona State University
http://herbergeronline.asu.edu
> From: Gjermund Gusland Thorsen <ggt667 at gmail.com>
> Reply-To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Date: Thu, 15 Feb 2007 17:44:50 +0100
> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Subject: Re: [FX.php List] dashboard widgets and fx.php
>
> Screenshot?
>
> On 2/15/07, Carl Anderson <Carl.Anderson at asu.edu> wrote:
>> Bob:
>>
>> I downloaded Dashcode two days ago, and with my admittedly limited
>> understanding of Ajax and whatnot, I was able to cobble together a decent
>> widget that pulls data via a call to a PHP script on our server.
>> (Essentially it's a Web service, but that's a different story.)
>>
>> Right now the PHP script is doing nothing more than spitting out
>> line-by-line sets of data, but that's exactly what I want for my purposes.
>> Goals for this week, and the weeks following, are to expand this to allow
>> writing to a database as well as more complex formatting.
>>
>> (Incidentally, it should be easy to write to a database, since it's just
>> like connecting to a PHP script.)
>>
>> --
>> Carl Anderson
>> Technical Support Analyst
>> Distance Learning
>> Herberger College of Fine Arts
>> Arizona State University
>> http://herbergeronline.asu.edu
>>
>>
>>> From: Bob Patin <bob at patin.com>
>>> Reply-To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>>> Date: Fri, 9 Feb 2007 18:26:06 -0600
>>> To: Alex Gates <alex at gandrpublishing.com>, "FX.php Discussion List"
>>> <fx.php_list at mail.iviking.org>
>>> Subject: Re: [FX.php List] dashboard widgets and fx.php
>>>
>>> Alex,
>>>
>>> Did you ever get this dashboard widget to work in pulling in records?
>>>
>>> I'd like to write a few simple widgets; I have 3 projects in mind:
>>>
>>> 1. I'd like to pull in simple records and display them in a table
>>> inside a widget
>>> 2. I'd like to be able to write to a database with a widget (long-
>>> shot, I know, but one can dream...)
>>>
>>> To begin with though, I'd love to be able to display records; have
>>> you gotten that to work? My tests so far have failed miserably...
>>>
>>> Best regards,
>>>
>>> Bob Patin
>>> Longterm Solutions
>>> bob at longtermsolutions.com
>>> 615-333-6858
>>> http://www.longtermsolutions.com
>>>
>>> CONTACT US VIA INSTANT MESSAGING:
>>> AIM or iChat: longterm1954
>>> Yahoo: longterm_solutions
>>> MSN: tech at longtermsolutions.com
>>> ICQ: 159333060
>>>
>>>
>>>
>>>
>>> On Jan 22, 2007, at 7:18 PM, Alex Gates wrote:
>>>> 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
>>>> _______________________________________________
>>>> FX.php_List mailing list
>>>> FX.php_List at mail.iviking.org
>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot.png
Type: image/png
Size: 59594 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20070215/a4e3b55c/screenshot-0001.png
More information about the FX.php_List
mailing list