Page 57 of 152
Posted: Thu Feb 06, 2003 4:43 am
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
[/edit]
-zemaj
Posted: Fri Feb 07, 2003 4:32 pm
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 ?
Posted: Sun Feb 09, 2003 12:21 pm
by zemaj
Copy & paste the code around line 113
-zem
Posted: Sun Feb 09, 2003 2:33 pm
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();
Posted: Sun Feb 09, 2003 3:28 pm
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.
Posted: Sun Feb 09, 2003 3:40 pm
by LifeIsPain
Yes, it does work, I am using it now.
Posted: Sun Feb 09, 2003 3:51 pm
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

Posted: Sun Feb 09, 2003 4:04 pm
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

)
Posted: Sun Feb 09, 2003 4:44 pm
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

Posted: Sun Feb 09, 2003 4:51 pm
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.
Posted: Sun Feb 09, 2003 4:53 pm
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%
Posted: Sun Feb 09, 2003 5:39 pm
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

Posted: Sun Feb 09, 2003 6:26 pm
by LifeIsPain
Ok, that is a big head scratcher then, cause it works just fine for me.
Posted: Sun Feb 09, 2003 6:45 pm
by morpheus2matrix
maybe zemaj will have an idea

Posted: Mon Feb 10, 2003 12:19 am
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