![]() |
Show who is online in Teamspeak on forumhome
Hi,
this is my first little hack and I hope one of you has a little bit time to improve it. This hack will check who is online on a Teamspeak server and generate a list of nicknames in a file. This file will then be display in the statistics area of forumhome. Hack can be installed in 5 minutes! Difficulty: very easy Screenshot attached Enhancements: If anyone knows how to start this via vBCron please tell me :D in forumroot/index.php find: PHP Code:
PHP Code:
Edit Template FORUMHOME Find: PHP Code:
PHP Code:
Upload ts2php (compiled c++ file) to /forumhome/ Upload ts2icon.jpg to /forumhome/images/misc/ Use a cronjob to start ts2php every 2 minutes (should be done via vBCron if possible but I don't know how!) with the following command: ./ts2php TEAMSPEAKIP whoisints.php This will check the Teamspeakserver for users and creates a file whoisints.php with the names in it. If you run a teamspeak server with a different port run ./ts2php TEAMSPEAKIP -p<port> whoisints.php Don't forget to chmod 755 ts2php :D See the screen to take get a better impression! |
awesome, sounds good :)
|
What is a teamspeak server?
|
it's a voice comms system similar to roger wilco, ventrillo ect ect ect you can find it here
|
cool hack. maybe this will get people into the teamspeak.
|
Cool Thing! I created a similar hack with the difference that the data is beeing read in realtime from the Server.
http://www.insideearth.de/forum.php?guestlanguageid=5 |
So if you haven?t got access to regular cron, you can?t get this to work? :(
|
Quote:
This can help all users which cannot run own cron jobs. |
Quote:
I would find this very useful for my site, I unfortunately don't know how to run a cron job, but was wondering if anyone knew how to make this run via the vb scheduler. Many thanks, Mith |
As far as I know, the vBulletin Cron script can only run *.php scripts :)
|
ok, I really want to add this and have been hacking vb's since the 2.1.x days. I've got everything working fine, but it wont update the list (so not really working fine) the ts ip we have is 67.18.180.106:1237 how would i enter that into the cronjob (i'm using crontab on control panel)
anyone able to help me out on what the cronjob line should look like for that ip? thanks |
Quote:
PC Gaming Site http://WOLFGaming.net |
Quote:
0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,3 6,38,40,42,44,46,48,50,52,54,56,58 * * * * /home/www/web1/html/forum/includes/cron/ts2php 217.160.173.218 /home/www/web1/html/forum/whoisints.php >/dev/null 2>&1 This is starting the update every 2 minutes :D Don't forget to add a -p<port> in your case. |
ok thanks, n00b type question here, but i add the 1237 in inplace of the word port right?
so like -p<1237> |
Quote:
ts2php IPADDRESS -p1234 FILE or ts2php IPADDRESS -p:1234 FILE Did not remember how I add that :D |
Thanks, im still having problems getting it to work, it doesnt seem to be creating the whoisints.php file at all, or updating it when i manually create a blank php file and name it whoisints.php
It's very late here too, so I've totally given up for tonight, but I dunno what else I can do to try and get it working, which is a crying shame cos the hack itself looks sound, and would have been really useful to have got working. I'll openly admit tho, I only got the control panel stuff added a couple of months back and this is my first experience with cronjobs outside of vb, so this may be the problem for me. |
Does this work for 3.01 by chance? Also, does the TS server need to be the same server as the forum server or could it be different?
This sounds very cool. Thanks a lot! |
works like a charm on 3.0.1, check my forums if you want to see it in action, i have it set to update every 2 minutes now.
thanks for the help with the cronjob too jluerken, I've been waiting for something like this for my clan for months, such a breeze to install, took me a while to get the cron down, you need the port as IP -p:addnumberhere file Once again, thanks for a great hack. |
Quote:
This run's every two minutes too. |
Instead of cronning it, run the command whenever index.php is loaded? Surely enough people visit your board to compensate for no-cron job.
|
Quote:
If not can someone tell me how to do this cron job ?? I have c-panel. and it says cron job on a button there. Thats my knowledge of cron =( help please. |
Quote:
|
Quote:
Here is what i have set it up to =( /home/changed/public_html/dab/ts2php 66.199.253.26 -p:8525 /home/changed/public_html/whoisints.php >/dev/null 2>&1 I tryed the -p8525 -p:8525 I tryed with the url instead of the path. I tryed everything i can think of and im betting i missed something very easy ?? =( |
when i did mine i didnt have the >dev/null 2>&1 bit, and it works ok, but oddly mine didnt start working for almost 12 hours after the cronjob started, and now it runs every 2 minutes
|
I have tryed without that to. even putting every word together =(
Nothing works it wont create the file or nothin.... I dont want blog up this thread with my stupid questions. Can i pm someone about this ? - edit - Ok now the wierdest thing happend. I tryed it again and now it created a file BUT the file isnt php its a tmp file at the end. ???whoisints.php.tmp Whats that all about anyway ? Ohh anmd it sent an email to me stating it couldnt connect to the ip 66.199.253.26:51234 But thats the wrong port number ? Why is it trying to connect to the wrong portnumber ? I have the correct number in the cron. - edit - |
Quote:
|
a bit of support here please =(
|
saaaaaaaaaaweeeeeeeeeeeeeeeeet !!!!
|
is there a way to get this type of info without putting everything in vBulletin???
I just wanna use this on my clans site which I dont have vB on(yet) and I was also thinking of making this into a block or something for vBportal or at least being able to include this... I am a noob @ php :) any help would be greatly appreciated :) Genmud |
Couldn't get this to work. When I tried executing ts2php from a SSH window I got the following: -
./ts2php: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory Any ideas |
Quote:
The script is independant of vb which means you can use it also on a normal webpage. |
Quote:
|
Quote:
|
Quote:
Send me your emailadress in a pm and I will send you the source so that you can compile it on your own. |
Quote:
|
this is awesome and I have been looking for something like this for a long time.
great hack and I will install it! |
I seem to have the same problem as croft.
I'm certain i've installed it correctly and my cron seems fine,its creating a file called whoisints.php.tmp(I do not understand why it is making this file) and I get this error at the top of my page: Warning: file_get_contents(./whoisints.php): failed to open stream: No such file or directory in /home/wiiija/public_html/wij/phobia/forum/index.php on line 59 Now,if I rename the file to whoisints.php the error dissapears but the file does not update and no users are listed as being on teamspeak,also the whoisints.php.tmp file reappears in the directory :) My cronjob as it stands: /home/wiiija/public_html/wij/phobia/forum/includes/cron/ts2php 217.158.150.19 -p:10110 /home/wiiija/public_html/wij/phobia/forum/whoisints.php >/dev/null 2>&1 I'm using cpanel to set the frequency of updates etc. If theres a glaring mistake I'd appreciate if somebody could point it out but it appears in order to me,I have also chmod 755 the ts2php file as stated in the first post,I hadnt done this at first and thought this maybe the problem but unfortunately not. Cheers Wij |
I fixed it,I had to remove the ">/dev/null 2>&1" and remove the ":" before the port,it now works 100%,great hack.
**edit** lol,ok 99% works,I've been disconnected from teamspeak for around 30 mins now and its still listing me as connected? :tired: regards Wij |
ok, got the thing running (on another machine because of the libstdc++.so.5 error, but where oh where can I define a username and password? Since the TS-server isn't public I really need that...
TIA |
Quote:
|
All times are GMT. The time now is 04:49 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|