Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Show who is online in Teamspeak on forumhome Details »»
Show who is online in Teamspeak on forumhome
Version: 1.00, by jluerken jluerken is offline
Developer Last Online: Dec 2018 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-02-2004 Last Update: Never Installs: 22
 
No support by the author.

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



in forumroot/index.php find:
PHP Code:
require_once('./includes/functions_bigthree.php'); 
Right under it add:
PHP Code:
// get teamspeak data
   
$myts2footer file_get_contents("./whoisints.php"); 

Edit Template FORUMHOME
Find:
PHP Code:
<if condition="$show['birthdays']"
and add the following text above it:

PHP Code:
<!-- teamspeak users -->
<
tbody>
    <
tr>
        <
td class="thead" colspan="2">
            <
a style="float:$stylevar[right]href="#top" onclick="return toggle_collapse('forumhome_teamspeak')"><img id="collapseimg_forumhome_teamspeak" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_teamspeak].gif" alt="" border="0" /></a>
            
Who's online in Teamspeak
        </td>
    </tr>
</tbody>
<tbody id="collapseobj_forumhome_teamspeak" style="$vbcollapse[collapseobj_forumhome_teamspeak]">
    <tr>
        <td class="alt2"><img src="$stylevar[imgdir_misc]/ts2icon.jpg" alt="TS2" border="0" /></td>
        <td class="alt1"><div class="smallfont">$myts2footer</div></td>
    </tr>
</tbody>
<!-- end teamspeak users --> 
Extract ts2forumhomehack.zip
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



See the screen to take get a better impression!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 08-21-2004, 06:02 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by genmud
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

The script is independant of vb which means you can use it also on a normal webpage.
Reply With Quote
  #33  
Old 08-21-2004, 06:02 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Panic
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
Which glibc version are you running?
Reply With Quote
  #34  
Old 08-21-2004, 07:31 PM
Panic Panic is offline
 
Join Date: Mar 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
GNU C Library stable release version 2.2.5, by Roland McGrath et al.
Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 2.95.4 20011002 (Debian prerelease).
Compiled on a Linux 2.4.18 system on 2003-04-08.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.9 by Xavier Leroy
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Report bugs using the `glibcbug' script to <bugs@gnu.org>.
See above for version information. So I need a version of ts2php compiled with the glib version installed on my web server, correct?
Reply With Quote
  #35  
Old 08-21-2004, 08:51 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Panic
See above for version information. So I need a version of ts2php compiled with the glib version installed on my web server, correct?
Yes that should fix it.
Send me your emailadress in a pm and I will send you the source so that you can compile it on your own.
Reply With Quote
  #36  
Old 08-24-2004, 07:55 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Panic
See above for version information. So I need a version of ts2php compiled with the glib version installed on my web server, correct?
@Panic: Did you get the source and compiled it? Tell me if this worked for you cause the answer will maybe also help others!
Reply With Quote
  #37  
Old 08-28-2004, 03:40 PM
SilverDawn SilverDawn is offline
 
Join Date: Jul 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is awesome and I have been looking for something like this for a long time.

great hack and I will install it!
Reply With Quote
  #38  
Old 08-30-2004, 12:42 PM
Wij's Avatar
Wij Wij is offline
 
Join Date: Sep 2002
Location: UK
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #39  
Old 08-30-2004, 01:45 PM
Wij's Avatar
Wij Wij is offline
 
Join Date: Sep 2002
Location: UK
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #40  
Old 09-13-2004, 04:37 PM
LImburg LImburg is offline
 
Join Date: Aug 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #41  
Old 09-13-2004, 05:31 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by LImburg
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
I've never tested this with a password protected TS but I think it is also working when there is a password on cause you're not really login on. Its only checking who's online like a webbased script which also do not need login data
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:38 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
  • Page Generation 0.05043 seconds
  • Memory Usage 2,328KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete