Documentation is available at add.php
- <?php
- /*
- Program E related AIML knowledgebase tools
- Copyright 2004, Anne Kootstra [anne@aiml.info]
- http://www.AIML.info
- Program E is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- Program E is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with Program E; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
- include "../admin/botloaderfuncs.php";
- require_once "include/common.inc.php";
- require_once "include/add.inc.php";
- /*
- this is the bot's ID which can be found in the bots table
- */
- $selectbot = findbotid();
- /*
- This ID contains the main node and needs to be fed manually to
- the loading function insertmybigsentence(). If this is not done,
- then the loading mechanism will add another AIML tree instead
- of adding to the existing tree.
- */
- $annesID = findmainnode($selectbot);
- /*
- The category that's going to be inserted.
- */
- $pattern = "_ FEED";
- $that = "*";
- $topic = "*";
- $template = "Yep ... bite me";
- /*
- In this format insertmysentence() expects the pattern side
- of the category to be formatted.
- */
- $mybigsentence="$pattern <that> $that <topic> $topic";
- /*
- $idused is the ID under which the template should be stored.
- The ID is the MySQL insert ID of the last word, which would be
- the last word of the <topic> bit of $mybigsentence. In many
- cases this is an empty cell
- */
- $idused=insertAnnesentence($mybigsentence, $annesID, $selectbot);
- /*
- This inserts the template.
- */
- insertmytemplate($idused,$template);
- print $idused."<br>";
- ?>
Documentation generated on Tue, 11 Jan 2005 18:40:57 +0100 by phpDocumentor 1.3.0RC3