News:

Join the Facebook Fan Page.

Main Menu

Sitemap

Started by SlammedDime, May 12, 2007, 05:43:04 PM

Previous topic - Next topic

SlammedDime

Link to Mod

This file adds an extra action to your SMF installation '?action=sitemap' that will show a sitemap to your visitors and bots.  It will not show boards to a user that its not supposed to.  So a guest will not see hidden boards.  It also has added support for SMF queryless urls and Pretty Urls mod.  Admin options for 1.1.x can be found under Features and Options and for 2.0 under Configuration > Modifications > Sitemap.

If you have Joomla!/Mambo and are running this with Orstio's Bridge, the sitemap will see that and format your links accordingly, and if you are using Joomla SEF, it will convert them as well.

Also included is the option to display an XML sitemap for use with Google Sitemaps.  On any of the sitemap pages, simply click the 'XML' link at the bottom for the XML version.  If you wish to submit your site to Google Sitemaps, you will need to use this link.  Google does not like SEF formatted URLs for the sitemap because it won't show the sitemap in the root directory.  Using the link as provided will.

A working version can be seen at http://www.airridetalk.com/forum/sitemap

Change Log:
2.0.0: Complete rewrite of the mod
1.2.2/1.3.0: Added support for Pretty Urls mod, changed username on topic display to Display name, rather than username.  1.2.2 is the last update for the 1.1.x series of SMF.  All future development will continue on 1.3.0 in support of SMF 2.0.
1.2.1: With lots of new things comes bugs.  Some error checking wasn't done, which caused an incorrect number of pages to be displayed, and thus causing sql errors.
1.2.0: Lots of new things... a few options in the admin panel under Features and Options.  Limit the number of topics on the sitemap, disallow non-admin access to the XML sitemap link, and collapse the child boards to reduce the size of the sitemap display.  A few bug fixes as well, primarily with the queryless_urls setting.
1.1.3: Fixed file a tad more, and fixed uninstaller to remove files added
1.1.2: Updated files to follow SMF coding guidelines more closely
1.1.1: Added Link Tree information and Who information
1.1: Added XML support
1.0: Initial Release


If you have Tiny Portal installed with 1.1.8, you may need to manually edit index.template.php.

Replace                                         ', theme_copyright(), ' <br />', tportal_version() , '
                                </td>
<td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'left' : 'right', '">

with
                                        ', theme_copyright(), ' <br />', tportal_version() , '
<span class="smalltext" style="display: inline; visibility: visible; font-family: Verdana, Arial, sans-serif;"> | <a href="'.$scripturl.'?action=sitemap">Sitemap</a></span>
                                </td>
<td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'left' : 'right', '">
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

One thing that I'm pretty sure will not work, is if you have SEO4SMF and try to use this, it will not generate SEO urls as you expect.  I do believe that that mod has an xml sitemap generator, so you may wish to look into that.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

imschur

Hi, I just installed this via the package manager at http://www.gearpedia.net [nofollow]. Everything seemed to go fine with no errors but I have no sitemap. Should this mod have added a new tab or anything in the control panel?

Thanks

SlammedDime

#3
Quote from: imschur on May 13, 2007, 12:36:23 AM
Hi, I just installed this via the package manager at http://www.gearpedia.net. Everything seemed to go fine with no errors but I have no sitemap. Should this mod have added a new tab or anything in the control panel?

Thanks
It adds a link to the sitemap next to the copyright in the template.  If you're not using the default theme, you'll have to manually make this change, as with all mods that make theme changes.  I've thought about adding options for this in the control panel, such as limits on the number of boards or topics to display, but I have no need for it on my site, so I never coded it that way.  Bo I'll leave that open for discussion.  I always welcome feedback.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

imschur

ok Im a moron. Thanks for the help and this cool mod.

TrueSatan

If you want to add it to the main navigation menu then please read the SMF documentation...here's a link that gives how to add it in the default theme...just adapt the method to a custom theme. http://docs.simplemachines.org/index.php?topic=564.0

imschur

Thanks for the link.

Please forgive my noob questions but regarding the sitemap.xml   Do I just perform a "save as" on the xml button and call it sitemap.xml end of story? Cuz jeez if this is the case Ill be ecstatic with the thought of putting an end to using applications to crawl the site for days

Thanks for your patience

SlammedDime

