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
  #12  
Old 08-07-2004, 12:41 PM
SB2002 SB2002 is offline
 
Join Date: Dec 2002
Location: United States
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #13  
Old 08-07-2004, 03:10 PM
xxxGiJoe xxxGiJoe is offline
 
Join Date: Jul 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Phalynx
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
I'd definately use this hack if you'd post it for my site...

PC Gaming Site
http://WOLFGaming.net
Reply With Quote
  #14  
Old 08-07-2004, 06:27 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 SB2002
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
Ok here is my cronjob as example
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
Don't forget to add a -p<port> in your case.
Reply With Quote
  #15  
Old 08-07-2004, 07:02 PM
SB2002 SB2002 is offline
 
Join Date: Dec 2002
Location: United States
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok thanks, n00b type question here, but i add the 1237 in inplace of the word port right?

so like -p<1237>
Reply With Quote
  #16  
Old 08-07-2004, 08:34 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 SB2002
ok thanks, n00b type question here, but i add the 1237 in inplace of the word port right?

so like -p<1237>
Yes, try

ts2php IPADDRESS -p1234 FILE or
ts2php IPADDRESS -p:1234 FILE

Did not remember how I add that
Reply With Quote
  #17  
Old 08-07-2004, 10:26 PM
SB2002 SB2002 is offline
 
Join Date: Dec 2002
Location: United States
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #18  
Old 08-08-2004, 05:09 AM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #19  
Old 08-08-2004, 11:51 AM
SB2002 SB2002 is offline
 
Join Date: Dec 2002
Location: United States
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #20  
Old 08-08-2004, 01:08 PM
Bandwurm Bandwurm is offline
 
Join Date: Jul 2003
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jluerken
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
*/2 * * * * /home/www/web1/html/forum/includes/cron/ts2php 217.160.173.218 /home/www/web1/html/forum/whoisints.php >/dev/null 2>&1

This run's every two minutes too.
Reply With Quote
  #21  
Old 08-08-2004, 01:40 PM
j_86 j_86 is offline
 
Join Date: May 2003
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Instead of cronning it, run the command whenever index.php is loaded? Surely enough people visit your board to compensate for no-cron job.
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 07:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12301 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
  • (4)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