ATXI: AMFPHP + Textpattern Integration · May 3, 06:28 PM

ATXI by AllFlashWebsite.com

Use this AMFPHP service plugin to integrate the Textpattern database with AMFPHP to allow fast data exchange with Flash. This is essentially a faster alternative to the afw_getarticle Textpattern plugin. Edit: My original thought was that remoting would replace the afw_getarticle Textpattern plugin, however afw_getarticle still provides functionality which lets the developer leverage the Textpattern platform for XML generation in a way that ATXI cannot emulate (yet).

Installation

  • AMFPHP must be installed first.
  • Edit ATXI/atxiDB.php You must hard-code your database server, database name, user, password. This information is also stored in your textpattern folder, look for config.php. (This information was entered when you installed Textpattern)
  • Copy ATXI folder to your server IN folder amfphp/services/
  • Compile your flash file, etc…
  • An example mxml file (Flex) from the AWI* package is included. It has not been tested with this release, however it should work.

*NOTE: These files are ported directly from Amfphp Wordpress Integration. However, not all the functions could be ported to Textpattern. Those functions have been commented out in the source code.

Download

Download ATXI here.

State of the Plugin

I plan on adding additional features like Images, Files, etc. This plugin is intended to be expanded by YOU. If you add features, please share!

Compatibility

Tested with Txp-4.0.6.

Functions

getRecentPosts($howMany)

  • Get last published posts, post_id, post_title
  • returns ArrayCollection

getFullPosts($page, $count)

  • Get the full data of the last published posts
  • param $page Started page
  • param $count how many posts by page.
  • returns ArrayCollection

getPostData($postID)

  • Get all post’s data by id
  • returns ArrayCollection

getPostNameCategories($postID)

  • Get post’s categories ids
  • returns ArrayCollection

getImagesByCategory($category)

  • Get all images by category
  • returns ArrayCollection, {id, name, category, ext, w, h, alt, caption, date, author, thumbnail}

getPostCommentsCount($postID)

  • Get howmany comments have the post
  • returns Number

getPostComments($postID)

  • Get all comments by post
  • returns ArrayCollection, {id, author, email, url, date, content}

getRecentComments($limit=“10”)

  • Get the last comments, if no parameter is set, the default number is 10
  • returns ArrayCollection, {id, author, email, url, date, content}

getFullArchives()

  • Get Archives tree order by Year, Month
  • returns ArrayCollection

getArchives($type, $limit=”“)

  • Get the blog’s Archives
  • param String $type [monthly, yearly, daily]
  • param Number $limit

Updates

06.11.08 Added Functions section to this page.
06.11.08 Added getImagesByCategory (atxiClient.php)
06.11.08 Added support for table prefix (atxiDB.php)

Example Usage

TODO

— Pickle

---

Comment

Textile Help