Lace is pretty cool - I created an extension which set's the lace cookie from my vanilla forum so when they click they jump over into Lace logged in as their vanilla user
now just gotta disable the name change box in lace itself so they don't change their names once in there :-)
<?php
/*
Extension Name: Lace Integration
Extension Url: http://www.cmehil.com/
Description: Adds the Lace (http://www.socket7.net/lace/) login to the user panel, defaulted with their name
Version: 1.0
Author: ccmehil
Author Url: http://craig.cmehil.com
*/
if(@$Panel){
// Location of your chat program
if(file_exists('../lace/config.php')){
// CSS Settings
$ButtonCSS = "PanelButton";
// Title you want to give the chat panel
$Title = "Chit Chat";
$TitleSubmit ="Chat Now!";
// Gather user info
if (!@$UserManager) $UserManager = $Context->ObjectFactory->NewContextObject($Context, "UserManager");
$AccountUserID = ForceIncomingInt("u", $Context->Session->UserID);
if (!@$AccountUser) $AccountUser = $UserManager->GetUserById($AccountUserID);
// Create chat cookie
setcookie("Lace_name", $AccountUser->Name, time()+3600*24*30, "/lace/");
// Create chat login form
$ChatForm = "<form method=\"get\" action=\"../lace/index.php\" method=\"POST\">"
. "<input type=\"hidden\" name=\"name\" value=\"".$AccountUser->Name."\" />"
. "<input type=\"submit\" class=\"".$ButtonCSS."\" value=\"".$TitleSubmit."\" />"
. "</form>"
. "<br>";
$ListName = $Context->GetDefinition($Title);
$Panel->AddList($ListName);
// Add the form to the panel
$Panel->AddListItem($ListName,'','',$ChatForm);
}
}
?>
Just gotta change the two cookie values to match your setup.
now just gotta disable the name change box in lace itself so they don't change their names once in there :-)
In that case, if you haven't done so already, you may want to also disable the changing of usernames in vanilla. As that could also throw your users off
That's a good point. Perhaps I just won't bother then, although I set the cookie each and everytime the page loads (which would mean the name change would go work)
I probably won't bother I don't have a lot of usage anyway :-)
Comments
now just gotta disable the name change box in lace itself so they don't change their names once in there :-)
<?php /* Extension Name: Lace Integration Extension Url: http://www.cmehil.com/ Description: Adds the Lace (http://www.socket7.net/lace/) login to the user panel, defaulted with their name Version: 1.0 Author: ccmehil Author Url: http://craig.cmehil.com */ if(@$Panel){ // Location of your chat program if(file_exists('../lace/config.php')){ // CSS Settings $ButtonCSS = "PanelButton"; // Title you want to give the chat panel $Title = "Chit Chat"; $TitleSubmit ="Chat Now!"; // Gather user info if (!@$UserManager) $UserManager = $Context->ObjectFactory->NewContextObject($Context, "UserManager"); $AccountUserID = ForceIncomingInt("u", $Context->Session->UserID); if (!@$AccountUser) $AccountUser = $UserManager->GetUserById($AccountUserID); // Create chat cookie setcookie("Lace_name", $AccountUser->Name, time()+3600*24*30, "/lace/"); // Create chat login form $ChatForm = "<form method=\"get\" action=\"../lace/index.php\" method=\"POST\">" . "<input type=\"hidden\" name=\"name\" value=\"".$AccountUser->Name."\" />" . "<input type=\"submit\" class=\"".$ButtonCSS."\" value=\"".$TitleSubmit."\" />" . "</form>" . "<br>"; $ListName = $Context->GetDefinition($Title); $Panel->AddList($ListName); // Add the form to the panel $Panel->AddListItem($ListName,'','',$ChatForm); } } ?>
Just gotta change the two cookie values to match your setup.
In that case, if you haven't done so already, you may want to also disable the changing of usernames in vanilla. As that could also throw your users off
I probably won't bother I don't have a lot of usage anyway :-)