Flashpress 0.8 Released

Changes

1 / Changes to WpPostVo Object

  • a / If the post has a featured image, the URL to it is included, otherwise its an empty string
  • b / The posts tags are listed (if it has any) as an array of TermVo Objects
  • c / The posts categories are listed (if it has any) as an array of TermVo Objects
  • d / The posts attachments are listed as an array of their URLS

2 / Changed inheritance of WpPostVo and WpSearchVo. Inheritance chain is as follows: WpPostbase->WpPostVo->WpSearchVo. Reason for this change is that the WpSearchVo only differs from the WpPostVo in its use of the ‘score’ attribute. Also, it makes sense that the WpSearchVo object returns as much information as a standard WpPostVo object.

3 / Fixed an variable type issue with searching that meant that only integer based score results were returned. This has been changed to a Number.

4 / Rejigging of internal helper methods

5 / Removal of two redundant VoObjects, which had been replaced by WpTermVo.

6 / Package name of the actionscript demo has changed from ‘noponies’ to ‘com.reformation’. This is due to the slow move of this blog to a new location.

Let me know how performance is with this release. The internal post retrieval method is now doing more work, but should save you having to make extra database requests. I’ve tested it with a request for 100 posts and its quick. But let me know. Let me know if you encounter any bugs etc.

I’ve not had time to finish the more full featured demo, but its coming.

Download here: Flash Press 0.8 (791)

6 Neighs about “Flashpress 0.8 Released”



28inch Neighed:

Wonderful !

I can`t wait to test it !

Rien Neighed:

Thanks for your very hard work, I really appreciate it. Been using it for a long time now.

My issue:
I can call my custom post types using getPosts(“post_type=travels”) but somehow the categories and tags properties of each PostVO have empty arrays. (When I look in the AMFPHP Service Browser)

They should be filled in my case with my custom country tags.

With the standard post types I do not have any issues, those arrays are filled with tags or termVO’s. Where could be the/my mistake?

Dale Neighed:

@ REIN,

I take you have a custom taxonomy for your country tags?

At the moment, and its a current limitation, the internal tag parser does a look up via wp_get_object_terms, and uses ‘post_tag’ as an argument, or when looking up categories, its using ‘category’.

To be honest I actually didn’t think anyone would be using custom taxonomies with this, so thats my bad. When I wrote that internal method I flagged that as an issue, and then promptly forgot about it when I released the files.

I’ll work out away to pass in a taxonomy to this method as an extra parameter of the getsPosts method and that should sort you out.

Rien Neighed:

Yes, you’re right. Thank you for the swift replies.

I do have a custom post type travel(=a place) which can have a “custom taxonomy” country.

If you’d like access to my wordpress/amfphp browser I can DM you on Twitter.

Dale Neighed:

@REIN,

Ok, after looking into this I think I have a couple of solutions that might cover your needs.

1 / Add a new property to the PostVO objects, called ‘customTax’ or similar. This would be an array that holds any and all custom taxonomies. Filtering and sorting would have to be done client side.
2 / Add two new properties to the PostVO object, to handle hierarchical (category) or non hierarchical (tags). That simply makes any filtering client side, a little easier.
3 / Remove the tags and categories properties from the PostVO objects and replace them with a generic ‘taxonomies’ property, that would hold any and all taxonomies for the post. Again, filtering etc would be client side.

Options one or two are probably the best options.

WordPress 3.1 is going to offer some new features for dealing with custom taxonomies, that I’ll be able to use here.

viaria Neighed:

waiting to see online.

Leave a neigh?