PDA

View Full Version : Registration on Site = Registration on TS?


iceman977th
29-07-2008, 09:28
We've just started up our group's website and have our member's registered on it. We've just started hosting our own TeamSpeak (had it hosted on InstantTeamSpeak) and are trying to get everyone registered. Is there a way to enable that wheen someone registers on our website, it connects to our TeamSpeak and registers them a registered account on our server?

Our site's using PHPNuke 7.9, server's using a VDS from HostGator w/ RedHat Enterprise Linux.

Would really appreciate it!

mavmike
30-07-2008, 17:35
Hi, you can do this if you have Super ServerAdmin account.
If you do, then you can connect through tcpquery and add a user from a website form.
However, you should make sure people are logged in or need a password to create the user from your site if you do this.
You might also want to limit the amount that can get created per person or even per minute incase a bot or someone tries to spam you.
If you dont have Super ServerAdmin I dont think you can so easily.

iceman977th
30-07-2008, 21:43
Hi, you can do this if you have Super ServerAdmin account.
If you do, then you can connect through tcpquery and add a user from a website form.
However, you should make sure people are logged in or need a password to create the user from your site if you do this.
You might also want to limit the amount that can get created per person or even per minute incase a bot or someone tries to spam you.
If you dont have Super ServerAdmin I dont think you can so easily.

I've got SSA access, that's no problem. (It's my server :D)

How would I be able to edit the registration on phpNuke so it does that?

Katana*GFR*
31-07-2008, 16:37
find the vBulletin script and see how that works.

iceman977th
01-08-2008, 01:40
find the vBulletin script and see how that works.

Ehh, I can't figure it all out. o_O

Katana*GFR*
01-08-2008, 17:03
Then you have a tough time.. These kind of script aren't flying around that much..
Maybe someone with php knowledge could help you?

If im thinking right all that has to be altered are the calls to the database, but im not sure.. My php is limited to "Hello World"..

iceman977th
04-08-2008, 02:11
Then you have a tough time.. These kind of script aren't flying around that much..
Maybe someone with php knowledge could help you?

If im thinking right all that has to be altered are the calls to the database, but im not sure.. My php is limited to "Hello World"..

Oh joy. Well, where do the files that set up an account with TeamSpeak locate at in relation to the root server install?

crazyandy
04-08-2008, 17:58
Have a look at Libacts2, its in this forum some were (a sticky I think).
It has some examples on how to use it.

http://forum.teamspeak.com/showthread.php?t=33367

Andy

Katana*GFR*
04-08-2008, 18:27
Oh joy. Well, where do the files that set up an account with TeamSpeak locate at in relation to the root server install?

I presume the script has a Readme file.
Normally these type of addons are in the forum / portal directory.

iceman977th
05-08-2008, 23:26
Ok, this is going to be a long one. Basically here's the operation for registering a new user from the /modules/Your_Account/index.php file..

function new_user() {
global $my_headlines, $module_name, $db, $gfx_chk, $user;
if (!is_user($user)) {
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
include("header.php");
OpenTable();
echo "<center><font class=\"title\"><b>"._USERREGLOGIN."</b></font></center>\n";
CloseTable();
echo "<br>\n";
OpenTable();
echo "<form action=\"modules.php?name=$module_name\" method=\"post\">\n"
."<b>"._REGNEWUSER."</b> ("._ALLREQUIRED.")<br><br>\n"
."<table cellpadding=\"0\" cellspacing=\"10\" border=\"0\">\n"
."<tr><td>"._NICKNAME.":</td><td><input type=\"text\" name=\"username\" size=\"30\" maxlength=\"25\"></td></tr>\n"
."<tr><td>"._EMAIL.":</td><td><input type=\"text\" name=\"user_email\" size=\"30\" maxlength=\"255\"></td></tr>\n"
."<tr><td>"._PASSWORD.":</td><td><input type=\"password\" name=\"user_password\" size=\"11\" maxlength=\"40\"></td></tr>\n"
."<tr><td>"._RETYPEPASSWORD.":</td><td><input type=\"password\" name=\"user_password2\" size=\"11\" maxlength=\"40\"><br><font class=\"tiny\">("._BLANKFORAUTO.")</font></td></tr>\n";
if (extension_loaded("gd") AND ($gfx_chk == 3 OR $gfx_chk == 4 OR $gfx_chk == 6 OR $gfx_chk == 7)) {
echo "<tr><td>"._SECURITYCODE.":</td><td><img src='?gfx=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr>\n"
."<tr><td>"._TYPESECCODE.":</td><td><input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\"></td></tr>\n"
."<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">\n";
}
echo "<tr><td colspan='2'>\n"
."<input type=\"hidden\" name=\"op\" value=\"new user\">\n"
."<input type=\"submit\" value=\""._NEWUSER."\">\n"
."</td></tr></table>\n"
."</form>\n"
."<br>\n"
.""._YOUWILLRECEIVE."<br><br>\n"
.""._COOKIEWARNING."<br>\n"
.""._ASREGUSER."<br>\n"
."<ul>\n"
."<li>"._ASREG1."\n"
."<li>"._ASREG2."\n"
."<li>"._ASREG3."\n"
."<li>"._ASREG4."\n"
."<li>"._ASREG5."\n";
$handle=opendir('themes');
$thmcount = 0;
while ($file = readdir($handle)) {
if ((!ereg("[.]",$file) AND file_exists("themes/$file/theme.php"))) {
$thmcount++;
}
}
closedir($handle);
if ($thmcount > 1) {
echo "<li>"._ASREG6."\n";
}
$sql = "SELECT custom_title FROM ".$prefix."_modules WHERE active='1' AND view='1' AND inmenu='1'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$custom_title = filter($row[custom_title], "nohtml");
if (!empty($custom_title)) {
echo "<li>"._ACCESSTO." $custom_title\n";
}
}
$sql = "SELECT title FROM ".$prefix."_blocks WHERE active='1' AND view='1'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$b_title = filter($row[title], "nohtml");
if (!empty($b_title)) {
echo "<li>"._ACCESSTO." $b_title\n";
}
}
if (is_active("Journal")) {
echo "<li>"._CREATEJOURNAL."\n";
}
if ($my_headlines == 1) {
echo "<li>"._READHEADLINES."\n";
}
echo "<li>"._ASREG7."\n"
."</ul>\n"
.""._REGISTERNOW."<br>\n"
.""._WEDONTGIVE."<br><br>\n"
."<center><font class=\"content\">[ <a href=\"modules.php?name=$module_name\">"._USERLOGIN."</a> | <a href=\"modules.php?name=$module_name&amp;op=pass_lost\">"._PASSWORDLOST."</a> ]</font></center>\n";
CloseTable();
include("footer.php");
} elseif (is_user($user)) {
global $cookie;
cookiedecode($user);
userinfo($cookie[1]);
}
}

And I guess I have to embed this in somehow to use the "Nickname" as the login name and the password as the user's password

<?php
require("../Absurd.php");

$host = Absurd_TeamSpeak2::connect('tcp://208.131.145.134');
$server = $host->getServerByUdp(8767);

//Superadmin (belong to $host) and Serveradmin accounts (belong to $server)

//Create new registered user account
$server->registerAccount('newserveradmin', 'passwd');

Anyone care to explain or show where I have to put this?