Improved Meta Keywords and Description Tags

Started by rsw686, September 05, 2007, 10:53:00 AM

Previous topic - Next topic

rsw686

I got this idea from JeepForum.com, which uses vBulletin. From a few sites I looked at it seems that this is vBulletin's standard way of generating meta tags. Take a look at page 3 of JeepForum's google site index.

http://www.google.com/search?q=site:jeepforum.com&hl=en&safe=off&client=firefox-a&channel=s&rls=org.mozilla:en-US:official&hs=A0v&start=20&sa=N

Notice that the topic subject, board name, and forum name are shown. Now look at the site index for an SMF forum. SMF uses the page title for the description, which lacks descriptive information for somebody viewing search engine results.

Heres how to do the same in SMF. I have made these modifications to my SMF forum, link in signature. Its so simple to do I wonder why something like this wasn't done in the beginning.

Be aware that this will affect your page ranking, this didn't bother me as my site is only two weeks old.

I'm hoping that this sort of feature could be included by default, or by a check box in SMF 2.0. It just seems useful to have more descriptive meta tags.

Sources\MessageIndex.php

// 'Print' the header and board info.
$context['page_title'] = strip_tags($board_info['name']) . ' - ' . $context['forum_name'];
$context['meta_description'] = $board_info['description'];
$context['meta_keywords'] = $board_info['name'];


Sources\Display.php

// Censor the title...
censorText($topicinfo['subject']);
$context['page_title'] = $topicinfo['subject'] . ' - '. $context['forum_name'];
$context['meta_description'] = $topicinfo['subject'] . ' ' . $board_info['name'];
$context['meta_keywords'] = $topicinfo['subject'];


Themes\default\index.template.php

<meta name="keywords" content="', !empty($context['meta_keywords']) ? $context['meta_keywords'] . ', ' : '', 'PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<meta name="description" content="', empty($context['meta_description']) ? 'A Simple Machines powered discussion forum.' : $context['meta_description'], '" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="noindex" />', '


On the board index you have

Title: Forum Name - Index
Keywords: hard coded in template
Description: hard coded in template

On the message index you have

Title: Board Name - Forum Name
Keywords: Board Name, keywords hard coded in template
Description: Board Description

On the message display you have

Title: Topic Subject - Forum Name
Keywords: Topic Subject, keywords hard coded in template
Description: Topic Subject Board Name
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

rsw686

Nobody has any thoughts on this? I've just know that when I do a google site search for simplemachines.org  (site:simplemachines.org) all the results say

"Welcome, Guest. Please login or register. Did you miss your activation email? 1 Hour, 1 Day, 1 Week, 1 Month, Forever. Login with username, password and ..."

From that description I wouldn't waste my time clicking on the link. Or is search engine ranking not an SMF priority? I know its only been one day so I'll wait it out a few and see if there are any responses.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Coldfx

Quote from: rsw686 on September 06, 2007, 02:48:10 PM
Nobody has any thoughts on this? I've just know that when I do a google site search for simplemachines.org  (site:simplemachines.org) all the results say

"Welcome, Guest. Please login or register. Did you miss your activation email? 1 Hour, 1 Day, 1 Week, 1 Month, Forever. Login with username, password and ..."

From that description I wouldn't waste my time clicking on the link. Or is search engine ranking not an SMF priority? I know its only been one day so I'll wait it out a few and see if there are any responses.

For one:

http://custom.simplemachines.org/mods/index.php?mod=761

For two:

http://custom.simplemachines.org/mods/index.php?mod=518



The second one has basically no support and is a quite buggy (Even on a test board w/o mods).  The first one sticks with a standard set of META tags.  Karl will be making the first one generate new tags per each page soon enough, once 2.0 is out, public.

rsw686

#3
I checked out the first one and it is just static meta tags. I'm not exactly sure why you are showing me other mods when I have already provided the code to make this happen. The code I provided gives you dynamic meta tags based on the page.

Anyway I'll probably package it into a mod and submit it. I was just hoping something like this would become default in 2.0 considering how lacking the current meta solution is.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

karlbenson

Indeed I will be making them the meta change when I re-write it for 2.0

However these days Meta data is a waste of time for 99% of search engines which ignore it.

rsw686

First off let me say I'm glad to see this will be addressed in 2.0  :)

Quote from: karlbenson on September 11, 2007, 02:15:35 PM
However these days Meta data is a waste of time for 99% of search engines which ignore it.

I disagree with this. Notice the description of the smf forum on google. Every entry's description has the first text appearing on the page "Welcome, Guest. Please login or register." since the description tag matches the title. Now google a site with description tags that are unique, notice they are the first thing google shows. Good meta tags are still important today.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

karlbenson

