Time2Dine.co.nz is Online Restaurant Booking
 
 New Zealand Restaurants Forum
Restaurant Forum | Contact Time2Dine | Book Online & Save | About Time2Dine

Go Back   New Zealand Restaurants & Food Forum > Search Engine Optimisation > SEO vBulletin
Register

Reply
 
LinkBack (5) Thread Tools
  4 links from elsewhere to this Post. Click to view. #1  
Old 7th Jun 04, 09:59 AM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,828
T2DMan is on a distinguished road
Default Search Engine Optimize vBulletin

updated September 2006

So how do you Search Engine Optimize vBulletin? How do you SEO vBulletin to the max? How do you dominate the search engines getting the max traffic, adsense $, traffic for your advertisers, and information to your users?

Check out my specific Search Engine Optimize vBulletin 3.5/6 thread.

The forums are hot at the moment with the new entrant into the vBulletin SEO market - vBSEO from Crawlability.



The product includes all the hacks that I have done as detailed in this thread (began June 2004) with many more additions. vBSEO also does the url rewrites.

In addition, the latest vBulletin 3.5/6 has included a number of my SEO recommendations into the main package. It has also implimented plugins as a way of adding hacks rather than the php code changes that I detailed below for pre vBulletin 3.5. So I recommend that you upgrade to the vBulletin 3.5 series, and get vBSEO.

So far, vBSEO is the only product that I have been able to find that successfully rewrites all the URL's in vBulletin and provides 301 redirects from the old urls to the new.

Certainly have a read through the first 2 pages of this thread to understand why there needs to be SEO for vBulletin. Then get a copy of vBSEO for your forum.

Consider contracting me to optimize your vBulletin.

Do you have the latest browser Firefox?

Have you added Google Adsense to your site yet?

Are you interested in an affiliate program for your site:


Generally there are three parts to SEO:



  • Onpage SEO
  • Onsite SEO
  • Whole of Web
Why SEO vBulletin - better onpage, onsite and whole of SEO web needed

There are a number of issues that needed to be addressed:
  • The number of different URL's that reference the same content. There should be only one url per thread, only one url for each page on the site.
  • The number of url's that give irrelevant information, or near dup content, like a unique url to email each post in each thread to someone - use rel=nofollows, and for some url's redirect Google to the proper url.
  • The distribution of Google PR around the forum.
  • The string urls - like showthread.php?t=123 - with string url's, the Google PR is generally 1 point lower than without the string.
  • The string URL's are not very clickable since they don't say what the thread is about. Rewriting means there are keywords in the url for clickability, and the search engines
  • HTML page size - get rid of the html comments and needless spaces to speed up download, and increase the amount of text that Google has in its 100k limit.
  • The emails that people get telling them about threads posted - need to be with the rewritten url's. These urls are often used for linking on websites, and so best if the rewritten url is used.
  • When people make new threads, and new posts, the url's they get should be url's that they can then link to on their own websites - permanent url's.
Google Sitemap

vBSEO has also released a vBulletin Google sitemap that tells Google about all the url's on the forum - both the old urls and the new rewritten url's. I have a version I created myself, but I now recommend the vBSEO version on vbulletin.org.

Onpage optimization - keyword selection

Before you install vBSEO, you need to consider what your forum names should be, since these are going to become part of the url's.

So consider -
  • what is it that you are selling?
  • what phrases do you want to get to the top for on Google
  • how many people are looking for those words on Google
Then make sure that you have dedicated pages - either homepage, forums, and threads for each search term.

Make sure that you have onpage optimized each page for that term - obviously for forums, page generation is formula based. So with vBSEO, you are able to tweak what is in the meta description, and other text on your pages.

Template changes I recommend - see below posts
  • Add "firstwords" to the navbar
  • Make the last threadbit into an h1
  • Mention the forum title a few more times on the forumdisplay pages to increase keyword density.
  • Link to the main archive pages in footer links on your site (note the numbered links on the footer of this page)
  • adding the "register" link into the logon box.
  • changing the welcome text that shows on the main forumhome page, optimizing it to include the search words for your forumhome page.
Help is available

