vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Forum Home Enhancements - TSxView: simple live viewer for Teamspeak 2 & 3 (https://vborg.vbsupport.ru/showthread.php?t=231924)

Disasterpiece 09-22-2010 04:40 PM

Hi

Sure, can help you with that.
I assume, that the actual Teamspeak Viewer and the Joinlink should be displayed at two different positions? Then what you need is the name of the second templatehook where you want the joinlink to be displayed. If you use the default vB4 template, this should be easy. I could tell you the hookname if you tell me where you want the link to be displayed.

The only change you've to do with the plugin is this:
In your AdminCP, go to plugin management, edit the "TSxViewer: Main" plugin.
There you can see some php code in the big textarea.
The best would be to simply copy the whole content into a texteditor where you can see and access the line numbers. This would be easier to work with.

- In line 40, change:
PHP Code:

$op .= '<span style="padding-left:20px" class="tssjoinlink">' 

to:
PHP Code:

$jlink '<span style="padding-left:20px" class="tssjoinlink">' 


- In line 88, change:
PHP Code:

$op .= '<span style="padding-left:20px" class="tssjoinlink">' 

To:
PHP Code:

$jlink '<span style="padding-left:20px" class="tssjoinlink">' 


- In line 104, add:
PHP Code:

$template_hook['yourhookname'] .= $jlink

Where "yourhookname" should be replaced with the template hook you want the joinlink to be displayed.

This basically splits the join link from the teamspeak viewer output and lets you place it somewhere else.
I didn't test this myself, due to lack of a vbulletin installation at the moment :P
Tell me if you get any problems with this.

Scan Cape Cod 09-22-2010 06:04 PM

Thanks for the quick reply. I want to add your code to the top of the following page, if possible.

http://www.scannewengland.net/forums...plate=tsviewer

Ideally I'd like to put it right where the "Enter Server" link is showing. The server viewer that is showing is inside of an iframe. I plan on shutting off the login box within once I have this working.

I'm not sure what the hookname for this would be, unless it's custom_tsviewer, which is what the template is called. Pardon my ignorance; trial by fire here! :D

Again, my thanks.

Scan Cape Cod 09-22-2010 11:45 PM

Actually it might just be easier for me to figure out what I need to do to make this link automatically take the currently logged on user's username:

ts3viewer://snechat.no-ip.org?port=9987?nickname=HERE'S WHERE THINGS GO DOWN THE TUBES FOR ME...

I am trying to find the answer by searching up vBulletin Template Variables, HTML code, etc, but I'm just not quite there...actually I don't think I'm even close! :D

Scan Cape Cod 09-23-2010 02:22 AM

Well, I've learned a lot. I learned how to create a custom hook by editing the hooks_vbulletin.xml file and also how to place them in the proper location on a php page. The code you sent me kills the link in the original position of the plug-in, and then doesn't display it in the new location.

If you still have time to give me a handhold, would you prefer to take this to PM? I don't want to jam up this thread with something not entirely relevant to it. I'll be more specific and provide examples there if you're agreeable.

Thanks.

Disasterpiece 09-23-2010 07:30 AM

Hi

sure, send it via PM.

Disasterpiece 09-28-2010 05:04 PM

1 Attachment(s)
UPDATE!

----

To everyone who is following this mod, the next major version (1.2) is nearly in beta stage, which means I need some people to test it for me, if there are any issues or suggestions which should go into the release version.

Here some key features what's new in 1.2:

- Support of multiple server viewer at once!
You have a variety of voicetool server you want to display? Then this is right for you!
- Support of more Voicetools!
Actually it was planned to support Mumble as well, but only Ventrilo made it as addition to TS2/TS3 into this version. Why? Read below...
- Query caching!
Probably the most interesting new feature: Query per cronjob, display from cache! Weee!
- Status logging!
Now you can monitor your server's status via cron logfiles and see when a server times out and when he's back on!
- Better backend Structuring
Since more features require more space and own scripts to work, the viewer tool now has its own AdminCP section. Also, nearly the whole code has been re-written to be better and faster.


Read on for explanations on why and how these changes affect the plugin:


----

- Support of multiple server viewer at once!

This is accomplished by a list of servers who can be created via admin interface. There you can activate/deactivate the server, see their online/offline status and the details you've entered. If you have only 1 server, then you're fine too. If you're managing more servers at once, you'll find this pretty handy.
Attachment 122400


- Support of more Voicetools!

I actually wanted to support TS2, TS3, Ventrilo and Mumble, but mumble has such an awful API for developers, that it simply was not possible to create a working status query without additional php extensions. Too complicated for now, the next minor version might include an API for those who are skilled enough to install the required extensions by themselves.
Anyhow, Ventrilo is supported now!!! Since I got many pms asking if Ventrilo can be supported too, well, here ya go. Hope it helps many people!


- Query caching!

The standard method of getting a userlist out of the server is to query the server every time you build up your forum page.
Which means, if 200 people view your forumhome page, then the teamspeak server gets 200 queries per minute. Which is unnecessary.
Now, all active servers get queried by an automated scheduled job, which runs every 10 minutes by default, with the option to reduce the delay to 1 minute. (sadly, vBulletin does not offer a delay between 1 and 10 minutes. duh)
So if you receive 200 pageviews per minute, or 2000 pageviews in 10 minutes, your servers only get queried once in this time. Sounds cool, eh?


- Status logging!

As additional feature to vB cronJobs, the script will now create a logfile entry everytime a server which was online times out or an offline server gives a positive response.
Can be a nice feature to monitor your server's uptime.
Attachment 122401


- Better backend Structuring

Now there's too much for a single setting page, so the whole content has been split up and now looks better and tidy.
Not much of a feature here, the fact that most of the plugin's code has been re-written might sound better to you.
So it's much easier for me to implement further features and the template is easier for you to customize.
Skilled php programmer can even modify the plugin's code to fit their special needs, in the releaseversion will most of the code be commented so it should be easy to understand.


Beta testers needed!

I have finished most of my work on the plugin, so it's ready to be thrown out into the wild.
If you're interested to help me out with some review and beta-testing, the plugin can be released even faster.
I need a functionality and a usability check, perhaps you find some errors I didn't see or have a few suggestions to make life more easier for you.
Drop me a line via PM with the info which vB version you're using and how skilled you are with vBulletin administration and programming/php.

red-dna 10-09-2010 09:13 PM

Hello there. I have a different port for my ts3 server,than the default one. And as the Port setting is ignored in Ts3 Servers, i cant have my server appear right.

My port is: 4261 - Any way to set it right?

Thnx

Disasterpiece 10-09-2010 09:51 PM

Hi

If you entered the correct serverID and IP, the port should be automatically retrieved from the teamspeakserver's response.
Does it display the wrong port?

red-dna 10-09-2010 10:38 PM

I entered the right id and ip, but it doesnt work. I try to click on the join Teamspeak and it loads my ts and inside it displays that it trying to connect to the default port, so i assumed for this it doesnt work.

Disasterpiece 10-09-2010 10:52 PM

Did you check the url? It should contain the port. If it's the wrong one, this could be a bug with the plugin. In this case I could give you a workaround to use your custom port in any case, the next version will fix this issue then.


All times are GMT. The time now is 07:34 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.01135 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete