This will add a "Who's Chatting" box on your forum home page.
Just like "Who's Online", if you click on "Who's Chatting" it will take you to a page with just the chatters.
If you are logged in, there is a link to the chat room. If you are not logged in, there is a link to register.
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Note that the problem of having a space in your user name is corrected. However, if the user name has an _underscore_ in it there may be problems.
To remove the feature that replaces underscores with spaces, remove this line (Line 57 in chat_home.php):
PHP Code:
$username = str_replace("_", " ",$username);
1 file change
1 new template
2 template changes
WARNING #1: This hack WILL speed up your Who's Chatting hits! If you seriously want Who's Chatting on your front page, keep in mind that you may have to buy extra hits! Otherwise, don't install this hack! I've found that it increased my chat room traffic dramatically, so I think it's worth buying the hits.
WARNING #2: When you do run out of Who's Chatting hits, your forum home page will break (you will get a blank page)! If this happens, in forum/index.php FIND
PHP Code:
include('chat_home.php');
and replace it with
PHP Code:
//include('chat_home.php');
Then buy more chat hits. When your upgrade goes through, remove the // from the line above to reactivate the hack.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Good idea! I'd still need to do some new coding to make that happen. I'll be out for a few weeks, but I'll try to get back to it. Feel free to work on it if you like
It would be up to you, as it's a cron job and can be set to any rate. I initially thought we could do once every 6 minutes, but SigmaChat gives less credit, so now I have it at once every 10 minutes.
It would be up to you, as it's a cron job and can be set to any rate. I initially thought we could do once every 6 minutes, but SigmaChat gives less credit, so now I have it at once every 10 minutes.
10 minutes is just about right however it won't account for anyone using the regular Who's Online module if that's also installed... or does this cron affect both?
Quote:
Originally Posted by tamarian
Hey, I see you're in Ottawa, me too
You betcha ... a true Bytown lad here for sure. :nervous:
10 minutes is just about right however it won't account for anyone using the regular Who's Online module if that's also installed... or does this cron affect both?
You wouldn't need the who's on line stuff, since this will cache the number of those in chat in one template, and a list of their member names in another template.
Of course, you can have both working if you want to, but there's no need.
Template #1 has something like this "Currently chatting: 3 members"
Template #2 has something like this "user1, user2, user3"
I put template #1 in the forum home stats box, and template #2 in the what's going on box.
Well, I haven't had time to clean up. I'd be glad to post it as is here, instead of a full release, as it's quite "hacky" But it's been running on my forum for a while.
Well, I haven't had time to clean up. I'd be glad to post it as is here, instead of a full release, as it's quite "hacky" But it's been running on my forum for a while.