vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - Talkerbot V2.2.3 (AI Posting Bot) (https://vborg.vbsupport.ru/showthread.php?t=126386)

eXtremeTim 09-15-2006 08:37 PM

Quote:

Originally Posted by zethon
I've gone ahead and added code to the ewt_talkerbot.php file that will (1) update the forum counters, put the bot into the "who's online" list and update the bot's user info.

Underneath of
PHP Code:

define ("MY_VERSION""TALKERBOT v2.2 FOR VBULLETIN 3.5 and 3.6 by eXtremeTim"); 

add the following function:

PHP Code:

function update_bot_info()
{
    global 
$vbulletin;
    
    require_once(
'./global.php');
    require_once(
'./includes/functions.php');
    
$userinfo fetch_userinfo($vbulletin->options['ewt_talkerbot_botuid']);

    
// if the bot is already in the session table, update it, otherwise add it        
    
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."session SET lastactivity = '"TIMENOW ."' WHERE (userid = '".$vbulletin->options['ewt_talkerbot_botuid']."')");
    if (
$vbulletin->db->affected_rows() == 0)
    {
        
$ip rand(25,160).".".rand(30,250).".".rand(3,250).".".rand(10,250);
        
$vbulletin->db->query_write("INSERT INTO ".TABLE_PREFIX."session (userid,lastactivity,host) VALUE ('".$vbulletin->options['ewt_talkerbot_botuid']."',".TIMENOW.",'$ip')");
    }

    
$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
    
$userdata->set_existing($userinfo);
    
$userdata->set('lastactivity'TIMENOW);
    
$userdata->set('lastvisit'TIMENOW 1);
    
$userdata->save();



Then towards the bottom there are two different if staments that look like:
PHP Code:

                    if (!$dataman->errors// should not occur
                    
{
                        
$dataman->save();
                                            } 

And make them both look like as follows:

PHP Code:

                    if (!$dataman->errors// should not occur
                    
{
                        
$dataman->save();
                        require_once(
'./includes/functions_databuild.php'); 
                        
build_forum_counters($foruminfo["forumid"]);
                        
update_bot_info();
                    } 


yea I already have them updates in the new version just working on some bugs and stuff. ;)

I will release the new update tonight. Just trying to figure out what else I was fixing in it. Since I have been busy the last few days i lost track of what i was doing.

Meta 09-15-2006 08:57 PM

Quote:

Since I have been busy the last few days i lost track of what i was doing.
(I know that feeling.)

eXtremeTim 09-15-2006 08:59 PM

I am debating right now if im making the functions file for this version or if ill take care of that on next release to clean up all the code.

SportsZone 09-15-2006 09:10 PM

Great hack!

How do I set how often he will reply to peoples posts?

zethon 09-15-2006 09:44 PM

Quote:

Originally Posted by eXtremeTim
yea I already have them updates in the new version just working on some bugs and stuff. ;)

I will release the new update tonight. Just trying to figure out what else I was fixing in it. Since I have been busy the last few days i lost track of what i was doing.

Awesome! I editted the post to also fix the double-quote problem with the bot. Not sure if you fixed that too or not. :)

TTG 09-15-2006 10:01 PM

Installed and worked straight out of the box .. great addition .. thanks eXtremeTim.

Clicked install

G_Man 09-15-2006 10:14 PM

Quote:

Originally Posted by SportsZone
Great hack!

How do I set how often he will reply to peoples posts?

Add which forums you want it to post in, in the TalkerBot Settings...

Then under each of those forums you set the percentage of his replies.

dilbert 09-15-2006 11:46 PM

Quote:

Originally Posted by eXtremeTim
I will release the new update tonight. Just trying to figure out what else I was fixing in it. Since I have been busy the last few days i lost track of what i was doing.

Terrific. I know it's not a bug, but a way for use shared server people to upload would be appreciated. Can you create sql scripts to upload?

eXtremeTim 09-16-2006 01:52 AM

use the botloaderinc.php file to load in the files one at a time.

eXtremeTim 09-16-2006 01:54 AM

I would like to take the time right now to thank G_Man for his donation and trying to provide support in the thread. I really appriciate the help. This script takes up alot of time to keep improving it.


All times are GMT. The time now is 07:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01622 seconds
  • Memory Usage 1,766KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete