Jump to content
InvisionCommunity.de - Der Deutsche Invision Community Support
Sign in to follow this  
kingofcomedy

size - Tag in Signatur "deaktivieren"

Recommended Posts

Einfache Frage: Wie kann ich den size - Tag in der Signatur deaktivieren? :)

Das entsprechende DropDown über dem Textfeld ist schon entfernt, aber es gibt halt "schlaue" User, die den Tag trotzdem nutzen. Wie kann ich das Forum dazu bringen, diesen Tag zu ignorieren? :unsure:

Danke.

Gruss,

Thorsten

Share this post


Link to post

Entferne einfach die size Tags bevor du die Signature durch den Parser jagst. ;)

Datei usercp_functions.php (lib - Verzeichnis)

Suche:

	function do_signature() {
 global $ibforums, $DB, $std, $print, $HTTP_POST_VARS;

 if ($HTTP_POST_VARS['act'] == "")
 {
 $std->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) );
 }
 //+----------------------------------------

 //----------------------------------
 // Check for bad entry
 //----------------------------------

 if ( (strlen($HTTP_POST_VARS['Post']) > $ibforums->vars['max_sig_length']) and ($ibforums->vars['max_sig_length']) )
 {
 $std->Error( array( 'LEVEL' => 1, 'MSG' => 'sig_too_long' ) );
 }

 if ( $HTTP_POST_VARS['key'] != $std->return_md5_check() )
 {
 $std->Error( array( 'LEVEL' => 1, 'MSG' => 'del_post' ) );
 }
Füge darunter ein
  //Kill size tags
 $text = preg_replace("#\[size=([^\]]+)\]#ie", "", $text);
 $text = preg_replace("#\[/size\]#ie", "", $text);

und schon sollte sich das Thema eigentlich erledigt haben. ;)

Share this post


Link to post

Entferne einfach die size Tags bevor du die Signature durch den Parser jagst. ;)

Datei usercp_functions.php (lib - Verzeichnis)

Suche:

	function do_signature() {

  global $ibforums, $DB, $std, $print, $HTTP_POST_VARS;


  if ($HTTP_POST_VARS['act'] == "")

  {

 	 $std->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) );

  }

  //+----------------------------------------


  //----------------------------------

  // Check for bad entry

  //----------------------------------


  if ( (strlen($HTTP_POST_VARS['Post']) > $ibforums->vars['max_sig_length']) and ($ibforums->vars['max_sig_length']) )

  {

 	 $std->Error( array( 'LEVEL' => 1, 'MSG' => 'sig_too_long' ) );

  }


  if ( $HTTP_POST_VARS['key'] != $std->return_md5_check() )

  {

 	 $std->Error( array( 'LEVEL' => 1, 'MSG' => 'del_post' ) );

  }
Füge darunter ein
  //Kill size tags

  $text = preg_replace("#\[size=([^\]]+)\]#ie", "", $text);

  $text = preg_replace("#\[/size\]#ie", "", $text);

und schon sollte sich das Thema eigentlich erledigt haben. ;)

So, ich habe das jetzt mal lokal getestet, aber leider ohne Erfolg, d.h. der Size-Tag wird nicht wirklich ignoriert, obwohl ich die Signatur erneut gespeichert habe.

Share this post


Link to post

Ja, glaub ich. :)

Entferne die zusätzlichen Zeilen und nehm die beiden. :)

  //Kill size tags
$ibforums->input['Post'] = preg_replace("#\[size=([^\]]+)\]#ie", "", $ibforums->input['Post']);
$ibforums->input['Post'] = preg_replace("#\[/size\]#ie", "", $ibforums->input['Post']);

Sollte dann klappen. Sorry. :)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×