Link to home
Start Free TrialLog in
Avatar of MarkJulie
MarkJulieFlag for United States of America

asked on

WordPressFilemaker sync support

I need help configuring a plugin WordPressFilemaker Sync built for syncing FM to WP. I own a license and can get the demo to work but not the full version. I also have the WP site and domain working (am using it to host a temporary IWP workaround that is not suitable. http://wordpressfilemaker.com/tour is the plugin built with (but not by hence no support) 360Works scripting tools. The developer is unavailable, and tutorials assume more experience than I have. I am ultimately trying to port a Filemaker summary report to a WordPress site for a client who does not use FM. IWP does not support the report, but I bought this plugin as a solution since I don't know php and cannot build from scratch. The tutorials available demonstrate the capability of the plugin but not configuration. I will attach the license info if useful.

Mark
Avatar of slinkygn
slinkygn
Flag of United States of America image

When you say the demo worked but the full version failed, how so?  Error message, anything like that?
Avatar of MarkJulie

ASKER

Demo connects because demo data and config fields are setup for testing. When I try to use the plugin from my nondemo fmdb, it is not configured due to lack of tutorial/instructions and its nonintuitive interface. I know it can work but am stymied at this stage.

Mark
As far as I know there are no config fields to set up with that plugin.  You can put your parameters in fields if you want, but you don't need to; the wp_simplePost() function can take straight strings and work from that.  All that you should need to do is enable API use in WP, and then run the function in a script, giving it the location of your WP site's xmlrpc.php file, your login name and password, post contents and a few other parameters.

So we'll need more detail -- what exactly have you tried so far (contents of scripts you're trying to execute in FM, whether API access is enabled in WP as per the instructions, etc.)?
WP api is enabled. Passing this script:

Set Variable [$retID; Value: wp_newPage( "http://www.markjulie.com/avenues_bible/xmlrpc.php" ; "markjulie@mac.com" ; "*****" ; "Another page for PCB" ; "Here is the current tally of PBC campers" ; "For the most accurate details, contact Kathy or Rhonda." ; "publish" ; "" ; "no" ; "" ; "current-camp-tally" ; "" ; "" ; "" ; "" )
Show Custom Dialog ["debug"; $retID]

I am trying to get a summary report of tallied data to display as a page.

What string from FM should be passed to display FM data?

Mark
Looks like your function name is in error, and the parameters are out of order, according to the documentation.

wp_newPage() should be wp_newPost()

Additionally, your parameter list of:

( "http://www.markjulie.com/avenues_bible/xmlrpc.php" ; "markjulie@mac.com" ; "*****" ; "Another page for PCB" ; "Here is the current tally of PBC campers" ; "For the most accurate details, contact Kathy or Rhonda." ; "publish" ; "" ; "no" ; "" ; "current-camp-tally" ; "" ; "" ; "" ; "" )

should probably be:

( "http://www.markjulie.com/avenues_bible/xmlrpc.php" ; "markjulie@mac.com" ; "*****" ; "Another page for PCB" ; "Here is the current tally of PBC campers" ; "For the most accurate details, contact Kathy or Rhonda."; "" ; "publish" ; ""; "" ; "no" ; "" ; "current-camp-tally" ; "" ; "" ; "" )

Finally, you then display your $retID as the debug info, but it may be more useful to do as the documentation recommends and display wpx_LastError instead -- this code is based directly off the documentation's recommended code:
If [ LeftWords ( $retID; 1 ) = "ERROR" ] 
Show Custom Dialog [ Message: $result & “ “ & wpx_LastError; Buttons: “OK” ] 
Exit Script [ ]
End If

Open in new window

The full documentation for the plugin is in the "Documentation" link at the bottom of the plugin's home page:
http://wordpressfilemaker.com/wp-content/uploads/2010/11/Documentation.pdf

It has the details on how your function should be structured.
Thanks. Your syntax fixed the posting issue. Is there a way to post the contents of a summary report to the WP post? I.e., will FM data have to be exported as a pdf, or is there a method to pass the results of a script to xmlrpc.php? The data is by name, gender, and class grouped by class then gender with a count per gender per class.
Out of that sample syntax, items 4, 5 and 6 are the post title, teaser content and "read more" content, respectively.  You can change any of those strings to be whatever works out to a valid string in the FM calculation engine.

So, for example, where you have in the function:
"For the most accurate details, contact Kathy or Rhonda."

You could instead have:
"The totals for the week of " & myTable::thisWeek & " are: " & $data

Where myTable::thisWeek is a field in that table's current record and $data is a local variable containing more text data, where you've aggregated totals.  Or anything like that.  You can have FileMaker functions in there, or whatever data source you need, or anything else you may want to construct -- as long as the end result is a string.
Is it possible to have $data update dynamically on the WordPress side as aggregate totals change, or is this solution only as current as my last run of the script on my desktop?

Is there any server side cron configuration possible if this is hosted on FMSA?
ASKER CERTIFIED SOLUTION
Avatar of slinkygn
slinkygn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial