It shouldn't be necessary to cron this. The plugin is designed to update the sitemaps as necessary.thekeeper said:Hello people, Sitemaps plugin work, you have to go http://www.yourforumvanilla.com/plugin/sitemaps/build
Now, after this, you can find a sitemaps.index.xml in cache/Sitemaps
Note:
Add this in Cron schedule
Bye!
public function PostController_AfterDiscussionSave_Handler(&$Sender) {
$Discussion = $Sender->EventArguments['Discussion'];
$DiscussionPostDate = strtotime($Discussion->DateInserted);
$DiscussionPostIndex = (int)date('Y',$DiscussionPostDate) + (int)date('d',$DiscussionPostDate);
$LastDiscussionIndex = C('Plugin.Sitemaps.LastDiscussionIndex',0);
if ($DiscussionPostIndex > $LastDiscussionIndex) {
SaveToConfig('Plugin.Sitemaps.LastDiscussionIndex', $DiscussionPostIndex);
SaveToConfig('Plugin.Sitemaps.Regenerate', TRUE);
}
}
public function DiscussionController_BeforeDiscussionRender_Handler(&$Sender) {
if (!C('Plugin.Sitemaps.Regenerate')) return;
RemoveFromConfig('Plugin.Sitemaps.Regenerate');
$Sender->AddJsFile($this->GetResource('js/sitemaps.js',FALSE,FALSE));
}public function PostController_AfterDiscussionSave_Handler(&$Sender) {
$this->Build();
}It looks like you're new here. If you want to get involved, click one of these buttons!