Pagina 1 van 1

Probleem met altijd-edit-regel MOD

Geplaatst: 16 jun 2006, 19:10
door iemand08
Ik ben op zoek naar een MOD die er voor zorgt dat er altijd een regel komt te staan als het bericht is aangepast.
Nu gebeurt het niet als er nog geen replay`s zijn geweest of als een admin het doet.

Ik heb al gezocht maar in elk topic stond wel dat er een MOD voor was maar er was geen link/naam gegeven.


Weet iemand hoe die MOD heet en waar ik hem eventueel kan downloaden????

Geplaatst: 17 jun 2006, 18:15
door iemand08
Ik heb er nu 1 gevonden geloof ik maar ik kom niet uit dit stukje:

Code: Selecteer alles

#-----[ OPEN ]--------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]--------------------------------------------
#
	if ( $postrow[$i]['post_edit_count'] )
	{
		$l_edit_time_total = ( $postrow[$i]['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total'];

		$l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, $poster, create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']), $postrow[$i]['post_edit_count']);
	}
	else
	{
		$l_edited_by = '';
	}

#
#-----[ REPLACE WITH ]------------------------------------
#
	$sql = "SELECT pe.*, u.username
			FROM " . POSTS_EDIT_TABLE . " pe, " . USERS_TABLE . " u
			WHERE pe.post_id = " . $postrow[$i]['post_id'] . "
				AND pe.user_id = u.user_id
			ORDER BY pe.post_edit_time DESC";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not obtain posts edit count information', '', __LINE__, __FILE__, $sql);
	}

	$l_edited_by = '';
	while ( $row = $db->sql_fetchrow($result) )
	{
		$l_edit_time_total = ( $row['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total'];
		$l_edited_by .= ( ($l_edited_by == '') ? '<br />' : '' ) . '<br />' . sprintf($l_edit_time_total, $row['username'], create_date($board_config['default_dateformat'], $row['post_edit_time'], $board_config['board_timezone']), $row['post_edit_count']);
	}

#

Code: Selecteer alles

  // Editing information
   //
   if ( $postrow[$i]['post_edit_count'] )
   {
      $max_edit_notes = $board_config['max_edit_notes'];
      $sql = 'SELECT * FROM ' . EDIT_NOTES_TABLE . ' WHERE post_id = ' . $postrow[$i]['post_id'] . ' ORDER BY edit_note_time DESC LIMIT ' . $max_edit_notes;
      if ( !($result = $db->sql_query($sql)) )
      {
         message_die(GENERAL_ERROR, 'Could not look up edit notes for this post', '', __LINE__, __FILE__, $sql);
      }
      
      while ( $row = $db->sql_fetchrow($result) )
      {
         $edit_note_id = $row['edit_note_id'];
      }
      
      if (!$edit_note_id ){
      $l_edit_time_total = ( $postrow[$i]['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total'];

      $l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, $poster, create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']), $postrow[$i]['post_edit_count']);
      }   
   }
   else
   {
      $l_edited_by = '';
   } 

	//

Heb al wat geprobeert maar het is me niet gelukt.

Kan iemand even dat stukje doen voor me??? :D

Geplaatst: 18 jun 2006, 12:47
door iemand08
Ik heb net gewoon het hele stuk gedaan dus die extra regels zijn helemaal verwijderd.
Hij doet het wel en heb verder niet met andere dingen problemen nog gehad.


Kan het kwaad dat er een aantal regels zijn verwijderd????

Geplaatst: 18 jun 2006, 17:45
door iemand08
Ik kom er nu achter dat er een fout komt als je een bericht post.
Als er staat: Je bericht is geplaats.....

Staat er helemaal bovenaan dit:

Code: Selecteer alles

Warning: Missing argument 21 for submit_post() in /public_html/forum/includes/functions_post.php on line 192

Warning: Cannot modify header information - headers already sent by (output started at /public_html/forum/includes/functions_post.php:192) in /public_html/forum/includes/page_header.php on line 661

Warning: Cannot modify header information - headers already sent by (output started at /public_html/forum/includes/functions_post.php:192) in /public_html/forum/includes/page_header.php on line 663

Warning: Cannot modify header information - headers already sent by (output started at /public_html/forum/includes/functions_post.php:192) in /public_html/forum/includes/page_header.php on line 664

Iemand een idee hoe ik het bestand dan moet aanpassen???

Geplaatst: 19 jun 2006, 08:02
door Insomnia
Doe de eerste 2 stappen in je 2 de post

de 3de doet je eens dit
Zoek naar

Code: Selecteer alles

// Editing information 

tot

Code: Selecteer alles

} 

//
Wijzig in

Code: Selecteer alles

 // Editing information 
   // 
   if ( $postrow[$i]['post_edit_count'] ) 
   { 
      $max_edit_notes = $board_config['max_edit_notes']; 
      $sql = 'SELECT * FROM ' . EDIT_NOTES_TABLE . ' WHERE post_id = ' . $postrow[$i]['post_id'] . ' ORDER BY edit_note_time DESC LIMIT ' . $max_edit_notes; 
      if ( !($result = $db->sql_query($sql)) ) 
      { 
         message_die(GENERAL_ERROR, 'Could not look up edit notes for this post', '', __LINE__, __FILE__, $sql); 
      } 
      
      while ( $row = $db->sql_fetchrow($result) ) 
      { 
         $edit_note_id = $row['edit_note_id']; 
      } 
      
      if (!$edit_note_id ){ 
      $l_edit_time_total = ( $postrow[$i]['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total']; 

      $l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, $poster, create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']), $postrow[$i]['post_edit_count']); 
      }    
   } 
   else 
   { 
      $l_edited_by = ''; 
   } 

   //
[/code]