Logbook macht prob...

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!
Antworten
J?rg
Beiträge: 136
Registriert: So 20.Jun, 2004 18:51
Wohnort: Buseck
Kontaktdaten:

Logbook macht prob...

Beitrag von J?rg »

Hallo,

ich wollte dieses Logbuch einbauen

Code: Alles auswählen

############################################################## 
## MOD Title:          Logbook MOD
## MOD Author:         Merlin Sythove <Merlin@silvercircle.org>
## MOD Description:    This MOD will keep a logbook of all posting.php
##                     andmodcp.php action
##                     [BETA] MOD Logbook
##                     http://www.phpbb.com/phpBB/viewtopic.php?t=350367			
## MOD Version:        1.0.0
## Compatibility:      2.0.18
und habe nun in der posting.php ein kleines Problem.
Ich soll diese Modifikation ausführen:

Code: Alles auswählen

#

#-----[ FIND ]-------------------------------------------------

#



		$select_sql = (!$submit) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';

		$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';

		$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';



		$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . " 

			FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . " 

			WHERE p.post_id = $post_id 

				AND t.topic_id = p.topic_id 

				AND f.forum_id = p.forum_id

				$where_sql";

#

#-----[ REPLACE WITH ]-------------------------------------------------

#	



		//START MOD Logbook

		//$select_sql = (!$submit) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';

		//$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';

		//$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';

		//

		//$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . " 

		//	FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . " 

		//		WHERE p.post_id = $post_id 

		//		AND t.topic_id = p.topic_id 

		//		AND f.forum_id = p.forum_id

		//		$where_sql";





    if ($submit)

    {

			$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_title, t.topic_first_post_id, 

				t.topic_last_post_id, t.topic_vote, p.post_id, p.post_time, p.poster_id, 

				pt.post_subject, pt.post_text, pt.bbcode_uid

  			FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f , " . POSTS_TEXT_TABLE . " pt 

  				WHERE p.post_id = $post_id

  				AND t.topic_id = p.topic_id

  				AND f.forum_id = p.forum_id 

				AND pt.post_id = p.post_id ";    

    }

    else

    {

  		$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, 

				t.topic_vote, t.topic_title, p.post_id, p.post_time, p.poster_id , p.enable_bbcode, 

				p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, 

				pt.bbcode_uid, u.username, u.user_id, u.user_sig

  			FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u 

  				WHERE p.post_id = $post_id

  				AND t.topic_id = p.topic_id

  				AND f.forum_id = p.forum_id

  				AND pt.post_id = p.post_id AND u.user_id = p.poster_id";

		}

Aber meine entsprechende Zeile sieht so aus:

Code: Alles auswählen

//-- mod : calendar --------------------------------------------------------------------------------
// here we added
//	, t.topic_calendar_time, t.topic_calendar_duration
//	, t.topic_icon
//	, p.post_icon
//-- modify
//-- mod : Repeating Events ----------------------------------
// added
//   , t.topic_calendar_repeat, t.topic_calendar_rep_end
		$select_sql = (!$submit) ? ', t.topic_title, t.news_id, t.topic_icon, t.topic_calendar_time, t.topic_calendar_duration, 				t.topic_calendar_repeat, t.topic_calendar_rep_end, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig,
				p.post_username, pt.post_subject, p.post_icon, pt.post_text, pt.bbcode_uid, 
				u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid': '';
//-- fin mod : calendar ----------------------------------------------------------------------------
//-- fin mod : Repeating Events ------------------------------
		$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';
		$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';

		$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, 
			p.post_id, p.poster_id" . $select_sql . "
			FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
			WHERE p.post_id = $post_id
				AND t.topic_id = p.topic_id
				AND f.forum_id = p.forum_id
				$where_sql";


Kann mirjemand helfen und sagen wie die stelle für mich aussehen müste???
Habe schon einiges Probiert, aber ohne erfolg.

Gruß Jörg
Zuletzt geändert von J?rg am Fr 17.Aug, 2007 13:26, insgesamt 1-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Oha, wieder ein MOD, der die Datenbank zumüllt...

Okay, so sollte es bei Dir laufen:

