♥FWR Media Posted September 7, 2008 Share Posted September 7, 2008 (edited) 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 September 7, 2008 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
spooks Posted September 7, 2008 Share Posted September 7, 2008 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. Quote 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 More sharing options...
♥FWR Media Posted September 7, 2008 Author Share Posted September 7, 2008 (edited) 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 September 7, 2008 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted September 7, 2008 Share Posted September 7, 2008 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. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2008 Share Posted September 8, 2008 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! Quote Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2008 Share Posted September 8, 2008 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 Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 8, 2008 Author Share Posted September 8, 2008 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)? Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2008 Share Posted September 8, 2008 (edited) 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 September 8, 2008 by john2323 Quote Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2008 Share Posted September 8, 2008 (edited) 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 September 8, 2008 by john2323 Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 8, 2008 Author Share Posted September 8, 2008 Any suggestions on the above? That is exactly what it is meant to do Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2008 Share Posted September 8, 2008 (edited) 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 September 8, 2008 by john2323 Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 8, 2008 Author Share Posted September 8, 2008 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. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2008 Share Posted September 8, 2008 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. Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 8, 2008 Author Share Posted September 8, 2008 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. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2008 Share Posted September 8, 2008 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? Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 8, 2008 Author Share Posted September 8, 2008 (edited) 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 September 8, 2008 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2008 Share Posted September 8, 2008 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 Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 8, 2008 Author Share Posted September 8, 2008 (edited) 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 September 8, 2008 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2008 Share Posted September 8, 2008 (edited) 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 September 8, 2008 by john2323 Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 8, 2008 Author Share Posted September 8, 2008 (edited) 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 September 8, 2008 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2008 Share Posted September 8, 2008 (edited) 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 September 8, 2008 by john2323 Quote Link to comment Share on other sites More sharing options...
sLaV- Posted September 8, 2008 Share Posted September 8, 2008 (edited) 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 September 8, 2008 by sLaV- Quote Link to comment Share on other sites More sharing options...
ollyno1uk2 Posted September 8, 2008 Share Posted September 8, 2008 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! Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted September 8, 2008 Author Share Posted September 8, 2008 (edited) 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 September 8, 2008 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
ollyno1uk2 Posted September 8, 2008 Share Posted September 8, 2008 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.