SPONSORS

Twitter Emulation Using MooTools 1.2 and PHP

written by Nikola Lazarevic

People all over the world love Twitter because of how easy it is to use. All you need to do is type in your current status, click “Update”, and you’re done. What most people probably don’t know is how simple it is to emulate Twitter’s functionality. Using PHP, MySQL, and MooTools javascript, you can implement a Twitter-like status system in no time.

twitter_emulation

Assumptions

Before we create this system, lets keep in mind a few assumptions we’re making:

  • We assume that the only user we’re keep track of is the person logged in and that the user’s ID is 1.
  • We also assume that user has javascript enabled. The great thing about this solution is that it works with javascript turned on or off.
  • We assume that the user’s image is stored in the following directory structure: /graphics/users/{user_id}.png
  • We assume that we’re using the full MooTools 1.2 core with the Fx.Slide plugin.

The Show

Here’s the sequence of events that will take place in our concoction:

  • * The page loads and shows previous statuses (or “tweets”).
  • * The user types in their new status and clicks submit.
  • * A message slides in from behind the submit button saying “Status Updated!”
  • * The new status and user photo slides in right after the “Recent Updates” heading.

As you can see, it’s very simple functionality that will be presented in an elegant manner.

Click here to view tutorial

Authored by

Web Designer, Blogger, M.Sc in Electronic Engineering from Nis, Serbia. Founder of webexpedition18.com. You can find me on Twitter.

Enjoyed this story?

Please leave your comment about this post on the comment section below. If you liked it tell your friends by tweeting it. You can also subscribe to our feed by rss or email.

No Comments
ADD COMMENT