Seite 12 von 20

Verfasst: 25.09.2003 21:26
von Philippt
mist :-/ bbcode.php/tpl sehen absolut ok aus nur das posting.php teil (in der nähe des quiz hack) wirkt irgendwie änders :-S bad :-(

Verfasst: 26.09.2003 03:11
von Dagobert
sach mir die zeilen dann poste ich dir meine.......vielleicht hilft es dir ja....

Verfasst: 26.09.2003 21:40
von Philippt
aslo das ganze ist in der posting.php und bei mir ists so:

Code: Alles auswählen

	else
	{
		if ( $mode == 'quote' )
		{
			$topic_id = $post_info['topic_id'];
		}
		// BEGIN Quiz Hack
		$auth_answer = false;
		if ( $mode == 'reply' && $userdata['session_logged_in'] && $post_info['topic_quiz'] == 1 )
		{
			include($phpbb_root_path . 'includes/quiz.'.$phpEx);
			if ( $quiz->check_answer_auth($topic_id, $userdata) )
			{
				$auth_answer = true;
				$post_data['quiz_answer'] = !empty($answer) ? $answer : '';
			}
		}
		// END Quiz Hack

		$post_data['first_post'] = ( $mode == 'newtopic' ) ? true : 0;
		$post_data['last_post'] = false;
		$post_data['has_poll'] = false;
		$post_data['edit_poll'] = false;
	}
}
else
{
	message_die(GENERAL_MESSAGE, $lang['No_such_post']);
}

//
// The user is not authed, if they're not logged in then redirect
// them, else show them an error message
//
//-- mod : calendar
//	 || (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal])
//-- modify
if ( !$is_auth[$is_auth_type] || (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal]))
//-- fin mod : calendar
{
	if ( $userdata['session_logged_in'] )
	{
		if (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal])
		{
			message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type_cal], $is_auth[$is_auth_type_cal . "_type"]));
		}
//-- fin mod : calendar
		message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type], $is_auth[$is_auth_type . "_type"]));
	}

	switch( $mode )
	{
		case 'newtopic':
			$redirect = "mode=newtopic&" . POST_FORUM_URL . "=" . $forum_id;
			break;
		case 'reply':
		case 'topicreview':
			$redirect = "mode=reply&" . POST_TOPIC_URL . "=" . $topic_id;
			break;
		case 'quote':
		case 'editpost':
			$redirect = "mode=quote&" . POST_POST_URL ."=" . $post_id;
			break;
	}
	$redirect .= ($post_reportid) ? '&post_reportid=$post_reportid' : '';
	redirect(append_sid("login.$phpEx?redirect=posting.$phpEx&" . $redirect, true));
}

//
// Set toggles for various options
//
if ( !$board_config['allow_html'] )
{
Das der fehler beim mode=quote auftrit und die bbcode.php/tpl eigentlich io sind sollt er hier sein aber das wirkt eigentlich auch gut :-/

Verfasst: 26.09.2003 22:57
von Dagobert
hier is meine posting.php

Code: Alles auswählen

else
	{
		if ( $mode == 'quote' )
		{
			$topic_id = $post_info['topic_id'];
		}
                // BEGIN Quiz Hack
		$auth_answer = false;
		if ( $mode == 'reply' && $userdata['session_logged_in'] && $post_info['topic_quiz'] == 1 )
		{
			include($phpbb_root_path . 'includes/quiz.'.$phpEx);
			if ( $quiz->check_answer_auth($topic_id, $userdata) )
			{
				$auth_answer = true;
				$post_data['quiz_answer'] = !empty($answer) ? $answer : '';
			}
		}
		// END Quiz Hack
		$post_data['first_post'] = ( $mode == 'newtopic' ) ? true : 0;
		$post_data['last_post'] = false;
		$post_data['has_poll'] = false;
		$post_data['edit_poll'] = false;
	}
}
else
{
	message_die(GENERAL_MESSAGE, $lang['No_such_post']);
}

//
// The user is not authed, if they're not logged in then redirect
// them, else show them an error message
//
if ( !$is_auth[$is_auth_type] || (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal]) )
//-- fin mod : calendar ----------------------------------------------------------------------------
{
	if ( $userdata['session_logged_in'] )
	{
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
		if (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal])
		{
			message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type_cal], $is_auth[$is_auth_type_cal . "_type"]));
		}
//-- fin mod : calendar ----------------------------------------------------------------------------

		message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type], $is_auth[$is_auth_type . "_type"]));
	}

	switch( $mode )
	{
		case 'newtopic':
			$redirect = "mode=newtopic&" . POST_FORUM_URL . "=" . $forum_id;
			break;
		case 'reply':
		case 'topicreview':
			$redirect = "mode=reply&" . POST_TOPIC_URL . "=" . $topic_id;
			break;
		case 'quote':
		case 'editpost':
			$redirect = "mode=quote&" . POST_POST_URL ."=" . $post_id;
			break;
	}
	$redirect .= ($post_reportid) ? '&post_reportid=$post_reportid' : '';
	redirect(append_sid("login.$phpEx?redirect=posting.$phpEx&" . $redirect, true));
}

//
// Set toggles for various options
//
if ( !$board_config['allow_html'] )
{

Verfasst: 27.09.2003 00:53
von Philippt
mist :-/ sind eigentlich identisch



Danke....... (grübe woher das wohl kommt)

Verfasst: 27.09.2003 10:58
von Pseiko
1. Wo bekommt man noch mehr Fragen her?
2. Und wie kann man selber welche veröffentlichen?

Verfasst: 27.09.2003 11:01
von Dagobert
1. lies den thread hier, dann findeste leute, die kataloge haben
2. lies die quiz faq, die du mit installiert hast

Verfasst: 28.09.2003 18:05
von saerdnaer
@Rainer K.: dankescjön... also das ist mir noch nie passiert... ich bekomm meistens nur fehlermeldungen und nicht gleich die problemlösungen ;-)

@tempic: dankeschön...

@Pseiko: du benutzt eine phpbb version < 206 schau mal in der older_phpbb_versions.txt nach... du musst den ersten punkt machen...

@alle die fragenkataloge haben: schickt sie mit dann steck ich sie in die biblothek...

ah

Anregung

Verfasst: 01.10.2003 10:15
von Rainer K.
Hi,

das Intervall der Quizfragen ist ja einstellbar. Wenn nun eine neue Quizfrage gestellt wird, prügeln sich bei mir im Forum alle drum und sind natürlich genau zum Zeitpunkt der Fragestellung online.
Umdas etwas zu entschärfen, habe ich +/-10% Variation der Fragezeiten eingebaut.
In common.php ändern:

Code: Alles auswählen

// BEGIN Quiz Hack
$sql = "SELECT config_name, config_value FROM " . QUIZ_CONFIG_TABLE . " WHERE config_name IN ('next_quiz','last_start_time','disable','next_quiz_step','next_quiz_step_mode')";
if ( !($quiz_result = $db->sql_query($sql)) )
{
	if ( defined('Install_Quiz') )
	{
		$quiz_config['disable'] = true;
	}
	else
	{
		message_die(GENERAL_ERROR, "Could not get quiz config information", "", __LINE__, __FILE__, $sql);
	}
}
while ( $quiz_row = $db->sql_fetchrow($quiz_result) )
{
	$quiz_config[$quiz_row['config_name']] = $quiz_row['config_value'];
}

// Variate quiz time +/- 10%
mt_srand( (double) microtime() * 1000000 );
$next_step_secs = $quiz_config['next_quiz_step'] * 3600;
switch($quiz_config['next_quiz_step_mode'])
{
	case 0:
		break;
		
	case 1:
		$next_step_secs *= 24;
		break;
		
	case 2:
		$next_step_secs *= (24 * 7);
		break;
		
	case 3:
		$next_step_secs *= (24 * 7 * 4);
		break;
		
	case 4:
		$next_step_secs *= (24 * 7 * 4 * 52);
		break;		
}
$random_seconds = mt_rand(0, ($next_step_secs / 5)) - ($next_step_secs / 10);
$current_time = time() + $random_seconds;
Grüße, Rainer

Verfasst: 02.10.2003 00:49
von Mofi
Was hab ich denn falksch gemacht wenn dieses kommt:
Parse error: parse error, unexpected T_ELSE in /is/htdocs/52270/www.Forum.de/phpBB2_plus_1.2/phpBB2/inc ... search.php on line 516

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/52270/www.Forum.de/phpBB2_plus_1.2/phpBB2/inc ... ch.php:516) in /is/htdocs/52270/www.Forum.de/phpBB2_plus_1.2/phpBB2/posting.php on line 618

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/52270/www.Forum.de/phpBB2_plus_1.2/phpBB2/inc ... ch.php:516) in /is/htdocs/52270/www.Forum.de/phpBB2_plus_1.2/phpBB2/inc ... header.php on line 647

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/52270/www.Forum.de/phpBB2_plus_1.2/phpBB2/inc ... ch.php:516) in /is/htdocs/52270/www.Forum.de/phpBB2_plus_1.2/phpBB2/inc ... header.php on line 649

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/52270/www.Forum.de/phpBB2_plus_1.2/phpBB2/inc ... ch.php:516) in /is/htdocs/52270/www.Forum.de/phpBB2_plus_1.2/phpBB2/inc ... header.php on line 650

das kommt jetzt immer wenn ich geantwortet habe, egal wo!