EllisLab text mark
Advanced Search
     
ExpressionEngine 2 SEO module
Posted: 07 July 2010 12:06 PM   [ Ignore ]
Avatar
Joined: 2010-01-21
141 posts

Hi all -

We’ve developed a fairly simple EE2 SEO Module that we’d like to release to the wild to get feedback on (bugs, feature requests, documentation needs, anything!).


Current Features:
1) Add title, keywords and a description for any entry via a new SEO tab.
2) Set a default title, description or keywords for entries
3) Prepend / Append text to all title tags (can be overridden with template tag)
4) Set visibility to robots via robots meta tag (noindex,nofollow vs other options)
5) Canonical meta tag to reduce duplicate content flags in search engines

Files can be downloaded via github: http://github.com/dsurgeons/ExpressionEngine-SEO (use the Download Source button on the top right).

There is some basic usage in the READ ME doc found there.

Installation:
1) Download source files
2) Add files to folder: system/expressionengine/third_party/seo
3) Install the module via the Add-ons > Modules are in your EE admin area

Let us know what you think!

Image Attachments
seotab.jpgseosettings.jpg
 
Posted: 07 July 2010 12:06 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2010-01-21
141 posts

Here is what an example header might look like. Note the use of embed tags. The header area is best utilized as a template part to be embedded within all other templates.

<!DOCTYPE html
<
html lang="en"
    <
head
        <
meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
        <
title>{embed:seo_title}</title
        
        <
meta name="description" content="{embed:seo_description}" />
        <
meta name="keywords" content="{embed:seo_keywords}" />
        
        
{exp:seo:privacy}
        
        {exp
:seo:canonical url="{embed:seo_canonical}"}
        
        
<link rel="stylesheet" href="{path='site/import'}" media="screen" type="text/css" />
    </
head


Here is how you can use the module within a specific entry. Note that we are using the module to get the specific items (title, keywords, description) for the entry, and then passing them along to the header template.

{exp:channel:entries channel="blog" status="open" limit="1"}
{embed
='site/.header' seo_title="{exp:seo:title entry_id="{entry_id}"}" seo_description="{exp:seo:description entry_id="{entry_id}"}" seo_keywords="{exp:seo:keywords entry_id="{entry_id}"}" seo_canonical="{title_permalink='blog/article'}"}
...content of page here....
{/exp:channel:entries} 


Overriding append/prepend settings within the template:

{embed='site/header' seo_title='{exp:seo:title entry_id="{entry_id}" prepend="this will be before the title tag" append="this will be after the title tag"}'
 
Posted: 09 July 2010 02:55 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2010-04-21
60 posts

Thanks for developing this for EE2! Exactly what I was looking for - seems like it covers the essential functionality needed.

Now to try it out!

 
Posted: 09 July 2010 03:28 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2010-04-21
60 posts

I am having an issue with saving the default options - e.g. setting a Default Description or the robots visibility and then saving doesn’t actually save the information. (Although the EE2 control panel pop-up still says so.) The database table exp_seo_options is empty.

Setting a SEO value for a specific entry works nicely and does save the info in the database.

Any suggestions?

 
Posted: 09 July 2010 10:21 AM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2010-01-21
141 posts

ah, yes -

There was a bug related to inserting initial values, conflicting with some default values set within the code.

I have fixed this. The only file affected is “mcp.seo.php”

You can get this new file in the Git repository.

You shouldn’t need to uninstall/reinstall the module, just replace the mcp.seo.php file.

Thanks for pointing this out!

 
Posted: 12 July 2010 08:21 AM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Joined: 2010-04-21
60 posts

Setting up everything and saving is working nicely now. Almost there…:

When trying to save individual entry SEO data, characters like “æøå” show up like “æøå” after saving - this works with the default titles/descriptions in the module settings, though.

When looking at the exp_seo_data database contents in phpmyadmin, these characters display correctly. Does this have something to do with my encoding settings?

 
Posted: 12 July 2010 10:53 AM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2010-01-21
141 posts

Interesting - very well could be.

Does your HTML specify and encoding? What encoding are the tables created by the module within your database?

 
Posted: 12 July 2010 11:05 AM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Avatar
Joined: 2006-03-20
753 posts

On an SEO side of things, should you really have default content?

 
Posted: 12 July 2010 11:26 AM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2010-01-21
141 posts

I don’t want to get into a discussion of best SEO practices, however, I do see your point!

I’ll edit the plugin to give you the option of whether you want to use the default settings or not (per field).

(Hopefully I’ll be able to do that today!)

 
Posted: 12 July 2010 11:30 AM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Avatar
Joined: 2006-03-20
753 posts

Yeah cool, it was more an observation than anything!

I’m giving it a go and it seems to work well, have you thought of adding extra metadata options such as dublin core metadata? A fair bit of that could be set as defualt such as language, rights, format, publisher etc etc.

Just a thought!

Great work!

 
Posted: 12 July 2010 01:16 PM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2010-01-21
141 posts

Thanks :D

I’ve updated the module in github.

You can now select whether or not to have the module fall back to the default values.

Note: If you replace the files without a uninstall/re-install, you may get a PHP Notice on the Module settings page until you submit the form.

Files modified:
language/english/lang.seo.php
mcp.seo.php
mod.seo.php
tab.seo.php
views/index.php

Image Attachments
updated.jpg