Login     Sign up
Are ajax notifications neccesary?
Options (Maximum selection: 1)Votes
yes
5
no
0
maybe
0
Closed in Oct 5th 2010 (5 people voted)

Ajax alert at the header
Sam Severua (@samtz)
Join date: Sep 11th 2010
Community posts: 14
View Profile
Send Message

Can somenody help me to design ajax notifications as in facebook especialy for new meseges and friend requests

167 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

look here:

[url]http://community.jcow.net/forums/viewthread/480[/url]

use the code of adil.

to avoid that the line collapses use another tag within <span id="#vbar"></span>

167 months ago
Abhimanyu (@abhimanyusharma003)
Join date: Aug 12th 2010
Community posts: 124
View Profile
Send Message

I try this..
well something goes wrong little bit..
can pls provide full code of that function so that i can judge it,.
Thanks

167 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

[code]
else {
echo '
<script type="text/javascript">
setInterval(function() {
$("#vbar").load(location.href+" #vbar>*","");
}, 9000);

</script>
<td valign="bottom" align="right">'.url('u/'.$client['uname'],t('Profile')).' | <span id="vbar"><span>'.$friendslink.' | '.url('message',t('Inbox').msg_unread() ).' | '.url('notifications',t('Notifications').note_unread()).'</span></span> | '.url('account',t('Account')).' | <span class="sub">'.url('member/logout',t('Logout') ).'</span>
</td>';
[/code]

you need to put a span-tag within the span-tag with id vbar otherwise strange things happen.

167 months ago
adil (@adil)
Join date: May 9th 2010
Community posts: 202
View Profile
Send Message

thanks for the referral!!! but u did the bug fix

167 months ago
Mohamad Saifullah (@okbah)
Join date: Aug 31st 2010
Community posts: 18
View Profile
Send Message

where to put this code? and what line to replace.. please i need this features

166 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

in page.tpl.php of your theme.

you find there something like

[code]
if (!$client['id']) {
echo '
<td align="right">
'.url('member/login',t('Login')).' | '.url('member/signup',t('Sign up')).'
</td>';
}
else {
echo '
<td align="right">'.url('u/'.$client['uname'],$client['uname']).' | '.$friendslink.' | '.url('message',t('Inbox').msg_unread() ).' | '.url('notifications',t('Notifications').note_unread()).' | <span class="sub">'.url('member/logout',t('Logout') ).'</span>
</td>';
}
[/code]

the else part you need to replace with the code.
do not replace the last }, it has to remain there

after that you can replace $client['uname'],t('Profile') by $client['uname'],$client['uname'] because we used the FB-template for the example, not the default template.

166 months ago
DeFender (@defender)
Join date: Oct 1st 2010
Community posts: 167
View Profile
Send Message

it refreshing whole page

166 months ago
adil (@adil)
Join date: May 9th 2010
Community posts: 202
View Profile
Send Message

you did something wrong ... re do it step by step as falcone mentioned above

166 months ago
DeFender (@defender)
Join date: Oct 1st 2010
Community posts: 167
View Profile
Send Message

for me it increases view count

166 months ago
DeFender (@defender)
Join date: Oct 1st 2010
Community posts: 167
View Profile
Send Message

it was in v3.3 . v4.1 is OK

166 months ago
arjuna (@arjuna)
Join date: Dec 25th 2010
Community posts: 1
View Profile
Send Message

im not understand..

164 months ago
1 2 Next