Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google Duplicate Content Manager version 1.0a


FWR Media

Recommended Posts

Google Duplicate Content Manager

Version 1.0 alpha

 

What is it for?

 

Google webmaster tools is currently showing duplicate title/descriptions caused by basic oscommerce functions. This script intends to both remove the duplicates then prevent reoccurance.

The URL I want indexed ..

 

/my-great-product-c-47.html

Duplicates: -

 

/my-great-product-c-47.html?page=2&sort=2a

 

/my-great-product-c-47.html?page=3&sort=3d

 

/my-great-product-c-47.html?language=en

 

/my-great-product-c-47.html?currency=GBP

 

ad infinitum.

 

There are two modes available:

 

 

$IhaveDuplicateContent = true; Exists to remove duplicate titles and descriptions from Google by adding relevant text to the front of title/description/keywords creating a unique page.

 

 

$IhaveDuplicateContent = false; Exists to prevent duplicates occuring in the first instance.

 

NOTE: This service does not cater for duplicate links caused by the creation of duplicate cPaths by adding a category to multiple parents. This is a point for future discussion.

 

Other Settings:

 

Turn service On/Off

 

Array of $_GET variables to react to.

 

 

Installation:

 

 

Very simple to install:

 

Upload one class file.

 

Add a line to the bottom of application_top.php

 

add 1 line above the code that prints your meta in index.php (and potentially other files)

 

add 2 lines below the code that prints your meta in index.php.

 

Done.

 

Test Before You Add/Change any Files:

 

Included is a standalone test file that you can simply upload to your server .. call it directly and it will give instructions on how to test.

 

Find it here

Edited by FWR Media
Link to comment
Share on other sites

  • Replies 75
  • Created
  • Last Reply

Top Posters In This Topic

Good idea,

 

One thought though, having added relevant text to the front of title/description/keywords to create a unique page, would this not add another risk of Google detecting that the site has duplicate content as the page content itself is unchanged.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Good idea,

 

One thought though, having added relevant text to the front of title/description/keywords to create a unique page, would this not add another risk of Google detecting that the site has duplicate content as the page content itself is unchanged.

 

It's possible but no more than exists currently.

 

Ideally I would add another simple method to the class and when you print the HEADER_TITLE or equivalent.

 

It would do similar to that of the header tags. e.g.

 

Original ..

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

Replacement ..

 

<td class="pageHeading"><h1>
<?php echo $preventDuplicates->addToTitle(HEADING_TITLE); ?>
</h1></td>

Edited by FWR Media
Link to comment
Share on other sites

would this not add another risk of Google detecting that the site has duplicate content as the page content itself is unchanged.

 

but the content is different - it is either a different page of products (?page=2) or the same list but sorted differently (?sort=2a) etc so when option 1 is active ($IhaveDuplicateContent = true;) we are changing the meta title & description to make it clear to the SE that the pages are different.

Link to comment
Share on other sites

Great contribution. Something I did not even think of. My site has some great rankings for some major keywords for the main pages but noticed not much from some of the deeper pages. This should help rank them better as well. All the cat 1 pages have PR but non of the cat page 2s! So this should help huge.

 

Good job!

Link to comment
Share on other sites

Oh I also noticed that I am getting this now:

 

sort_2a | page_2 | Page Title

 

The page titles are correct but I assume the sort and the page part is not. How do I fix this and can it be placed after the page title.

 

Thanks

Jamie

Link to comment
Share on other sites

Great contribution. Something I did not even think of. My site has some great rankings for some major keywords for the main pages but noticed not much from some of the deeper pages. This should help rank them better as well. All the cat 1 pages have PR but non of the cat page 2s! So this should help huge.

 

Good job!

 

This contrib wont affect the deeper spidering of your website, it "does what it says on the tin".

 

Have you installed the dynamic sitemap contribution and Chemos XML sitemaps (for Google webmaster tools)?

Link to comment
Share on other sites

This contrib wont affect the deeper spidering of your website, it "does what it says on the tin".

 

Have you installed the dynamic sitemap contribution and Chemos XML sitemaps (for Google webmaster tools)?

 

 

Hi,

 

Yes they are getting crawled but I think they are getting hit with duplicate content, thus the not ranking very well. I have XML sitemaps installed.

 

Thanks,

Jamie

Edited by john2323
Link to comment
Share on other sites

Oh I also noticed that I am getting this now:

 

sort_2a | page_2 | Page Title

 

The page titles are correct but I assume the sort and the page part is not. How do I fix this and can it be placed after the page title.

 

Thanks

Jamie

 

 

Any suggestions on the above?

Edited by john2323
Link to comment
Share on other sites

Any suggestions on the above?

 

That is exactly what it is meant to do

Link to comment
Share on other sites

That is exactly what it is meant to do

 

Can I change it so that the sort_a and page_ are at the end? By end I mean after the title.

Edited by john2323
Link to comment
Share on other sites

Can I change it so that the sort_a and page_ are at the end? By end I mean after the title.

 

They are at the beginning because if they were at the end and you had very long titles/descriptions they would have no effect.

Link to comment
Share on other sites

They are at the beginning because if they were at the end and you had very long titles/descriptions they would have no effect.

 

