[ABD] Forum AI v0.2.0

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! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
zemaj
Registered User
Posts: 267
Joined: Thu Mar 07, 2002 3:58 am
Location: Australia
Contact:

Post by zemaj »

http://sourceforge.net/projects/iai/

I'd better get that page back up on my site - didn't release it was down.

[edit]
It's now back up again. It can be accessed from http://iai.palgn.com or http://palgn.com/iai/

I shall try to reinstall the mod on my site and get the demo system up and running again too - I've been so busy with my launch this project has been kinds left by the side :oops:
[/edit]

-zemaj
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

Hi,

i've try to install id but i've got an error when someone try to register

Code: Select all

Tried obtaining data for a non-existent user

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near 'AND user_id <> -1' at line 4

SELECT * FROM phpbb_users WHERE user_id = AND user_id <> -1

Line : 113
File : /home/a037morpheus/www/includes/functions_post.php
I use phpBB 2.0.4 and MySQL

Any Ideas ?
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
zemaj
Registered User
Posts: 267
Joined: Thu Mar 07, 2002 3:58 am
Location: Australia
Contact:

Post by zemaj »

Copy & paste the code around line 113

-zem
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

Code: Select all

function iai_send_pm($user_to_id, $iai_subject, $iai_message, $send_email)
{
	global $board_config, $lang, $db, $phpbb_root_path, $phpEx;

	$sql = "SELECT *
		FROM " . USERS_TABLE . " 
		WHERE user_id = " . $user_to_id . "
		AND user_id <> " . ANONYMOUS;
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql);
	}
	$usertodata = $db->sql_fetchrow($result);

	// prepare IAI message (IAI may have used html, smilies etc...)
	$bbcode_uid = make_bbcode_uid();
	$iai_message = str_replace("'", "''", $iai_message);

	// This is to fix up some of the bad formatting which comes out of the AI
	if(empty($iai_message))
	{
		$iai_message = "Thank you.";
	}
	$iai_message = prepare_message(trim($iai_message), 0, 1, 1, $bbcode_uid);

	$msg_time = time();
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
Darkfire001
Registered User
Posts: 87
Joined: Sat Jun 01, 2002 12:09 am
Location: USA, NC
Contact:

Post by Darkfire001 »

so zemaj this mod DOES work with phpbb 2.0.4? I had it with 2.0.1 and worked well, but it got deleted when a hacker attacked my website. I know the older version was really awkward but this one sounds much better.
Visit http://www.gamerpub.com for the Hottest Videogame Forum around and monthly videogame prizes.
LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

Yes, it does work, I am using it now.
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

LifeIsPain wrote: Yes, it does work, I am using it now.

it work everywhere except for the registration/modification of a profile for me :?
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

Well, I personally think that includes/usercp_register.php is where your problem is, cause no user_id is being sent, or at least being received byt iai_send_pm().

So search usercp_register.php to see what happened to $user_id, cause for some reason, it is blank (but shoot, you mod yourself, come on ;) )
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

LifeIsPain wrote: Well, I personally think that includes/usercp_register.php is where your problem is, cause no user_id is being sent, or at least being received byt iai_send_pm().

So search usercp_register.php to see what happened to $user_id, cause for some reason, it is blank (but shoot, you mod yourself, come on ;) )



i've done that but i don't find the problem :cry:
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

What happens if you comment out:

iai_send_pm($user_id, $iai_wpm_subject, $iai_wpm_message, 0);

in usercp_register.php? Do the emails still get sent? Just to show that $user_id is being used.
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.
entelligence
Registered User
Posts: 86
Joined: Tue Nov 19, 2002 11:53 pm

Post by entelligence »

for me, it answers PM's and will talk on the AI chat page. But it wont post at all in forums. Even though I have posting percentage set to 100%
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

LifeIsPain wrote: What happens if you comment out:

iai_send_pm($user_id, $iai_wpm_subject, $iai_wpm_message, 0);

in usercp_register.php? Do the emails still get sent? Just to show that $user_id is being used.


if i do that, there is no problem : members can registered or edit their profile, etc...


this is srange but not vital : for the moment, i can't use the automoatic PM, that's all but not good :cry:
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

Ok, that is a big head scratcher then, cause it works just fine for me.
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

:?

maybe zemaj will have an idea :!:
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
zemaj
Registered User
Posts: 267
Joined: Thu Mar 07, 2002 3:58 am
Location: Australia
Contact:

Post by zemaj »

Strange. You see I just set up the mod on my forums again and I had a problem with this although my problem was that for some reason $board_config['iai_active_wpm'] wasn't returning true (even when I set it to it.

But this is entirely different.

In usercp_register have a look at:
if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN )
{
//$emailer->use_template("admin_activate", stripslashes($user_lang));
$emailer->use_template("admin_activate", $board_config['default_lang']);
$emailer->email_address($board_config['board_email']);
$emailer->set_subject($lang['New_account_subject']);
$emailer->extra_headers($email_headers);

$emailer->assign_vars(array(
'USERNAME' => $username,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),

'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
);
$emailer->send();
$emailer->reset();
}

$message = $message . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');

//
// START IAI welcome pm message
//


Are you sure you have no other mod installed there? Is that what it says? If it does, does the activation link get sent properly? If so I have no idea what's happening to $user_id :!:

Very strange.

-zem
Locked

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