datawebcorp Posted January 30, 2008 Share Posted January 30, 2008 ...creates an account in SupportTrio by Active Campaign. Is someone here willing to do that for me, for a fee of course? 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted January 30, 2008 Share Posted January 30, 2008 Should be simple enough, I'd be happy to give it a go. 0 Quote Link to comment Share on other sites More sharing options...
datawebcorp Posted January 30, 2008 Author Share Posted January 30, 2008 OK. What do I/we need to do next? 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted January 30, 2008 Share Posted January 30, 2008 I'm installing a copy of it on my server so I can look at the database structure. I'll PM you with more details later. 0 Quote Link to comment Share on other sites More sharing options...
Juanzo Posted January 31, 2008 Share Posted January 31, 2008 That would be awesome. I'm also eager to use SupportTrio but without any kind of integrating with WHMcs it would involve a lot of work creating / updating accounts. 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted January 31, 2008 Share Posted January 31, 2008 I'll post the script here for those interested. I've used the clientsignup actionhook, it creates a user in supporttrio with their username set as their email address. (This can be easily changed to something else.) Replace lines 15-30 in includes/actionhooks.php with the following: (Replace the configurations values as necessary) function actionhook_ClientSignup($vars) { ### CONFIGURATION ### $ttgid = 0; // The Group ID to insert the user as belonging to. Leave as zero for no group. $ttdb_db = "strio_db"; // The Database name of your supporttrio installation $ttdb_user = "strio_user"; // The MySQL username with access to this database $ttdb_pass = "strio_pass"; // The MySQL user's password $ttdb_host = "localhost"; // The host the database is on ##################### $ttdb = mysql_connect($ttdb_host, $ttdb_user, $ttdb_pass); mysql_select_db($ttdb_db, $ttdb); $query = "INSERT INTO `tt_users` (`user`, `pass`, `s_date`, `s_time`, `name`, `email`, `status`, `gid`, `m_datetime`) VALUES ('" . mysql_real_escape_string($vars['Email']) . "', '" . base64_encode($vars['Password']) . "', NOW(), NOW(), '" . mysql_real_escape_string($vars['FirstName']) . " " . mysql_real_escape_string($vars['LastName']) . "', '" . mysql_real_escape_string($vars['Email']) . "', 1, " . (int)$ttgid . ", NOW());"; mysql_query($query, $ttdb); mysql_close($ttdb); } 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted February 5, 2008 Share Posted February 5, 2008 You might want to check if the user already has a trio account 0 Quote Link to comment Share on other sites More sharing options...
railto Posted February 5, 2008 Share Posted February 5, 2008 hmm, we use triolive for our live chat, if this works on our test bed might end up moving away from kayako for it 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted February 5, 2008 Share Posted February 5, 2008 You might want to check if the user already has a trio account No need, the query will fail if someone with the same username already exists and no errors will be shown as WHMCS turns them all off. WHMCS shouldn't allow more than one client registration per-email anyway. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted February 5, 2008 Share Posted February 5, 2008 No need, the query will fail if someone with the same username already exists and no errors will be shown as WHMCS turns them all off.WHMCS shouldn't allow more than one client registration per-email anyway. But they can use *anything* as their username in trio You need to check if the email address is already in the trio DB or adding the record *will* break their ability to submit tickets by email... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.