dragomano/Optimus

[Suggest] Change numbers of SitemapXML items to display!

Closed this issue · 1 comments

Hello @dragomano ,
I have a suggestion that you should add option to change sitemap xml items to display, instead of 50.000 as default! This allows users can customize their sitemap easily without modifying the code (and on my opinion, 50.000 is a very big big number that it'll slow down the server while loading page!).
So this is my idea:

File Sitemap.php

  1. Remove from line 25 to line 52

  2. Find (line 82): if (!empty($counter) && $counter % self::getCount() == 0)
    Replace with: if (!empty($counter) && $counter % $modSettings['optimus_sitemap_items_display'] == 0)

File Settings.php
Find (line 427): array('int', 'optimus_sitemap_topics_num_replies'),
Add after: array('int', 'optimus_sitemap_items_display'),

Finally, add this text to the language files: .english, .russsian,...
$txt['optimus_sitemap_items_display'] = 'Numbers of sitemap xml to display';

Thanks, I will add this option in the next release.