DiSo Actionstream

This is a port of the MT Actionstream plugin to Wordpress. It uses the same YAML format, making services easy to add and configure. You can see it in action on my main page.

Settings are under Users > Action Stream. You can add services, preview the stream, or import a list of services from another site.

This plugin works as a sidebar widget. You can also include it in a post/page by using the tag <!--actionstream(USERID/USERNAME)-->

For advanced users, the template tag is:

<?php actionstream_render(); ?>

You can optionally call it like this:

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

As part of DiSo, the SVN is on Google Code

Developers of other plugins can add their own service types on the fly to be options for the user by calling the register_actionstream_service with a service name, and two arrays paralleling the content of the two sections of the YAML file.

Download the Plugin

There is an RSS Feed for comments on this post.
You can trackback from you own site.

37 Comments

  1. Comment at 2008-03-18 13:39 by UNITED STATES Windows XP Mozilla Firefox 2.0.0.12 James Kirk
    body

    Receiving this area in my profile page where I add a service to the Action Stream:

    Warning: Invalid argument supplied for foreach() in /home/.lion/singpolyma/singpolyma.net/wordpress/wp-content/plugins/wp-diso-actionstream/actionstream.php on line 252

    Also, seems to take an inordinately long time for the page to refresh, but that may be due to the nature of what's happening?

    At least here the page comes back, albeit with the above error. On one of my blogs, the page just refreshes white (but has the top most part of the admin bar (sans navigation, though)

  2. Comment at 2008-03-18 14:36 by CANADA Windows Vista Mozilla Firefox 2.0.0.12 Stephen Paul Weber
    body

    What services have you added? This seems to be a bug with the YAML for one of them.

  3. Comment at 2008-03-18 14:51 by UNITED STATES Windows XP Mozilla Firefox 2.0.0.12 James Kirk
    body

    I had added my twitter and flickr accounts.

  4. Comment at 2008-03-19 13:22 by UNITED STATES Windows XP Flock 1.1 Bill
    body

    How can you remove a service that has been added?

  5. Comment at 2008-03-19 20:21 by CANADA Linux Flock 1.1 Stephen Paul Weber
    body

    @Bill - you currently can't - this will be added soon :)

  6. Comment at 2008-03-21 03:14 by UNITED STATES Mac OS X Mozilla Firefox 3.0b4 Kevin
    body

    Stephen, this is awesome. So far none of the lifestreaming widgets have been able to showcase photos and videos the way yours does. Kudos!

    Just two questions:
    1. Where are the service user IDs stored once I enter them (so I can edit later)?
    2. Which files do I go to to style the lifestream CSS? (my blog's sidebar lifestream looks messy)

  7. Comment at 2008-03-24 08:36 by Windows Vista Mozilla Firefox 2.0.0.12 Stephen Paul Weber
    body

    They are stored on your user profile (ie, in the usermeta table). Deleting/editing services is a feature in the next release (soon, I hope, have to do more debug with kirk).

    You can style it with template CSS I should think - but if you look in /wp-content/plugins/wp-diso-actionstream/styles/ you should find what you're looking for :)

    The messiness seems to be more your styles overriding the defaults than the defaults being messy ;)

  8. Comment at 2008-03-24 11:02 by UNITED STATES Mac OS X Mozilla Firefox 3.0b4 Kevin
    body

    Thanks Stephen! I know there's some kind of interference from the template CSS. Trying to figure out how to sanitize it. :)

  9. Comment at 2008-03-24 17:38 by UNITED STATES Mac OS X Safari 525.13 Jeff
    body

    Just my two cents… AWESOME plugin!!

  10. Comment at 2008-03-24 22:18 by UNITED STATES Windows XP Mozilla Firefox 2.0.0.12 James Kirk
    body

    Same results. The admin page is not getting refreshed. Manual refresh shows the service has been added, though nothing in the preview section. Nothing getting written to the post page. Nothing getting written to the db.

  11. Comment at 2008-03-24 22:21 by CANADA Linux Flock 1.1 Stephen Paul Weber
    body

    Per http://twitter.com/singpolyma/statuses/776555977 this plugin actually requires PHP5.2.0 or above

  12. Comment at 2008-03-25 00:12 by UNITED STATES Windows XP Mozilla Firefox 2.0.0.12 James Kirk
    body

    Okay, SPW. I was able to get my linux server's php upgraded to v.5.2.5 without seemingly too much challenge. Next I deactivated and reactivated the latest version of the AS plugin, and was able to get output in both the preview screen as well as the post page.

    Clearly, I'll look into the CSS styling to make things fit tighter.

    One thing: I went to enter my upcoming user name and on entering, got:

    Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Start tag expected, '<' not found in /var/www/vhosts/dev.boldlygoing.com/httpdocs/wp-content/plugins/wp-diso-actionstream/actionstream.php on line 323

    Warning: simplexml_load_string() [function.simplexml-load-string]: Couldn't load User ID<!– web5.up.mud.yahoo.com uncompressed Mon Mar 24 22:04:01 in /var/www/vhosts/dev.boldlygoing.com/httpdocs/wp-content/plugins/wp-diso-actionstream/actionstream.php on line 323

    Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in /var/www/vhosts/dev.boldlygoing.com/httpdocs/wp-content/plugins/wp-diso-actionstream/actionstream.php on line 323

    Plus, do you have any write up on exactly what format your plugin is looking for regarding each service? For instance, I "assume" that for twitter I enter my user name "jameskirk" for flickr, "jamesdkirk" for website (which actually the plugin seems to output it regardless if I've entered it as a service), for my site service I entered, "http://boldlygoing.com".

    Just curious if it might be helpful for the general installing/using public if the admin page had a listing of what the user is expected to input into the text box.

    Thanks for your help. Hopefully, our work will help others as well?

  13. Comment at 2008-03-25 04:35 by UNITED STATES Windows XP Mozilla Firefox 2.0.0.12 James Kirk
    body

    Just for grins, I attempted to install the plugin on my live 2.2.3 WP install. Everything seemed fine in the admin sections, but I was unable to get the output in the sidebar (where this had worked correctly on the same theme on the WP 2.5RC1 dev install.) Not a big deal. I'll be upgrading the core code when the final release of WP 2.5 occurs, just thought you'd like to know.

  14. Comment at 2008-03-25 06:57 by CANADA Linux Flock 1.1 Stephen Paul Weber
    body

    Thanks, Kirk, that error will go away next release :) Glad we finally found the problem. As for the format for what to enter - I have that data, just need to get it into UI land somehow.

  15. Comment at 2008-03-25 18:48 by UNITED STATES Windows XP Mozilla Firefox 2.0.0.12 James Kirk
    body

    You'll get there, no doubt. Any thoughts on what I have to do/which version I should use on my live WP 2.2.3 install? I did revert back to your .20 release, but was not getting any output in the side bar or the post page (though AS seemed fine on the admin page preview).

    Now that I've gotten the taste for it, I want it now! and not until I push WP 2.5 live (whenever that is likely to happen!)

  16. Comment at 2008-03-25 18:54 by CANADA Linux Flock 1.1 Stephen Paul Weber
    body

    @kirk - what's the exact template tag you put in your sidebar? No output at all? Did you put it in a PHP-enabled area?

  17. Comment at 2008-03-25 19:19 by UNITED STATES Windows XP Mozilla Firefox 2.0.0.12 James Kirk
    body

    Ack! Great question. I "thought" I had the sidebar widget PHP-enabled. Turns out that when I was working on the WP 2.5RC1 dev area, I had to update that sidebar widget to a plugin that worked for 2.5. Paying ZERO attention, I simply loaded that up in my current 2.2.3 install, live, and turned off the previously (known) working "widgetize anything" sidebar plugin.

    Thanks for just asking the question. Now have it working on the 2.2.3 live site, BoldlyGoing.com

  18. Comment at 2008-03-25 19:44 by UNITED STATES Windows XP Mozilla Firefox 2.0.0.12 James Kirk
    body

    As you can see on my home page, I've been able to get a certain amount of styling done on the presentation of the Action Stream. Not seeming to be able to affect the image output, however. Was hoping to be able to put in a nice color coordinated border around the flickr images to make them pop a bit more from the white background. Thoughts?

  19. Comment at 2008-03-25 19:56 by CANADA Linux Flock 1.1 Stephen Paul Weber
    body

    Try styling like so:

    .action-stream-list .service-flickr .entry-title img {
    padding: 1em;
    background-color: #ccc;
    }

  20. Comment at 2008-03-25 20:04 by UNITED STATES Windows XP Mozilla Firefox 2.0.0.12 James Kirk
    body

    Ah, that got it there. You da mang! Thanks, SPW.

  21. Comment at 2008-03-27 14:54 by UNITED STATES Mac OS X Safari 525.13 Jeff
    body

    Hoping for the ability to reformat date. Also wishing for automatic
    formatting in sidebars. My themes keep nulling the images…

    What I mean by that is the feed icons are replaced by the sidebar li or ul class bullets or images. I'd like to see the plugin contain code that overrides the sidebar code ONLY at the point of including the feed icons.

    Some of the problem in my theme was spacing. Once I gave the plugin a little more space on the left margin, the icons showed up, but it was trial and effect trying to get it to work.

  22. Comment at 2008-03-27 18:05 by CANADA Ubuntu Linux Mozilla Firefox 2.0.0.12 Stephen Paul Weber
    body

    Next version will take date format and timezone from the core WordPress settings.

    The CSS clashing problem is a bigger one. If your CSS has more specific selectors (according to the CSS rules, which I barely understand) then your styles will override those of the plugin. The trick is to get the plugin styles to work when the user wants them, and to be overridable otherwise. I think we're as close to that as I know how to get us with 0.35.

  23. Comment at 2008-03-28 17:37 by UNITED KINGDOM Mac OS X Safari 525.13 Cristiano Betta
    body

    Somehow the list doesn't want to collapse groups in Safari. Seems to be a css issue.

  24. Comment at 2008-04-01 08:37 by UNITED KINGDOM Windows XP Mozilla Firefox 2.0.0.13 Steve Blamey
    body

    Great plugin and thanks for all your work on this and Diso. Guess you know that installation does not work in WP2.5. Problem seems to be down to plugin installs running in non-global scope in 2.5. Once I had added global declaration to actionstream.php the table got created and my stream items showed up.

  25. Comment at 2008-04-02 23:11 by UNITED STATES Mac OS X Mozilla Firefox 3.0b5 Scott Jangro
    body

    Stephen,

    Besides the database not getting created, which I just created manually before I saw the note about a global var in WP 2.5, I had to make a few changes to actionstream.php to get things working properly.

    Specifically a $cnt var was missing the ->__toString method and the toggle display JS was operating on every div until I modified the group_id with a counter.

    Drop me an email if you want me to email you the file so you can diff it.

    Thanks for this. I love it.

  26. Comment at 2008-04-05 10:57 by UNITED STATES Mac OS X Flock 1.1.1 Jeff
    body

    What's the most current version..?

    Second, I just noticed today that Safari does not combine streams… For instance, in my sidebar, every single individual song that I listened to on last.fm is listed, as are multiple postings from any other service I use on that day.

    However, in Flock or Firefox, it lists just the last one and underneath says, "And 14 more…"

    I would like Safari to display that as well. Any ideas here?

    Jeff

  27. Comment at 2008-04-28 05:33 by AUSTRALIA Windows Vista Mozilla Firefox 2.0.0.14 syhr.sg
    body

    I keep getting Cannot be activated because of fatal error messages every time I activate this. There is no error message in sight, and the actionstream configs & pulls down info easy. HOWEVER, the schedule function seems to die somewhere along the line because the "Next Update" box (Users -> Actionstream) shows Next Update: -20156312.4 minutes. I'm running WP 2.5.1 and the only other plugin is OpenID. Any ideas?

  28. Comment at 2008-04-28 07:23 by CANADA Linux Flock 1.1.2 Stephen Paul Weber
    body

    @syhr.sg Did the table wp_actionstream_items get created? If not, I'll tweak the plugin and send it to you again and see if we can't get this working in WP2.5 :)

  29. Comment at 2008-05-03 00:51 by AUSTRALIA Windows Vista Mozilla Firefox 2.0.0.14 syhr.sg
    body

    I'm new to MySQL, so bear with me :)
    wp_actionstream_items seems to exist, but all the fields except identifier_hash (user_id, created_on, service, setup_idx & data) appear to be null. At least there's a 'Yes' in the Null column in PHPMySQL. Is this right?

  30. Comment at 2008-05-03 10:12 by CANADA Linux Flock 1.1.2 Stephen Paul Weber
    body

    @sygr.sg all the "yes" in the NULL column on PHPMySQL means is that it *can* be null… unless it's on data, in which case that's weird. Sounds like there's no data in there though, since the wp-cron isn't set. I haven't tested on WP2.5, only made changes suggested to me by 2.5 users. I'll upgrade my test blog and see if I can reproduce your problem :)

  31. Comment at 2008-05-03 13:59 by UNITED KINGDOM Windows XP Internet Explorer 7.0 Stevo
    body

    When first time activating in 2.5 i get:

    Fatal error: Cannot redeclare actionstream_plugin_activation() (previously declared in C:\xampplite\htdocs\wordpress\wp-content\plugins\wp-diso-actionstream\actionstream.php:21) in C:\xampplite\htdocs\wordpress\wp-content\plugins\wp-diso-actionstream\actionstream.php on line 24

    however the plugin does load and you can add feeds however in users-actionstream i have

    Next Update: -20164016.1 minutes
    No items to display in actionstream

    Ive also looked for table wp_actionstream_items in mysql and it doesnt appear to be there.

  32. Comment at 2008-05-03 19:53 by CANADA Linux Flock 1.1.2 Stephen Paul Weber
    body

    @Stevo - are you running 0.45? That's the exact problem that I fixed

  33. Comment at 2008-05-05 00:11 by UNITED STATES Mac OS X Mozilla Firefox 3.0b5 NS
    body

    On 2.5.1 I can't activate the plugin… I get:

    Plugin could not be activated because it triggered a fatal error.
    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in (snip)/wp-content/plugins/wp-diso-actionstream/classes.php on line 5

    It gave the same error on 0.40 and 0.45 (svn rev 137).

  34. Comment at 2008-05-05 10:00 by CANADA Linux Flock 1.1.2 Stephen Paul Weber
    body

    @NS looks like you aren't running PHP5.2 or higher

  35. Comment at 2008-05-10 09:08 by UNITED KINGDOM Mac OS X Mozilla Firefox 2.0.0.14 Jack Mottram
    body

    Great plugin.

    A few bugs I've noticed after installing v0.45:

    Random tweets are showing up from (I assume) other accounts than mine.
    Goodreads actions show the user id number, not the name associated with the account, and fails to display the author of any books.
    You can only add one website stream, and the feature doesn't seem to work at all (tried main URL and Atom/RSS URLs)

    Also, not a bug, but would it'd be nice to have an option to disable the 'and x more' feature, so that everything is streamed right onto the page (I don't know enough about PHP to alter the classes.php file safely).

    Sorry, don't mean to sound ungrateful - this really is an amazing addition to WP.

  36. Comment at 2008-05-11 20:32 by CANADA Linux Mozilla Firefox 3.0b5 Stephen Paul Weber
    body

    RE Jack - Where do have this installed that you're seeing the 'random tweets' behaviour? I am not experiencing this, might it have been a Twitter glitch?

    Will look into the GoodReads behaviour for the next release.

    You can only add one of any service, I will re-evaluate this in a future release. The "website" option *should* work but is untested as far as I know - will look.

    An "un-dedupe" function to be closer to the MT behaviour? Can do :)

  37. Comment at 2008-05-14 02:48 by UNITED KINGDOM Windows Vista Mozilla Firefox 2.0.0.14 Anonymous
    body

    so this requires php5 to run? gah, my host won't upgrade :(

1 Trackbacks

  1. Trackback at 2008-04-03 12:46 by Sweatcast: Two Miracles and Good People | Jangro.com
    body

    [...] Share your thoughts about GP's on GoodPeopleDay.net [...]

Post a Comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Stephen Paul Weber