I am available on a contract basis to work through your site:
  • with keyword selection and wording on your site - this is one of the biggies, and requires some thought
  • with installation of vBSEO and the vBSEO sitemap creator (real easy, but why not have some help)
  • with technical issues like accessing your site via domain.com - Get online with a domain name and web hosting as well as just domain.com
  • It actually takes time, and sometimes its easier to have someone else do it for you. I can change the oil of my car, but I get the mechanic to do it for me.
Why me?

I am a moderator on the vBSEO site and have my name on the credits of the packages, have had a number of my SEO recommendations accepted into the main vBulletin package, have even SEO'ed a forum Hardware Reviews, Computer Hardware Reviews - Dev Hardware that has as part of their websites, the well regarded SEO Chat forum - SEOing the SEOers own sites! Very cool.

Last edited by T2DMan; 13th Mar 08 at 12:48 PM. Reason: vBSEO and vBulletin 3.5/6
Reply With Quote
  #2  
Old 7th Jun 04, 10:00 AM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,828
T2DMan is on a distinguished road
Default Search Engine Optimize vBulletin - the old way

I have taken on board the challenge to Search Engine Optimize vBulletin.

There is a hack for vBulletin versions up to 3.5 on this thread, and another thread for Search Engine Optimize vBulletin 3.5. Many of the php and template hacks in this thread have been incorporated into vBulletin 3.5. I recommend first upgrading to vBulletin 3.5 (I can help) then getting me to apply the remainder of the hacks, and helping you with onpage optimizing your forum - wording changes are very important.

Surely you should not need to Search Engine Optimise vBulletin, it should already be part of the package? I have been very surprised to find many fundamental SEO principles have not been followed, and have had a lot of fun Search Engine Optimizing vBulletin.

Once vBulletin is Search Engine Optimized, and has sufficient Google PR, I have been able to get most forum threads to the top 10 on Google. I recommend the vBulletin package for its ease of use and power on Google.


Top rankings are possible (June 2005)

I am amazed that I have been able to get this thread to the top 10 on Google for "vBulletin". Per the Search Guild Search Term difficulty scale, they give ranking on the first page for "vBulletin" a difficulty score of 988917 - Practically Impossible they say.

Either apply the
SEO vBulletin hacks yourself, or Contract me to SEO your website. Let me do the practically impossible for your site.

References

Check out the Search Engine Optimize vBulletin references. Please add your reference after you install the hack.


URL rewrites

Have a look at the url's on this forum. I am available to supply and install the hack onto your forum - details available on personal enquiry direct to me (not via VBSEO). The rewrite package is a 5 minute install. It also means that a number of the template and php hacks are not needed.

How to SEO vBulletin

There are a number of issues that I have addressed:
  • The number of different URL's that reference the same content. I have managed to either use permanent redirects, or change the url so that in all cases, there is only one url for the same content.
  • The number of url's that give irrelevant information, or near dup content, like a unique url to email each post in each thread to someone. I have excluded the bots from these via robots.txt.
  • The distribution of Google PR around the forum. I have changed the site map and added links to each forum site map in the footer.
Summary - Search Engine Optimize vbulletin

Archive

I have changed the archive, so that it directly refers to the actual threads, and referenced each of the archive forum lists (site maps) (/archive/index.php/f-2.html) on each page, so that the max PR goes through to each thread.

The pagination also needs to be changed so that page one is referred to as f-x.html, not f-x-p-y.html (where x is the forum number, and y is the page number).

Robots.txt

I have now excluded the following using robots.txt. Note that I do not have the ".php" at the end of the files. Don't add the comments of course

User-agent: *
Disallow: /printthread - yet another instance of same information
Disallow: /sendmessage - virtually same page content
Disallow: /register - no need to have this
Disallow: /login - no need to have this
Disallow: /newreply - virtually same for each reply
Disallow: /subscription
Disallow: /private
Disallow: /misc - no new information
Disallow: /report
Disallow: /poll
Disallow: /showpost - single representations of each post/thread. I would prefer the thread as a whole to be on Google. The original thread is repeated yet again if this is allowed on Google. It would be possible to seo the showpost pages (title, meta description, ...) but I don't think that the single posts add much value for being on Google. The PR is rather low for each (especially since there is no site map for these), and not many people would be interested in optimising the text and titles for these individual posts.

