<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[PhpBB 3] Ajax Chat 0.8.3 configurazione]]></title><description><![CDATA[<p dir="auto">Ciao a tutti, ho installato ieri questa fantastica chat sul mio forum. Ho trovato su sourceforge a il modo per dare dei comandi al bot, cosa molto interessante, ma pure seguendo alla lettera quello che scrivono mi da errore:<br />
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.</p>
<p dir="auto">To make your chatbot respond to certain keywords, follow these steps.<br />
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.<br />
Open lib/class/AJAXChat.php and do a search for this:</p>
<pre><code>function insertParsedMessage($text)
</code></pre>
<p dir="auto">At the end of this function (about line 762 or so) is this:</p>
<pre><code>} else {
            // No command found, just insert the plain message:
            $this-&gt;insertCustomMessage(
                $this-&gt;getUserID(),
                $this-&gt;getUserName(),
                $this-&gt;getUserRole(),
                $this-&gt;getChannel(),
                $text
            );

        }

          }
</code></pre>
<p dir="auto">Right ABOVE the last } paste this:</p>
<pre><code>include("chatbot.php");
</code></pre>
<p dir="auto">Save, then create a new php page called chatbot.php in the lib/class/ folder (or you can create the chatbot.php first if you want to avoid any interruption in ajax chat).<br />
enter this code into the chatbot.php page</p>
<pre><code>&lt;?php

// Chat bot messages
if(stristr($text, 'help me'))
      {
// KEYWORDS TRIGGER START
    $this-&gt;insertChatBotMessage(
                    $this-&gt;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

?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/topic/123859/phpbb-3-ajax-chat-0-8-3-configurazione</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Dec 2026 22:37:35 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/123859.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 20 Mar 2010 20:38:50 GMT</pubDate><ttl>60</ttl></channel></rss>