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

oops, you're right! Just tried it and it worked fine!

I didn't test it, I assumed it wouldn't work...

thnx

Now I only would like to have a better version (without the libstdc++.so.5 nagging) so I don't have to upload the file every minute... But it works for now!

EDIT:
If nobody is logged in to the TSS (well, it happens sometimes), the program returns a segmentation-fault. So there's always one (the last person who logged out) mentioned in the whoisints.php-file.
Reply With Quote
  #43  
Old 09-16-2004, 06:28 AM
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Location: Los Angeles
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

simply awesome!! brings my site to the next level. thank you!

*clicks install*
Reply With Quote
  #44  
Old 10-24-2004, 11:46 AM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

./ts2php: error while loading shared libraries: libstdc++.so.5: cannot load shared object file: No such file or directory

I also get this error when I try to start ts2php manualy.

GNU C Library stable release version 2.2.2, by Roland McGrath et al.
Copyright (C) 1992-1999, 2000, 2001 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.3 20010315 (SuSE).
Compiled on a Linux 2.4.3 system on 2002-10-04.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
Berkeley DB glibc 2.1 compat library by Thorsten Kukuk
linuxthreads-0.9 by Xavier Leroy
NoVersion patch for broken glibc 2.0 binaries
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk

I am no linux expert so can someone help me plz

StarBuG
Reply With Quote
  #45  
Old 10-30-2004, 08:47 AM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone who can help?

Maybe you should offer the source of the C++ file and give a short description how to compile the file on the server!?

StarBuG
Reply With Quote
  #46  
Old 11-04-2004, 01:44 AM
EvilCrow EvilCrow is offline
 
Join Date: Aug 2002
Location: Detroit, Michigan. US
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I've got the cron job to make the whoisints.php file but its empty and I get an e-mail and in the body it only says "Abort trap".

Can someone help me plz??
Reply With Quote
  #47  
Old 11-04-2004, 10:44 AM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EvilCrow
Ok I've got the cron job to make the whoisints.php file but its empty and I get an e-mail and in the body it only says "Abort trap".

Can someone help me plz??
What do you mean by " I've got the cron job...but its empty" ?

Did you entered the cronjob on your shell into the crontab?
You would do it like: crontab -e (then insert and save)

StarBuG
Reply With Quote
  #48  
Old 11-04-2004, 05:54 PM
EvilCrow EvilCrow is offline
 
Join Date: Aug 2002
Location: Detroit, Michigan. US
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by StarBuG
What do you mean by " I've got the cron job...but its empty" ?

Did you entered the cronjob on your shell into the crontab?
You would do it like: crontab -e (then insert and save)

StarBuG
My web host I use, I have to make a file called "Crontab" and place the code in it I don't have access to cpanel or anyother for that matter, the cron is making the whoisints.php file but its blank and I get an e-mail with "Abort trap" in the message.
Reply With Quote
  #49  
Old 11-04-2004, 07:23 PM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EvilCrow
My web host I use, I have to make a file called "Crontab" and place the code in it I don't have access to cpanel or anyother for that matter, the cron is making the whoisints.php file but its blank and I get an e-mail with "Abort trap" in the message.
Sorry then I cant help you

Star
Reply With Quote
  #50  
Old 11-05-2004, 02:23 AM
NYI Fan's Avatar
NYI Fan NYI Fan is offline
 
Join Date: Oct 2001
Location: Long Island, NY
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

(edited to update)

Grrr - i KNOW i'm missing something simple here.
the cron job runs, but i am getting the .tmp extention added to my .php file
i am also getting error email that state it cant connect to the database on a port different that what i specified

Thank you!

(further update) it seems removing the : from before the port resolves the weird port error message
BUT The .tmp file that is 0 bytes in size remains, and does not update

Anyone?
Thanks
Reply With Quote
  #51  
Old 12-26-2004, 06:05 PM
fijijims fijijims is offline
 
Join Date: Dec 2004
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack! I've installed and it seems to be working great! Kudos!
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 05:16 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.06348 seconds
  • Memory Usage 2,324KB
  • 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
  • (3)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
  • (3)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