View Full Version : Google Sitemap Creator 1.0
se.nsuo.us
01-02-2006, 10:19 AM
Just grab http://se.nsuo.us/contrib/google_sitemap.php.zip, unzip and put the file in addons directory access the sitemap using a URL similar to http://yourdomain.com/path_to_pp/index.php?z=sitemap
Note this uses the native google map xml format and not the modified RSS fomat as http://forum.pixelpost.org/showthread.php?t=2125 suggest
Tested on Pixelpost 1.5 Beta
@Devs - as a side note may be the check for $_GET['x'] should be moved to after the addons are sucked in... would have prefered x=sitemap rather than z=sitemap
Connie
01-02-2006, 11:12 AM
hej, that is a good suggestion!
Joe[y]
01-02-2006, 01:44 PM
good suggestion!
in the meantime i might change http://photos.jlspurling.com/index.php?z=sitemap into a tag so that i can include it in an x= - although... i use htacces i could hide this - but i'd rather it kept the same format. how does my mod to the file look? - i changed the urls - i was jsut wondering if google can see past urls with mod-rewrite.
se.nsuo.us
01-02-2006, 03:05 PM
Browsers do not like XML which has blank lines at the begining and Google does not like redirects in Sitemaps
Joe[y]
01-02-2006, 03:27 PM
if you're talking about the blank lines on my actual photoblog! i don't know where they're coming from or how to get rid of them. it's driving me crazy.
se.nsuo.us
01-03-2006, 03:36 AM
@Joe[y] - there are blank lines even in your sitemap xml they have to be comming from one of the files which is included in *every* other file if they are not from your index.php
Search for files which have blank lines just before <?php and these need not be at the begining of the file :)
se.nsuo.us
01-03-2006, 05:43 AM
Updated the zip file to fix an error in the date format
Joe[y]
01-03-2006, 10:01 AM
@Joe[y] - there are blank lines even in your sitemap xml they have to be comming from one of the files which is included in *every* other file if they are not from your index.php
Search for files which have blank lines just before <?php and these need not be at the begining of the file :)
hehe. i know this. but as i said - it's driving me crazy trying to find the damn file with this problem! and i know it's not even my hosts fault as pages outside of my photoblog are fine! i swear i've looked at every file... even those not included. i removed any blank lines that were after ?> but still no luck :confused:
EDIT: I found it - there were 5 blank lines at the end of the fancyarchive addon.
DikkieBurger
08-05-2006, 11:33 PM
Just installed this addon, but it's doesn't work correctly, my sitemap is only flat text, not an xml document: http://www.dikkieburger.nl/index.php?z=sitemap
But when I look the source of the sitemap page it shows a good sitemap.
se.nsuo.us
08-06-2006, 06:42 AM
so it means that your browser renders xml... whats your point?
DikkieBurger
08-06-2006, 09:25 AM
The weird thing is, when I look at your sitemap I get a xml document.
DikkieBurger
08-06-2006, 07:40 PM
Google says I have some white lines at thebeginning of my xml file, I've checked all includes and addon files but I can't find a file with white spaces before or after <?php ?>.
Florid
08-07-2006, 12:55 AM
2DikkieBurger
I found this 'lines' in 'month_calendar' addon. Сheck up all addons once again. :rolleyes: Something like this:
$cal_output .= "</table>";
$tpl = ereg_replace ("<MC_NO_IMAGE_INFO>",$mc_no_image_info,$tpl);
$tpl = ereg_replace("<MONTH_CALENDAR>",$cal_output,$tpl);
[spaces]
[spaces]
?>
... [spaces] must be deleted
And one more thing: in 'Admin mode' on your 'Options/URL:' must be something like this:
http://photoblogonline.com/
with '/' on end
RSS or 'sitemap' Not correctly works if it is not present ('/' on end of URL ) and Google says 'errors .... bla bla bla'
How can you see this 'spaces' (how mutch it)? Open yor 'sitemap URL' and save it on your local drive. Then Open this file in editor (I USE EditPad Pro) and you well see ... that yor code begin whith [spaces] or Press 'Source Code of page' in your Browser (e.g. FireFox):
[spaces]
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
<url>
<loc>http://photoblogonline.com/</loc>
<priority>1.0</priority>
</url>
See [spaces]?
reflejandome
08-08-2006, 07:05 AM
[ yes, sitemap generate spaces at the start of the document, how can i removed it ?? i not have month_calendar...thx ]
it was a problem with fancy archive ...
Vernon.Trent
08-08-2006, 08:58 AM
google sitemap services works also well with your rss link.
Florid
08-08-2006, 12:19 PM
RSS Link have 10 posts. Sitemap - much more :rolleyes:
janickg
01-12-2007, 09:17 PM
See also http://forum.pixelpost.org/showthread.php?p=41441#post41441
I've created an admin addon to extend on the Sitemap Creator addon to ping Google on updates everytime a new post is made. Doesn't require this particular plugin if one has already created a static sitemap.
Giuseppe
11-12-2007, 01:01 PM
There is a way to put (other then manually) the sitemap at root level and not in PP directory? And with another name not sitemap?
thanks
Lazlo
11-12-2007, 01:06 PM
There is a way to put (other then manually) the sitemap at root level and not in PP directory? And with another name not sitemap?
thanks
You can use .htaccess for that i've you have a Apache webserver.
Options -Indexes
RewriteEngine on
RewriteRule ^[your sitemap name].xml$ [pixelpost dir]/index.php?z=sitemap
And replace the stuff between the [].
Giuseppe
11-12-2007, 01:10 PM
Thanks Lazlo,
You can use .htaccess for that i've you have a Apache webserver.
what this mean? that the sitemap is written directly at the root level or a redirect to the root?
ciao
Lazlo
11-12-2007, 01:17 PM
It means that you access your sitemap at root, ie you go to www.yoursite.com/sitemap.xml
Then the .htaccess get's the sitemap from your PP directory and show it at www.yoursite.com/sitemap.xml
It's like an alias for a web address.
Giuseppe
11-12-2007, 01:28 PM
Thank you Lazlo,
but this, i think with proof, go against google guidelines that says to put the sitemap at the root level. Nothing to do via addons code?
excuse me and thanks
Lazlo
11-12-2007, 01:33 PM
It's Ok with google. I also use this method. Google looks for www.yoursite.com/sitemap.xml and the gets your sitemap. It doesn't see that the file actually is somewhere else because of the alias.
Giuseppe
11-12-2007, 01:43 PM
Thanks again,
now google go a step further. (my case) At the root level i have a sitemap for the site powered with wordpress, and (i see it in this moment when try to upload the sitemap) the only way with this configuration is to integrate PP sitemap with wordpress sitemap so they build a unique sitemap.xml.
ciao
Lazlo
11-12-2007, 01:54 PM
I see, how about putting your photoblog on a subdomain ie fotoblog.soveratonews.com and place your PP over there. Then you can place the sitemap in your PP directory.
But I don't know what googles opinion is about this, but I think you can just put the sitemap in soveratonews.com/fotoblog/, because that is the root of your photoblog.
Giuseppe
11-12-2007, 04:03 PM
I'm sure about this:
you could't put the sitemap at /fotoblog/ you have to put it (the sitemap) at the highest level you have access (often the root) or google after some days ban your site.
ciao
Lazlo
11-12-2007, 09:00 PM
Mm, I have my sitemap in my subdomain folder for 1.5 years now. And Google really likes my site.
Giuseppe
11-12-2007, 09:21 PM
Yes, is true, but you have content only at that level, and i don't now how google treats subdomain like subdomain.domain.com. Be sure that if you do the same with subfolder and root with sitemap in both level google ban the site.
ciao
greychops
02-28-2008, 07:16 PM
Does anyone know why the text size on certain parts of my pages would become larger when I installed the Google Sitemap generator addon?
Thanks,
Jonathan
greychops
02-28-2008, 07:22 PM
Figured it out, sorry.
I had html tags at the bottom.
hessebub
06-05-2008, 08:29 AM
Any chance to modify the script so that it lists the rewritten URLs I otherwise obtain from the "Rewrite URLs" AddOn?
Thus, modify this somehow?
<url>
<loc>".$cfgrow['siteurl']."index.php?showimage=$id</loc>
<lastmod>$datetime</lastmod>
</url>
And maybe use the tag from the Rewrite AddOn?
<IMAGE_PERMALINK_CLEAR>
But how?
Dr.Ozdi
10-22-2008, 04:18 PM
Hi all,
Iīm using this very importen addon, but my xml feed still has errors with spaces...can anybody help me where are those spaces? Not in calendar addon.
Thanks
Dr.
http://drozdi-foti.prodam-chalupu.cz/index.php?z=sitemap
Dr.Ozdi
10-27-2008, 06:26 PM
Well, I deleted everything looks like "space", all donīt using addons. My xml feed has only 2 empty rows less.... :-(
Is this part of code right or not?
";
Thanks
Dr.
mckeephoto
12-03-2008, 01:09 PM
I have installed Google Sitemap Creator and can find my sitemap at http://blog.mckeephotography.com/index.php?z=sitemap
However, to use the ping plugin, I was trying to get to http://blog.mckeephotography.com/sitemap.xml and it doesn't exist.
My pixelpost install is at the root level.
What am I doing wrong?
dakwegmo
12-06-2008, 02:46 AM
I have installed Google Sitemap Creator and can find my sitemap at http://blog.mckeephotography.com/index.php?z=sitemap
However, to use the ping plugin, I was trying to get to http://blog.mckeephotography.com/sitemap.xml and it doesn't exist.
My pixelpost install is at the root level.
What am I doing wrong?
If you haven't created the .htaccess file as lazlo mentions above, then you won't be able to access the site map using /sitemap.xml
You will need to either use the address /index.php?z=sitemap or create the .htaccess file.
gheatza
12-23-2008, 12:29 PM
Hello,
Thanks for your addon, it works perfectly for me. I modified it a bit, to integrate it with the SEO 1.7 addon ( http://www.pixelpost.org/extend/modifications/seo-pixelpost-17/ ), so it's kind of perfect at the moment :)
You guys can check it at http://www.stargazer.eu/sitemap.xml .
The links look like this :
<loc>http://www.stargazer.eu/26/your-taste</loc>
<lastmod>2008-09-07</lastmod>
</url>
−
<url>
<loc>http://www.stargazer.eu/25/ephemeral</loc>
<lastmod>2008-08-29</lastmod>
Regards,
Cezar.
bergonzzi
01-02-2009, 12:27 AM
Hey there all,
Just like hessebub was asking I was also looking to generate a sitemap with clean URLs and I managed to modify the script to make it work. I'm also using the paged_archive addon with the mod_rewrite option ON. Here's the modified script:
$query = mysql_query("SELECT id,datetime,headline FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime<='$cdate') ORDER BY datetime desc ");
while(list($id,$datetime,$headline) = mysql_fetch_row($query))
{
$image_title = pullout($headline);
$seo_title = '/'.converturl($image_title);
$datetime = strtotime($datetime);
$datetime =date("Y-m-d",$datetime);
$output .= "
<url>
<loc>".$cfgrow['siteurl']."$id$seo_title</loc>
<lastmod>$datetime</lastmod>
</url>
";
}
$output .= "<url>
<loc>".$cfgrow['siteurl']."about/</loc>
</url>
</urlset>";
header("Content-type:application/xml");
echo $mapheader.$output;
exit;
}
So basically you ad the title field to the query (headline), add it to the while cycle as well ($headline) and then convert it to SEO friendly using the same functions used in paged_archive addon:
$image_title = pullout($headline);
$seo_title = '/'.converturl($image_title);
Finally, modify the generated output to make it clean:
<loc>".$cfgrow['siteurl']."$id$seo_title</loc>
You see it working o my blog: http://www.bergspot.com/sitemap.xml
Thank you bergonzzi this is working fine. Also thanks to se.nsuo.us for this great addon.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.