[FX.php List] Screenshot of widget
Bob Patin
bob at patin.com
Thu Feb 15 10:14:25 MST 2007
OK, here's what I've gotten to so far with creating a Dashboard
widget; it's not ready for prime-time quite yet so that's why I
hadn't posted anything, but this actually works, so maybe someone can
help me with the last step:
I took an existing widget that displays some HTML and replaced the
existing HTML file with my own. The contents of my HTML file are just
this:
<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="0;url=http://xxxxxxxxxxxx/
titans.php">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
</BODY>
</HTML>
Next I created my simple PHP query, which is "titans.php;" it queries
a database, pulls in the game dates, opponents, scores, and outcome.
If the outcome is a win, the table colors the W or L with red rather
than black.
This all works great; however, there's a lot left to be done:
1) I don't know how to embed this HTML output in a scrolling widget,
which is what most of us would want to use so that widgets don't have
to be large.
2) I haven't done anything yet with the Javascript that allows you to
click on the "i" button and flip the widget to the back side.
I like the idea of using the redirect since it keeps the query on the
web server where it belongs, and makes it safe to distribute a widget
like a game score widget or others without fear of disclosing any
sensitive data like a database password and such.
There may be another way to get to the data rather than using a META-
redirect, but this seems to work so far.
Here's a screenshot; notice the table takes up the entire size of the
widget, since I haven't spent the time yet to figure out how to embed
my HTML in a nice window or better, a scrolling control.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: widget_screenshot.gif
Type: image/gif
Size: 27484 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20070215/17847e05/widget_screenshot-0001.gif
-------------- next part --------------
More information about the FX.php_List
mailing list