phpBB.de - Die deutsche phpBB-Community
Stand: 30.12.2008 04:56
aktuelle Version auf phpBB.de
 
Apache At Work Communities Community Building Informationen und Hinweise Installation/Konfiguration/Update MySQL PHP phpBB-Optimierungen phpBB3 Rechtliches Server & Technik Snippets Templates und Mods
 



Knowledge Base Offline -> At Work -> Snippets -> <table> Fix

<table> Fix
Autor: Acid
Stand: 30.12.2008 04:56
Neuste Version unter: http://www.phpbb.de/doku/kb/tablefix

<table> Fix

Damit wird verhindert, das beim Posten von HTML-Tabellen hinter jede Zeile ein Zeilenumbruch eingefügt wird.
phpBB Version: 2.0.x

Achtung: Die Tabellen-Tags table, tr, td und th müßen im Adminpanel erlaubt werden, was natürlich nicht ohne Risiko ist (vergisst man eine Tabelle im Beitrag zu schliessen, zerhaut´s einem das Layout).
Code:
#
#-----[ ÖFFNEN ]------------------------------------------------------
#
# /posting.php
#
#-----[ FINDE ]------------------------------------------------------
#
         if ( $error_msg == '' )
         {
            $topic_type = ( $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type;

#
#-----[ DARUNTER EINFÜGEN ]-------------------------------------------------
#
            //
            // <table> fix
            //
            $message = preg_replace('/>\r\n/', '>', $message);

#
#-----[ FIND ]------------------------------------------------------
#
      if( !$html_on )
      {
         if( $user_sig != '' || !$userdata['user_allowhtml'] )
         {
            $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', '<\2>', $user_sig);
         }
      }

#
#-----[ DARUNTER EINFÜGEN ]-------------------------------------------------
#
      //
      // <table> fix
      //
      else
      {
         $preview_message = preg_replace('/>\r\n/', '>', $preview_message);
      }

Keywords: tabelle+leerzeilen+fix+freiraum



Knowledge Base Offline -> At Work -> Snippets -> <table> Fix