ArticleMs Sitemap Generator
Hi guys,
Here is a sitemap generator for the ArticleMs CMS.He generates Google valid sitemaps based on your database structure.The sitemap is generated starting with the category structure, pages then articles.He use your ArticleMs database entries so is pretty fast.I didn´t tested it yet with a big number of categories and articles, because I don´t have them
, but give´ it a try and let me know how is it working.
Installation in your ArticleMs CMS
This is pretty simple.You just have to copy the file in your ArticleMs root directory, then call from the browser at http://www.yourdomain.com/sitemap_cron.php . One more thing. You must have write permissions on the sitemap.xml file.To accomplish this, create an empty file named sitemap.xml in your ArticleMS root installation folder(if you don´t have one already), then change the access on it to chmod 777.That will make it work.
After the sitemap is generated he can ping Google and let it know that you have some changes in your website.For me works well. You jusy need to call the url by adding the ping=1 parameter in url.Something like this:
www.yourdomain.com/sitemap_cron.php?ping=1
If you wan to make the process in an automatic way, you can set a cron and calling the script with the following command:
curl http://www.yourdomain.com/sitemap_cron.php?ping=1
Set the interval as you like.I think best is once/day.
That´s it.If you have any troubles let´me a comment.You can do it also if you like´it or have any ideas
Download the file here
Enjoy!


Thanks for this great plugin!! I am using ArticleMS for some 1+ years and looking for a script to make a sitemap for my site. Very nice and working well with my site…. Thanks again…
November 9th, 2007 | #
Thanks for sharing it, Cornel. I’ve changed your script to support generation of sitemap.xml.gz
Not being able to find your contact information, I’ll paste it here.
$file = “sitemap.xml”;
if (function_exists(”gzwrite”)) {
$file = “sitemap.xml.gz”;
$fHwnd=gzopen(”sitemap.xml.gz”,”w1″);
if ($fHwnd) {
gzwrite($fHwnd, $sXml);
fclose($fHwnd);
}
else {
die(”Unable to write the $file file. Please check if your folder is writable.”);
}
}
else {
$fHwnd=@fopen(”sitemap.xml”,”w+”);
if ($fHwnd) {
@fwrite($fHwnd, $sXml);
fclose($fHwnd);
}
else {
die(”Unable to write the sitemap.xml.gz file.Please check if your folder is writable.”);
}
}
echo “Sitemap $file was created successfuly.\n”;
//now ping google about our updated sitemap…
if($articlems->get[”ping”])
{
$pingUrl=”http://www.google.com/webmasters/sitemaps/ping?sitemap=” . urlencode($articlems->settings[”sitelocation”].$articlems->settings[”relpath”].”$file”);
$fHwnd=@fopen($pingUrl,”r”);
if($fHwnd)
{
echo (”Google pinged with success.\n”);
}
fclose($fHwnd);
}
echo ‘OK’;
November 30th, 2007 | #
Yes this is really a great script
it works fine for me too
Thanks
December 2nd, 2007 | #
Thanks for this script. I’ve recently started with articlems and anything that can help with search engines picking me up is a great tool to me. I’ve manually submitted my site map once when I just started but to have it done automatically every day is just great.
January 30th, 2008 | #
the patch for the xml.gz file gives an error…maybe i’ve done something wrong?
January 30th, 2008 | #
January 31st, 2008 | #
it works! Thanks!
but could you please tell me how to set a cron? where to add this code “curl http://www.yourdomain.com/sitemap_cron.php?ping=1″, i m sorry i knew little about php and building website
January 31st, 2008 | #
Thanks for the script! Haven’t used it yet but it seems straight forward enough. Michael, to set your cron, look in your C panel for cron jobs or something similar.
You can enter an email address as well so you know the cron is working. I will set mine to run once each friday, to do this I enter * for each of the boxes and 5 for the weekday. To know more look for cron jobs on google.
March 7th, 2008 | #
Thanks for this PHP script! Works well for me.
March 13th, 2008 | #
The Script itself worked perfect. however when i submitted my map to Google i recieved a parse error so i did a bit of research and google said that the tag was incorrect so i changed the code in the sitemap_cron.php to this:
//Google Go Url
$sXml.='’. “\n”;
to this:
to Google i recieved a parse error so i did a bit of research and google said that the tag was incorrect so i changed this:
//Google Go Url
$sXml.=’
And everything is A OK now
thanks cornelalexa
March 25th, 2008 | #
oops sorry the code didn’t format correctly
anyway i found the solution to my parse error here: https://www.google.com/webmasters/tools/docs/en/protocol.html#sitemapValidation
March 25th, 2008 | #
Thanks again for the great script…
As Google only allows 50000 pages or 10mb sitemaps files would it be possible for you to modify the script to allow for larger article directories. To include multiple sitemaps?
March 25th, 2008 | #