Quiz Hack
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Hallo,
ich habe folgendes Problem jetzt. Wenn ich eine Quizfrage manuell stellen möchte, dann erscheint diese Meldung:
Error in posting
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near ' 1043265623, 11, 0, 0, 0 , 1)' at line 1
INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote , topic_quiz) VALUES ('Quiz Frage #1 ...', , 1043265623, 11, 0, 0, 0 , 1)
Line : 272
File : /www/htdocs/includes/functions_post.php
Peggy
ich habe folgendes Problem jetzt. Wenn ich eine Quizfrage manuell stellen möchte, dann erscheint diese Meldung:
Error in posting
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near ' 1043265623, 11, 0, 0, 0 , 1)' at line 1
INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote , topic_quiz) VALUES ('Quiz Frage #1 ...', , 1043265623, 11, 0, 0, 0 , 1)
Line : 272
File : /www/htdocs/includes/functions_post.php
Peggy
sorry für die Störung, aber einer meiner User hat im Forum diesen Error entdeckt:
Also das passiert, wenn auf ein Quiz antwortet!
kann mir jemand kurz helfen? HIER die functions_post.php als txt
Code: Alles auswählen
Fatal error: Cannot redeclare hex2bin() in /homepages/34/d13424033/htdocs/gbg/forum/includes/functions_post.php on line 33

