[BETA] Forum (phpbb3) with bot response (ALICE & Hal9000)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
Locked
User avatar
petrocad3d
Registered User
Posts: 68
Joined: Wed Apr 08, 2009 2:40 am

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by petrocad3d » Thu Aug 12, 2010 2:01 am

M1sT3rM4n wrote:I just realized that my fsockopen function has been disabled. I need to activate it with a web administrator. Could that be causing the problem?
,

Yes, the bots are not able to connect with their server, even if the minibot must response with message error like this :

"i am eating, feeds :)", "i am busy", "i dont have time", "why dont ask to other bot" or "i am watching TV"

it is modboterror1, and you can change it in the admin CP, after the bots works.

did you set modboterror1 string?

:ugeek:

Mr. Man!
Registered User
Posts: 109
Joined: Sat Jul 31, 2010 6:05 am
Contact:

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by Mr. Man! » Thu Aug 12, 2010 3:15 am

I am currently talking to you via MSN, but wanted to say that I can help you make your language clearer for those who are having a bit of difficulty understanding the instructions.

Also, I think my Ultimate Points edit in posting.php is causing some problems.

Mr. Man!
Registered User
Posts: 109
Joined: Sat Jul 31, 2010 6:05 am
Contact:

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by Mr. Man! » Thu Aug 12, 2010 6:29 am

I just made a brand new forum, and installed the modbot on there. I then edited the posting.php and I still don't see the option to enable a bot response.

I think it might be your edits in posting.php. Check your work.

User avatar
petrocad3d
Registered User
Posts: 68
Joined: Wed Apr 08, 2009 2:40 am

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by petrocad3d » Thu Aug 12, 2010 3:35 pm

M1sT3rM4n wrote:I just made a brand new forum, and installed the modbot on there. I then edited the posting.php and I still don't see the option to enable a bot response.

I think it might be your edits in posting.php. Check your work.
Yes, you are right, the problem is in posting.php. This lines need to be in the correct place :