Rel=nofollow

Please refer to the following thread with my new rel=nofollow hack (May 2005). This is a fantastic addition to the SEO vBulletin hack, as it makes sure that only the important url's are able to receive Google PR. The likes of edit post, new thread, printthread, showpost, contact us, ... are all stopped from being able to receive Google PR.

The vbseo package does this with no need to update templates.

Page Titles

I have the page titles being the thread topic first, or forum topic first when looking at the forum.

Meta descriptions and Firstwords/First Paragraph on page

The meta descriptions are based on a formula of thread, forum and generic description. The aim is to repeat the search phrase (ie page title) twice within a sentence around 150 characters long. With good crafting of the meta description, I am seeking to avoid the problem of the snippet being formed out of the mishmash of words at the top of the forum entry, however, I have also added a formula for the "First Words" that also alleviates this problem.

possible customisable descripitions for threads Complete Thread Description Hack 1.7 - vBulletin.org Forum

and the forums

Header/Footer For Each Forum and Threads in that Forum - vBulletin.org Forum

Breadcrumb templates

I have changed the breadcrumb templates so that the current breadcrumb is in <h1>.

Style Manager/Main CSS - add to the "Additional CSS definitions"

Code:
.showthreadh1
{
font-family:verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; 
margin:0;
font-size: 14px;
font-weight: bold;	
display: inline;
}
edit the navbar template
replace:
Code:
<strong>$navbits[lastelement]</strong>
Last version, I incorrectly stated that you should replace the following - sorry
Code:
<strong>$vboptions[bbtitle]</strong>
with:
Code:
<h1 class="showthreadh1">$navbits[lastelement]</h1>
Root URL

The root is now always referred to as "/" rather than "/index.php".

I would appreciate anyone elses additional ideas, and alternate answers to the above questions and approaches.

CSS in its own file

This reduces the size of each page, ie download time, makes the content that much higher on the page, and in reducing the size of the page means it takes longer to get to the 100k mark that Google caches. ie This page is over 100k.

Set via the "vBulletin Options", "Style and language settings", option- Store CSS Stylesheets as Files? Yes. You need to follow the instructions given there to change the write permissions on the directory.

added 4/4/05 I have had problems in getting the css into its own file. If you cant get it to work, try setting the "Store CSS Stylesheets as Files?" as No, then to Yes again. Been a very successful way of getting it working.

Session ID's (added 20 Nov 2004)

There is some useful code in sessions.php that removes the session id's when certain 3 bots are visiting. I have applied the hack from Remove Bot SIDs from URL Requests which removes the sid's from not only the three named bots, but all the bots that are registered in the who's online/spider identification strings list in the vbulletin setup.

An up to date list can be obtained from:
VBulletin spider identification strings/descriptions

Add to the
Change all "threadid=" to "t=" in email notifications

detail on vBulletin-Search Engine Optimize vBulletin-Page 5-top hack

Last edited by T2DMan; 13th Mar 08 at 12:48 PM.
Reply With Quote
  #3  
Old 7th Jun 04, 01:35 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,828
T2DMan is on a distinguished road
Default Title, metas, firstwords

Addition 1 Apr/05 - add firstwords to the NavBar template, remove from showthread and forumdisplay

28/Jan/05 & 8 Feb
-duplicate content is a live issue, on subsequent pages, the title,metas, firstwords are all the same. Therefore, I have added "Page x" at the front for subsequent pages to make sure that Google only picks the first page on the SERP's for each forum and thread listing.

Customizing the Title, Meta Description, and Meta Keywords

In the showthread template, I have used the following.

replace the existing <title> tag with your version of
Code:
<title>$thread[title]-<if condition="$pagenumber>1">Page $pagenumber-</if>action phrase-brandname $foruminfo[title]</title>
<meta name="keywords" content="$thread[title] $vboptions[keywords] alternate keywords, brandname" />
<meta name="description" content="$thread[title]-<if condition="$pagenumber>1">Page $pagenumber-</if> $foruminfo[title]. Visit our forum to discuss $thread[title]" />
In the forumdisplay template, I have used the following
Code:
<title>$foruminfo[title] <if condition="$pagenumber>1">Page $pagenumber-</if></title>
<meta name="keywords" content="$vboptions[keywords] " />
<meta name="description" content="<if condition="$pagenumber>1">Page $pagenumber-</if>$foruminfo[description]" />

