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

Meta Tags

Recommended Posts

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)

Share this post


Link to post

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'] );
		}

Share this post


Link to post

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?

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  

×