$message = ($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED';
$message = include 'ai/posting_bot_option.php';
$message .= $user->lang[$message] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');

i saw, you added this lines, in other place, it is ok, but, when you added this lines again(did you remember this step?), the last line was added in this way :

$message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');

instead

$message .= $user->lang[$message] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');

The problem was the point "."

Explanation :

$message .= $msg;

this is similar

$message = $message + $msg;

if you dont add the point before the equal, you wont be able to see the prompt. because the prompt would be detected.

i am not sure if my explanation is clear, but if you want to create clearly instructions for this modbot, someones and i will be grateful.

:ugeek:

PD: if you wish, show me your posting.php code (again) only this part, and i will rewrite that part of code. no problem.

YamiHoshi
Registered User
Posts: 4
Joined: Mon Aug 09, 2010 5:50 pm

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by YamiHoshi » Thu Aug 19, 2010 7:36 pm

>>petrocad3d
9 days later, it still doesn't work.

Edit:
The Mod is now working, but not working.
I'm getting this:

Code: Select all

General Error
SQL ERROR [ mysql4 ]

Unknown column 'post_bot_respond' in 'field list' [1054]

SQL

SELECT post_bot_respond FROM phpbb_posts WHERE post_id = 13

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: posting_bot.php
LINE: 1005
CALL: dbal_mysql->sql_query()
Yes, I have root access to the server.

Mr. Man!
Registered User
Posts: 109
Joined: Sat Jul 31, 2010 6:05 am
Contact:

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by Mr. Man! » Fri Aug 20, 2010 12:46 am

1. Did you make the MySQL edits?
2. This mod requires the fsockopen function to function properly.

User avatar
petrocad3d
Registered User
Posts: 68
Joined: Wed Apr 08, 2009 2:40 am

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by petrocad3d » Sat Aug 21, 2010 2:56 am

YamiHoshi wrote:>>petrocad3d
9 days later, it still doesn't work.

Edit:
The Mod is now working, but not working.
I'm getting this:

Code: Select all

General Error
SQL ERROR [ mysql4 ]

Unknown column 'post_bot_respond' in 'field list' [1054]

I checked the modbot for last version of phpbb(3.0.7) and it is working without problem.

you must be add a column 'post_bot_respond' to 'phpbb_posts' table

SQL
ALTER TABLE `phpbb_posts` ADD post_bot_respond varchar(250) NULL default "";

:ugeek:

lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by lugsciath » Tue Sep 14, 2010 9:20 am

$message .= $user->lang[$message] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');

The problem was the point "."

Explanation :

$message .= $msg
It works, indeed! I had sometimes trouble with the missing point after the third $message var. The bot works with it fine, if you made this little failure in you edits it will not (no menu, no reaction at all).

Mr. Man!
Registered User
Posts: 109
Joined: Sat Jul 31, 2010 6:05 am
Contact:

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by Mr. Man! » Fri Sep 17, 2010 5:08 pm

He's compiling a new version for release. I'm bugging him about it haha.

teemad.net
Registered User
Posts: 4
Joined: Tue Aug 10, 2010 5:26 pm
Location: Estonia
Name: Mario Aria
Contact:

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by teemad.net » Sun Sep 19, 2010 6:28 pm

Installed this mod too and everything works fine. When we can see a next release? :roll:
Still learning English.

teemad.net
Registered User
Posts: 4
Joined: Tue Aug 10, 2010 5:26 pm
Location: Estonia
Name: Mario Aria
Contact:

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by teemad.net » Mon Sep 20, 2010 9:09 pm

Actually there is one problem. Bots does not distinguish our forum users :|
Still learning English.

User avatar
petrocad3d
Registered User
Posts: 68
Joined: Wed Apr 08, 2009 2:40 am

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by petrocad3d » Tue Sep 21, 2010 3:43 am

teemad.net wrote:Installed this mod too and everything works fine. When we can see a next release? :roll:
supposed Today, because I promised it, but due to an attack on one of our sites ....,

well really soon.

teemad.net wrote: Actually there is one problem. Bots does not distinguish our forum users
I am not sure, but, the bots response in this way
..................
actually the name (or the nick) of the users is sent to the bot.

Alice and Hal9000 reply knowing the name, but Pandorabots and verbots not. it is no possible to send this information to them or i dont know how it do.

Alice and Hal9000, yes
Pandorabots and Verbots, no


:ugeek:

teemad.net
Registered User
Posts: 4
Joined: Tue Aug 10, 2010 5:26 pm
Location: Estonia
Name: Mario Aria
Contact:

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by teemad.net » Tue Sep 21, 2010 8:45 am

I say Good night to Alissa here and u can see that she thinks that an other user who says Good night after me to her, is me as well :roll:

Sorry about bad english :oops:
Still learning English.

batanaka
Registered User
Posts: 12
Joined: Tue Sep 21, 2010 11:35 pm

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by batanaka » Tue Sep 21, 2010 11:42 pm

I installed it today on my localhost. It has a lot of potential, but I think it will need some work before it can be actually functional. The most obvious problems that I instantly noticed:
1. The scripts (and bots, consequently) can't handle username of the poster. It should be passed to a bot in some way so that it will be able to answer to simple questions like: "What is my name?"
2. It needs a few functions for processing input text before sending it to a bot. Right now if you type five hundred lines of text, bot will attempt to interpret them all, producing tons of nonsense text. I think there should be a function for cutting a message from user to just one or two last sentences and then only sending it to a bot for getting reply. Also, it should strip all text between quotes (together with quotes) before processing it.

User avatar
petrocad3d
Registered User
Posts: 68
Joined: Wed Apr 08, 2009 2:40 am

Re: [BETA] Forum (phpbb3) with bot response (ALICE & Hal9000

Post by petrocad3d » Thu Sep 23, 2010 4:29 am

The next version will be easy to install.
batanaka wrote:I installed it today on my localhost. It has a lot of potential, but I think it will need some work before it can be actually functional. The most obvious problems that I instantly noticed:
1. The scripts (and bots, consequently) can't handle username of the poster. It should be passed to a bot in some way so that it will be able to answer to simple questions like: "What is my name?"
Alice Bot and Hal9000 must reply very well "What is my name?", because the program send the name of the user. it is possible you will need to mod your alice program, because my alice bot program replies very well "what is my name".

--------
if you post in my forum "what is your name?". (first post)
Hal9000 replies "my name is Hal9000, and you?"
if you reply this post "Peter"(a name)
Hal9000 replies "nice to meet you Peter"
if you post again in my forum "what is my name?".
Hal900 replies "your name is Peter".
-------
if you post "what is my name?" (first post)
Hal9000 and Alice reply "your name is {nick name}".

nick name is sent to the bots.

This only works very well, only for register users.
batanaka wrote: 2. It needs a few functions for processing input text before sending it to a bot. Right now if you type five hundred lines of text, bot will attempt to interpret them all, producing tons of nonsense text. I think there should be a function for cutting a message from user to just one or two last sentences and then only sending it to a bot for getting reply. Also, it should strip all text between quotes (together with quotes) before processing it.

Hal9000 just takes 3 first lines.
Alice takes all.

the quote is cut after by each bot(ALICE & HAL9000), easy bot handle the quote.

I have this function called eliminatortagx, in the Alice bot program.

Code: Select all

if (function_exists("eliminadortagx") === FALSE) {
	function eliminadortagx($oraciones){
	$i=0;$con = 0;$des = 0;
	while  ($i<strlen($oraciones)) {
		$c = substr($oraciones,$i,1);
		if (substr($oraciones,$i,6)=='[quote') {$des++;}
		if (substr($oraciones,$i,7)=='[/quote') {$des--;}
		if ($c == '<' ) {$con++;}
		if ($c == '[' ) {$con++;}
		if (($con == 0) and ($des == 0)) {$cc = $cc . $c;}
		if ($c == '>' ) {$con--;}
		if ($c == ']' ) {$con--;}
		$i++;
		}
	return $cc;
	}
}

i will release the next version very soon.

:ugeek:

Locked

Return to “[3.0.x] MODs in Development”