I've created a Drupal 7 version of this module that is working successfully on a website that I've built. I see that this module is marked "obsolete" and "unsupported," but if the module maintainer would like to hand over maintainer status to me, I could provide minimal support at least. I needed a module for my own website that would let me create blocks which display tweets selected by hashtag, and it turned out to be easier for me to upgrade the Twitter Search module to Drupal 7 than to write a new module from scratch for this purpose.

Comments

sheldon rampton’s picture

StatusFileSize
new18.31 KB

Here's a patch that upgrades this module to my version for Drupal 7. It requires the 7.x-5.6 version of the Twitter module, and also requires a patch to fix the search_tweets method in the Twitter module's class library, as documented here:

http://drupal.org/node/1963524

sheldon rampton’s picture

StatusFileSize
new18.3 KB

I noticed a bug in my previous version, so here's a rerolled patch that fixes it.

I've also created a Github repository with the Drupal 7 code so people can get it that way (and so it is easier for me to maintain while I'm waiting to see if the current module maintainer can give me maintainer status):

https://github.com/sheldonrampton/twitter_search

sheldon rampton’s picture

If anyone would care to see an example of the Twitter Search module for D7 in actual production, here's a website I built using it:

http://www.hackforchange.org/

The Twitter hashtag blocks on the home page and on individual event pages were all created using the Twitter Search module and Drupal views. I also wrote a few lines of glue code so that each event node can display a different hashtag block, depending on a textfield entered when the event node is saved.

lukus’s picture

Hey Sheldon

I've installed the module and I've added a search term but I'm unable to retrieve any listings .. maybe I'm not using it in the correct way.

Could you let me know what I need to do to get the results?

One other thing, if I try to delete my term - I'm unable to do so .. I'm asked if I'm sure I want to delete the term "", rather than the term requested.

in file twitter_search.pages.inc

<?php
function twitter_search_delete_confirm($form, &$form_state) {
  $twitter_search_id = check_plain(arg(4));
?>

should be

<?php
function twitter_search_delete_confirm($form, &$form_state) {
  $twitter_search_id = check_plain(arg(6));
?>
lukus’s picture

Also, could you confirm whether this is using Twitters API v.1?

sheldon rampton’s picture

@lukus: Yes, this uses the new Twitter API, as does the current release of the Twitter module upon which it depends.

It should retrieve Twitter statuses containing your search terms when you run cron.

I'll look into the bug you reported related to deletion of search terms.

lukus’s picture

@Sheldon Rampton;

Hey, works very well - thank you very much for all your work. Really is very useful.

I didn't realise that the twitter module needed the patch (which you mention in http://drupal.org/node/1963424#comment-7267516); after I applied that all worked as designed.

Thanks :)

sheldon rampton’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Fixed

@lukus: The module's original owner has added me as a co-maintainer of the project, so I've created a full dev release here for the 7.x-1.x version of this module. I've also updated the twitter_search_delete_confirm() function to use the correct argument. Thanks for that fix.

Status: Fixed » Closed (fixed)

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