Singpolyma

Technical Blog

Actionstream Plugin Update

Posted on

I am pleased to announce version 0.2 of my WordPress Actionstream plugin!

It can be downloaded from the normal place.

New this release:

  1. Better microformats support in the output
  2. Some architecture improvements and bug fixes
  3. There is now a sanity check for zero items or less items than requested
  4. Posts on the host blog are now added to the actionstream
  5. There is a well defined way to add stream items (say, from another plugin). Just create an array with the fields you need (be sure to specify identifier and created_on – GUID and unix time of publish, respectively) – usually includes title and url. Then instantiate an object of class ActionStreamItem and save in like so: (new ActionStreamItem($array_data, 'service', 'data_type', $user_id))->save();
  6. There is now a hook for other plugins to add available services. Example:
    actionstream_service_register('feed',
    
          array(
    
             'name' => 'Feed',
    
             'url' => '%s'
    
          ),
    
          array(
    
             'entries' => array(
    
                   'html_form' => '[_1] posted <a href="[_2]" rel="bookmark" class="entry-title">[_3]</a>',
    
                   'html_fields' => array('url', 'title'),
    
                   'url' => '{{ident}}',
    
                )
    
          ));
    
    

3 Responses

James Kirk

SPW, how do I call the out put in the WP template code? Not immediately seeing a reference to it. Thanks!

Stephen Paul Weber

Ah, so sorry. The template tag is:

<?php actionstream_render(); ?>

You can optionally call it like this:

<?php actionstream_render(USERID, MAX_ITEMS, HIDE_USERNAMES(true/false)); ?>

Leave a Response