post_move_instead_deleting Mod

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Blisk
Beiträge: 873
Registriert: Di 21.Sep, 2004 12:06
Kontaktdaten:

Beitrag von Blisk »

I was installing this mod, but have problem with ajax addon
cant find this lines

Code: Alles auswählen

#
#-----[ FIND ]------------------------------------------
#
else if ($mode == 'delete_topic')
{
	// Get post_id
	if (isset($HTTP_POST_VARS[POST_TOPIC_URL]) || isset($HTTP_GET_VARS[POST_TOPIC_URL]))
	{
		$topic_id = (isset($HTTP_POST_VARS[POST_TOPIC_URL])) ? intval($HTTP_POST_VARS[POST_TOPIC_URL]) : intval($HTTP_GET_VARS[POST_TOPIC_URL]);
	}
	else
	{
		$topic_id = 0;
	}

	if (!empty($topic_id))
	{

#
#-----[ AFTER, ADD ]------------------------------------------
#
		if (intval($board_config['delete_post_forum']) != 0)
		{
			$sql = "SELECT * FROM " . FORUMS_TABLE . "
				WHERE forum_id = " . $board_config['delete_post_forum'];
			if (!$result = $db->sql_query($sql))
			{
				$result_ar = array(
					'result' => AJAX_ERROR,
					'error_msg' => 'This topic does not exist'
				);
			}
			$forum_count = $db->sql_numrows($result);
			$db->sql_freeresult($result);

			$forum_check = ($forum_count != 0) ? TRUE : 0;
		}
		else
		{
			$forum_check = 0;
		}

#
#-----[ FIND ]------------------------------------------
#
		$sql = "DELETE 
			FROM " . TOPICS_TABLE . " 
			WHERE topic_id = $topic_id
				OR topic_moved_id = $topic_id";
		if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
		{
			$result_ar = array(
				'result' => AJAX_ERROR,
				'error_msg' => 'Could not delete topics'
			);
		}

		if ( $post_id_sql != '' )

#
#-----[ REPLACE WITH ]------------------------------------------
#
		if ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD && $board_config['mod_allow_delete_post'] == 1))
		{
			$sql = "DELETE FROM " . TOPICS_TABLE . "
				WHERE topic_id = $topic_id
					OR topic_moved_id = $topic_id";
			if (!$db->sql_query($sql))
			{
				$result_ar = array(
					'result' => AJAX_ERROR,
					'error_msg' => 'Could not delete topics'
				);
			}
		}
		else if ($forum_check == TRUE)
		{
			$sql = "UPDATE " . TOPICS_TABLE . "
				SET forum_id = " . $board_config['delete_post_forum'] . "
				WHERE topic_id = $topic_id";
			if (!$db->sql_query($sql))
			{
				$result_ar = array(
					'result' => AJAX_ERROR,
					'error_msg' => 'Could not delete topics'
				);
			}

			$sql = "UPDATE " . POSTS_TABLE . "
				SET forum_id = " . $board_config['delete_post_forum'] . "
				WHERE topic_id = $topic_id";
			if ( !$db->sql_query($sql) )
			{
				$result_ar = array(
					'result' => AJAX_ERROR,
					'error_msg' => 'Could not delete topics'
				);
			}
		}

		if ( $post_id_sql != '' && ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD && $board_config['mod_allow_delete_post'] == 1)))

#
#-----[ FIND ]------------------------------------------
#
		if ( $vote_id_sql != '' )

#
#-----[ REPLACE WITH ]------------------------------------------
#
		if ( $vote_id_sql != '' && ($userdata['user_level'] == ADMIN || ($userdata['user_level'] == MOD && $board_config['mod_allow_delete_post'] == 1)))


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
[ Attachment gelöscht am Do 19.Okt, 2006 14:59 von oxpus ]
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

To use the Ajax Features in combination with the post move instead delete mod, just install the add on which comes with the Features package.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Blisk
Beiträge: 873
Registriert: Di 21.Sep, 2004 12:06
Kontaktdaten:

Beitrag von Blisk »

I was trying to do that, but can find lines where to add or replace
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Why to add or replace something in the ajax.php?
You mustn't mod the ajax.php, just replace it!
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Blisk
Beiträge: 873
Registriert: Di 21.Sep, 2004 12:06
Kontaktdaten:

Beitrag von Blisk »

There is no Included files in post_move_instead_deleting_1_0_2
I was trying to install Add_On_AJAX_Features.txt
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

In the Ajax features you can find the special ajax.php ;)
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten