Problem with the GoogleSiteMaps Extension

Author Message

Sébastien Antoniotti

Monday 03 September 2007 1:43:02 am

Hi,

I have a problem with the GoogleSiteMaps Extension : I have copied the extension folder into /extension, activated it, and copied googlesitemaps.ini.append.php into the settings/siteaccess/(mypublicsiteaccess)/ folder.

Here is my googlesitemaps.ini.append.php :

#?ini charset="iso-8859-1"?

[Classes]

#set include to include objects of classes listed in Class_Filter_Array
#set exclude to exclude objects of classes listed in Class_Filter_Array
Class_Filter_Type=include

#setting array to include/exclude classes in sitemap
Class_Filter_Array[]
Class_Filter_Array[]=folder
Class_Filter_Array[]=artiste
Class_Filter_Array[]=album
Class_Filter_Array[]=chanson
Class_Filter_Array[]=actu
Class_Filter_Array[]=guitar_pro
Class_Filter_Array[]=tablature
Class_Filter_Array[]=article

[NodeSettings]
#set false to include only main node of content object in sitemap
#set true to include all nodse of content object in sitemap
Main_Node_Only=false

#<changefreq> based on depth of node
Node_Depth_ChangeFreq[]
Node_Depth_ChangeFreq[]=always
Node_Depth_ChangeFreq[]=hourly
Node_Depth_ChangeFreq[]=daily
Node_Depth_ChangeFreq[]=weekly
Node_Depth_ChangeFreq[]=monthly
Node_Depth_ChangeFreq[]=yearly
Node_Depth_ChangeFreq[]=never

#<priority> based on depth of node
Node_Depth_Priority[]
Node_Depth_Priority[]=1
Node_Depth_Priority[]=0.9
Node_Depth_Priority[]=0.8
Node_Depth_Priority[]=0.7
Node_Depth_Priority[]=0.6
Node_Depth_Priority[]=0.5
Node_Depth_Priority[]=0.4

So the sitemap is not correctly build when accessing the url : http://www.sunemu.net/index.php/fr/layout/set/googlesitemap/content/view/googlesitemaps/2 there is just a line...

I'am using a 3.8.6 version.

Thanks for your help !

eZ Publish Freelance
web : http://www.webaxis.fr

Sébastien Antoniotti

Monday 03 September 2007 2:07:05 am

I've solved a part of my problem by editing the googlesitemap.tpl, but I need to found a solution for the first line who refer the sitemap url...

eZ Publish Freelance
web : http://www.webaxis.fr

Sébastien Antoniotti

Monday 03 September 2007 3:01:53 am

Here is the part of the template that I've modified :

 <url>
    <loc>http://www.sunemu.net</loc>
    <lastmod>{currentdate()|datetime('custom', '%Y-%m-%d')}</lastmod>
    <changefreq>hourly</changefreq>
    <priority>1</priority>
   </url>  

{else}
   <url>
    <loc>{concat('http://www.sunemu.net/index.php',$node.url_alias|ezurl(no))|extlinkfix(del_layout)}</loc>
    <lastmod>{$node.object.modified|datetime('custom', '%Y-%m-%d')}</lastmod>
    <changefreq>{$changefreq[$depth]}</changefreq>
    <priority>{$priority[$depth]}</priority>
   </url>  
{/if}

It's not very clean but it works fine ;)

Now I'll configure a cron who have to ping google weekly with my sitemap.xml.

eZ Publish Freelance
web : http://www.webaxis.fr

Xavier Dutoit

Monday 03 September 2007 8:53:58 am

Hi,

Not a big fan of the priority based on how deep the node is.

Eg: the folder that contains your blog articles should have a lower priority than each post, shouldn't it ?

(thinking loud...)

http://www.sydesy.com

Sébastien Antoniotti

Monday 03 September 2007 9:12:23 am

Hi Xavier,

You're right, and I have added 2 arrays with the class identifier for key and the priority or the ChangeFrequence for value, so in my fetch I have the priority that I want for each classes ;)

eZ Publish Freelance
web : http://www.webaxis.fr

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 20 2025 04:10:05
Script start
Timing: Jan 20 2025 04:10:05
Module start 'layout'
Timing: Jan 20 2025 04:10:05
Module start 'content'
Timing: Jan 20 2025 04:10:05
Module end 'content'
Timing: Jan 20 2025 04:10:05
Script end

Main resources:

Total runtime0.0196 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.2891152.6406
Module start 'layout' 0.00530.0044 741.929739.4766
Module start 'content' 0.00970.0072 781.406397.3984
Module end 'content' 0.01690.0027 878.804738.3047
Script end 0.0196  917.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002613.3408140.0002
Check MTime0.00125.9082140.0001
Mysql Total
Database connection0.00063.206910.0006
Mysqli_queries0.003517.646730.0012
Looping result0.00000.127610.0000
Template Total0.002211.110.0022
Template load0.00094.619610.0009
Template processing0.00136.424810.0013
Override
Cache load0.00062.957710.0006
General
dbfile0.00031.322780.0000
String conversion0.00000.052340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs