Showcase of a Twitter clone, using Drupal.

Events happening in the community are now at Drupal community events on www.drupal.org.
mariusooms's picture

Many times I've scratched my head at Drupal why I couldn't create a simple micro-blogging site. All the ingredients and modules are there, such as, Views, Rules, Flag, User management modules, CCK, Content Types. Yet one part was failing, which goes to the core of micro-blogging, to only list content of users you choose to follow. You can flag users, but you can not yet filter content to only list the nodes of the user you flagged.

However using Friendlist, now we can. The friendlist module (which I'm proudly co-maintaining) has the ability to list content created of the established users relations. This is through use of an unofficial patch, which is currently being tested. By creating this test site, I'm looking into how far Drupal can be used to clone Twitter. I think I've gotten quite far, I have not tested it extensively and I encourage you to jump in and see for yourself.

The module used are:
- Friendlist
- Views
- Rules
- Flag
- CCK
- Automatic Nodetitles
- Form Block
- Filefield
- ImageAPI
- Imagefield
- ImageCache
- Imagecache Profile Pictures
- Pathauto
- Quick Tabs
- Reg with Pic
- Time Ago
- Token
- String Overrides

* Not all these modules are required, but to create the Twitter clone, you do pretty much need them.

There are a bunch of user profiles pre-created based on Marvel characters. See the list here: http://druplr.ywamnation.com/characters. The all share the same password: marvel, except Captain America, who is reserved for the admin.

Feel free to log in on any of these accounts and test it out. Or spend some more time and register another Marvel character. That way you can test the Rules integration for email notification.

As you gathered from the url above, I have set up a test domain at http://druplr.ywamnation.com and used the name Druplr. I saw in one of the Group discussions and figured it was good to keep building/testing with that name.

The idea is to create a Twitter clone, but it could mimic any other micro-blogging flavor. The theme is kept inline with Garland, using the Minelli fixed width theme. Basic css is used to modify things a bit. Since this was created as a test site, it does not intent to work on all browser platforms, expect display flaws - especially when using IE. It was developed on a MAC, so I've never even seen it in IE. So, if you test, please test with a Mozilla browser.

NOTE: I've only created a few connections / updates for the first few characters. Feel free to extend testing this showcase and leave some feedback here.

Comments

Fun!

theneemies's picture

That's a pretty fun project. It would gain some serious traction if it integrated with Twitter (Twitter client, but more), and maybe used jQuery Spy (http://leftlogic.com/lounge/articles/jquery_spy2/).

Yes...

mariusooms's picture

That would be very nice, but I know jack about ajax :)

Regards,

Marius

I like the name Dritter as well (http://druplr.ywamnation.com/node/36)

Updates are nodes

mariusooms's picture

Reference update: http://druplr.ywamnation.com/node/35

Yes...this seems a bit overkill...especially when, according to techcrunch, Twitter logs 3 million updates a day. Then again, this is a test site to see if cloning can be done using only existing modules with no or very little modifications. As someone mentioned with a 1000 users with 3 updates a day you would have 3 million nodes a year. Maybe there exist a module to purge nodes after a time as well. Since micro-blogging is not made for its archives, but updates. Nobody reads twits from 6 months ago.

Thoughts on this anyone?

Regards,

Marius

Favorites tab doesn't update with ajax

mariusooms's picture

Reference update: http://druplr.ywamnation.com/node/34

This would be nice if it did, but it doesn't. Currently it just uses quick tabs to create tabs. However this is not a big deal, since favorites are for safe keeping so that list doesn't need to be ajax loaded. Also people don't favorite updates and then click on favorites to see the list. We do here, because of testing, but in a live situation, users would flag an update and move on. For example, you don't bookmark a pgae and than check your bookmarks right away to see if the bookmark was added.

Make sense?

Regards,

Marius

Custom tables

niklp's picture

I would think that you can make this slighly more flexible by using either custom tables to store the data and a custom module to manage the data - then use Views 2 to pull the data out?

Web Development in Nottingham, UK by Kineta Systems

Agreed, microblogging sites

kyle_mathews's picture

Agreed, microblogging sites generate tons of content. All the data probably should be on one table to make things more efficient.

Kyle Mathews

Kyle Mathews

Agreed x2, however, the

mariusooms's picture

Agreed x2, however, the current sate is that such a module does not exist and therefor micro-blogging is still not possible at the moment other than using nodes. I assume it could be easy to create a simple storage table for the updates, but to have it integrate with Views and Rules is another story. Until that time the above approach is the first working example of true micro-blogging, though not ultimately efficient.

Regards,

Marius

PS or am I missing a module that could harvest the updates?

Wow, that is really amazing,

DerTobi75's picture

Wow, that is really amazing, I am trying to rebuild this ;)

What is the "- Time Ago" Module? Are you going to document how you set everything up? And will the unofficial patch become a part of friendlist?

Regards,

Tobi

timeago module

Great twitter clone! I am

chris_car's picture

Great twitter clone! I am impressed!

Your post made me think of distributed micro blogging http://groups.drupal.org/node/14953
Maybe it's the next step to include openmicroblogging into the friendslist module, in order to allow making friends beyond web site domain barriers...


http://developer.test1212.org
http://test1212.org
http://meidia.ca

Very Cool

tiburon1523's picture

Great work man, you've given me a heap of ideas.

I'm working along the same direction with MicroSkirts. I'm not trying to clone twitter but use microblogging as a way to get users interact who would not normally blog. I added photos also as a quick way to share.

I'm actually stuck now finding a way to get twitter posts in to the system for users who want their tweets to appear in the stream.

Here's the site- http://microskirts.skirt.com/

--tiburon

--tiburon

socialnicheguru's picture

subscribing

Wow, I'm amazed! Would be

kiryoku's picture

Wow, I'm amazed!
Would be nice to see a tutorial or screencast on how you put the modules together :)

hacked site

lostboys's picture

Considering the warning firefox gives and the fact that all links redirect to http://may-beonce.ru/infinity?8 (or similar), it looks like http://druplr.ywamnation.com/ was hacked.

It is in any case unusable

Social Networking Sites

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: