Google News Sitemap Generator

OUTDATED! : this is an old version of the Google News Sitemap Generator component. Please update your bookmarks and refer to the newer version of the script.

1. INTRODUCTION
2. CREDITS & LICENCE
3. DOWNLOADS
4. CONTENTS
5. REQUISITES
6. INSTALLATION
7. UNINSTALL

INTRODUCTION (CHAPTER 1)

This script is used to generate a sitemap specific for Google News and is generated following the directives specified from Google itself at

http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=42738

This script is intented to be used just in Joomla installation and requires the OpenSef plugin to be installed.

CREDITS & LICENCE (CHAPTER 2)

This script is released under the terms of the GNU GPL v3 (General Public Licence) which you can find browsing the link below

http://www.gnu.org/copyleft/gpl.html

Original author is Andrea Olivato

Author Website: http://blog.andreaolivato.net
Author Email: embrace.lenar [AT] gmail.com

Project Homepage: http://blog.andreaolivato.net/software/google-news-sitemap-generator/

DOWNLOADS (CHAPTER 3)

OUTDATED! : this is an old version of the Google News Sitemap Generator component. Please update your bookmarks and refer to the newer version of the script.

Download the archives from the following links, according to your version of Joomla and your O.S.

[Download id not defined] [Download id not defined] [Download id not defined] [Download id not defined]

CONTENTS (CHAPTER 4)

The archive you downloaded needs to contain following files:

- googlenews_sitemap.php – Script file, you do not usually need to edit this one. You have to submit this file to google as Sitemap. EX: http://yourdomain.com/googlenews.php
- config_googlenews_sitemap.php – Configuration file. You have to set this up before running your sitemap.
- README – Explanation File

REQUISITES (CHAPTER 5)

To run successfully this script you need to have installed and well configured:

- Joomla CMS (every version compatible with OpenSef should work fine)
- OpenSef extension for Joomla
- The script need to be located on the root directory of your Joomla installation , at the same level of the configuration.php file

INSTALLATION (CHAPTER 6)

Please follow these simple steps to install successful your local copy of Joomla GoogleNews Sitemap Generator

6.1 – Files Upload

Upload the two .php files contained in the archive to your joomla installation directory. The two files has to be at the same level of the configuration.php file.
Note that if you upload the script in the wrong directory this script will not work.
Files to Upload:
- googlenews_sitemap.php
- config_googlenews_sitemap.php

6.2 – Configuration

After you uploaded the two files edit the one called
config_googlenews_sitemap.php
and set it up modifying the two variables
-$keywords
-$your_site_root
with yor values. For the keyword list that google accepts please follow this link
http://www.google.com/support/webmasters/bin/answer.py?answer=42993

6.3 – Check it

After you configured it visit the page
googlenews_sitemap.php
from yor favourite browser.
For example: http://yourdomain.com/googlenews_sitemap.php
If you see a lot of urls it works! Submit your new map as usual and you are done

UNINSTALL (CHAPTER 7)

If you do not want Google to crawl your sitemap anymore you can not simply delete the sitemap from google webmaster tool. Open your ftp manager and delete the
googlenews_sitemap.php
file. Optionally keep the file named
config_googlenews_sitemap.php
on your server so that if you want to re-add the sitemap later you still have your configuration done.