If you want multiple phrases, you can either use child templates, or use conditionals

You can put a conditional on the <head> entries so that you can also have a non restaurant forum/thread like this one, and not have restaurant related terms in the meta data.

Code:
showthread template
 after <head>
 add
 <if condition="$foruminfo[forumid]<7">
 your meta data information
 <else />
 your alternate meta data information
 </if>

Discussion

Title
- Note how I have put the thread/forum title first
Description - try to repeat the search phrase twice (I use the thread title twice) and keep your description to 149 characters. With a formula it is a little hard, but you get the idea

Firstwords on the page

Google likes paragraphs at the top of pages that include the search phrases. Often it will use this paragraph for its snippet. Therefore, you need to use the search phrase (ie title) minimum twice within around 149 characters. The firstwords are used in both the thread and forum.

On the NAVBAR template

after:
Code:
<strong>$vboptions[bbtitle]</strong></div>
		</if>
add - your version of:

Code:
<if condition="THIS_SCRIPT=='poll'">
<div class="navbar" style="margin-bottom:5pt;margin-top:5px;font-size:8pt">The poll results for <b>$threadinfo[title]</b>. <br /></div>

<else />

<if condition="$thread[title]">
<br/><div class="navbar" style="font-size:8pt"><b>$thread[title]</b> <if condition="$pagenumber>1">Page $pagenumber</if>. Discuss <i>$thread[title]</i>, on domainname.com, the best widget selling in the world. $foruminfo[title].<br/>&nbsp;</div>

<else />
<if condition="$foruminfo[title]">
 <br/><div class="navbar" style="font-size:8pt">
$foruminfo[title] <if condition="$pagenumber>1">Page $pagenumber </if> on domainname. $foruminfo[description]<br/>&nbsp;

 </div>
</if>
</if>
</if>


Add a "Register" link on the logon form (top right of page)

It is not always easy to find the register link - I like having a link as part of the logon script box.

Navbar template:

after:
Code:
<input type="submit" class="button" value="$vbphrase[log_in]" tabindex="4" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" />
add
Code:
<if condition="$show['registerbutton']"><span class="smallfont"><a href="register.php?$session[sessionurl]">$vbphrase[register]</a></span></if>
Deleting old code

Now go to the headinclude template and delete the following, since you have included it in the forumdisplay and showthread templates. I see no need for the vbulletin generator tag:
Code:
<meta name="generator" content="vBulletin $versionnumber" />
<meta name="keywords" content="$vboptions[keywords]" />
<meta name="description" content="$vboptions[description]" />

Last edited by T2DMan; 19th Aug 05 at 01:41 PM. Reason: 27/7-poll hack 12/May-revised firstwords for Navbar. 1/Apr/05 revised firstwords, 8/Feb/05 added pagenumber to thread, added pagenumber to title etc of page 2 onwards...
Reply With Quote
  #4  
Old 9th Jun 04, 09:01 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,828
T2DMan is on a distinguished road
Default Home Page

The Home page url should always be the same - ie Should be root "/", not "index.php".

The problem is that the navbar template takes the file name say "index" from the Forums Home Page Options in 'VBulletin Options'.

So my hack is to hard code the navigation/breadcrumb templates - navbar to the correct file name.

Look in the navbar template for 3 instances of:

[HTML]a href="vboptions[forumhome].php?$session[sessionurl]" [/HTML]

replace with (or replace the '/' with the directory that your forum is in):

[HTML]a href="/<if condition="$session[sessionurl]">?$session[sessionurl]</if>"[/HTML]

Last edited by T2DMan; 3rd Jun 05 at 03:59 PM. Reason: adding home page information
Reply With Quote
  #5  
Old 10th Jun 04, 01:56 AM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,828
T2DMan is on a distinguished road
Default Hacks to reduce number of url's

