Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
Aladin Posted September 6, 2010 Posted September 6, 2010 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?
Aladin Posted September 6, 2010 Author Posted September 6, 2010 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?
Kessler Posted September 8, 2010 Posted September 8, 2010 This may be better off in the feedback forum, since you want a certain change made and that's the place to make requests. Would you like this moved there?
Aladin Posted September 9, 2010 Author Posted September 9, 2010 Move as plaesed ;) I just need confirmation if code change is ok?
Kessler Posted September 9, 2010 Posted September 9, 2010 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.
Aladin Posted September 10, 2010 Author Posted September 10, 2010 Tho code works. Otherwise I would not post it. Just needed confirmation if its ok or it should be done in other way? You might consider making it standard in future versions.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.