Sometimes I am amazed at the sheer power of Drupal. Last night was one of those times.

I had an idea awhile back to create an AllTop clone for Twitter (basically, the top people to follow for particular topics loaded in typical AllTop formatting). I also wanted an area where the sidebar would load in tweets every 5 seconds or so from these people in real time. There were requirements to manage all this and so forth as well.

I spec'd it out and tried to get it created on the cheap in India. They came back with 30 man days. Even at $17 dollars an hour this worked out to approx 4 grand. This was just a silly idea I had and wanted to test out and didn't want to shell out 4K (add to that the fact that I didn't perceive it would take 30 man days -- after all, I still remember how to hack PHP code).

The last two nights after work, I decided to see if I could build this thing in Drupal. I did. In 6 hours (4 hours one night, 2 hours the other).

Let's break down the math: 30 man days with India. 6 hours with Drupal.

I used Twitter module, CCK and Views + one custom module with 20 lines of code. It does everything I wanted it to. It rocks. It's fun and I can look at a variety of topics without having to subscribe to all of them.

Check out the top people to follow for Drupal here: http://www.tweettop.com/topic/drupal (Please let me know if there any Drupal pros I need to add)

Check out the other 18 topics (and growing) here: http://www.tweettop.com (Please let me know if you would like me to add specific topics)

Drupal, as I've said before, Rocks.

Jordan Willms
http://www.sumolabs.com
http://twitter.com/jordanwillms

Comments

yeeloon’s picture

It looks fantastic! *thumbs up*

Btw, how do you create or what did you use for the page (next and previous browsing, ajaxy stuff) without refreshing the page?

Mind to share your tips... ;-)

Thanks,
yeeloon

jpwillms’s picture

Yeelon -

In Drupal 6.x + Views, Views can automatically add these pagers for you (In other words, I didn't have to do a think but turn Ajax "On").

Cheers!

J

jocklife’s picture

I was under the impression Twitter was a pull service so how do you get it in to Drupal? Is your custom code anywhere that could be "share?/" I would love to replicate this, but not that way you are doing it, just specific to our Twitter "clients."

jpwillms’s picture

Could be done in two ways easily enough.

1) Using the RSS feeds per user (which aggregator module can easily suck in). Views can then display the posts.

2) Using the Twitter Module (which is what we did). We then used views to display in all the twitter posts for a user. The Twitter module is great and automatically pulls in new posts via cron.

Twitter module is more advantageous since you have more granular control over the data for each post (avatar, time, msg, etc)

Let me know if you have any additional questions and I'll be more than happy to help you sort out a solution.

J

http://twitter.com/jordanwillms
http://sumolabs.com

rayray’s picture

So, how does the concept of "users" fit into this picture? Are you creating a "user" for each topic, or each Twitter feed, in your app?

If you were to extend this system to allow people to sign up and create their own "topic", containing any number of feeds (like the new service at AllTop), how would you implement that?

Thanks for the info and good work!

einsteinsboi’s picture

And all in 6 hours? Impressive!

Drupal rocks!

Lazlo’s picture

Nice work.

jmontano’s picture

Nice work. Congratulations

DerTobi75’s picture

That really looks awesome!

Did you use Panels to put more the one view of tweets on a page!?

Regards,

Tobi

mmcbride’s picture

Jordan,

Really nice job, how do you assign twitter users to the different topics?

Thanks, Maurice.

jjeff’s picture

Some of my favorite Drupal Twitterers include @eaton, @webchick, @robertDouglass, and... uhmm... me! (@jjeff)

seutje’s picture

quite impressive, but where's @eaton ? :(
or should he have his own category called "witty puns" or something?

btw, lil bug in it: if you go to http://www.tweettop.com/topic/drupal?page=1 u'll see that all thingies are on page 2, maybe should find a way to use different query argument for each one like page_0=1 page_1=1 ...

but most ppl have js on and don't even notice anyway :)

kudo's!

richardjam’s picture

I have a similar project are u willing to share your custom module

dhana_space1’s picture

good Job in 6 hours, But...i visited the website now, Looks like lots of implementation has added after that.
Am i correct ? I mean, whatever i see now, is done in 6 hours ? :-)

---

jpwillms’s picture

http://www.sumolabs.com/blog/how-i-built-tweettopcom-6-hours-drupal

The second revision took about 5 additional man hours, only because I was learning the twitter api. Otherwise, it should have been quicker.

Cheers

J