anyone know a good tutorial of how to make the status bar found in the new facebook? the one on the bottom. looks really cool
i was thinking it was written in either ajax or jquery. but not sure.
-
In order to have it always be in the bottom, that is more of CSS than javascript. I think you would get better answers if you were more specific. For example, I would want the answer to revolve around as to how the chatroom works on facebook. Is the javascript request being sent every second to check for new messages? or is there another protocol being used in order to have instant messages?
Robert C. Barth : Considering the browser can only speak HTTP, I doubt there's another protocol being used.Tom : There are a few variations of how to keep the information updated, albeit all falling under HTTP. While you could make periodic Ajax requests to check for updates, there is also the option of long polling (Comet) which I do believe Facebook uses for their chat.Brent Baisley : Here is a blog post about how Facebook implemented chat (they use Erlang on the backend). Very interesting read. http://www.facebook.com/note.php?note_id=51412338919&ref=mf -
It's not clear what your are looking for: bar's design or it's functionality. If your are speaking about design you should look into css positioning (absolute). If it's about functionality i suppose that there is some kind of ajax javascript which checks every x seconds if there is change of state, and if there is go deeper and find out what to load.
Jiaaro : I think it's fixed positioning. wouldn't absolute put it on the bottom of the page (rather than scree)? -
I looked through the jQuery plugins, and Googled the topic for you. All I could find was this: http://www.west-wind.com/weblog/posts/388213.aspx which isn't exactly what you want, but it is a good place to start. With some style changes, and a little tweaking it could easily look exactly like the Facebook bar.
Not sure that this is the type of answer you were looking for, but i've been looking for the same thing and this code seems to at least show how it's done.
-
Here's another good starting point: http://www.ben-griffiths.com/project/jquery-position-footer/. If I remember correctly it works in FF & IE & Safari
-
Why not just download the Facebook source code and take a look at how they do it? They open sourced a lot of the stuff they use/created/enhanced. http://developers.facebook.com/opensource.php
-
Here are some useful links/plugins that might help you:
Positioning the footer: http://plugins.jquery.com/project/positionFooter
Enable drag/drop of things (like applications): http://docs.jquery.com/UI/Draggable
Tooltip (when hover): http://plugins.jquery.com/project/tipsy
And for the interaction with the server (for new events etc.) you might use the AJAX functionality in jQuery: http://docs.jquery.com/Ajax
-
Soh Tanaka just put out a great step-by-step tutorial on how to re-create the Facebook Status Bar: http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-1/
0 comments:
Post a Comment