Seite 19 von 19

Verfasst: 15.04.2007 15:32
von Maareja
@Gumfuzi: Zeile 1203 der viewtopic.php

Code: Alles auswählen

   if($postrow[$i]['post_move'] == 1)
@Boecki91: http://www.mkboard.com/downloads/viewtopic.txt

Verfasst: 15.04.2007 21:36
von Gumfuzi
Der Teil hier gehört nicht an die Stelle, wo er ist:

Code: Alles auswählen

		// Move Message
   if($postrow[$i]['post_move'] == 1)
  {
    $sql = "SELECT moved_type
      FROM ". MOVED_TABLE ."
      WHERE last_post_id = '". $postrow[$i]['post_id'] ."'
      ORDER BY moved_id DESC LIMIT 1";
    if(!$result = $db->sql_query($sql))
    {
      message_die(GENERAL_ERROR, 'Could not get moved type', '', __LINE__, __FILE__, $sql);
    }
    $row = $db->sql_fetchrow($result);
    $moved_type = $row['moved_type'];

    if($moved_type == "move")
    {
      $select = "mv.moved_time, mv.last_post_id, f.forum_name AS forumparent, f2.forum_name AS forumtarget, u.username";
      $from = "". MOVED_TABLE ." mv, ". FORUMS_TABLE ." f, ". FORUMS_TABLE ." f2, ". USERS_TABLE ." u ";
      $where = "mv.last_post_id = '". $postrow[$i]['post_id'] ."'
                AND mv.moved_parent = f.forum_id
                AND mv.moved_target = f2.forum_id
                AND mv.moved_mod = u.user_id";
    }
  
    if($moved_type == "split")
    {
      $select = "mv.moved_time, mv.last_post_id, f.forum_name as forumparent, t.topic_title, u.username";
      $from = "". MOVED_TABLE ." mv, ". TOPICS_TABLE ." t, ". FORUMS_TABLE ." f, ". USERS_TABLE ." u ";
      $where = "mv.last_post_id = '". $postrow[$i]['post_id'] ."'
                AND mv.moved_parent = f.forum_id
                AND mv.moved_oldtopic_id = t.topic_id
                AND mv.moved_mod = u.user_id";
    }
  
    if($moved_type == "lock" || $moved_type == "unlock")
    {
      $select = "mv.moved_time, mv.last_post_id,  u.username";
      $from = "". MOVED_TABLE ." mv,  ". USERS_TABLE ." u ";
      $where = "mv.last_post_id = '". $postrow[$i]['post_id'] ."'
                AND mv.moved_mod = u.user_id";
    }
    
    if($moved_type)
    {
      $sql = "SELECT $select
        FROM $from
        WHERE $where
        ORDER BY mv.moved_time DESC LIMIT 1";
      if ( !$result = $db->sql_query($sql) )
      {
        message_die(GENERAL_ERROR, 'Could not get main move information', '', __LINE__, __FILE__, $sql);
      }
      $moved = $db->sql_fetchrow($result);
    }
    
    $mini_icon = $images['icon_minipost'];
    $move_date = create_date($board_config['default_dateformat'], $moved['moved_time'],           $board_config['board_timezone']);
    $mover = $moved['username'];
    $parent_topic = $moved['topic_title'];
    $parent_forum = $moved['forumparent'];
    $target_forum = $moved['forumtarget'];

    if($moved_type == "move")
    {
      $move_message = sprintf($lang['Move_move_message'], $move_date, $mover, $parent_forum, $target_forum);
    }
    if($moved_type == "lock")
    {
      $move_message = sprintf($lang['Move_lock_message'], $move_date, $mover);
    }
    if($moved_type == "unlock")
    {
      $move_message = sprintf($lang['Move_unlock_message'], $move_date, $mover);
    }
    if($moved_type == "split")
    {
      $move_message = sprintf($lang['Move_split_message'], $move_date, $mover, $parent_topic, $parent_forum);
    }

    if($moved['last_post_id'] == $postrow[$i]['post_id'])
    {
      $template->assign_block_vars('postrow.move_message', array(
        'MOVE_MESSAGE' => '<img src="'.$mini_icon.'" border="0" />'.$move_message)
      );
    }
    else
    {
      $template->assign_block_vars('postrow.switch_spacer', array());
    }
  }// Move Message
er unterbricht die Variablenübergabe an das Template. Schaue in der Modanleitung nochmal nach, wo er genau hingehört, ev. vor dem Teil hier:

Code: Alles auswählen

	//
	// Again this will be handled by the templating
	// code at some point
	//
(nur eine Vermutung, in der Modanleitung sollte es drinstehen, falls Du die Stelle nicht in Deiner Datei haben solltest, dann baue es mal testweise da ein, wo ich geschrieben habe (aber zuerst mal lt. Mod-Anleitung probieren!)

Verfasst: 17.04.2007 12:44
von hackepeter13
Hiho,

ich verwende diesen Mod nun schon seit mindestens 1 -1,5 Jahren.

Aber ich hab mir letzten mal eine Frage gestellt.

Und zwar wenn man ein Thema schließt oder verschiebt oder splittet, wird unter dem letzten Beitrag eine Infozeile gemacht, in der steht was mit dem Thread passiert ist.

Was mir aufgefallen ist, wenn man zwei Aktionen durchführt, z.B. Thread Verschieben und anschließend Schließen, wird die Info das der Thread verschoben wurde, durch die Info das der Thread geschloßen wurde ersetzt.

Kann man das so machen das dann beide Infos dastehen?

Verfasst: 17.04.2007 17:10
von Gumfuzi
ja, das ist leider nicht so toll, aber verschmerzbar.

(ist mir auch schon aufgefallen)

Verfasst: 20.04.2007 10:28
von hackepeter13
Ja, ich mein so schlimm ist es auch nicht, wäre nur eine kleine optische Verbesserung gewesen :)

Verfasst: 05.09.2007 09:58
von tippimaus
Noch mal zum mitschreiben...
Man kann mit diesem Mod einen einzelnen Beitrag in ein anderes Thema verschieben?

Sorry für die blöde frage, aber das geht für mich nicht so ganz hervor.
Ich bin nunmal blond

Verfasst: 05.09.2007 16:54
von Seimon
tippimaus hat geschrieben:Man kann mit diesem Mod einen einzelnen Beitrag in ein anderes Thema verschieben?
Nein!
Der Mod zeigt Informationen an wie:
Verschoben: 05.09.2007 16:35 Uhr von Dr.Death
Ursprungsforum: phpBB 3.0: Administration und Benutzung Zielforum: Coding & Technik
http://www.phpbb.de/viewtopic.php?t=154517


Um einen Beitrag in ein anderes Thema zu verschieben braucht man den merge mod (beitrag aus thread a splitten (standardfunktion) und mit mergemod in thread b einfügen)

Verfasst: 05.09.2007 17:43
von tippimaus
Danke für die Aufklärung.

den merge habe ich gestern eingebaut.
Hab nur noch nicht so ganz gerafft, wie es dann weiter geht.

Aber das kriege ich auch noch raus... Hoffe ich.