If you want to upload your sitemap someplace, then yes you could do that.  Or you can just click the xml link, or copy the xml link rather, and submit it to google in google sitemaps.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

imschur


DuygusaL


nitins60

Nice feature! Which link should i use to Google Sitemaps, if i installed it n http://forum.com/forum/

SlammedDime

Quote from: Matt @ ARTcom on May 12, 2007, 05:43:04 PMAlso included is the option to display an XML sitemap for use with Google Sitemaps.  On any of the sitemap pages, simply click the 'XML' link at the bottom for the XML version.  If you wish to submit your site to Google Sitemaps, you will need to use this link.  Google does not like SEF formatted URLs for the sitemap because it won't show the sitemap in the root directory.  Using the link as provided will.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

riffster

Love the results of your site Matt. I am having some difficulty with this mod though probably from sheer lack of knowledge. I am running -

Joomla (enabled SEF)
SMF Bridge 1.1.6
Opensef

After install, the result is - http://slidemeister.com/component/option,com_smf/Itemid,40/action,sitemap/lang,en [nofollow]

This does not look like your neat structured forum. Any suggestions?





SlammedDime

I don't quite understand your question.  Are you referring to the URL's that my site uses (the SEF Urls)?  The sitemap that you linked looks exactly as it should.  If you're wondering about the URL's, its because I created a SEF extension for OpenSEF that allows my site to have content filled urls through OpenSEF.  There is a thread on the first page of the Joomla/Mambo support forum with all of that information in it (titled: (Near) Perfect SEF for Bridged Joomla/SMF with OpenSEF)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

riffster

Ah Haa! I'm late to the ballgame here so it seems. So I need this extention. It appears to be being updated at the moment. I'll grab it later. Good work & good support from you Matt.

SlammedDime

I'm curious to hear some opinions from the masses....

On very large sites with many topics, loading the XML page could be quite demanding on the server (maybe not, as it gets all the threads in one query, but it could be a large chunk of data transfer).  Would it be better, or would some people prefer to have the XML link show to only admins, that way they have access to the link to submit to google or other sites that accept xml sitemaps.

I'm also going to rework the changefreq and priority, as they are simply static right now, but having them dynamic would be better, but that may use even more database resources, and again, for large sites, would be demanding on the server.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

DJ Rg

#16
Hi and Thanks Much Matt

I know bout this much bout site maps, and google (and probably yahoo etc) likes them. I gave Google the XML (in the webmaster tools).

Myself anything that lightens a sites resource usage is a good thing, so with that much knowledge I would say yes to make the XML available to admins only, or by group permissions, (is it really anymore than a SEO tool?)..

I am really interested in what others have to say about this...

Thanks again for creating and sharing this....

8)

Skipdawg

Awesome mod thanks.  ;)  Makes that part more simple.  ;D
Skipdawg's Community

Powered by SMF 1.1.3

SlammedDime

#18
Quote from: DJ Rg on May 20, 2007, 09:45:55 AM
Hi and Thanks Much Matt

I know bout this much bout site maps, and google (and probably yahoo etc) likes them. I gave Google the XML (in the webmaster tools).

Myself anything that lightens a sites resource usage is a good thing, so with that much knowledge I would say yes to make the XML available to admins only, or by group permissions, (is it really anymore than a SEO tool?)..

I am really interested in what others have to say about this...

Thanks again for creating and sharing this....

8)
I suppose the best way to determine if it really is demanding on the server is to have someone monitor real time loads as the page loads on a very large site, or to check the generation time and see how small or large it is.  Unfortunately my site doesn't have many topics, so I wouldn't be able to test this, but I have seen a few sites that are using this mod that have over 20K topics (this mod caps at 20K I think) and they might be able to gauge it... but simply adding a conditional to the template to only display the XML link to admins so they at least have access to it would be easy enough for now.

I'll also be adding a 'urllist' utility in the next version which will generate a text file that can be used on yahoo (although I do believe that yahoo and the other major engines use XML now).

There's also a little bug, although no biggie, that I discovered, which can easily be seen on Skipdawg's site... there are more pages than there are threads... easy fix as well, which will be in the next version.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Nutter

I've got a problem. The XML is generating URLs like http://www.example.com/index.php/board,15.0.html [nofollow] instead of index.php?board=15.0 or ?topic=350.0

The viewer sitemap pages work fine.

Any suggestions before I start digging in to the code to hack a fix?
- Ryan [nofollow]

Advertisement: