Jump to content

Featured Replies

Posted
comment_51438

Ich würde gerne aus der Meta Description die Seitenanzahl, Kategorie und den Thread Titel entfernen.

Zudem würde ich gerne den <title> Tag ebenfalls um die Forenkategorie erleichtern.

 

In welcher PHP Datei werden diese Dinge generiert?

(Über das Template includemeta kommt man da nicht weiter)

comment_51441

Das muss man in unterschiedlichen Dateien machen, je nach dem wo man etwas ändern möchte.

 

Beispielhaft: /admin/applications/forums/modules_public/forums/forums.php

 

Dort gibt es dann folgende Zeilen:

		if ( $this->forum['description'] )
		{
			$this->registry->output->addMetaTag( 'description', $this->forum['name'] . ': ' . $this->forum['description'] );
		}
		else
		{
			$this->registry->output->addMetaTag( 'description', $this->forum['name'] );
		}
  • Author
comment_51442

Ahhh vielen Dank :)

 

In der topic.php ist folgende Zeile für die Ausgabe der Meta Description:

# Trim to 155 chars based on Dan's recommendation
		$this->registry->output->addMetaTag( 'description', trim( $pageMeta . sprintf( $this->lang->words['topic_meta_description'], strip_tags( $topicData['title'] ), $forumData['name'], str_replace( "r", "", $this->_firstPostContent ) ) ), FALSE );

Wenn ich die Description auf 155 Zeichen begrenzen will, muss ich einfach das FALSE auf TRUE ändern?

Wie müsste der Code geändert werden, damit topic title, Forum Name und Seitenanzahl nicht mehr in die meta description einfließen?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.