[SOLVED] SEO Tools and CGBlog

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Bilmartech
Forum Members
Forum Members
Posts: 50
Joined: Mon Feb 21, 2011 2:08 am

[SOLVED] SEO Tools and CGBlog

Post by Bilmartech »

I am trying to figure out a way to get the SEO Tools module to work with the CG Blog one.

The SEO module doesn't recognize any of the blogs articles at all so none of them get submitted for indexing or into the sitemap.

And since SEO Tools doesn't actually recognize the blog post, the meta description and meta title are getting pulled from the default blog page and therefore causing duplicate meta tags. So even if the pages get picked up by a crawler, the meta titles and descriptions are the same for all the blog entries and therefore really don't show any relevance to the actual post.

Any ideas or help is appreciated.
Last edited by Bilmartech on Fri Aug 19, 2011 3:41 am, edited 1 time in total.
uniqu3

Re: SEO Tools and CGBlog

Post by uniqu3 »

Regarding metatags you can try following this post http://www.i-do-this.com/blog/48/Put-yo ... -autopilot
Bilmartech
Forum Members
Forum Members
Posts: 50
Joined: Mon Feb 21, 2011 2:08 am

Re: SEO Tools and CGBlog

Post by Bilmartech »

Thanks for the fast response! That's a great article and i actually am already doing several of the suggestions in it.

Currently on my template I have this setup:

Code: Select all

{if ($blogtitle == "")}
<meta name='description' content=' {title} | {sitename}' /> 
{else} 
<meta name='description' content=' {$blogtitle} |{sitename} ' /> {/if}
{if ($blogtitle == "")}
<title>{title} | {sitename} </title> 
{else} 
<title>{$blogtitle} | {sitename}   </title> {/if}
It works absolutely fine even with SEO Tools (which I really like using honestly) the problem is with SEO Tools you also add this into the template {SEOTools} which is where the "magic" happens and then SEO Tools pulls it's info into the page as well.

Looking at your article you suggested and trying to come up with a great hybrid solution... is there away to tell the template something like this:

If this is a page on the site then... {SEOTools} else.... if it's a blog article then do some of the suggestions in the article?

This would be the best of both worlds for me at least and since SEO Tools doesn't do anything with the blog articles anyway, there's no need for the data that SEO Tools puts into the meta tags to come from that module.

I hope that makes sense...

Then the only thing left is to figure out a way for SEO Tools to pull all the blog articles into the sitemap it generates and submits to Google so those pages can be indexed.

Thanks again for the input and help...
Bilmartech
Forum Members
Forum Members
Posts: 50
Joined: Mon Feb 21, 2011 2:08 am

Re: SEO Tools and CGBlog

Post by Bilmartech »

Ok.. continuing on with my hybrid solutions....

I was able to locate the problem with the Meta title in SEO Tools... under the bug report looks like the fix is:

solved it by changing following line in action.default.php )line #82)

$meta_title = $this->getPreference('meta_title','{title} | {sitename}');

to

$meta_title = $this->getPreference('title_meta','{title} | {sitename}');


I did the above and that portion works great! on all pages including blog pages because I have the SEO Tools Meta Title set to

Code: Select all

{if isset($blogtitle)}{$blogtitle}{else}{title}{/if} | {sitename}
so now onto the Meta description issue. SEO Tools also gives you an option to auto generate a Meta Description.

HOWEVER... because SEO Tools has a section called "description block" if i remove "META Description" from that section to force it to auto generate, i get an error.

SOOOOO HERE"S MY HYBRID SOLUTION!

After you've made the necessary change above to the action.default.php file do the following:

First I had to remove the code

Code: Select all

{capture}{content block="META Description" oneline="true"}{/capture}
from the detail blog template (YES I know SEO Tools instructs you to place that code on the template).. I have left it every where else in all the other templates (May not even be needed, but I left it).. I have only removed it from the Detail Template in the Blog Module.

Second, In SEO Tools setup, I have removed the words "META Description" from the Name of page description content block: section (Keep in mind this is also something that SEO Tools tells you to put into that section BUT I removed it.)

Third, I have checked the option in SEO Tools called Automatically generate a page description where none is provided.

Fourth, in SEO Tools in the Text for auto-generated descriptions: section I have added this code:

Code: Select all

{if isset($blogtitle)}{$blogtitle}{else}{title}{/if} | {sitename} | {keywords} 
You can pretty much add anything you want at this point.. the only requirement is that the {keywords} has to be left in for SEO Tools to function properly.

Fifth, on the details template of the blog you have to add this code

Code: Select all

{assign var='blogtitle' value=$entry->title|escape}
so that the SEO Tools module picks up on the blogtitle.


And That's It!!! Everything seems to be working fine and SEO Tools is creating all the META data for all the pages including the blog pages.

I hope this helps someone else.. any feedback is appreciated and I by no means claim to be great at any of the coding here.. so if I've done something that can be improved or was unecessary - PLEASE feel free to leave a reply.. i am always open to improving!