Code:
showthread.php
case 'nextoldest':
after -> $threadid = $getnextoldest['threadid'];
	 unset($thread);
added -> exec_header_redirect("showthread.php?t=$threadid");

case 'nextnewest':

after -> $threadid = $getnextnewest['threadid'];
	 unset($thread);
added -> exec_header_redirect("showthread.php?t=$threadid"); 


Code:
/includes/functions.php
function exec_header_redirect($url)

added -> header("HTTP/1.1 301 Moved Permanently"); 
before -> header("Location: $url"); 


I wanted to keep the integrity of the current programming, so since Google handles permanent redirects well, this means that for the next, and previous threads, there is Google PR transfer and no new url created.

NEW 31/3/05 - Newthread.php / editpost.php / newreply.php hack

I have been frustrated with adding a new thread, or editing an existing post, or adding a newreply, then wanting to email someone about it, but not having the proper URL to email them. Its also another url for the Google Adsense mediabot to find.

In each of the three cases, the URL was p=, not t=. When you email someone with a url they may add the link to a webpage, and so be adding a duplicate url for the page as compared to the proper t= url.

31/3/2005 Added the newreply.php and showthread.php hacks to finish off this series

on the /newthread.php file, find:
Code:
$url = "showthread.php?$session[sessionurl]p=$newpost[postid]#post$newpost[postid]";
replace with either - your choice depending on where you want the cursor placed. I prefer to not have the # at the end, but it is your choice.
Code:
//seo hack - amended by T2DMan
$url = "showthread.php?$session[sessionurl]t=$newpost[threadid]";
or
Code:
//seo hack - amended by T2DMan
$url = "showthread.php?$session[sessionurl]t=$newpost[threadid]#post$newpost[postid]";
on the /editpost.php find
Code:
$url = "showthread.php?$session[sessionurl]p=$postid#post$postid";
		eval(print_standard_redirect('redirect_editthanks'));
replace with
Code:
// amended by t2dman so that when editing posts, the thread number is displayed once edited
numberofpages();

if($pagenumber>1){
		$url = "showthread.php?$session[sessionurl]t=$threadinfo[threadid]&page=$pagenumber#post$postid";
	} else {
		$url = "showthread.php?$session[sessionurl]t=$threadinfo[threadid]#post$postid";
	}
		eval(print_standard_redirect('redirect_editthanks'));
on the /newreply.php find:
Code:
		if ($newpost['visible'])
		{
			if (($tview = fetch_bbarray_cookie('thread_lastview', $threadinfo['threadid'])) != $threadinfo['lastpost'])
			{
		 	$url = "showthread.php?$session[sessionurl]p=$newpost[postid]&amp;posted=1#post$newpost[postid]";
			}
			else
			{
		 	$url = "showthread.php?$session[sessionurl]p=$newpost[postid]#post$newpost[postid]";
			}
		}
replace with:
Code:
if ($newpost['visible'])
		{
// amended by t2dman so that when replying to posts, the thread number is displayed once edited
			$postid=$newpost[postid];
		  numberofpages();
			if (($tview = fetch_bbarray_cookie('thread_lastview', $threadinfo['threadid'])) != $threadinfo['lastpost'])
			{
			//the previous url included posted=1, therefore want to remove it - post reset to 0 in showthread
			set_bbarray_cookie('posted', 1, 1);	 
	
//		 	$url = "showthread.php?$session[sessionurl]p=$newpost[postid]&amp;posted=1#post$newpost[postid]";
			}
//		 	$url = "showthread.php?$session[sessionurl]p=$newpost[postid]#post$newpost[postid]";
			  if($pagenumber>1){
		 		$url = "showthread.php?$session[sessionurl]t=$threadid&amp;page=$pagenumber#post$newpost[postid]";
				} else {
		 		$url = "showthread.php?$session[sessionurl]t=$threadid#post$newpost[postid]";
				}	


		}
and on the /showthread.php file

replace
Code:
 if ((!$posted OR $updatethreadcookie) AND $displayed_dateline AND $displayed_dateline > $threadview)
{
	set_bbarray_cookie('thread_lastview', $threadid, $displayed_dateline);
}
with:
Code:
//added by t2dman
$posted=fetch_bbarray_cookie('posted', 1);