kann mir jemand kurz helfen? HIER die functions_post.php als txt
@sqrt: lösche das
nach und füge es nach wieder ein...
@peggy: deine includes/funtions_post.php und deine includes/quiz.php als .txt bitte...
ah
Code: Alles auswählen
// BEGIN Quiz Hack
if ( defined('FUNCTIONS_POST_INCLUDED') )
{
return;
}
define('FUNCTIONS_POST_INCLUDED', true);
// END Quiz Hack
Code: Alles auswählen
$unhtml_specialchars_replace = array('>', '<', '"', '&');
@peggy: deine includes/funtions_post.php und deine includes/quiz.php als .txt bitte...
ah
Hiho,
in unseren PHPBB-Board nutzen wir das Quiz als nette Abwechslung, im "Langzeitbetrieb"(4Wochen) haben sich sich ein Paar Fragen aufgetan:
-ist es möglich, das Quiz nach zum Bsp. 24/48 Stunden automatisch auflösen zu lassen? Manche Fragen aus dem verwendeten Fragenkatalog sind knifflig, so das manchmal die Antwort ausbleibt.
-ebenso hatt sich unser Quiz-Bot etwas schräg mit den Antworten. So muss diese zu 100% aus dem Fragenkatalog übereinstimmen, also auch Kommas und Satzzeichen. Könnte man nicht eine Art "Logik" bauen, die bei 90%iger Übereinstimmung der Punkt gegeben wird? (ich selber wüsste nicht wie dies zu realisieren wäre)
-wenn jemand eine Antwort gegeben hatt, sollte er nach einer bestimmten Zeit (vielleicht 5h) wieder eine Antwort posten dürfen. liesse sich soetwas realisieren und wenn ja wie?
(sorry, falls die Antworten auf meine Fragen schon gepostet wurden, bis Seite 12 hab ich noch mitgelesen
)
in unseren PHPBB-Board nutzen wir das Quiz als nette Abwechslung, im "Langzeitbetrieb"(4Wochen) haben sich sich ein Paar Fragen aufgetan:
-ist es möglich, das Quiz nach zum Bsp. 24/48 Stunden automatisch auflösen zu lassen? Manche Fragen aus dem verwendeten Fragenkatalog sind knifflig, so das manchmal die Antwort ausbleibt.
-ebenso hatt sich unser Quiz-Bot etwas schräg mit den Antworten. So muss diese zu 100% aus dem Fragenkatalog übereinstimmen, also auch Kommas und Satzzeichen. Könnte man nicht eine Art "Logik" bauen, die bei 90%iger Übereinstimmung der Punkt gegeben wird? (ich selber wüsste nicht wie dies zu realisieren wäre)
-wenn jemand eine Antwort gegeben hatt, sollte er nach einer bestimmten Zeit (vielleicht 5h) wieder eine Antwort posten dürfen. liesse sich soetwas realisieren und wenn ja wie?
(sorry, falls die Antworten auf meine Fragen schon gepostet wurden, bis Seite 12 hab ich noch mitgelesen

Hi Leutz,
habe wie fast alle vor mir auch erhebliche Probs mit diesem schönen Mod.
Fehlermeldung:
Hier meine functions_post.php (Zeile 250 - 280)
Habe jetzt alles zich mal durchgeschaut aber keinen Fehler bei mir gefunden. Selbst wenn ich "k_id" rausnehme bzw. den Komma dazwischen entferne bekomme ich die gleiche Fehlermeldung.
habe wie fast alle vor mir auch erhebliche Probs mit diesem schönen Mod.
Fehlermeldung:
Code: Alles auswählen
Error in posting
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near ' topic_quiz) VALUES ('Quiz Frage #1 ...', , 1043520425, 1, 0, 0, 0, , , 1)' at line 1
INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, k_id, , topic_quiz) VALUES ('Quiz Frage #1 ...', , 1043520425, 1, 0, 0, 0, , , 1)
Line : 268
File : /www/htdocs/v027589/includes/functions_post.php
Hier meine functions_post.php (Zeile 250 - 280)
Code: Alles auswählen
else if ($mode == 'editpost')
{
remove_search_post($post_id);
}
if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
{
$topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0;
// BEGINN Quiz Hack
$quiz_sql1 = !empty($post_data['topic_quiz']) ? ', topic_quiz' : '';
$quiz_sql2 = !empty($post_data['topic_quiz']) ? ', 1' : '';
// END Quiz Hack
$sql = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, k_id, $quiz_sql1) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, $k_id, $quiz_sql2)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote, k_id=$k_id WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
if ($mode == 'newtopic')
{
$topic_id = $db->sql_nextid();
}
}
$edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
if (!$db->sql_query($sql, BEGIN_TRANSACTION))
Habe jetzt alles zich mal durchgeschaut aber keinen Fehler bei mir gefunden. Selbst wenn ich "k_id" rausnehme bzw. den Komma dazwischen entferne bekomme ich die gleiche Fehlermeldung.
Fehler bei der Installation
Hi Leute, wenn ich das Quiz Mod installieren möchte bekomme ich folgende Fehlermeldung:
Fatal error: Call to undefined function: include_attach_lang() in /home/www/htdocs/die-liebesseiten.de/phpBB2/includes/functions.php on line 236
Hier mal ein Auszug aus der functions.php
Fatal error: Call to undefined function: include_attach_lang() in /home/www/htdocs/die-liebesseiten.de/phpBB2/includes/functions.php on line 236
Hier mal ein Auszug aus der functions.php
// Initialise user settings on page load
function init_userprefs($userdata)
{
global $board_config, $theme, $images;
global $template, $lang, $phpEx, $phpbb_root_path;
if ( $userdata['user_id'] != ANONYMOUS )
{
if ( !empty($userdata['user_lang']))
{
$board_config['default_lang'] = $userdata['user_lang'];
}
if ( !empty($userdata['user_dateformat']) )
{
$board_config['default_dateformat'] = $userdata['user_dateformat'];
}
if ( isset($userdata['user_timezone']) )
{
$board_config['board_timezone'] = $userdata['user_timezone'];
}
}
if ( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx) )
{
$board_config['default_lang'] = 'english';
}
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
if ( defined('IN_ADMIN') )
{
if( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx) )
{
$board_config['default_lang'] = 'english';
}
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx);
}
// Begin Attachment MOD
Zeile236 include_attach_lang();
// End Attachment MOD
//
// Set up style
//
if ( !$board_config['override_user_style'] )
{
if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_style'] > 0 )
{
if ( $theme = setup_style($userdata['user_style']) )
{
return;
}
}
}
$theme = setup_style($board_config['default_style']);
return;
}
function setup_style($style)
{
global $db, $board_config, $template, $images, $phpbb_root_path;
$sql = "SELECT *
FROM " . THEMES_TABLE . "
WHERE themes_id = $style";
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not query database for theme info');
}
if ( !($row = $db->sql_fetchrow($result)) )
{
message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]");
}
$template_path = 'templates/' ;
$template_name = $row['template_name'] ;
$template = new Template($phpbb_root_path . $template_path . $template_name, $board_config, $db);
if ( $template )
{
$current_template_path = $template_path . $template_name;
@include($phpbb_root_path . $template_path . $template_name . '/' . $template_name . '.cfg');
if ( !defined('TEMPLATE_CONFIG') )
{
message_die(CRITICAL_ERROR, "Could not open $template_name template config file", '', __LINE__, __FILE__);
}
$img_lang = ( file_exists($current_template_path . '/images/lang_' . $board_config['default_lang']) ) ? $board_config['default_lang'] : 'english';
while( list($key, $value) = @each($images) )
{
if ( !is_array($value) )
{
$images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value);
}
}
}
return $row;
}
function encode_ip($dotquad_ip)
{
$ip_sep = explode('.', $dotquad_ip);
return sprintf('%02x%02x%02x%02x', $ip_sep[0], $ip_sep[1], $ip_sep[2], $ip_sep[3]);
}
function decode_ip($int_ip)
{
$hexipbang = explode('.', chunk_split($int_ip, 2, '.'));
return hexdec($hexipbang[0]). '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);
}