Sitemap

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

Previous topic - Next topic

nitins60

Nothing wrong. Smf generates urls like http://forum.com/index.php/etc.html and index.php? Nothing wrong


SlammedDime

Quote from: Nutter on May 22, 2007, 08:06:22 AM
I've got a problem. The XML is generating URLs like http://www.example.com/index.php/board,15.0.html 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?
There shouldn't be a fix needed... I need to see a URL to see whats going on on your site.  If the XML links are being formatted like that, then you have queryless urls enabled on your board.  If you do not have this enabled, or have no clue what it is, I need to see a URL.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Nutter

I assume that's "Search engine friendly URLs" which I have unchecked.  Shouldn't the URLs in the XML file be the same as the normal sitemap?

Sitemap is http://forums.photoartsforum.com/index.php?action=sitemap [nofollow] , xml is http://forums.photoartsforum.com/index.php?action=sitemap;xml [nofollow]
- Ryan [nofollow]

SlammedDime

#23
Quote from: Nutter on May 22, 2007, 10:17:27 AM
I assume that's "Search engine friendly URLs" which I have unchecked.  Shouldn't the URLs in the XML file be the same as the normal sitemap?

Sitemap is http://forums.photoartsforum.com/index.php?action=sitemap , xml is http://forums.photoartsforum.com/index.php?action=sitemap;xml
Do this... check that box, save your settings, then uncheck the box, then save your settings again and see what happens.

Edit, I think I know the issue, and its rare... but on line 108 of Sitemap.template.php, change
         if ($modSettings['queryless_urls']==0)

to
         if (empty($modSettings['queryless_urls']) || $string == $scripturl)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Nutter

QuoteDo this... check that box, save your settings, then uncheck the box, then save your settings again and see what happens.
That seems to have fixed it.  Do you mind sharing the cause?  Call it a morbid curiosity  :D
- Ryan [nofollow]

SlammedDime

Quote from: Nutter on May 22, 2007, 03:30:46 PM
QuoteDo this... check that box, save your settings, then uncheck the box, then save your settings again and see what happens.
That seems to have fixed it.  Do you mind sharing the cause?  Call it a morbid curiosity  :D
Beats me.... all I can figure was that the queryless_url setting was improperly set to some strange value, which caused error in this mod, but allowed your board to still function properly.  Editing Sitemap.template.php as I suggested above would clear it up alltogether, as that is the similar code that is used in the SMF source files.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Hadi

tried the more...but i keep receive the following msg

An Error Has Occurred!
Unable to load the 'main' template.


what did i do wrong?


SlammedDime

Make sure the file Sitemap.template.php made it into your default theme directory.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

wicked1

i just installed it and it works just fine on my site. This is a great mod :)
I even got it to work on a custom theme and put it into the main menu. I am also glad that it doesn't show "hidden" boards.

I just have two questions:

1. would it be possible to make it so it only shows the main boards in the sitemap? Like have it minimize the sub-forums until they click the arrow to expand? I have a rather large board and the sitemap seems to go on forever lol
2. i know you mentioned it before, but i would like to make it so that xml is admin-only. Can you explain how to do that please?

thank you so much!

SlammedDime

In the next release, when I have some free time to code more, I'll add some settings in the admin panel for the sitemap.  I'll add in an option for collapsible sub-boards, and I'll also add in an option for the XML link to be shown to only admins or everyone, along with options like excluding additional boards, and maybe some other user suggestions?

As for making it admin viewable only for the time being...

Code (find) Select
global $scripturl, $modSettings, $txt;
Code (replace) Select
global $scripturl, $modSettings, $txt, $context;

Code (find) Select
echo '</li>
<li>', getXMLLink(), '</li>';

Code (replace) Select
echo '</li>';
if($context['user']['is_admin'])
echo '
<li>', getXMLLink(), '</li>';
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

wicked1

thank you for such a quick response :)
i'm looking forward to the next release, i can't think of any other suggestions at this point.
And that worked! So now the xml for my sitemap is admin only :)
thanks again!

Hadi

Quote from: Matt @ ARTcom on June 01, 2007, 02:12:14 PM
Make sure the file Sitemap.template.php made it into your default theme directory.

Its there....but the size is only Zero B

SlammedDime

Download another copy of the mod and manually upload that file to your default theme directory.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

romeoyankee

hey guys.. quick question for you in regards to uploading the sitemap to google.

So i already have my account set up with google under the domain www.cyow.ca [nofollow]

My forums are in www.cyow.ca/forums/ [nofollow]

Is there a way to just upload the link to the sitemap file??? 

When I try and add this http://www.cyow.ca/forums/index.php?action=sitemap;xml [nofollow] to google it tells me that it isnt a valid site..

It says "The Sitemap must be located at http://www.cyow.ca/ [nofollow]. To add a Sitemap at http://www.cyow.ca/forums/ [nofollow], first add that site to your account and then click the Add a Sitemap link beside it.


How do I get the sitemap file uploaded to google?  Do I have to save the link as sitemap2.xml (i have a sitemap file for the rest of my site as well) and then upload it to my server and then give that to google? 

Let me know!

SlammedDime

I'm sure it wouldn't be too difficult to use Apache's mod_rewrite and put a .htaccess file in your root directory that would point at that file.  Let me play around and see if I can come up with something.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

put the following in a .htaccess file in your root directory and see if it works for you... (or add to one that may already be there)

RewriteEngine on
RewriteRule ^sitemap2.xml$ /forums/index.php?action=sitemap;xml


Then navigate to http://www.cyow.ca/sitemap2.xml and you should see the same thing as if you went to http://www.cyow.ca/forums/index.php?action=sitemap;xml.  If it does work, then you can simply submit http://www.cyow.ca/sitemap2.xml to google as well and you should be set.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

romeoyankee

thanks alot for a fast AND correct answer!!! 

I havent worked with htaccess alot and dont really know how to.  That worked perfectly!

thanks man

Garry1953

Just added this mod to my forum, works perfectly, thanks.

amirali.b

HI
I whant to install this mod manually for my costum theme
<file name="$boarddir/index.php">
I dont have boarddir !! which index.php file?

SlammedDime

If you are installing on a custom theme, you do not need to worry about that line.... only only need to worry about the install instructions that have $themedir in them.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: