View Single Post
  #232  
Old 01-26-2003, 08:43 AM
C.Birch C.Birch is offline
 
Join Date: Apr 2002
Posts: 459
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Ember
We're trying to teach the bot croatian, do we just tell him the english then the croation, or what?
to do things like that i think you need to make new aiml file but im not to sure, but theres a file with the alice softwear that says the following:

PHP Code:
<?

/*
    Program E
    Copyright 2002, Paul Rydell
    
    This file is part of Program E.
    
    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
*/


/*

INSTRUCTIONS

If you want to put custom tags into your templates you need to define functions to handle those tags in this file.

Define the function with the name ct_customtagname. Setup the function to be passed the parameters $xmlnode, $inputstar, $thatstar, and $topicstar.

After the function has been defined it will automatically be called to handle XML that matches your custom tag name.

Please review the examples below.

*/


/*
Example:
You want to build email capabilities into the bot and have invented an <email> tag.
Example of how your new email tag will be used:
    <category>
      <pattern>EMAIL PAUL AND TELL HIM *</pattern>
      <template>Okay. I emailed him. <email to="paul@rydell.com"><star/></email></template>
    </category>
*/

/*
function ct_email($xmlnode,$inputstar,$thatstar,$topicstar){
    
    # Capitalize the attributes
    $mynode=upperkeysarray($xmlnode["attributes"]);

    # Get the value of an attribute
    $sendto=$mynode["TO"];
    
    # Process everything inside the tag
    $emailcontent=recursechildren(realchild($xmlnode),$inputstar,$thatstar,$topicstar);

    # Send an email
    mail($sendto, "E-Mail from Program E", $emailcontent);

    # Don't return anything to the output
    return "";

}
*/

/*
Example:
You want to build math capabilities into the bot and have invented an <add> tag.
Example of how your new add tag will be used:
    <category>
      <pattern>PLEASE ADD * TO *</pattern>
      <template>The answer is <add><star index="1"/>,<star index="2"/></add></template>
    </category>
*/

/*
function ct_add($xmlnode,$inputstar,$thatstar,$topicstar){
    
    $total=0;

    # Process everything inside the tag
    $numberstoadd=recursechildren(realchild($xmlnode),$inputstar,$thatstar,$topicstar);

    # Split the numbers into an array
    $numberstoadd=split(",",$numberstoadd);

    # Total up the numbers
    foreach($numberstoadd as $x)
        $total += $x;

    # Return the answer
    return $total;

}
*/

?>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01944 seconds
  • Memory Usage 1,786KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete