Mehrfachauswahl Umfrage

Du suchst einen bestimmten Mod, weißt aber nicht genau wo bzw. ob er überhaupt existiert? Wenn dir dieser Artikel nicht weiterhilft, kannst du hier den von dir gewünschten/gesuchten Mod beschreiben ...
Falls ein Mod-Autor eine der Anfragen hier aufnimmt um einen neuen Mod zu entwicklen, geht's in phpBB 2.0: Mods in Entwicklung weiter.
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.
Mänu
Mitglied
Beiträge: 190
Registriert: 05.01.2005 10:58
Wohnort: Neuenkirch
Kontaktdaten:

Beitrag von Mänu »

Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

die functions_post.php ist in Ordnung.

suche in der posting.php

Code: Alles auswählen

	// Vote in a poll
	//
	if ( (!empty($HTTP_POST_VARS['vote_id'])) and (is_array($HTTP_POST_VARS['vote_id'])) and (isset($HTTP_POST_VARS['vote_id'])) )
	{
		$vote_option_id = intval($HTTP_POST_VARS['vote_id']);
		for($i = 0; $i < $max_voting; $i++)
			  {
			    $vote_option_id = $vbn[$i];
		$vote_id = $HTTP_POST_VARS['vote_id'];
		$sql = "SELECT vd.vote_id, vd.vote_max
			FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
			WHERE vd.topic_id = $topic_id
				AND vr.vote_id = vd.vote_id
				AND vr.vote_option_id = $vote_option_id
			GROUP BY vd.vote_id";
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);
		}

		if ( $vote_info = $db->sql_fetchrow($result) )
		{
			$max_vote = $vote_info['vote_max'];
		}
		$max_voting=count($vote_id);
		if ($max_voting>$max_vote)
		{
			$max_voting=$max_vote;
		}
		for($i = 0; $i < $max_voting; $i++)
		{
			$vbn[$i]= $vote_id[$i];
		}

		$sql = "SELECT vd.vote_id
			FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
			WHERE vd.topic_id = $topic_id
				AND vr.vote_id = vd.vote_id
				AND vr.vote_option_id = $vote_option_id
			GROUP BY vd.vote_id";
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);
		}

		if ( $vote_info = $db->sql_fetchrow($result) )
		{
			$vote_id = $vote_info['vote_id'];

			$sql = "SELECT *
				FROM " . VOTE_USERS_TABLE . "
				WHERE vote_id = $vote_id
					AND vote_user_id = " . $userdata['user_id'];

				if ( !$db->sql_query($sql, END_TRANSACTION) )
				{
					message_die(GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql);
				}

				$message = $lang['Vote_cast'];
			}
			else
			{
				$message = $lang['Already_voted'];
			}

			$db->sql_freeresult($result2);
		}

//		$db->sql_freeresult($result);

		$template->assign_vars(array(
			'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">')
		);
		$message .=  '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
		message_die(GENERAL_MESSAGE, $message);
	}
	else
	{
		redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
	}
}

else if ( $submit || $confirm )
ersetze mit:

Code: Alles auswählen

	// Vote in a poll
	//
	if ( !empty($HTTP_POST_VARS['vote_id']) )
	{
		$vote_option_id = intval($HTTP_POST_VARS['vote_id']);

		$vote_id = $HTTP_POST_VARS['vote_id'];
		$sql = "SELECT vd.vote_id, vd.vote_max    
			FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
			WHERE vd.topic_id = $topic_id 
				AND vr.vote_id = vd.vote_id 
				AND vr.vote_option_id = $vote_option_id
			GROUP BY vd.vote_id";
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);
		}

		if ( $vote_info = $db->sql_fetchrow($result) )
		{
			$max_vote = $vote_info['vote_max'];
		}
		$max_voting=count($vote_id);
		if ($max_voting>$max_vote)
		{
			$max_voting=$max_vote;
		}
		for($i = 0; $i < $max_voting; $i++)
		{
			$vbn[$i]= $vote_id[$i];
		}

		$sql = "SELECT vd.vote_id    
			FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
			WHERE vd.topic_id = $topic_id 
				AND vr.vote_id = vd.vote_id 
				AND vr.vote_option_id = $vote_option_id
			GROUP BY vd.vote_id";
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);
		}

		if ( $vote_info = $db->sql_fetchrow($result) )
		{
			$vote_id = $vote_info['vote_id'];

			$sql = "SELECT * 
				FROM " . VOTE_USERS_TABLE . "  
				WHERE vote_id = $vote_id 
					AND vote_user_id = " . $userdata['user_id'];
			if ( !($result2 = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, 'Could not obtain user vote data for this topic', '', __LINE__, __FILE__, $sql);
			}

			if ( !($row = $db->sql_fetchrow($result2)) )
			{

			  for($i = 0; $i < $max_voting; $i++)
			  {
			    $vote_option_id = $vbn[$i];


				$sql = "UPDATE " . VOTE_RESULTS_TABLE . " 
					SET vote_result = vote_result + 1 
					WHERE vote_id = $vote_id 
						AND vote_option_id = $vote_option_id";
				$vote_option_id = ''
				if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
				{
					message_die(GENERAL_ERROR, 'Could not update poll result', '', __LINE__, __FILE__, $sql);
				}

			  }
				$sql = "UPDATE " . VOTE_DESC_TABLE . " 
					SET vote_voted = vote_voted + 1 
					WHERE vote_id = $vote_id 
						AND topic_id = $topic_id";
				if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
				{
					message_die(GENERAL_ERROR, 'Could not update poll voted', '', __LINE__, __FILE__, $sql);
				}

				$sql = "INSERT INTO " . VOTE_USERS_TABLE . " (vote_id, vote_user_id, vote_user_ip) 
					VALUES ($vote_id, " . $userdata['user_id'] . ", '$user_ip')";
				if ( !$db->sql_query($sql, END_TRANSACTION) )
				{
					message_die(GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql);
				}

				$message = $lang['Vote_cast'];
			}
			else
			{
				$message = $lang['Already_voted'];
			}
			$db->sql_freeresult($result2);
		}
		else
		{
			$message = $lang['No_vote_option'];
		}
		$db->sql_freeresult($result);

		$template->assign_vars(array(
			'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">')
		);
		$message .=  '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
		message_die(GENERAL_MESSAGE, $message);
	}
	else
	{
		redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
	}
}
else if ( $submit || $confirm )
Vorher eine Sicherungskopie deiner bisherigen posting.php erstellen :wink:

Markus
Mänu
Mitglied
Beiträge: 190
Registriert: 05.01.2005 10:58
Wohnort: Neuenkirch
Kontaktdaten:

Beitrag von Mänu »

Krieg jetzt diese Fehlermeldung beim post erstellen
Parse error: parse error, unexpected $ in /home/www/web291/html/forum/posting.php on line 1604
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

verlinke nochmal bitte die neue posting.php

Markus
Mänu
Mitglied
Beiträge: 190
Registriert: 05.01.2005 10:58
Wohnort: Neuenkirch
Kontaktdaten:

Beitrag von Mänu »

Ne, moment, ist diese fehlermeldung, hab mich vorher beim erstellen verschrieben:
Parse error: parse error, unexpected T_IF in /home/www/web291/html/forum/posting.php on line 869


http://www.maenumania.ch/files/posting.txt
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

suche in der posting.php

Code: Alles auswählen

  // Vote in a poll 
   // 
   if ( !empty($HTTP_POST_VARS['vote_id']) ) 
ersetze mit:

Code: Alles auswählen

  // Vote in a poll 
  // 
		if ( (!empty($HTTP_POST_VARS['vote_id'])) and (is_array($HTTP_POST_VARS['vote_id'])) and (isset($HTTP_POST_VARS['vote_id'])) )
Markus
Mänu
Mitglied
Beiträge: 190
Registriert: 05.01.2005 10:58
Wohnort: Neuenkirch
Kontaktdaten:

Beitrag von Mänu »

Immer noch dasselbe..
Parse error: parse error, unexpected T_IF in /home/www/web291/html/forum/posting.php on line 869
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

Hast du zufällig noch den MOD Admin Voting eingebaut?
Verlinke mal bitte auch noch die viewtopic.php als txt-Datei.

Markus
Mänu
Mitglied
Beiträge: 190
Registriert: 05.01.2005 10:58
Wohnort: Neuenkirch
Kontaktdaten:

Beitrag von Mänu »

Ne, nicht dass ich wüsste... :-?

viewtopic.txt
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

suche in der viewtopic.php

Code: Alles auswählen

$poll_expires_c = $lang['Results_after'];
ersetze mit:

Code: Alles auswählen

$poll_expires_c = '';
Sonst konnte ich da auch nichts finden.

Markus
Antworten

Zurück zu „phpBB 2.0: Mod Suche/Anfragen“