Mibew Messenger Community
Contributions => Plugins, tips, and tricks => Topic started by: moj0 on January 29, 2010, 11:48:26 AM
-
hi guys i want to add a agent name in my predefinedanswers (Canned Messages) how can i do that?
-
I needed the same, here's how I did it:
1. Edit the file webim/libs/chat.php in your favourite editor
2. Find the function setup_chatview_for_operator
3. Find the foreach loop that looks like this:
foreach($canned_messages as $answer) {
$predefinedres .= "<option>".htmlspecialchars(topage($answer['vcvalue']))."</option>";
}
4. Change $predefinedres to the following:
$predefinedres .= "<option>".htmlspecialchars(topage(
preg_replace("/{operator_name}/", $operator['vccommonname'], $answer['vcvalue'])
))."</option>";
5. Login to webim as administrator, and add a canned message like the following:
Hello, my name is {operator_name}, how may I be of assistance today.
{operator_name} will automatically become your operator name whenever you start a new chat with a client.
Hope this helps!