Parse error: syntax error, unexpected '}', expecting '{' in /membri/petmaniaitalia/chat/lib/class/AJAXChat.php on line 660
e non parte la chat, sicuramente sbaglio qualcosa vi riporto di seguido quello che dicono di fare.
To make your chatbot respond to certain keywords, follow these steps.
Remeber that you should not use windows notepad to edit PHP code. Get an editor like Notepad++ to edit php code or you may encounter problems.
Open lib/class/AJAXChat.php and do a search for this:
Codice: Seleziona tutto
function insertParsedMessage($text)
Codice: Seleziona tutto
} else {
// No command found, just insert the plain message:
$this->insertCustomMessage(
$this->getUserID(),
$this->getUserName(),
$this->getUserRole(),
$this->getChannel(),
$text
);
}
}
Codice: Seleziona tutto
include("chatbot.php");
enter this code into the chatbot.php page
Codice: Seleziona tutto
<?php
// Chat bot messages
if(stristr($text, 'help me'))
{
// KEYWORDS TRIGGER START
$this->insertChatBotMessage(
$this->getPrivateMessageID(),
"\nHow may I help you?\n" //This is what the chatbot says when the visitor enters help me anywhere in a sentence!
);
}
// KEYWORD TRIGGER END
?>

