Jump to content

Meta tag: Description


Aladin

Recommended Posts

IPBoard v3.1.2, SEO question.


User is posting a new topic. Besides Topic Title he also has an option to post Topic Description.

Why (if exists) Topic Descripion is not put in field:
<meta name="description" content="Topic Descripion" />

and only! if Topic Descripion is not available then
<meta name="description" content="First post limited X characters" />



Users are far better in describing their own topic, then first X chars. of first post.


What should be changed and where to make this change?

Link to comment
Share on other sites

Change /admin/applications/forums/modules_public/forums/topics.php

Original code:
$this->registry->output->addMetaTag( 'description', str_replace( "n", " ", str_replace( "r", "", strip_tags( $this->_firstPostContent ) ) ), FALSE, 155 );


Change to:

if ( $this->topic['description'] )
{
$this->registry->output->addMetaTag( 'description', str_replace( "n", " ", str_replace( "r", "", strip_tags( $this->topic['description'] ) ) ), FALSE, 155 );
}
else
{
$this->registry->output->addMetaTag( 'description', str_replace( "n", " ", str_replace( "r", "", strip_tags( $this->_firstPostContent ) ) ), FALSE, 155 );
}



Is this solution or some other changes should be made?

Link to comment
Share on other sites

Whether or not that code will work, I don't know as I haven't tried it out. However, you are free to make any modifications to your own board that you want to make.

Moving this to the feedback forum so that the suggestion can be considered for future releases.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...