Singpolyma

DiSo Actionstream

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 using the actionstream_services filter.

This plugin requires PHP5.2.0 or above.

Download the Plugin

56 Responses

James Kirk

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)

Kevin

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)

Stephen Paul Weber

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 ;)

Kevin

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

James Kirk

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.

James Kirk

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?

James Kirk

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.

Stephen Paul Weber

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.

James Kirk

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!)

Stephen Paul Weber

@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?

James Kirk

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

James Kirk

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?

Jeff

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.

Stephen Paul Weber

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.

Steve Blamey

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.

Scott Jangro

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.

Jeff

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

syhr.sg

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?

Stephen Paul Weber

@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 :)

syhr.sg

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?

Stephen Paul Weber

@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 :)

Stevo

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.

NS

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).

Jack Mottram

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.

Stephen Paul Weber

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 :)

James Kirk

Hey, SPW! Back again, my friend. New challenge for you. Just updated from 0.35 to 0.45. No challenges on the existing blog (WP 2.6). Am running a second blog on same machine (same install, in fact, however using different table prefixes for the different blogs: AA_actionstream_items and BB_actionstream_items). Actually had to manually create the actionstream_items table for the second install as I was getting the error posted above for the long time till next update error.
So far, so good. Both are working, and updating as expected.

Here's my question to you: if you're able to follow my set up above, is there a way I can simply point both of the blogs to the one db table? I realized when copying the table row data that all of that info is getting stored (and on the existing blog there was like 486 rows!) so while I'd like the same info on both blogs, I would rather not have to store it twice in my db!

Feel free to DM if this is outside the scope, however your help to make this happen would be extraordinarily cool (all your help is very cool, FYI!) Thanks in advance!

Stephen Paul Weber

@James It's your lucky day! This change isn't actually that hard and should work with the existing code. Go into the code for the plugin on the blog you want to change and edit config.php Edit the 4-from-last line which should read:
'item_table' => $wpdb->prefix.'actionstream_items'
And hardcode the prefix:
'item_table' => 'AA_actionstream_items'

James Kirk

I agree that it seemed like it would be my lucky day, but that day will be not starting now! Made the change, and immediately got the
Next Update: -20302363.53 minutes
message (where I was getting the updates after having manually created the BB_actionstream_items table. Also, went into MySQL and manually deleted the BB_actionstream_items table in case of conflict.

Thoughts?

James Kirk

And I did get this message on the BB_ blog when I removed and re-added one of the services:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/boldlygoing/public_html/wp-content/plugins/wp-diso-actionstream/classes.php on line 118

JDK.

Stephen Paul Weber

@James if the BB blog is now hard-coded to point at AA, you should not manage the streams from there at all, but only from AA. Anything it says about the streams may or may not be trustworthy. That said, that change should not have cause the side effects you describe – do they go away if you undo it?

singpolyma

And yes, that last comment is me, even though it looks faked… I commented from the wrong account by mistake.

James Kirk

Understood. So I went into the BB_ blog (JamesDKirk.com) and removed all the services from that interface. Interestingly, if you go to see the output, it only shows the web posts from AA_ blog (BoldlyGoing.com) and a lone flickr image that isn't even from my account (this may go to the intermittent bug I've been reading about over on the DiSo list??).

Back at BoldlyGoing.com, all is well in the world of ActionStream!

Jeff

Hmmm. I see that too. It updated when I listened using the Last.fm app on my Mac, but not last night using Last.fm on my iPhone. (Although the Last.fm website shows the songs I listened to last night!) Any ideas?

Anonymous

Hi There…this plugin is not working for me. I verified with my webhost i have PHP 5.0.4 and mysql 4.1.20. Are these requirements not robust enough to run this plugin? I am not getting errors, but the Twitter and Magnolia are not updating. Those are the two I have set. Any advice welcome, thanks!

mashby

Fantastic plugin. Can't imagine why it's not in the WordPress repository, because I had zero issues installing and setting it up for my site. Thank you!

Quick question on Brightkite. Where does Action Stream pull it's data from? Is it from the friendstream.rss feed?

Leave a Response