Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 01:10 pm EDT

Geeklog Forums

Sitemap.plugin files every update timing


Status: offline

ivy

Forum User
Full Member
Registered: 11/25/04
Posts: 314
Location:Tokyo Japan
I want to change sitemap files freequency.
Now only configuration is changed..

execute XMLSITEMAP_changeFile() by cron or content edit timing.
What should I do?
Geeklog Japan https://www.geeklog.jp
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
It should change as the xmlsitemap plugin does contain the function

plugin_configchange_xmlsitemap

which will update the sitemap file on any configuration change.

Can the webserver write to the sitemap file?

One of the Geeklog Core Developers.
 Quote

Status: offline

ivy

Forum User
Full Member
Registered: 11/25/04
Posts: 314
Location:Tokyo Japan
Can the webserver write to the sitemap file?


Yes.
But I should save configuration manually.

Can I write sitemap.xml by using CRON everyday?
Geeklog Japan https://www.geeklog.jp
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
I am not sure I understand why you want to update the sitemap everyday as it should update whenever there are any new items or changes.

If you do want to run the cron job then have it execute the function

Text Formatted Code
XMLSMAP_update();


which is found in the xmlsitemap functions.inc file. This will update the sitemap file for all plugins.
One of the Geeklog Core Developers.
 Quote

Status: offline

ivy

Forum User
Full Member
Registered: 11/25/04
Posts: 314
Location:Tokyo Japan
Thanks!

I am not sure I understand why you want to update the sitemap everyday as it should update whenever there are any new items or changes.


I want to execute XMLSMAP_update() everytime editing staticpages, story, and so on.
But each plugin does not excute XMLSMAP_update(), so Geeklog CRON execute.

Geeklog Japan https://www.geeklog.jp
 Quote

Status: offline

ivy

Forum User
Full Member
Registered: 11/25/04
Posts: 314
Location:Tokyo Japan
xmlsitemap/functions.inc

add this functions?

Text Formatted Code

/**
* callback function for the pseudo cron job
*/
function plugin_runScheduledTask_xmlsitemap() {
        XMLSMAP_update();
}
 

Geeklog Japan https://www.geeklog.jp
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
Thanks Ivy
One of the Geeklog Core Developers.
 Quote

Status: offline

ivy

Forum User
Full Member
Registered: 11/25/04
Posts: 314
Location:Tokyo Japan
This function does not work. sorry.
Could you please debug?
Geeklog Japan https://www.geeklog.jp
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
Why do you want to run the xmlsitemap on a cron job? There is no need as it will update with any config change or any edit you do to an article etc...


XMLSMAP_update();

is run when the xmlsitemap config is changed and when I look at the file dates it updates fine after I change the xmlsitemap config from the Geeklog configuration.

Tom

One of the Geeklog Core Developers.
 Quote

Status: offline

ivy

Forum User
Full Member
Registered: 11/25/04
Posts: 314
Location:Tokyo Japan
Why do you want to run the xmlsitemap on a cron job? There is no need as it will update with any config change or any edit you do to an article etc...


not updated by editing dataBox, Story content.

XMLSMAP_update();

is run when the xmlsitemap config is changed and when I look at the file dates it updates fine after I change the xmlsitemap config from the Geeklog configuration.


only xmlsitemap config is changed.

Geeklog Japan https://www.geeklog.jp
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
So if you change the update frequency in the config your sitemap.xml file doesn't get updated and change right away?

When does it the sitemap update? When you add or delete a story?

As I said before the config runs

Text Formatted Code
XMLSMAP_update();


when a xmlsitemap config option changes.

When an item is saved like a story, the function

Text Formatted Code
plugin_itemsaved_xmlsitemap


is run and then for example for stories

Text Formatted Code
XMLSMAP_update('story')


is run.

The plugin needs to support plugin_getiteminfo_xxx before the xmlsitemap plugin will update the sitemap with its information.

I think something else must be going on with your install.

Is this just a databox issue?
One of the Geeklog Core Developers.
 Quote

Status: offline

ivy

Forum User
Full Member
Registered: 11/25/04
Posts: 314
Location:Tokyo Japan
plugin_getiteminfo_xxx
I see.
It is databox issue.
thanks!

Geeklog Japan https://www.geeklog.jp
 Quote

All times are EDT. The time is now 01:10 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content