Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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
  #22  
Old 08-09-2004, 01:48 AM
croft croft is offline
 
Join Date: Aug 2002
Location: Sweden
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JimpsEd
Instead of cronning it, run the command whenever index.php is loaded? Surely enough people visit your board to compensate for no-cron job.
By the sound of it you know how to do that ?
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.
Reply With Quote
  #23  
Old 08-09-2004, 11:53 AM
SB2002 SB2002 is offline
 
Join Date: Dec 2002
Location: United States
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by croft
By the sound of it you know how to do that ?
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.
I had the same thing, you need to use the absolute url of your site to get to the file and also to create the file, like what the guys above have said, and then simply insert the ts ip address (followed by -p:number) where number = your port number (if applicable) and it should work. I had to use the crontab in control panel, which i assume is kinda the same thing. This was my first even cron job too, and with some help i was able to pop my cherry so to speak. If you get any probs, then give us a shout and i'll see if i can help you, otherwise im sure someone else would be more than willing
Reply With Quote
  #24  
Old 08-09-2004, 12:25 PM
croft croft is offline
 
Join Date: Aug 2002
Location: Sweden
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SB2002
I had the same thing, you need to use the absolute url of your site to get to the file and also to create the file, like what the guys above have said, and then simply insert the ts ip address (followed by -p:number) where number = your port number (if applicable) and it should work. I had to use the crontab in control panel, which i assume is kinda the same thing. This was my first even cron job too, and with some help i was able to pop my cherry so to speak. If you get any probs, then give us a shout and i'll see if i can help you, otherwise im sure someone else would be more than willing

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

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
Reply With Quote
  #26  
Old 08-09-2004, 07:51 PM
croft croft is offline
 
Join Date: Aug 2002
Location: Sweden
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 -
Reply With Quote
  #27  
Old 08-11-2004, 01:58 PM
croft croft is offline
 
Join Date: Aug 2002
Location: Sweden
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by croft
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 -
Anyone ?
Reply With Quote
  #28  
Old 08-12-2004, 08:16 PM
croft croft is offline
 
Join Date: Aug 2002
Location: Sweden
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

a bit of support here please =(
Reply With Quote
  #29  
Old 08-15-2004, 05:14 PM
vBTotal vBTotal is offline
 
Join Date: Jul 2004
Location: Computer
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

saaaaaaaaaaweeeeeeeeeeeeeeeeet !!!!
Reply With Quote
  #30  
Old 08-15-2004, 10:27 PM
genmud genmud is offline
 
Join Date: Aug 2003
Location: PHOENIX
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #31  
Old 08-21-2004, 05:27 PM
Panic Panic is offline
 
Join Date: Mar 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply

Thread Tools

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 03:19 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.06658 seconds
  • Memory Usage 2,321KB
  • 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
  • (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