Posted on: 05/27/18 03:22am
By: ivy
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?
Re: Sitemap.plugin files every update timing
Posted on: 05/27/18 10:06am
By: Laugh
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?
Re: Sitemap.plugin files every update timing
Posted on: 05/27/18 08:41pm
By: ivy
Can the webserver write to the sitemap file?
Yes.
But I should save configuration manually.
Can I write sitemap.xml by using CRON everyday?
Re: Sitemap.plugin files every update timing
Posted on: 05/28/18 07:11am
By: Laugh
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.
Re: Sitemap.plugin files every update timing
Posted on: 05/28/18 07:19am
By: ivy
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.
Re: Sitemap.plugin files every update timing
Posted on: 05/28/18 08:18am
By: ivy
xmlsitemap/functions.inc
add this functions?
Text Formatted Code
/**
* callback function for the pseudo cron job
*/
function plugin_runScheduledTask_xmlsitemap() {
XMLSMAP_update();
}
Re: Sitemap.plugin files every update timing
Posted on: 05/28/18 11:05am
By: Laugh
Thanks Ivy
Re: Sitemap.plugin files every update timing
Posted on: 05/29/18 08:11am
By: ivy
This function does not work. sorry.
Could you please debug?
Re: Sitemap.plugin files every update timing
Posted on: 05/29/18 09:09am
By: Laugh
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
Re: Sitemap.plugin files every update timing
Posted on: 05/30/18 03:07am
By: ivy
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.
Re: Sitemap.plugin files every update timing
Posted on: 05/30/18 07:24am
By: Laugh
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?
Re: Sitemap.plugin files every update timing
Posted on: 06/02/18 10:34pm
By: ivy
plugin_getiteminfo_xxx
I see.
It is databox issue.
thanks!