Ok but thats not the question, can I move them? If so I would like to as I have short titles and would rather them be at the end. In the keyword part they can stay where they are. I would just like to move them for the title.

 

I have messed around with the code a little but nothing I do seems to change their order.

Link to comment
Share on other sites

Ok but thats not the question, can I move them? If so I would like to as I have short titles and would rather them be at the end. In the keyword part they can stay where they are. I would just like to move them for the title.

 

I have messed around with the code a little but nothing I do seems to change their order.

 

Yes you can move them, you would need to modifiy the PCRE via the performPCRE() method.

Link to comment
Share on other sites

So you would edit lets say this line correct?

 

<meta\s*name\s*=\s*"\s*description\s*"\s*content\s*=\s*"\s*@i'

 

If so I have already done this and nothing seems to change?

Link to comment
Share on other sites

So you would edit lets say this line correct?

 

<meta\s*name\s*=\s*"\s*description\s*"\s*content\s*=\s*"\s*@i'

 

If so I have already done this and nothing seems to change?

 

I may consider adding a "put it at the end" function in the next version but atm I'm focused on it working by removing and preventing duplicates.

Edited by FWR Media
Link to comment
Share on other sites

I may consider adding a "put it at the end" function in the next version but atm I'm focussed on it working by removing and preventing duplicates.

 

Well thanks anyway, I think it would be a two second job to fix for someone like you who knows how. But if you don't have the time. I will just remove it until I can get one of my freelance guys to do it.

 

Thanks anyway,

Jamie

Link to comment
Share on other sites

I think it would be a two second job to fix for someone like you who knows how. But if you don't have the time

 

I'm not here to do bespoke coding for you.

 

I may add such a function (If I get sufficient requests to do so), I may not, you'll have to wait and see.

Edited by FWR Media
Link to comment
Share on other sites

I'm not here to do bespoke coding for you.

 

I may add such a function I may not you'll have to wait and see.

 

 

It was a suggestion, and if you don't like it oh well. Not asking you to code my site. Its your contribution it was a simple request. I said thats fine and it is. I will get someone else to change it. No worries. This is a support forum correct? You will be getting questions like this.

 

Anyway I may post the fix after its been done or I may not we will have to wait and see.

Edited by john2323
Link to comment
Share on other sites

Anyway I may post the fix after its been done or I may not we will have to wait and see.

 

I'd rather you didn't post at all after this experience.

 

Are you a help vampire

 

This is a support forum correct?

 

You requested a feature, that is fine and it is noted. What you don't seem able to accept is that I am not willing to do something immediately specifically for john2323.

Edited by FWR Media
Link to comment
Share on other sites

I'd rather you didn't post at all after this experience.

 

Are you a help vampire

 

 

 

You requested a feature, that is fine and it is noted. What you don't seem able to accept is that I am not willing to do something immediately specifically for john2323.

 

 

You could have just said that from the begging? This is a support forum and I was asking for help?? I don't get the problem your having? If you don't want me to post thats fine. If I get it changed I will post another contribution then. Thats ok with me to. Just trying to help and make suggestions its weird how your getting defensive about it.

Edited by john2323
Link to comment
Share on other sites

Hi Robert,

 

Great of you to make a contribution for this, nice work :D

 

Just wanted to ask on your opinion on whether I should use this contribution or your solution in another thread (which basically flagged the tags "sort", "page", etc and put a <meta name="robots" content="noindex, follow"> tag if these tags were detected) which I was following ... and must say has been working ... but would this contribution do a better job in your opinion or should I stick to the solution you had previously?

 

 

Thanks again

Edited by sLaV-
Link to comment
Share on other sites

FWR - I think this contribution is exactly what we need and once again you have managed to resolve potential weaknesses of OSc - so thanks for all your hard work.

 

I am wondering if it would be an idea to have the option to change the names of what is being put in the header - rather than "page_2" I would like it it read "Page 2" and maybe have the option to rename the sort to a more relevant name.

 

Perhaps there is a simple way of doing this or perhaps you may think it's pointless to do, either way, it seems like a great contrib!

Link to comment
Share on other sites

FWR - I think this contribution is exactly what we need and once again you have managed to resolve potential weaknesses of OSc - so thanks for all your hard work.

 

I am wondering if it would be an idea to have the option to change the names of what is being put in the header - rather than "page_2" I would like it it read "Page 2" and maybe have the option to rename the sort to a more relevant name.

 

Perhaps there is a simple way of doing this or perhaps you may think it's pointless to do, either way, it seems like a great contrib!

 

Beautifying the tags is something I have thought about (Jan called the existing ones "butt ugly") and I may well offer some method to do this in a newer version.

 

In the mean time the following line sets the look of the title tag ..

 

$replace[]   = '<title>' . str_replace('-', ' | ', $this->addedMeta);

 

Changing it to ..

 

$replace[]   = '<title>' . str_replace(array('-', '_'), ' ', ucfirst($this->addedMeta));

 

May help you in the short term.

Edited by FWR Media
Link to comment
Share on other sites

Thanks for the quick reply - I assume this way it would remove the pipe as well which I think does clearly mark out the different sections

 

Being a quite new to php, I read the above as replacing any '-' or '_' with a ' ' - so this method does away with the pipe separator?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...