Results 1 to 8 of 8

Edit meta description to Add $threadinfo[title] at the start

This is a discussion on Edit meta description to Add $threadinfo[title] at the start within the General Discussion forums, part of the vBSEO SEO Plugin category; First sorry for my english, i will try to explain what i want the best possible: I see that vBSEO ...

  1. #1
    Junior Member
    Real Name
    Juan
    Join Date
    Dec 2008
    Posts
    28
    Liked
    0 times

    Edit meta description to Add $threadinfo[title] at the start

    First sorry for my english, i will try to explain what i want the best possible:

    I see that vBSEO uses the first words of a post to make the meta description:

    For example:

    In this thread:
    como solucionar el problema de Metadescripciones cortas

    The meta description is:
    Code:
    <meta name="description" content="hola buenas tardes, tengo un problema que me da dolor de cabeza, tengo 1600 url con Metadescripciones cortas en las herramientas de google webmaster, casi todas las url son" /
    But as you can see sometimes isn't the best having the first words of the post because there isn't very related to the content

    So i want to add something like this:

    Code:
    <meta name="description" content="como solucionar el problema de Metadescripciones cortas: hola buenas tardes, tengo un problema que me da dolor de cabeza, tengo 1600 url con Metadescripciones cortas en las herramientas de google webmaster, casi todas las url son" /
    Where
    como solucionar el problema de Metadescripciones cortas

    Is the thread title.

    I tried making a edition on headinclude template but vBSEO don't use this.

    I think that this is possible with some edition with a Plugin or in the php files can you explain how to do this?.

    Thanks!

  2. #2
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    In order to alter the way vBSEO handles the meta information, you will have to dive into the php itself that creates this.

    in /includes/functions_vbseo.php

    find around line 1602

    Code:
    if(VBSEO_REWRITE_META_DESCRIPTION||VBSEO_REWRITE_META_KEYWORDS)
    you will have to play in there to change your display

  3. #3
    Senior Member
    Real Name
    Hayden James
    Join Date
    Mar 2006
    Posts
    161
    Liked
    0 times
    Somewhere in there eh? Interesting.

    For me
    Code:
    if(VBSEO_REWRITE_META_DESCRIPTION||VBSEO_REWRITE_META_KEYWORDS)
    was on line 1851.

    Inet did you find how to tweak?

  4. #4
    Senior Member
    Real Name
    Hayden James
    Join Date
    Mar 2006
    Posts
    161
    Liked
    0 times
    Ok Inettive you can use RR's to do this instead. But hope you already found the solution.

  5. #5
    Junior Member
    Real Name
    Juan
    Join Date
    Dec 2008
    Posts
    28
    Liked
    0 times
    Quote Originally Posted by hydn View Post
    Ok Inettive you can use RR's to do this instead. But hope you already found the solution.
    It is possible using the RR's but the problem is that you need to disable the Dynamic META TAGS which also adds a description to other pages such as Profile Pages and with RR's you can only setup it for showthread and forumdisplay pages.

  6. #6
    Senior Member
    Real Name
    Hayden James
    Join Date
    Mar 2006
    Posts
    161
    Liked
    0 times
    you can only setup it for showthread and forumdisplay pages
    Considering that's all we have included in our vbseo sitemaps. This was not too much of an issue.

  7. #7
    Junior Member
    Real Name
    Juan
    Join Date
    Dec 2008
    Posts
    28
    Liked
    0 times
    Quote Originally Posted by hydn View Post
    Considering that's all we have included in our vbseo sitemaps. This was not too much of an issue.
    It would do a lot of duplicate meta descriptions and will be the same with the Thread tags.

    This is the code that needs edition for do this:

    Code:
    if(VBSEO_REWRITE_META_DESCRIPTION)
    {
    $desc_content = vbseo_extract_msg_postbits();
    if(VBSEO_META_DESCRIPTION_UNIQUE)
    {
    $desc_append = true;
    $desc_content = vbseo_substr_words($desc_content, VBSEO_META_DESCRIPTION_MAX_CHARS - 10);
    $desc_content .= ' ('.$GLOBALS['threadinfo']['threadid'].')';
    }
    }
    And need to add:
    Code:
    $desc_content .= ' ('.$GLOBALS['threadinfo']['title'].')';
    But i don't know where put this piece of code, can anyone help?

    Thanks

  8. #8
    Junior Member
    Real Name
    Juan
    Join Date
    Dec 2008
    Posts
    28
    Liked
    0 times
    I'm still searching for this, it's one line that needs to be added to the code but i can't see where.

    I tested doing this with Relevant Replacements but it isn't the solution because i lose the meta description for showpost, member page, blog pages, etc, etc.

    Thank you

Similar Threads

  1. thread title in meta description
    By webexit in forum General Discussion
    Replies: 5
    Last Post: 03-02-2009, 11:49 AM
  2. Relevant Meta Description, Title & Keywords
    By Aceville in forum Troubleshooting
    Replies: 1
    Last Post: 11-22-2007, 05:49 AM
  3. 'META DESCRIPTION' with $threadinfo[title]
    By cellow in forum General Discussion
    Replies: 2
    Last Post: 05-28-2007, 05:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •