Seite 2 von 2

Verfasst: 14.07.2006 19:38
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?

Verfasst: 14.07.2006 19:42
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

Verfasst: 14.07.2006 19:55
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?

Verfasst: 14.07.2006 20:04
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

Verfasst: 14.07.2006 20:25
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!

Verfasst: 14.07.2006 20:37
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

Verfasst: 14.07.2006 20:42
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?