[FX.php List] Google-type search across tables?

Steve Winter steve at bluecrocodile.co.nz
Wed Mar 28 00:52:54 MDT 2012


Malcolm

The 'prettifier' that you speak of doesn't, in my experience, happen by default, you need to do two quite specific things to get data out like that, and hence it's really easy to avoid…

Formatted text generally requires the getAsCSS script step to convert a field from 'plain text' into HTML (not CSS as the name suggests), and then you need to use the getFieldUnencoded API call to prevent the HTML tags from being turned into their entity encoding…

Is it possible that you used 'a tool' like the Site Assistant or something like that to help you build the site, because this is most assuredly not the default behaviour of the API...

And as Tim pointed out, the HTML which is returned by the getAsCSS calc step is horrible. It's a miss-mash of HTML tags, old and new, all in upper case, with weird spans, multiple <BR> tags, and no paragraphs… if you do want formatted data then you need to run it through a post-API PHP function to clean it up and get it much more compliant… (can send you an example if you care)

Cheers
Steve

> 
> The FMP API pushes all search results through a "prettifier" by default. Not good and the very reason that I moved to FX.
> 
> I had built my first web app with FMP API and soon after delivery it broke. I didn't know about the prettifier then. We discovered that our client was using searches that coincided with the key data we were returning. Instead of having a nice list of keys of fixed length and defined structure we had a jumble of HTML. 
> 
> I expected: 
> 
> CAT001
> DOG002
> CAT002
> ...
> 
> and I was getting
> 
> CAT001
> <B>DOG</B>002
> CAT002
> 
> 
> 
> malcolm_______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

Steve Winter
+44 777 852 4776
steve at bluecrocodile.co.nz



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20120328/00298457/attachment.html


More information about the FX.php_List mailing list