dragomano / Optimus

A simple SEO mod for SMF
https://custom.simplemachines.org/mods/index.php?mod=2659
Artistic License 2.0
6 stars 8 forks source link

[Suggest] Change numbers of SitemapXML items to display! #29

Closed tuivodich closed 4 years ago

tuivodich commented 4 years ago

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';

dragomano commented 4 years ago

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