if ((!$posted OR $updatethreadcookie) AND $displayed_dateline AND $displayed_dateline > $threadview)
{
	set_bbarray_cookie('thread_lastview', $threadid, $displayed_dateline);
}
//added by t2dman
elseif ($posted){
	set_bbarray_cookie('posted', 1, 0);
}

Last edited by T2DMan; 4th Oct 05 at 04:41 AM. Reason: 31/3/05 newthread hack / adding path name to functions.php
Reply With Quote
  #6  
Old 10th Jun 04, 11:43 AM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,828
T2DMan is on a distinguished road
Default "last post" issue

http:/forum.time2dine.co.nz/showthread.php?goto=lastpost&t=6
redirects to the last post
http:/forum.time2dine.co.nz/showthread.php?p=6#post6, so keeps this url - it does become a duplicate. Now Google does not record the # details, so it is recording as a duplicate showthread.php?p=6, and t=6

With a multipage thread, there needs to be separate url's.



Logic - redirects to t=x if no pagination, redirects to t=x&page=y#post=z if more than one page.

The lastpost issue also appears on the member.php lastpost, requiring the same hack. Both hacks are listed separately below.

For those that have already done my hacks, and want the updates, please do the hack for the functions.php below and don't bother about changing the showthread.php and member.php (I have deleted the code and replaced with the function)

