1 tilqicom Dec 08, 2010 18:57
3 tilqicom Dec 08, 2010 21:03
lturner wrote:
Off the top of my head, I don't see why the twitter plugin shouldn't be able to hook into one of the comment save hooks and tweet when a comment is posted. Something like....
void AfterCommentInsert( array &$params )
might work. It doesn't do this at the moment of course so you would need to hack the plugin to get it to work.
I guess a different option would be to use the comment rss feed and a service like http://twitterfeed.com/ or http://dlvr.it to push the comments out to twitter that way. Not sure how well it would work or how it would look on twitter but at least you could give this a go now without hacking code.
I have http://dlvr.it set up on a few of my sites and it works really well. Especially as you can post to multiple social media platforms and not just twitter.
Cheers
Lee
I liked the idea of comment feed.much appreciated
There has gotta be like tens of workarounds to achieve what i want. But afaic the most efficient way would be what i described above.
There's a word press plugin that does the above, i will try to get it working in evo, if i cant i will have to settle to that as a last resort.
4 tilqicom Dec 16, 2010 22:27
fyi, feedburner also allows you to tweet your feed, but i couldnt find information anywhere if it's real-time.
5 sam2kb Dec 17, 2010 13:18
Get the latest twitter plugin from here http://evocms.cvs.sourceforge.net/viewvc/evocms/b2evolution/blogs/plugins/twitter_plugin/_twitter.plugin.php?revision=1.27&content-type=text%2Fplain
and use this code in your plugin
tested! ;)
function AfterCommentInsert( & $params )
{
global $Plugins;
if( $TwitterPlugin = & $Plugins->get_by_code('evo_twitter') )
{
$content = array(
'title' => $params['Comment']->dget('content', 'xml'),
'url' => $params['Comment']->Item->get_tinyurl().'#c'.$params['Comment']->ID,
);
$Blog = $params['Comment']->Item->get_Blog();
$r = $TwitterPlugin->send_a_tweet( $content, $Blog, $msg );
$this->msg( $msg, 'note' );
return $r;
}
return false;
}
6 lturner Dec 17, 2010 13:26
Wouldn't it be better to just add an option to the twitter plugin to tweet out comments then everyone gets the benefit ?
L
7 sam2kb Dec 17, 2010 13:41
lturner wrote:
Wouldn't it be better to just add an option to the twitter plugin to tweet out comments then everyone gets the benefit ?
L
It's a good idea. Feel free to add the above code to the twitter plugin.
We still need an option to tweet 'Hello World' from b2evo, so those changes were necessary.
8 tilqicom Jan 27, 2011 22:34
so, has anybody added it to the plugin successfully yet, and how can i ? the the cvs for evocms plugins seems to be down
9 lturner Jan 28, 2011 11:54
I haven't added this yet. Sorry, I don't have the time to look at this at the moment.
L
Off the top of my head, I don't see why the twitter plugin shouldn't be able to hook into one of the comment save hooks and tweet when a comment is posted. Something like....
might work. It doesn't do this at the moment of course so you would need to hack the plugin to get it to work.
I guess a different option would be to use the comment rss feed and a service like http://twitterfeed.com/ or http://dlvr.it to push the comments out to twitter that way. Not sure how well it would work or how it would look on twitter but at least you could give this a go now without hacking code.
I have http://dlvr.it set up on a few of my sites and it works really well. Especially as you can post to multiple social media platforms and not just twitter.
Cheers
Lee