Skip to main content
Topic: Sitemap generator (Read 3115 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Sitemap generator

Our forum, Hydrogenaudio, also employed a sitemap generator prior to the move from IPS Board 2.x.

I have adapted this generator to ElkArte, and posted it here:

https://gist.github.com/kode54/6cbcf2dc4f5c018be16b

Re: Sitemap generator

Reply #1

Nice. I'll try to work my own code in and post it.

Elliquiy generates multiple maps because we passed the 50k page limit a long time ago, even for public threads.

Re: Sitemap generator

Reply #2

I've updated it a bit, fixed the use of message IDs for offset pages. Now it correctly uses post count offsets in increments of 25, which may be amended to whatever count you want based on your site's default posts per page count. Or I could amend it to fetch that count from the configuration table.

I await your changes as well.

Re: Sitemap generator

Reply #3

Many likes but no comments by the big guys here? O.o
~ SimplePortal Support Team ~


Re: Sitemap generator

Reply #5

Quote from: derived – last automated sitemap generator i bothered with, posted a url to admin section


This one intentionally checks the access lists against the Guests group, and even then, it only posts links to topics and the date of the most recent post.

Re: Sitemap generator

Reply #6

Thanks for sharing this @kode54

just a note if could be useful for someone else, if you are not using the rewrite urls included into elkarte this should be edited from:
Code: (FROM) [Select]
                   '/index.php/topic,'.$row['id_topic'].'.0.html';
      } else {
      $posturl = $boardurl.
                   '/index.php/topic,'.$row['id_topic'].'.'.$lastpage.'.html';

Code: (TO) [Select]
                   '/index.php?topic='.$row['id_topic'].'.0';
      } else {
      $posturl = $boardurl.
                   '/index.php?topic='.$row['id_topic'].'.'.$lastpage;

I'm not sure about this:
Code: [Select]
      $lastpage = (intval(($row['num_replies'] + 1) / 25)) * 25;
Should 25 be replaced with the number of posts  displayed per page? I am using 15 posts per page.
sorry for my bad english

Re: Sitemap generator

Reply #7

Ah, yes, that should be replaced with the number of posts per page. Maybe I should read that programmatically from the configuration?