OUTDATED! : this is an old version of the Google News Sitemap Generator component. Please update your bookmarks and refer to the newer version of the script.
  • Hello everyone. Because so many of you requested a new version I started working on it. You can already download an initial and working version on the new project page. Please refer to that new page for further updates and for support questions.

    http://blog.andreaolivato.net/software/gnsg-goo...

    Thanks everyone who supported my decision to keep developing the plugin, I really hope this new work could help you.
  • Cannot open the ZIP, there is a forbidden folder name
  • robert
    Is there a way we can add the Article Title? as it is also part of the Google news sitemap requirements
  • Dear Andrea,
    how are you? - hopefully all is fine. Today I have seen, that Google was changing the news script. Old <news:news> New: <n:news> and so for all. All information are available at http://www.google.com/support/news_pub/bin/answ...

    code:
    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
    xmlns:n="http://www.google.com/schemas/sitemap-news/0.9">
    <url>
    <loc>http://www.example.org/business/article55.html</loc>
    <n:news>
    <n:publication>
    <n:name>The Example Times</n:name>
    <n:language>en</n:language>
    </n:publication>
    <n:access>subscription</n:access>
    <n:genres>pressrelease, blog</n:genres>
    <n:publication_date>2008-12-23</n:publication_date>
    <n:title>Companies A, B in Merger Talks</n:title>
    <n:keywords>business, merger, acquisition, A, B</n:keywords>
    <n:stock_tickers>NASDAQ:A, NASDAQ:B</n:stock_tickers>
    </n:news>
    </url>
    </urlset>

    You know I'm using sh404SEF and I was changing the code but I have one question: what is the variable for the line <n:title>.......</n:title> like <n:publication_date>'.$data_nuova.'</n:publication_date>.

    I have no idea and I dont speak italian to find out what the variable inside <n:title>??????</n:title>

    Have you a hint what I have to write between this tag?

    It would be very nie to hear from you and of course I wish you a perfect day.

    Best greetings Gerd from Munich
  • Hi,

    I try to use your script to my site : http://www.piridion.com (Joomla 1.5.x, core SEF)
    But unfortunately it doesn't work for the moment.
    In googlenews_sitemap.php, the while(...) loop is not executed because the SELECT... command returns 0 results.
    In the SELECT commande, index.php?option=com_content&view=category&layout=blog&id=xx returns a 404 error when i try to use it on my browser after my domain name. Maybe it's cam from here?

    Thank you for your help
  • christingeorge
    Hello Andrea,

    I executed your script at ,

    httP://www.f1passionates.com/googlenews_site.php

    But I am not getting the formatted O/P. I think I am getting the URL + Tags Echo's just like that, It is not coming in the Format, that it is supposed to come , ( I Checked the googlenews_sitemap.php file
  • Hi andrea,
    I am still waiting for the Artio solution. Did you realize it or not?
    thanks
    renzo (italy)
  • Berprado hi,
    The sitemap is accepted from google news for a while. I don't know why, but every link in sitemap is duplicated after the changes i've made (maybe awrong loop). If you want send an email at tymbos [ at ] gmail [ dot ] com for more info.
    Still waiting for Andreas solution.
    Maybe an include of the core route.php, help.
  • berprado
    tymbos could you please help me with the array, $sectionid an all that stuff
    thanks in advance
  • hi again and thanks for your reply.
    I 've got a temporary solution with a modification to your script.
    I put a $sectionid and a array to your script and for now is accepted by google news. Hard work for someone without knowledge of php!
    I'm waiting for your solution.
    Thanks again!
  • bercho
    I have the same issu as tymbos
    The result of the map is http://www.mysite.com/category/article but the right is http://www.mysite.com/section/category/article. google news is indexing but finds nothing
    please please help anyone?
  • Hi Andrea,
    I am so happy that someone in the Joomla community has developed a google news sitemap. I uploaded the files and did the configurations but I got this error message.
    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'folmag'@'localhost' (using password: NO) in /home/folmag/public_html/googlenews_sitemap.php on line 24
    Error connecting to Database Server : Access denied for user 'folmag'@'localhost' (using password: NO)

    What should I do? I followed all of your instructions 5 times and it still won't connect. Your help would be very appreciated.

    Thanks,
    Robin
  • Hi Robin,

    this is very strange, it seems like it can not import correctly the settings from your joomla configuration... Can you please tell me what version of Joomla you-re using and what version of my script you downloaded?
  • Hi Andrea,
    Thanks for getting back to me. I am using Joomla 1.5.10. And I downloaded this file googlenews_sitemap_1.5.x_mod_sh404.zip. I uploaded the file in this directory /public_html/1510update/googlenewssitemap/. Then I extracted the file in my cpanel. After that I moved the config_googlenews_sitemap.php and googlenews_sitemap.php to the /public_html directory. Then I configured the config_googlenews_sitemap.php file. I added keywords separated by the commas. Then I inserted the site root. I tried http://isavesmart.com and /home/folmag/public_html. I even placed the database name, password and database user in the config file. But still did not work.
    Any ideas?? I have been looking for a google news site map for a while. I am delighted to find you.
    Sincerely,
    Robin
  • Andrea hi,
    I use your script for core in j1.5.10 with
    php5.1.2 and mysql5.0.22-Debian_0ubuntu6.06.11-log
    but i have a problem with links.
    The result is http://www.mysite.com/category/article but the right is http://www.mysite.com/section/category/article.
    Any idea what went wrong?
    I put a /section1/ in your script but i lost the other sections.
    Please reply.
    Thanks in advance!
  • Hi I don't have a quick solution I need to install a copy of joomla and run some tests. It will take me a while I'll get back to you asap...
  • Hi Andrea,
    Thank you so much, this works like a charm !
    You are the best :o)
  • Hi Koxi, sorry if it took me so long to realize that but I have been very busy... Anyway I believe I managed to realize what you need. Could you please try this version? It should limit your sitemap to three days old posts.

    http://blog.andreaolivato.net/downloadsgooglenews...
  • koxi
    Hi Andrea,
    This is very nice, thank you
  • Hi koxi I don't have a Joomla installation at hand right now so I can not see which tables and fields I have to use to search for newer articles.

    I'll try that as soon as possible and will get back to you immediatly
  • Hi Andrea,

    Thanks for this great tool.
    You version for Joomla 1.0 + sh404 works fine.

    The only thing you forgot about Google News requirements is that they request to add only URLs published in the last 3 days. Your tool adds all the website URLs.

    Is there a way to edit the code to make it fit Google standard ?
  • Hi koxi I don't have a Joomla installation at hand right now so I can not see which tables and fields I have to use to search for newest articles.

    I'll try that as soon as possible and will get back to you immediatly
  • Guest
    Hi Andrea,

    There are about four of us using Joomla and are sources for Google News in English and would love to use this component but have been unable to get it working.


    Can you contact me at www.expathos.com? We are willing to spend some money and hire you to get it running for us.

    Best

    Richard
  • Guest
    Core script and core site- using 1.57 core SEO.
  • Guest
    Core.
  • Which script are you using and with which SEF component? OpenSef Sh404 or the core one?
  • Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/home/XXX/XXX/XXX/public_html/googlenews_sitemap.php on line 71

    Setting Value

    PHP Built on: FreeBSD 6.2-STABLE-200708 FreeBSD 6.2-STABLE-200708 amd64
    Database Version: 4.1.22-log
    Database Collation: utf8_general_ci
    PHP Version: 5.2.6
    Web Server: Apache/1.3.41 (Unix) PHP/5.2.6 mod_ssl/2.8.31 OpenSSL/0.9.7e-p1
    Web Server to PHP interface: apache
    Joomla! Version: Joomla! 1.5.7 Production/Stable [ Wovusani ] 9
  • it's ok thanks very much
    best regards.
  • You can add it manually easily... I can not make the modify as I'm not sure how to check if you activated the suffix or not. While I try to realize it try this:

    1. Open your googlenews_sitemap.php with your favourite text editor
    2. Find the 78th line
    3. Just before the tag add


    .html


    you should obtain something like that

    '.$your_site_root.'/'.$risultati_della_ricerca['cat'].'/'.$risultati_della_ricerca['id'].'-'.$risultati_della_ricerca['cont'].'.html< /loc>
  • hello andrea ! thanks a lot for your work google accepted the sitemap.
    script is working fine except for one thing that i am using sef options with the url suffix. but the script not showing the url suffix.
    if you may fix that ,i am glad
    thanks
  • Hello Haber,

    that was easier then I tought

    http://blog.andreaolivato.net/downloadsgooglene...

    In the config file you will also find a configurable parameter to choice if you want to insert all the post or just the post younger then 3 days as you asked. Default value is to shot just 3 days old articles.

    Let me know if it works fine for you.

    Have a nice day
  • i have already living in this site and it's my last a couple of days in this site :P
    ok thanks regards !
  • Ok, i'll try to realize that asap...recheck this page in a couple of days...
  • hi andrea thanks for your quick answer.
    i am using joomla 1.5.8 .if possible i need default url rewirte because of my indexed pages in google and limited to last three days articles version of script.
  • Hello Haber,

    1. I'm sorry but this script only works with OpenSef or Sh404 sef enabled. I never tried realizing a version working with default url rewrite engine but I believe it can be possible. If you need it I may try to realize that modifyng the script a bit. Just let me know what version of Joomla you're using...

    2. No, it takes every article from your database, but it adds the creation date, so I believe google delete them automatically. In any case I can easily limit it to three days it's not difficult.

    Just let me know if you need me to work on it ...
  • hi andrea ,
    1. can we use this script without any sef component, with standart sef features of joomla .htaccess or that verison of your script is avaible
    2. google says http://www.google.com/support/webmasters/bin/an... here. ( Keep in mind that you should only add articles published in the last three days, and these articles will expire after 30 days.
    does the script publish only last three days articles.
    thanks regards.
  • Hi praneko, happy new year to you too...

    I'm sorry but my script work only with OpenSef or Sh404.... if you want I can try to realize a mod for Artio JoomSef but I need a few days to do so...
  • praneko
    Happy new years andrea

    I used ARTIO JoomSEF with Joomla 1.5.8 , i got error as following :

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/chroot/tokomuslimah/web/googlenews_sitemap.php on line 49

    I have put 2 php files at root web
    Please advise..

    thanks
  • Hello Haber,

    sorry for the late but I was on holidays. This is the sh404 version for 1.5

    http://blog.andreaolivato.net/downloadsgooglene...

    Does it work fine for you? If you got any problem please let me know what fails exactly so that I can help you!
  • hi andrea ,, is this script avaible for joomla sdtandar t .htaccess file without sh404 or available a standart .htaccess version thanks regards
  • hi andrea , i am using joomla 1.5.8 and sh404 but i couldn't run the script with sh404 i am waiting for sh404 version of this script. because i tried to install opensef but i couldn't install it to my site.this script is very useful and i want thank you for your work.
  • hi download links are broken
  • Hi Gerd!

    Thanks a lot for everything: thanks about testing, about keeping me informed and obviously about the wishes.

    I'm glad that everything worked fine for you, I'll release the sh404 version separately from the opensef one.

    I whish you a great Christmas!
  • Dear Andrea,
    The sitempa script for 404sef works correct. After a couple of days, Google accept now the sitemap without any error or warning message. Congratulation - its perfect.

    Thank you very much for your work and your help. You can offer it now to joomla users with 404sef component.

    I wish you a Merry Christmas and a happy new year.

    Gerd from Munich
  • Are you sure you set up the config file correctly? Have you got the right version of Joomla / OpenSef?
  • Me da el error:

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/---------/public_html/googlenews_sitemap.php on line 48
blog comments powered by Disqus