Scodigo, Inc.

Log In | Register

Cart Items:
0

SmartPill Update - New Beta Release Coming Soon

User icon

First of all, thank you for your interest in SmartPill. So far, we've had over 1,200 downloads of the first beta release and we've had lots of great feedback. Please don't hesitate to contact us with questions, ideas and of course any issues that you've had:

Micah Woods
micah.woods@scodigo.com

Chris Hansen
chris.hansen@scodigo.com

I'd like to thank Matt Petrowsky for pushing us to make the plug-in easier to use. Matt wanted an easier way to pass FileMaker data to the plug-in. For example, let's say you want to encrypt the contents of a field named "Password". One option is to concatenate the field into the PHP code like this:

PHP_RunScript( "echo md5('" & User:: Password & "');" )

While this does work, it gets a bit tedious and your code can become hard to manage.

The solution we can up with was to write a "FileMaker" PHP extension. This extension is compiled into the plug-in and it enables 2 new PHP functions. fm_evaluate is essentially the same as FileMaker's Evaluate function and gives you full access to FileMaker's calculation engine FROM PHP. fm_perform_script allows you to trigger scripts within your PHP code and it includes the ability to pass a script parameter and a control parameter.

The above example can now be written like this:

PHP_RunScript( "echo md5(fm_evaluate('User:: Password'));" )

The power of these 2 functions may not be apparent at first but as you begin to use the plug-in, I think you'll find them very valuable. Imagine, you now have access to any FileMaker function including the Get functions, Design functions, Custom functions and other powerful functions like GetNthRecord.

I've included the documentation for these 2 functions at the bottom of this message.

Other new stuff:

- The next release will include the latest version of PHP, which is 5.1.6.

- We've removed the requirement of having a "PHP Support" folder. All of the required ini settings are now loaded by default. Although this requirement is removed, having a "PHP Support" folder is still a good idea if you want to store additional libraries like PEAR. We also use it as a safe place to write temp files. And, it's still the place where you install the license file if you're installing license files to disk (vs. using the register function).

- The IMAP extension is now compiled into the plug-in allowing email to be received.

- The GD imagerotate function now works so you can rotate images - yay!

Well that's it for the update. We plan to release the next version in the coming week so please stay tuned.

Regards,

Micah Woods

New PHP functions:

fm_evaluate -- Evaluates the specified expression using FileMaker's calculation engine

mixed fm_evaluate ( string expression )

expression = any expression that can be used with FileMaker's Evaluate function. [REQUIRED]

fm_perform_script -- Performs a FileMaker script

mixed fm_perform_script ( string file_name, string script_name, [, string script_parameter [, int control]])

file_name = the name of the file that contains the script to be performed. [REQUIRED]

script_name = the name of the script to be performed. [REQUIRED]

script_parameter = ScriptParameter to be sent to the script. [OPTIONAL]

control = tells FileMaker what to do when other scripts are already running, 0 = halt, 1 = exit, 2 = resume, 3 = pause, which is the default. [OPTIONAL]