Bedankt, dat is opgelost.
Gisteren heb ik de rest van de mod gedaan en geupload.
Alles leek goed te werken.
Dan had ik een test account aangemaakt die dan vandaag zou verjaren (om te zien wat er zou gaan gebeuren)
Nu kijk ik vandaag op het forum en dan krijg ik dit:
Fatal error: Call to undefined function: bpm_send_pm() in /home/divinglo/domains/divinglommel.be/public_html/forum/index.php on line 337
hier is mijn index.php van lijn 313 tot 385:
Code: Selecteer alles
// START Birthday Mail Extension & bpm mod
{
$sql = "SELECT *
FROM " . WPM;
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "", "", __LINE__, __FILE__, $sql);
}
else
{
while($row = $db->sql_fetchrow($result))
{
$swpm_config[$row['name']] = $row['value'];
}
}
if($swpm_config['active_bpm'])
{
$bpm_subject = str_replace("[username]", $username, $swpm_config['bpm_subject']);
$bpm_subject = str_replace("[age]", $user_age, $bpm_subject);
$bpm_subject = str_replace("[sitename]", $board_config['sitename'], $bpm_subject);
$bpm_message = str_replace("[username]", $username, $swpm_config['bpm_message']);
$bpm_message = str_replace("[age]", $user_age, $bpm_message);
$bpm_message = str_replace("[sitename]", $board_config['sitename'], $bpm_message);
bpm_send_pm($user_id, $bpm_subject, $bpm_message, 1);
}
}
if($swpm_config['active_bpmmail'])
{
$sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id = " . $userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "", "", __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
$bd_mail = intval($row['user_email']);
}
$sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "", "", __LINE__, __FILE__, $sql);
}
while ($row = $db->sql_fetchrow($result))
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
$emailer->email_address(trim($row['user_email']));
$emailer->use_template("birthday", $row['user_lang']);
$emailer->set_subject($bpm_subject);
$emailer->set_message($bpm_message);
$bpm_subject = str_replace("[username]", $username, $swpm_config['bpm_subject']);
$bpm_subject = str_replace("[age]", $user_age, $bpm_subject);
$bpm_subject = str_replace("[sitename]", $board_config['sitename'], $bpm_subject);
$bpm_message = str_replace("[username]", $username, $swpm_config['bpm_message']);
$bpm_message = str_replace("[age]", $user_age, $bpm_message);
$bpm_message = str_replace("[sitename]", $board_config['sitename'], $bpm_message);
$emailer->assign_vars(array(
'MESSAGE' => str_replace($bpm_message),
'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $row['username']), 0, 25)),
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']))
);
$emailer->send();
$emailer->reset();
}
$birthday_today_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
}
}
if ($birthday_today_list) $birthday_today_list[ strlen( $birthday_today_list)-1] = ' ';
if ($birthday_week_list) $birthday_week_list[ strlen( $birthday_week_list)-1] = ' ';
}
$db->sql_freeresult($result);
}
en dit is dan regel 337:
Code: Selecteer alles
bpm_send_pm($user_id, $bpm_subject, $bpm_message, 1);