PDA

View Full Version : SEO vBulletin without VBSEO - template edits


too_cool_3
11-09-2011, 10:17 PM
I'm trying to edit my templates in vB 4.1.7 to imporve SEO.

A guide I'm following states to remove:


<if condition="$show['threadinfo']"> <meta name="keywords" content="$threadinfo[title], $vboptions[keywords]" /> <meta name="description" content="<if condition="$pagenumber>1"><phrase 1="$pagenumber">$vbphrase[page_x]</phrase>-</if>$threadinfo[title] $foruminfo[title_clean]" /> <else /> <if condition="$show['foruminfo']"> <meta name="keywords" content="$foruminfo[title_clean], $vboptions[keywords]" /> <meta name="description" content="<if condition="$pagenumber>1"><phrase 1="$pagenumber">$vbphrase[page_x]</phrase>-</if>$foruminfo[description_clean]" /> <else /> <meta name="keywords" content="$vboptions[keywords]" /> <meta name="description" content="$vboptions[description]" /> </if> </if>


from "headinclude" template. This removes the description and keywords from the headinclude.

In vB 4.1.7 I removed:


<vb:if condition="$show['threadinfo']">

<vb:elseif condition="$show['foruminfo']" />
<meta name="keywords" content="{vb:raw foruminfo.title_clean}, {vb:raw vboptions.keywords}" />
<meta name="description" content="<vb:if condition="$pagenumber > 1">{vb:rawphrase page_x, {vb:raw pagenumber}}-</vb:if>{vb:raw foruminfo.description_clean}" />
<vb:else />
<meta name="keywords" content="{vb:raw vboptions.keywords}" />
<meta name="description" content="{vb:raw vboptions.description}" />
</vb:if>


Does this essentially accomplish the same thing? As I noticed the code they are asking you to remove is similar, however it is not the same..

-------------------------------------

Next it states to look for:


$headinclude <title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>


in the "forumhome" template. Move the $headinclude to below the title line, and insert this inbetween the two:


<title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title> <meta name="keywords" content="$vboptions[keywords]" /> <meta name="description" content="$vboptions[description]" /> $headinclude


Like this you will be using the description and keywords that you set under vBulletin options. However, in vB 4.1.7 I see:


{vb:raw headinclude}
<title>{vb:raw vboptions.bbtitle}</title>


so I did this:


{vb:raw headinclude}
<title>{vb:raw vboptions.bbtitle}</title>
<meta name="keywords" content="$vboptions[keywords]" />
<meta name="description" content="$vboptions[description]" />


Since there is no $headinclude in vB4 I left {vb:raw headinclude} at the top. Does this accomplish the same thing? Should I put the <meta name> stuff above {vb:raw headinclude}?

-------------------------------------

In "forumdisplay" template, it says find:


$headinclude <title>$foruminfo[title_clean]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if> - $vboptions[bbtitle]</title>


and change to:


<title>$foruminfo[title_clean]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if> - $vboptions[bbtitle]</title> <meta name="keywords" content="$foruminfo[title] $vboptions[keywords]" /> <meta name="description" content="$foruminfo[description] $foruminfo[title]" /> $headinclude


There are 2 main changes here. First, your pulling keywords from the vBulletin options as with the forumhome, but your also adding the forum name to the keywords... Second, you have a description that is specific to each individual forum.

However, in vB 4.1.7 I see:


{vb:raw headinclude}
<title>{vb:raw foruminfo.title_clean}<vb:if condition="$pagenumber > 1"> - {vb:rawphrase page_x, {vb:raw pagenumber}}</vb:if></title>


so I changed it to this:


{vb:raw headinclude}
<title>{vb:raw foruminfo.title_clean}<vb:if condition="$pagenumber > 1"> - {vb:rawphrase page_x, {vb:raw pagenumber}}</vb:if></title>
<meta name="keywords" content="$foruminfo[title] $vboptions[keywords]" />
<meta name="description" content="$foruminfo[description] $foruminfo[title]" />


Again, I kept {vb:raw headinclude} at the top of the <meta name> stuff, instead of putting it at the bottom like they say to do with $headinclude. Is this accomplishing the same thing they intended in the older code?

-------------------------------------

Next, in "showthread" template, you find:


$headinclude <title>$thread[title]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if> - $vboptions[bbtitle]</title>


and change it to this (change the red text to something specific to your forum):


<title>$thread[title]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if> - $foruminfo[title]</title> <meta name="description" content="$thread[title] is discussed *title of your forum* - $foruminfo[title]" /> <meta name="keywords" content="$thread[title] $vboptions[keywords]" /> $headinclude


The breakdown here is this - You are changing the title slightly by removing the site name, and replacing it with the name of the forum that the thread is in. You are adding the description which will now have: The Title of the thread + The red text + The Title of the forum the thread is in. Lots of keywords in your description now.

You are also adding the keywords that you placed in vBulletin Options, as well as the thread title which is also in the keywords now.

However, in vB 4.1.7 I see:


{vb:raw headinclude}
<vb:if condition="$threadinfo['keywords']"><meta name="keywords" content="{vb:raw threadinfo.keywords}" /></vb:if>
<meta name="description" content="{vb:raw thread.meta_description}" />

<title>{vb:raw thread.prefix_plain_html} {vb:raw thread.title}<vb:if condition="$pagenumber > '1'"> - {vb:rawphrase page_x, {vb:raw pagenumber}}</vb:if></title>


This seems to already include <meta name> information. So I LEFT IT ALONE. How does the code that is already there in vB4 differ from what the older code instructed you to put in?

-------------------------------------

Lastly, you find "memberinfo" template and change:


$headinclude <title>$vboptions[bbtitle] - $vbphrase[view_profile]: $userinfo[username]</title


to:


<title>$userinfo[username]'s profile on $vboptions[bbtitle]</title> <meta name="keywords" content="$vboptions[keywords]" /> <meta name="description" content="$vboptions[description]" /> $headinclude


in vB 4.1.7 I found:


{vb:raw headinclude}
<title>{vb:rawphrase view_profile}: {vb:raw prepared.username} - {vb:raw vboptions.bbtitle}</title>


and changed it to:


{vb:raw headinclude}
<title>{vb:rawphrase view_profile}: {vb:raw prepared.username} - {vb:raw vboptions.bbtitle}</title>
<meta name="keywords" content="$vboptions[keywords]" />
<meta name="description" content="$vboptions[description]" />


Again, leaving {vb:raw headinclude} at the top of everything instead of moving it to the bottom like it states with $headinclude, since there is no $headinclude in vB4. Is what I did to the code in my template proper and valid for vB4?

-------------------------------------

Thanks for all your help. I want to know if the edits I made to the vB 4.1.7 templates will function as intended and if any of these edits are redundant now in vB4 please let me know which ones and why.

Best Regards,

-Marc