Code: Alles auswählen

#
#-----[ FIND ]-------------------------------------------------
#
//-- mod : calendar --------------------------------------------------------------------------------
// here we added
//	, t.topic_calendar_time, t.topic_calendar_duration
//	, t.topic_icon
//	, p.post_icon
//-- modify
//-- mod : Repeating Events ----------------------------------
// added
//   , t.topic_calendar_repeat, t.topic_calendar_rep_end
		$select_sql = (!$submit) ? ', t.topic_title, t.news_id, t.topic_icon, t.topic_calendar_time, t.topic_calendar_duration, 				t.topic_calendar_repeat, t.topic_calendar_rep_end, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig,
				p.post_username, pt.post_subject, p.post_icon, pt.post_text, pt.bbcode_uid, 
				u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid': '';
//-- fin mod : calendar ----------------------------------------------------------------------------
//-- fin mod : Repeating Events ------------------------------
		$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';
		$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';

		$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, 
			p.post_id, p.poster_id" . $select_sql . "
			FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
			WHERE p.post_id = $post_id
				AND t.topic_id = p.topic_id
				AND f.forum_id = p.forum_id
				$where_sql";

#
#-----[ REPLACE WITH ]-------------------------------------------------
#	
    if ($submit)
    {
			$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_title, t.topic_first_post_id, 
				t.topic_last_post_id, t.topic_vote, p.post_id, p.post_time, p.poster_id, 
				pt.post_subject, pt.post_text, pt.bbcode_uid, p.post_icon,
				t.topic_calendar_time, t.topic_calendar_duration, t.topic_icon, t.topic_calendar_repeat, t.topic_calendar_rep_end
  			FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f , " . POSTS_TEXT_TABLE . " pt 
  				WHERE p.post_id = $post_id
  				AND t.topic_id = p.topic_id
  				AND f.forum_id = p.forum_id 
				AND pt.post_id = p.post_id ";    
    }
    else
    {
  		$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, 
				t.topic_vote, t.topic_title, p.post_id, p.post_time, p.poster_id , p.enable_bbcode, 
				p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, 
				pt.bbcode_uid, u.username, u.user_id, u.user_sig, p.post_icon,
				t.topic_calendar_time, t.topic_calendar_duration, t.topic_icon, t.topic_calendar_repeat, t.topic_calendar_rep_end
  			FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u 
  				WHERE p.post_id = $post_id
  				AND t.topic_id = p.topic_id
  				AND f.forum_id = p.forum_id
  				AND pt.post_id = p.post_id
  				AND u.user_id = p.poster_id";
	}
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!
J?rg
Beiträge: 136
Registriert: So 20.Jun, 2004 18:51
Wohnort: Buseck
Kontaktdaten:

Beitrag von J?rg »

Danke dir, ich möchte den Mod nur dazu nutzen editierte Beiträge
für die Moderatoren/Admins sichtbar zu machen, da die user gerne
das recht haben wollten Beiträge zu editieren nur bei Diskussionen die zum
Streit führen werden die einfach schnell gelöscht.
Diese Funktion möchte ich als eine ART Versionhistorie nutzen like WIKI.

GRuß Jörg
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Najo, auch eine Möglichkeit.
Pass aber auf, daß Du bei der Archivierung nicht Gefahr läufst, gegen geltendes Recht zu verstossen.
So müssen z. B. archivierte Beiträge, auch wenn sie nur einem eingegrenzten Benutzerkreis zur Verfügung stehen, ebenfalls auf rechtswidrige Inhalte geprüft werden, etc...
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!
J?rg
Beiträge: 136
Registriert: So 20.Jun, 2004 18:51
Wohnort: Buseck
Kontaktdaten:

Beitrag von J?rg »

Wo kann ich denn dies mal nachlesen , da ich
solche Diskussionenschon hatte.

Gruß Jörg
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Wie "wo nachlesen"?

Urheberrechtsgesetz
Markenschutzgesetz
Mediengesetze
Telekommunikationsgesetz
Datenschutzgesetz
Bürgerliches Gesetzbuch

Reicht das?
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!
J?rg
Beiträge: 136
Registriert: So 20.Jun, 2004 18:51
Wohnort: Buseck
Kontaktdaten:

Beitrag von J?rg »

Der MOD zeigt nun beim Löschen eines Post's ein fehlendes
9 Argument in der Funktiondelete_post (in der function_post.php).

Code: Alles auswählen

//
// Delete a post/poll
//
function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$cont_album_id)
{
	global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
	global $userdata, $user_ip;

	if ($mode != 'poll_delete')
	{
		include($phpbb_root_path . 'includes/functions_search.'.$phpEx);

		$sql = "DELETE FROM " . POSTS_TABLE . "
			WHERE post_id = $post_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
		}
//bookmarks
				$sql = "DELETE FROM " . BOOKMARK_TABLE . "
					WHERE topic_id = $topic_id";
				if ( !$db->sql_query($sql) )
				{
					message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
				}
//end book

		$sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
			WHERE post_id = $post_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
		}


wenn ich das Richtig deute kommt dies aus der posting.php und evt.von dieser Stelle:

Code: Alles auswählen

//-- mod : calendar --------------------------------------------------------------------------------
// here we added
//	, $topic_calendar_time, $topic_calendar_duration
//-- modify
				submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length, $mark_edit, $max_vote, $hide_vote, $tothide_vote, $topic_calendar_time, $topic_calendar_duration, $topic_calendar_repeat, $topic_calendar_rep_end, $post_icon, $news_category, $cont_title, $cont_desc, $cont_number, $cont_album_id, $cont_date, $cont_app, $cont_pic_db, $cont_delete, $cont_activation, $topic_calendar_time);
//-- fin mod : calendar ----------------------------------------------------------------------------
			}
			break;
		case 'delete':
//START MOD Logbook 

			log_action('delete_post', $forum_id, $topic_id, $post_data['topic_title'], $post_id, $post_data['post_time'], $post_data['old_title'], $post_data['old_text']);

//END MOD Logbook  
delete_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id);

			//break;
		case 'poll_delete':
      //START MOD Logbook //Could be 'delete' or 'poll_delete'

      log_action('delete_poll', $forum_id, $topic_id, $post_data['topic_title'], $post_id, $post_data['post_time'], $post_data['old_title']);

      //END MOD Logbook

        if ($error_msg != '')
			{
				message_die(GENERAL_MESSAGE, $error_msg);
			}


			delete_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $cont_album_id);
			break;
	}

Aber das 9.te Argument ist für mich da , aber warum kommt die Meldung????
Brauche mal wieder hilfe.....

Gruß Jörg
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Nein, hier fehlt es:

Code: Alles auswählen

# //END MOD Logbook 
# delete_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id);
Diese Zeile muss also so lauten:

Code: Alles auswählen

# //END MOD Logbook 
# delete_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $cont_album_id);
;)
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!
J?rg
Beiträge: 136
Registriert: So 20.Jun, 2004 18:51
Wohnort: Buseck
Kontaktdaten:

Beitrag von J?rg »

Danke dir.

Nun klappt zwar das löschen bekomme nun aber ne andere Meldung:

Code: Alles auswählen

Fatal error: Cannot redeclare clean_words() (previously declared in /var/www/web10/html/phpBB2/includes/functions_search.php:24) in /var/www/web10/html/phpBB2/includes/functions_search.php on line 24.
Gruß Jörg
Zuletzt geändert von J?rg am Di 21.Aug, 2007 11:43, insgesamt 1-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Such mal in der functions_post.php nach

Code: Alles auswählen

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

Code: Alles auswählen

include($phpbb_root_path."includes/functions_search.$phpEx");
und ersetzt include durch include_once.
Dann sollte der Fehler weg sein.
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!
J?rg
Beiträge: 136
Registriert: So 20.Jun, 2004 18:51
Wohnort: Buseck
Kontaktdaten:

Beitrag von J?rg »

Danke dir...

Stimmt ich habe diese Zeile 2mal in der functions_post.php gefunden und ersetzt.
Siehe da nun klappt es danke dir.....
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Jo, keine Ursache.
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