Bumping-MOD und der Lösch-MOD

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
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.
Andavos
Mitglied
Beiträge: 145
Registriert: 13.07.2006 11:50
Wohnort: Winterthur

Beitrag von Andavos »

Hallo!
Also, ich muss jetzt nur noch ein in viewtopic.php nach

Code: Alles auswählen

f.stop_bumping
einfügen, und schon sollte es funktionieren?
Benutzeravatar
Mahony
Ehemaliges Teammitglied
Beiträge: 12257
Registriert: 17.11.2005 22:33
Wohnort: Ostfildern Kemnat
Kontaktdaten:

Beitrag von Mahony »

Hallo
Hallo!
Also, ich muss jetzt nur noch ein
in viewtopic.php nach

Code: Alles auswählen

f.stop_bumping
einfügen, und schon sollte es funktionieren?
Ja, so ist es. Aber deswegen müsstest du jetzt nicht neu posten. Probier es doch einfach aus. Falls dann noch ein Fehler auftaucht, poste bitte die genaue Fehlermeldung.



Grüße: Mahony
Wer fragt, ist ein Narr für fünf Minuten, wer nicht fragt, ist ein Narr für immer.
Andavos
Mitglied
Beiträge: 145
Registriert: 13.07.2006 11:50
Wohnort: Winterthur

Beitrag von Andavos »

http://web176phi.dynamic-kunden.ch/Proj ... ic.php?t=3

Jippi, danke, es funktioniert, aber kannst du mir sgaen warum die Grafik unter dem Beitrag auf der "Gesperrt" steht einen Rahmen hat?
Und wie bringe ich ihn weg?
Benutzeravatar
Mahony
Ehemaliges Teammitglied
Beiträge: 12257
Registriert: 17.11.2005 22:33
Wohnort: Ostfildern Kemnat
Kontaktdaten:

Beitrag von Mahony »

Hallo
Setze mal ein border="0" hintendran.

Edit: Ich sehe gerade, deine /includes/functions_post.php hat noch einen Fehler. Poste mal den Code um die Zeile 185 (also etwas vor und hinter der Zeile) und/oder überprüfe ob du das hier richtig eingebaut hast:

Code: Alles auswählen

#--------------[ FIND ]-------------
# // after "function submit_post("

	include($phpbb_root_path . 'includes/functions_search.'.$phpEx);

#
#--------------[ BEFORE, ADD ]-------------
#
	$forum_bumping = 0;
	if ($board_config['stop_bumping'] == 2 && $mode != 'newtopic')
	{
		$sql = "SELECT f.stop_bumping FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
			WHERE f.forum_id = t.forum_id
				AND t.topic_id = $topic_id";
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not fetch bumping status for this forum', '', __LINE__, __FILE__, $sql);
		}
		while ($row = $db->sql_fetchrow($result))
		{
			$forum_bumping = $row['stop_bumping'];
		}
		$db->sql_freeresult($result);
	}

	if (($board_config['stop_bumping'] == 1 || $forum_bumping == 1) && $userdata['user_level'] == USER && ($mode == 'reply' || $mode == 'quote')) 
	{
		$sql = "SELECT p.poster_id FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
			WHERE t.topic_id = " . $topic_id . "
				AND t.topic_last_post_id = p.post_id";
		if (!($result = $db->sql_query($sql)))
		{
			message_die(GENERAL_ERROR, 'Could not check last poster id', '', __LINE__, __FILE__, $sql);
		}

		$row = $db->sql_fetchrow($result);
		$checked_user = $row['poster_id'];

		if ($checked_user == $userdata['user_id'])
		{
			message_die(GENERAL_ERROR, $lang['Rules_bump_cannot']);
		}

		$db->sql_freeresult($result);
	}
	// END Stop Bumping Mod

#


Grüße: Mahony
Wer fragt, ist ein Narr für fünf Minuten, wer nicht fragt, ist ein Narr für immer.
Andavos
Mitglied
Beiträge: 145
Registriert: 13.07.2006 11:50
Wohnort: Winterthur

Beitrag von Andavos »

In der Datei viewtopic.php kann ich dieses Bild nicht finden! Wo ist es denn eigentlich programmiert?

Dies hier ist der Stop-Bumping-Code in /includes/functions_post.php den ich einfügen musste, Linie 182 bis 222:

Code: Alles auswählen

