Typ Deines phpBB Forums: Premodded phpBB
MODs: Ja
Dein Wissensstand: Einsteiger
Link zu Deinem Forum: [url]http://[/url]
PHP Version:
MySQL Version:
Was hast Du gemacht, bevor das Problem aufgetreten ist?
Den Quiz Mod ausgebaut
Was hast Du bereits versucht um das Problem zu lösen?
Alle mögliche.
Fehlerbeschreibung und Nachricht
Also ich möchte den Quiz Mod aus meinem forum wieder aus bauen. So weit hat alles geklappt. Nur, wen ich aus der funktions-post.php diesen Code ausbaue,
Dann bekomme ich eine fehlermeldung die zu dieser Zeile verweist :// BEGIN Quiz Hack
if ( defined('FUNCTIONS_POST_INCLUDED') )
{
return;
}
define('FUNCTIONS_POST_INCLUDED', true);
// END Quiz Hack
Lasse ich den oben geposteten Code in der Datei klappt alles bestens, nur der Code gehört doch eindeutig zum Quiz Mod und müste doch raus...function wpm_send_pm($user_to_id, $wpm_subject, $wpm_message, $send_email)
Der geamte Codeausschnitt sieht so aus:
if (!defined('IN_PHPBB'))
{
die('Hacking attempt');
}
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#');
$html_entities_replace = array('&', '<', '>');
$unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#');
$unhtml_specialchars_replace = array('>', '<', '"', '&');
// BEGIN Quiz Hack
if ( defined('FUNCTIONS_POST_INCLUDED') )
{
return;
}
define('FUNCTIONS_POST_INCLUDED', true);
// END Quiz Hack
// start wpm mod by Duvelske (http://www.vitrax.vze.com)
function wpm_send_pm($user_to_id, $wpm_subject, $wpm_message, $send_email)
{
global $board_config, $swpm_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 wpm message
$bbcode_uid = make_bbcode_uid();
$wpm_message = str_replace("'", "''", $wpm_message);
if(empty($wpm_message))
{
$wpm_message = "Thank you for registering.";
}
$wpm_message = prepare_message(trim($wpm_message), 0, 1, 1, $bbcode_uid);
$msg_time = time();
// Do inbox limit stuff
$sql = "SELECT COUNT(privmsgs_id) AS inbox_items, MIN(privmsgs_date) AS oldest_post_time
FROM " . PRIVMSGS_TABLE . "
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR privmsgs_type = " . PRIVMSGS_READ_MAIL . "
OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )
AND privmsgs_to_userid = " . $usertodata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_MESSAGE, $lang['No_such_user']);
}
$sql_priority = ( SQL_LAYER == 'mysql' ) ? 'LOW_PRIORITY' : '';
if ( $inbox_info = $db->sql_fetchrow($result) )
{
if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] )
{
$sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . "
WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
OR privmsgs_type = " . PRIVMSGS_READ_MAIL . "
OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )
AND privmsgs_date = " . $inbox_info['oldest_post_time'] . "
AND privmsgs_to_userid = " . $usertodata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete your oldest privmsgs', '', __LINE__, __FILE__, $sql);
}
}
}