Sorry, I don't know whether my post was confusing or you misread it.

What I meant was, I intend to update my easyeditmetadata mod for use on the new version of smf.

As far as I can see in the beta of 2.0, it seems to be same as it is at the moment, changing to show the board title/topic title in the description.

Also note: It will not affect Google PageRank since that is mainly determined by 'backlinks'.

jwalters

Thanks for posting this rsw686.  I have recently set up a sitemap for forum and was disappointed in the low quality of the description for the pages that google was indexing (slowly, but getting there).  Basically as described - the login text over and over again for every page.

Since search engines are so important these days for generating site traffic, I would hope that the smf developers would make better description support part of 2.0 - if not in RC or initial release, then in 2.1.

Meanwhile I may try your suggestion for a code change to produce dynamic description meta data and see how that works.

Static key word meta data is probably OK - but a facility to have keywords at the board level would be nice - but the board description can serve this purpose.

And, as stated before it can be seen by simple experiment that Google does not ignore description meta data.  Once can easily find sites that use the description meta data and get it displayed.  Try "site:simplemachines.org" at Google and look through the results.

Is this happening at hxxp:simplemchines.org [nonactive] because smf 2.0 changed the way this works or because a mod was installed to do it for this site only?

karlbenson

as far as I'm aware, there is no difference in meta data between 1.x.x series and 2.x series

rsw686

Quote from: jwalters on September 26, 2007, 05:35:12 PM
And, as stated before it can be seen by simple experiment that Google does not ignore description meta data.  Once can easily find sites that use the description meta data and get it displayed.  Try "site:simplemachines.org" at Google and look through the results.

Is this happening at simplemchines.org because smf 2.0 changed the way this works or because a mod was installed to do it for this site only?

site:simplemachines.org shows welcome, guest for me on google as well. Do a site search for a vbulletin forum, jeepforum.com is one example, and you will see a major difference. I checked out the description and keywords on a vbulletin forum and made the above code do the same.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

青山 素子

While the meta description tag might be used for the "preview" test, it isn't used for any kind of ranking at all.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Dannii

site:whatever.com is not a search! It's a listing! Without keywords the page excerpt is just whatever comes first in the page. A proper search with have keywords, and the excerpt will be far more relevant.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

jwalters

Thanks eldʌka.  Good observation, the "site:" search is not typical of the results from a keyword search.  It is more representative to search for "site:xxxxx.yyy key1 ...". 

That shows the pages Google has indexed and the results based on keywords.  They look a lot better - as you said a real search will highlight the search terms on the page.

Of course where they show up (if at all) in a Google search without the site tag is dependent on the search engine's ranking of the pages.


kapild

Quote from: rsw686 on September 05, 2007, 10:53:00 AM


Sources\MessageIndex.php

Sources\Display.php

Themes\default\index.template.php


I like you suggestion!! Actually i have just started a forum(1 week) using smf. I read almost everything on the doc site of smf then i tried to modify the default theme by using package manager. It copies only essential files. So if i would like to implement your idea, its ok of index.template.php file but for other two files what shoult i do as i don't want to touch the default theme directory. Should i copy other two files (MessageIndex.php and Display.php) in my modified theme directory where my new index.template.php file is there and there i can modify all three file. As if i modify the default theme directory files, i will have to do it again whenever i update to a new version.

Thanks!!

rsw686

#14
Actually the other two files you need to edit are in the sources folder, not the themes folder.

When 1.1.4 just came out it was a patch that you applied through the package manager so you don't loose existing edits to files. Only the lines of code changed for 1.1.4 were changed.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

kapild

Thanks !!
actually i have already updated to 1.1.4.
Should i update/modify the two file available in Sources directory now. 

Shonick

#16
Thanks rsw686  a lots

Can you do this?

Title: Topic Subject - Forum Name
Keywords: Topic Subject, keywords hard coded in template
Description: Part of the first post of the topic 

Paracelsus

Hi.

After I tried your modifications rsw686, my forum's custom theme got somewhat corrupted and now there are images missing, and I can't even change the theme to the default one... it's as if it was stuck with a small part of the custom theme.

Tried undoing the changes, but it doesn't work either... ideas ???

rsw686

I don't see how that could happen. You must have made a mistake when editing the files. All the modifications do is add extra values to the global array and then print them out on the index page. Always make a backup before modifying files.

What version are you using and do you have mods installed? If not mods are installed download the full install, extract the MessageIndex.php and Display.php source files and replace them on your site.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Paracelsus

Ok rsw686, I just noticed it was my mistake... I have uploaded a different index.template.php... dumb me ::)

In a few hours, I'll be able to get back the "original" index.template and then I will try your suggestion again and come back to leave some feedback ;)

Advertisement: