A project I am working on needs this for D6; are you interested in the code?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

madhusudan’s picture

This is already there..

check this
http://www.ostraining.com/blog/drupal/showing-a-twitter-feed-in-a-drupal...

and this is working for me. :-)

joachim’s picture

Thanks for the link... doesn't seem to be code that's hosted on d.org though.

My point was that a D6 version of this could live in this project's git repository and be downloadable here.

I'll certainly take a look at the code at that link though. (Not sure why it's asking for twitter password though, and how it's storing it...)

ZenDoodles’s picture

I'd gladly look at a D6 port if you wanted to contribute it.

Anonymous’s picture

+1 for an "official" D6 version of this module

pabloveintitres’s picture

+2 for a 6.x "official", the lack on the 6.x version linked here is that you can't display hashtags instead an user's tweets.

gunwitch’s picture

+3 for a 6.x version.
So many sites still use D6 and we need a *simple* Twitter module without all these bells and whistles just for listing our recent tweets.

missmobtown’s picture

Yes, please! Desperate for a reliable, *simple* Twitter mod for 6.x

redaccion’s picture

+1

Laxman13’s picture

Status: Needs review » Active
FileSize
12.22 KB

As it turns out, I needed a D6 version of this as well. Here is a basic back port to 6.x. Very few changes were made from the 7.x version, just a few fixes here and there.

For some reason I could not get the curl request working on either of the servers I tried it on, and honestly I don't know curl so swapped in a drupal_http_request() instead and it works fine. The code changes for this will be found in twitter.class.php under function search() (line 125) and in twitter_block.module (line 183), changed json_decode($twitter->getJSON()); to json_decode($twitter->getJSON()->data);

Laxman13’s picture

Status: Active » Needs review

changing status

ZenDoodles’s picture

Assigned: Unassigned » ZenDoodles
Category: feature » task
Status: Active » Needs review
Issue tags: +Needs backport to D6

Beautiful @Laxman13 I'm going to review and test this.

Thanks so much!

ahoymehearties’s picture

Much thanks, Laxman! I'm getting an error though - Invalid argument supplied for foreach() on line 270. That is:

function theme_twitter_block($twitter_result, $variables = array()) {
  foreach($twitter_result as $tweet) {
    $tweets[] = theme('twitter_block_tweets', array('tweet' => $tweet));
  }

It sometimes works fine, and it sometimes just fails completely. I'm really at a loss as to what to do in that case! If you're around, I'd love a bit of help.

cweagans’s picture

Status: Needs review » Postponed

Let's finish 7.x first.

ZenDoodles’s picture

Status: Postponed » Active

I've begun the backport (see git instructionsfor the code. It is still broken, but I ran out of time. I'm sorry, but I do not expect this to be a high priority, but now that it's in git, folks can work on patches.

Drupal 8 is scheduled for feature freeze soon. Y'all should really upgrade anyhow. :)

ZenDoodles’s picture

Assigned: ZenDoodles » Unassigned
Devin Carlson’s picture

Title: D6 version? » Backport Twitter Block to Drupal 6
Assigned: Unassigned » Devin Carlson
Status: Active » Needs review
FileSize
23.25 KB

A patch to fix the remaining problems with the 6.x branch and bring it up to speed with the 7.x branch.

I'll try to do some extensive testing tonight and fix up and remaining problems but help is always appreciated!

Devin Carlson’s picture

Status: Needs review » Fixed

Committed #16 to 6.x-1.x.

I'm marking this as fixed and will open new issues for specific problems with the 6.x-1.x branch.

Status: Fixed » Closed (fixed)
Issue tags: -Needs backport to D6

Automatically closed -- issue fixed for 2 weeks with no activity.

mttjn’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs review

Sorry to be stupid, but where is the 6.x-1.x. version as per #17 please? I can't see it on the "View all releases" page at https://drupal.org/node/1037610/release.

Since I couldn't find it I tried to recreate the process using patch in #16 on the module in #9 and it keeps failing:

matthew@MMBP:~/Downloads/twitter_block$ patch < /Users/matthew/Downloads/twitter_block/fix-remaining-issues-1077244-16.patch
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/plugins/content_types/twitter_block.inc b/plugins/content_types/twitter_block.inc
|index 8d8a935..e4b44b0 100644
|--- a/plugins/content_types/twitter_block.inc
|+++ b/plugins/content_types/twitter_block.inc
--------------------------

Would appreciate any help. Thanks.

Status: Needs review » Needs work

The last submitted patch, 16: fix-remaining-issues-1077244-16.patch, failed testing.

cweagans’s picture

mttjn, there's no snapshot release or anything, so you'll have to pull it from git. See directions on this page: https://drupal.org/node/1037610/git-instructions/6.x-1.x

mttjn’s picture

Status: Needs work » Fixed

Thanks, cweagans

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.