Quote:
Originally Posted by exyuteam
In VB 4.xx if you want to point on specific post, link must be:
http://DOMEN-COM/showthread.php?p=XXXXX#postXXXXX
In Chatbox, we have notification when new post are entered, and if we click on that link, we see that page, and not post itself!
Clement, please correct this in next version....
Thanks in advance!
|
Fixed in the next version.
Quote:
Originally Posted by Lifesupporters
I'm using this on a 3.8.x install and it's working for the most part. There are a few minor issues such as not remembering user preference when it comes to collapsed or open state of smilies, bbcode, etc., but that's not much of a concern.
The one question I do have however is in regards to bot configuration. I know how to use the bot and have it configured to answer specific questions but I don't know how to configure the bot for wildcard questions?
Essentially, the bot will only answer specific questions if they are input exactly as programmed, including punctuation for example:
Question: Is anyone here?
Bot: Yes I'm here, how are you {username}
...however, any changes to the original question will not yield results so for example:
Question: Is Anyone Here?
Bot: No response.
Question: Is Anyone Here
Bot: No response.
Question: anyone here?
Bot: No response.
...
Is there a way to configure the bot to reply to wildcard queries that have a portion of text that matches what's been programed in the ACP?
Thanks.
|
Well I don't have the time before the end of the week to run a test but here is a little test of code change we could try.
Edit the includes/class_dm_mgccbchat.php file.
Search for :
PHP Code:
if (strcasecmp($bot['question'],$this->raw_chat) == 0)
{
// Do some replacements
$bot['answer'] = str_replace('{username}',htmlspecialchars($this->registry->userinfo['username']), $bot['answer']);
$bot['answer'] = str_replace('{time}',vbdate($this->registry->options['timeformat'],TIMENOW,true,false), $bot['answer']);
$bot['answer'] = str_replace('{date}',vbdate($this->registry->options['dateformat'],TIMENOW,false,false), $bot['answer']);
// Save the bot answer for sending
$this->bot_answer = $bot['answer'];
$notfound = 0;
}
Replace this by :
PHP Code:
$found = 0;
if (strlen($bot['question']) == strlen($this->raw_chat))
{
if (strncasecmp($bot['question'],$this->raw_chat) == 0)
{
$found = 1; // Same length string and string equals
}
}
else if (strlen(stristr($this->raw_chat,$bot['question']))>0)
{
$found = 1; // Bot question included in part of the chat
}
if ($found)
{
// Do some replacements
$bot['answer'] = str_replace('{username}',htmlspecialchars($this->registry->userinfo['username']), $bot['answer']);
$bot['answer'] = str_replace('{time}',vbdate($this->registry->options['timeformat'],TIMENOW,true,false), $bot['answer']);
$bot['answer'] = str_replace('{date}',vbdate($this->registry->options['dateformat'],TIMENOW,false,false), $bot['answer']);
// Save the bot answer for sending
$this->bot_answer = $bot['answer'];
$notfound = 0;
}
I haven't tested the code and did it quickly @work but if you can try it that would be nice