Sites using the Domain Access module may require Google News Sitemap to filter the sitemap by domain. e.g. www.a.com/googlenews.xml should only contain nodes whose domain source is www.a.com.
I attached two patches (one for .module and one for .install) that accomplish this. If Domain Access is enabled, then the admin screen presents an option to "Filter by domain." Is that's set, then the module will filter the sitemaps by domain.
I made the patches based on 6.x-1.4...
; $Id: googlenews.info,v 1.1.2.1 2009/07/24 19:53:13 davereid Exp $
| Comment | File | Size | Author |
|---|---|---|---|
| googlenews.domain.module.patch | 1.83 KB | surgeonbor | |
| googlenews.domain.install.patch | 301 bytes | surgeonbor |
Comments
Comment #1
dave reidThe module uses db_rewrite_sql(), so shouldn't domain work with that method?
Comment #2
webastien commentedI'm not using D6 module, but on D5 this is the correct way:
The module use db_rewrite_query, so you can add this kind of hook_implementation:
Comment #3
surgeonbor commentedYes, you're right of course. I used hook_db_rewrite_sql() (thanks for the code, webastein) and it's working nicely. I changed the status to closed.
Comment #4
Exploratus commentedWorks great!!!!
Comment #5
mattwmc commentedSo is there a way to create a google news sitemap for each subdomain?
Comment #6
chawl commented@mattwmc, this is what the above "perfectly working" patch does.
@surgeonbor, huge tx really!
Comment #7
mattwmc commentedOk, thanks.
Don't know how I missed that, lol.
One of those days I suppose.