• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Link with (number of logged in users)

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
4 posts • Page 1 of 1

Postby Montero » Mon Sep 17, 2012 8:41 pm

Hi!
I wonder if there is a way to show how many users are online in a '(number)' beside the Link from another page. Same server for documents and all.

I'd like the link to show like this (a href) "Free Chat Link (12)" (/a) for 12 chatters online.

Thanks!
Montero
New member
 
Posts: 2
Joined: Mon Sep 17, 2012 8:37 pm
Top

Postby re*s.t.a.r.s.*2 » Tue Sep 18, 2012 12:39 am

hi,

Make ajax call, to the php that collects the users, then in the response from the get the anchor tag created just the way you like..
append the this response to a div in the page you wanna show it..


Code: Select all
<?php
// all processed from code above, you have to make it..


$count = $users; // a an integer

echo '<a href="chat.php">Free Chat Link('.$count.')</a>'; 
?>

It's just an idea..

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby Montero » Tue Sep 18, 2012 1:21 pm

That sounds awesome! But I don't know where to start with this. Any hints on how to collect that valuable data?
The URL etc. I can figure out but not how to collect the array.

The info should be collected from /chat/

Thank you for taking your time!
Montero
New member
 
Posts: 2
Joined: Mon Sep 17, 2012 8:37 pm
Top

Re: Link with (number of logged in users)

Postby guttastyle » Sat Oct 13, 2012 6:59 pm

Hello, There's a page inside the demo folder showing you how to do this
guttastyle
Member
 
Posts: 24
Joined: Sat Mar 03, 2012 5:37 pm
Top


Post a reply
4 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 17 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub