Jump to content

Facebook like notification.


deepson2

Recommended Posts

Hello,

 

Can we do that face book like notification with php. I mean for website, once user logs in he/she can probably get the toolbar which will give him/her small recap kind of thing that. he/she is got new friend request, or got new comment.

 

I have searched a lot. i thing face book have done that with API or something else??

 

Can anyone have worked on something like this? or any suggestion?  :confused: :confused:

 

Thanks in advance.

Link to comment
Share on other sites

I'm sure you can do what you need to with PHP, but could you be more specific?

When the user logs in, what exactly is it looking for? i.e. what data does it need to check against?

The more specific you are, the more help we can offer.

 

You would do something like this pseudo-code:

<?
if($logged_in == true)
{
  $notification_bar = "Whatever you need to appear here";
}
?>
<html>
  <body>
    <? echo $notification_bar; ?>
    Your normal page contents here
  </body>
</html>

Link to comment
Share on other sites

This is easy enough to create. I can think of a few ways, here's one:

 

CREATE TABLE comment_notification (
  id INTEGER NOT NULL AUTO_INCREMENT,
  user_id INTEGER NOT NULL,
  comment TEXT,
  KEY fk_user_id (user_id),
  PRIMARY KEY (id)
);

CREATE TABLE friend_notification (
  id INTEGER NOT NULL AUTO_INCREMENT,
  user_id INTEGER NOT NULL,
  accept_link VARCHAR(255),
  deny_link VARCHAR(255),
  KEY  fk_user_id (user_id),
  PRIMARY KEY (id)
);

 

This is just one but there are other ways you can do this but this depends on what you want to display and your program flow.

Link to comment
Share on other sites

Thanks for the reply to both of you.

 

I was thinking something similar. but thing is i just wanted to see some site which has this kind of facilities.

 

and secondly how can i get that toolbar? i don't want to use iframe here.

 

Do you have any live example of this kinda of  stuff?

 

 

Link to comment
Share on other sites

I don't think i will use both the interfaces. using fixed toolbar i can get the toolbar. and on that i can fetch whatever data(total comment, new shout) i would like to fetch( i hope this is what i am thinking right now..let see  ::))

 

What would be your suggestion?

 

Not sure I entirely understand what you are asking but maybe you want to a look at ExtJS then it allows you put any kind of data onto the toolbar.

 

Would something like this be easily integratable into drupal and smf?

 

Yes.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.