Now to get the Social Bookmarking plugin to read the title of the blog and description instead of the default pages and I'll be golden!
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: [SOLVED] SEO Tools and CGBlog

Post by Gregor »

Thanks for your detailed description.

I installed the latest version of SEOTools2 and followed your instructions, maybe it's because your instructions are based on the previous version, I did not get CGBlog metatags. BTW, I did not look into the php-code, assuming that is fixed in the new release.

My site site is http://www.uisge-beatha.eu

From the site source:
<meta name='title' content='Logboek, overzicht van gemaakte tochten | Uisge Beatha - mijn zeilboot, een Hanse 311' />
<meta name='description' content='Logboek, overzicht van gemaakte tochten | Uisge Beatha - mijn zeilboot, een Hanse 311 | and ' />
<meta name='keywords' content='' />
The keywords are empty. I also noticed that the meta tags defined inside Global Settings not show up. But maybe this is more general.

Any ideas?

Gregor
Bilmartech
Forum Members
Forum Members
Posts: 50
Joined: Mon Feb 21, 2011 2:08 am

Re: [SOLVED] SEO Tools and CGBlog

Post by Bilmartech »

Honestly.. SEO Tools 2 is designed for CMSMS 1.10+ and since that platform is significantly different than 1.9.4.3 "Faanui" which is what I am using and did the edits to SEO Tools for..

I wouldn't even know if these changes would have anything to do with you version or not?

I think the general concepts would be the same though to give you some direction in where to look and try to experiment.
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: [SOLVED] SEO Tools and CGBlog

Post by fearmydesign »

Thanks for the info on this thread and hopefully you can help me figure something out... I tried using this code on my CGBlog detail template so that i do not get 'Duplicate Meta Errors' by Google - which is the code posted above, but its not working.... am I missing a step on this? Thanks

Code: Select all

{if ($blogtitle == "")}
<meta name='description' content=' {title} | {sitename}' /> 
{else} 
<meta name='description' content=' {$blogtitle} |{sitename} ' /> {/if}
{if ($blogtitle == "")}
<title>{title} | {sitename} </title> 
{else} 
<title>{$blogtitle} | {sitename}   </title> {/if}
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: SEO Tools and CGBlog

Post by fearmydesign »

uniqu3 wrote:Regarding metatags you can try following this post http://www.i-do-this.com/blog/48/Put-yo ... -autopilot
Thank you, this worked perfect!
Bilmartech
Forum Members
Forum Members
Posts: 50
Joined: Mon Feb 21, 2011 2:08 am

Re: [SOLVED] SEO Tools and CGBlog

Post by Bilmartech »

fearmydesign wrote:Thanks for the info on this thread and hopefully you can help me figure something out... I tried using this code on my CGBlog detail template so that i do not get 'Duplicate Meta Errors' by Google - which is the code posted above, but its not working.... am I missing a step on this? Thanks

Code: Select all

{if ($blogtitle == "")}
<meta name='description' content=' {title} | {sitename}' /> 
{else} 
<meta name='description' content=' {$blogtitle} |{sitename} ' /> {/if}
{if ($blogtitle == "")}
<title>{title} | {sitename} </title> 
{else} 
<title>{$blogtitle} | {sitename}   </title> {/if}
That is just one part of the process above. If you have only done this portion, then you need to do the other steps to integrate the SEOTools into the blog articles to remove the Duplicate tags.
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: [SOLVED] SEO Tools and CGBlog

Post by fearmydesign »

Bilmartech wrote:
fearmydesign wrote:Thanks for the info on this thread and hopefully you can help me figure something out... I tried using this code on my CGBlog detail template so that i do not get 'Duplicate Meta Errors' by Google - which is the code posted above, but its not working.... am I missing a step on this? Thanks

Code: Select all

{if ($blogtitle == "")}
<meta name='description' content=' {title} | {sitename}' /> 
{else} 
<meta name='description' content=' {$blogtitle} |{sitename} ' /> {/if}
{if ($blogtitle == "")}
<title>{title} | {sitename} </title> 
{else} 
<title>{$blogtitle} | {sitename}   </title> {/if}
That is just one part of the process above. If you have only done this portion, then you need to do the other steps to integrate the SEOTools into the blog articles to remove the Duplicate tags.
Thank you, missed that..!
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: SEO Tools and CGBlog

Post by fearmydesign »

fearmydesign wrote:
uniqu3 wrote:Regarding metatags you can try following this post http://www.i-do-this.com/blog/48/Put-yo ... -autopilot
Thank you, this worked perfect!
... I just realized that the only thing 'NOT' working with this are the keywords metatag... any ideas? This is what I have for the keywords but it keeps pulling the same 3 keywords for every single article under News or CGblog modules, all the other automated metatags are working perfect... I don't understand.

Code: Select all

<meta name="keywords" content="{search action='keywords' count='10'}" />
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: [SOLVED] SEO Tools and CGBlog

Post by Gregor »

I decided to start using MetaMax. That does do the trick. Have search at the Forum for MetaMax.

Gregor
Post Reply

Return to “Modules/Add-Ons”