//
// Post a new topic/reply/poll or edit existing post/poll
//
function submit_post($forum_bumping = 0;
if ($board_config['stop_bumping'] == 2 && $mode != 'newtopic')
	{
		$sql = "SELECT f.stop_bumping FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
			WHERE f.forum_id = t.forum_id
				AND t.topic_id = $topic_id";
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not fetch bumping status for this forum', '', __LINE__, __FILE__, $sql);
		}
		while ($row = $db->sql_fetchrow($result))
		{
			$forum_bumping = $row['stop_bumping'];
		}
		$db->sql_freeresult($result);
	}

	if (($board_config['stop_bumping'] == 1 || $forum_bumping == 1) && $userdata['user_level'] == USER && ($mode == 'reply' || $mode == 'quote')) 
	{
		$sql = "SELECT p.poster_id FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
			WHERE t.topic_id = " . $topic_id . "
				AND t.topic_last_post_id = p.post_id";
		if (!($result = $db->sql_query($sql)))
		{
			message_die(GENERAL_ERROR, 'Could not check last poster id', '', __LINE__, __FILE__, $sql);
		}

		$row = $db->sql_fetchrow($result);
		$checked_user = $row['poster_id'];

		if ($checked_user == $userdata['user_id'])
		{
			message_die(GENERAL_ERROR, $lang['Rules_bump_cannot']);
		}

		$db->sql_freeresult($result);
	}
	// END Stop Bumping Mod
Linie 185 ist die vierte im Code!
Benutzeravatar
Mahony
Ehemaliges Teammitglied
Beiträge: 12257
Registriert: 17.11.2005 22:33
Wohnort: Ostfildern Kemnat
Kontaktdaten:

Beitrag von Mahony »

Hallo
Du hast den Code falsch eingefügt. Suche nach:

Code: Alles auswählen

//
// Post a new topic/reply/poll or edit existing post/poll
Markiere den gesamten Code bis zu

Code: Alles auswählen

//
		// Flood control
und füge den von mir geposteten Code ein.

Code: Alles auswählen

// Post a new topic/reply/poll or edit existing post/poll
//
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length)
{
	global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
	global $userdata, $user_ip;

	$forum_bumping = 0;
	if ($board_config['stop_bumping'] == 2 && $mode != 'newtopic')
	{
		$sql = "SELECT f.stop_bumping FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
			WHERE f.forum_id = t.forum_id
				AND t.topic_id = $topic_id";
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not fetch bumping status for this forum', '', __LINE__, __FILE__, $sql);
		}
		while ($row = $db->sql_fetchrow($result))
		{
			$forum_bumping = $row['stop_bumping'];
		}
		$db->sql_freeresult($result);
	}

	if (($board_config['stop_bumping'] == 1 || $forum_bumping == 1) && $userdata['user_level'] == USER && ($mode == 'reply' || $mode == 'quote')) 
	{
		$sql = "SELECT p.poster_id FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
			WHERE t.topic_id = " . $topic_id . "
				AND t.topic_last_post_id = p.post_id";
		if (!($result = $db->sql_query($sql)))
		{
			message_die(GENERAL_ERROR, 'Could not check last poster id', '', __LINE__, __FILE__, $sql);
		}

		$row = $db->sql_fetchrow($result);
		$checked_user = $row['poster_id'];

		if ($checked_user == $userdata['user_id'])
		{
			message_die(GENERAL_ERROR, $lang['Rules_bump_cannot']);
		}

		$db->sql_freeresult($result);
	}
	// END Stop Bumping Mod
	include($phpbb_root_path . 'includes/functions_search.'.$phpEx);

	$current_time = time();

	if ($mode == 'newtopic' || $mode == 'reply' || $mode == 'editpost') 
	{
Das Bild müsste in der viewtopic_body.tpl verlinkt sein.


Grüße: Mahony
Wer fragt, ist ein Narr für fünf Minuten, wer nicht fragt, ist ein Narr für immer.
Andavos
Mitglied
Beiträge: 145
Registriert: 13.07.2006 11:50
Wohnort: Winterthur

Beitrag von Andavos »

Vielen Dank, es geht nun wieder vollständig, aber wo kann ich jetzt eben noch dieses Bild finden bei dem ich den Rahmen noch eliminieren muss?
Antworten

Zurück zu „phpBB 2.0: Mod Support“