includes/functions.php
after:
Code:
define('FORUM_PREPEND', '&nbsp; &nbsp; ');
add:
Code:
//added by T2DMan to get page number of latest post for redirection
function numberofpages()
{
	global $vboptions, $perpage, $postid, $threadedmode, $postinfo, $pagenumber, $bbuserinfo, $DB_site;
	
  $perpage = $bbuserinfo['maxposts'];
	$checkmax = explode(',', $vboptions['usermaxposts'] . ',' . $vboptions['maxposts']);
	
	if (!$perpage OR $perpage < 1 OR $perpage > max($checkmax))
	{
		$perpage = $vboptions['maxposts'];
	}
	if (!empty($postid) AND $threadedmode == 0)
	{
		$postinfo = verify_id('post', $postid, 1, 1);
		$threadid = $postinfo['threadid'];
		$getpagenum = $DB_site->query_first("
		SELECT COUNT(*) AS posts
		FROM " . TABLE_PREFIX . "post AS post
		LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
		WHERE threadid = $threadid AND visible = 1 AND deletionlog.primaryid IS NULL
		AND dateline " . iif(!$postorder, '<=', '>=') . " $postinfo[dateline]
		");
		$pagenumber = ceil($getpagenum['posts'] / $perpage);
   }

}

showthread.php
below case 'lastpost': and the similar for case'newpost':

Code:
after -> if ($threadedmode != 1) // if linear or hybrid
	 {
 
replace: 
exec_header_redirect("showthread.php?$session[sessionurl]p=$getlastpost[postid]$highlightwords#post$getlastpost[postid]");

with ->
 
$postid = $getlastpost['postid'];

numberofpages();
if($pagenumber>1){
 
exec_header_redirect("showthread.php?$session[sessionurl]t=$threadid$highlightwords&page=$pagenumber#post$getlastpost[postid]");
}
else
{
//new redirect by Michael
exec_header_redirect("showthread.php?$session[sessionurl]t=$threadid$highlightwords#post$getlastpost[postid]"); 
} 



showthread.php
below case'newpost':

Code:
 
after -> if ($posts['postid'])
{

 
replace
exec_header_redirect("showthread.php?$session[sessionurl]p=$posts[postid]$highlightwords#post$posts[postid]");
 
with ->
$postid = $posts['postid'];

numberofpages();

if($pagenumber>1){
exec_header_redirect("showthread.php?$session[sessionurl]t=$threadid$highlightwords&page=$pagenumber#post$posts[postid]");
}
else
{
exec_header_redirect("showthread.php?$session[sessionurl]t=$threadid$highlightwords#post$posts[postid]"); 
}
 
 



and member.php

Code:
 
after:
if ($getperms & CANVIEW)
 
{
 
$userinfo['lastposttitle'] = $getlastpost['title'];
 
replace:
$userinfo['lastposturl'] = "showthread.php?$session[sessionurl]p=$getlastpost[postid]#post$getlastpost[postid]";
 
with:
 
//using the p= twice is unnecessary, and it creates another url for the thread. Since Google ignores the #, this url is treated the same as the main thread url.
//*************************************************************
// find the page that we should be on to display this post-if page >1,
// then display alternate url, otherwise display main url for SEO
// set $perpage
 
$postid = $getlastpost['postid'];

numberofpages();

if($pagenumber>1){
$userinfo['lastposturl'] = "showthread.php?$session[sessionurl] t=$threadid$highlightwords&page=$pagenumber#post$getlastpost[postid]";
} 
else
{
//new userinfo by Michael
$userinfo['lastposturl'] = "showthread.php?$session[sessionurl]t=$threadid$highlightwords#post$getlastpost[postid]"; 
}
 

Last edited by T2DMan; 28th May 05 at 05:44 PM. Reason: moving repeated code to functions.php 31/3/05, v3.06 (doing a search replace for sessionurl_js to sessionurl) - clarifying hacks - using terminology "replace"
Reply With Quote
  #7  
Old 10th Jun 04, 12:11 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,828
T2DMan is on a distinguished road
Default Pagination

Where there is more than one page for a thread, the forum shows 1 2 3 ... with the url shows page=1, page=2, etc.


The problem is that the page=1 is yet another url for the first page.

So for the first page, show only the thread url
- replace the existing with the following on the threadbit_pagelink template:

Code:
<if condition="$curpage == 1">
<a href="$address">$curpage$address2</a> 
<else />
<a href="$address&amp;page=$curpage$address2">$curpage</a> 
</if>

Last edited by T2DMan; 29th Aug 05 at 10:25 PM.
Reply With Quote
  #8  
Old 10th Jun 04, 02:05 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,828
T2DMan is on a distinguished road
Default Pagination within the thread

The pagination within the thread had two problems.

First issue was the reference to "page=1".

On the pagenav_pagelink template code, replace the entire code with the following:

Code:
<if condition="$curpage == 1">
<td class="alt1"><a class="smallfont" href="$address$address2" title="<phrase 1="$pagenumbers[first]" 2="$pagenumbers[last]" 3="$total">$vbphrase[show_results_x_to_y_of_z]</phrase>">$curpage</a></td>
 
<else />
 
<td class="alt1"><a class="smallfont" href="$address&amp;page=$curpage$address2" title="<phrase 1="$pagenumbers[first]" 2="$pagenumbers[last]" 3="$total">$vbphrase[show_results_x_to_y_of_z]</phrase>">$curpage</a></td>
 
 
</if>
pagenav template

Second issue - the "<" and ">" navigation on the page needed to be adjusted for the same issue

pagenav template
after <if condition="$show['prev']"><td class="alt1">

replace
<a class="smallfont" href="$address&amp;page=$prevpage$address2" title="$vbphrase[prev_page] - <phrase 1="$prevnumbers[first]" 2="$prevnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>">&lt;</a>

with
Code:
<if condition="$prevpage==1">
<a class="smallfont" href="$address$address2" title="$vbphrase[prev_page] - <phrase 1="$prevnumbers[first]" 2="$prevnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>">&lt;</a>
		<else />
<a class="smallfont" href="$address&amp;page=$prevpage$address2" title="$vbphrase[prev_page] - <phrase 1="$prevnumbers[first]" 2="$prevnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>">&lt;</a>
</if>
forumdisplay.php

The page navigation has sorting options which require a rather long url since the options are not stored in cookies. Since I want the url to be in the simple form of f=x&page=y, I considered it a good idea to show the simple url's when the default sort option was kept, and the user was not logged on (ie a search engine). Although the search engines will click on the search function, there will at least be one simple set of url's for it to follow that lead it to all the individual threads.

in forumdisplay.php

replace:
$pagenav = construct_page_nav($totalthreads, "forumdisplay.php?$session[sessionurl]f=$forumid", "&amp;sort=$sortfield&amp;order=$sortorder&amp;pp=$perpage&amp;daysprune=$daysprune");

with

Code:
// added by Michael Brandon - for SEO to simplify url if not logged on, and using default options
if($sortfield=='lastpost' and ($sortorder=='desc' or $sortorder=='') and !$bbuserinfo['userid'])
{
$pagenav = construct_page_nav($totalthreads, "forumdisplay.php?$session[sessionurl]f=$forumid");
}
else
{//previous coding
$pagenav = construct_page_nav($totalthreads, "forumdisplay.php?$session[sessionurl]f=$forumid", "&amp;sort=$sortfield&amp;order=$sortorder&amp;pp=$perpage&amp;daysprune=$daysprune");
}
 

Last edited by T2DMan; 28th May 05 at 06:20 PM. Reason: removing the $address2 from pagenav template
Reply With Quote
  #9  
Old 12th Jun 04, 03:32 AM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,828
T2DMan is on a distinguished road
Default Member url issues

Yes, the members are referred to by more than one url as well.

in the main forum page it is referred to as "lastposter", on other pages it is member.php?u=x, and on the showthread.php page, the url is member.php?userid=x

So they are all now either u=x, or redirected to u=x.

Changes made

I have changed the lastposter from the forum page, so that it redirects to the member.php?u=x url

Code:
member.php
After
if (!$userid)
{
eval(print_standard_error('error_unregistereduser'));
}
 
add
 
else 
//added by Michael 12/6/04 for SEO to keep one url per forum member

 if($find){
//permanent redirect to that member
exec_header_redirect("member.php?u=$userid");
}
and in the showthread.php, the url is member.php?userid=

Code:
change the postbit template - search for userid=
 
change
<a href="member.php?$session[sessionurl]userid=$post[userid]">
 
to
<a href="member.php?$session[sessionurl]u=$post[userid]">

Last edited by T2DMan; 3rd Sep 05 at 08:24 AM.
Reply With Quote
  #10  
Old 14th Jun 04, 07:09 PM
Junior Reviewer
 
Join Date: Jun 2004
Posts: 2
Joeychgo is on a distinguished road
Default

IM new to forums and SEO, but learning ---

one thing I noticed -- is that Keyword density and text to image ratios are shot to hell in VB because of all the VB standard words and icons that are on the page --- like post, reply. quote, user names, date, etc...

I not only have vbulletin, but also VB Advanced (a home portal page designed for VB) www.lincolnvscadillac.com
__________________
-
vBulletin FAQ -The Home for Forum Administrators

Free vBulletin Skins & Styles : vBulletin Hacks :Duplicate Content and vBulletin Forums (Article) : vBulletin Web Hosting : vBulletin SEO
Reply With Quote
Reply


LinkBacks (?)
LinkBack to this Thread: http://forum.time2dine.co.nz/seo-vbulletin/search-engine-optimize-vbulletin-98.html
Posted By For Type Date
Indian Ladies Forum | Indian Women Forum | Indian Culture-Indus Ladies This thread Refback 20th Jan 08 06:24 AM
How many SEO mods are available? This thread Refback 19th Jan 08 11:37 PM
How to SEO VBulletin? - vBulletin FAQ Forums This thread Refback 10th Jan 08 11:56 AM
Steel Blue 3.5.3 - vBulletin.org Forum This thread Refback 10th Jan 08 09:25 AM
Have you done these vBulletin SE optimizations? - vBulletin Community Forum This thread Refback 5th Jan 08 12:58 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Engine Optimize vBulletin 3.5 Discussion T2DMan SEO Discussion 54 12th Apr 07 10:08 AM
Search engine visits vBulletin Linknz SEO vBulletin 2 18th Aug 06 08:21 AM
Search Engine Optimize vBulletin 3.5 T2DMan SEO vBulletin 9 8th Sep 05 12:46 AM
Contract details for Search Engine Optimize vBulletin T2DMan SEO vBulletin 1 7th May 05 10:23 AM
Search Engine Optimizing vBulletin T2DMan SEO vBulletin 0 28th Oct 04 11:23 AM



Powered by: vBulletin Copyright ©2000 -2010, Jelsoft Enterprises Limited.
Search Engine Friendly URLs by vBSEO 3.2.0
© 2010 Time2Dine