Announcement

Collapse
No announcement yet.

Fix for Sitemaps (easy way)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] Fix for Sitemaps (easy way)

    settings > options > XML Sitemaps > Sitemap File Path .. define path with sitemaps.. example: /home/site/forums/sitemaps .... Save.. is ok

    In includes/class_sitemaps.php line 757 look this:
    PHP Code:
    $content .= "\n\t" '<loc>' htmlspecialchars($this->registry->options['bburl'] . '/xmlsitemap.php?fn=' urlencode($sitemap['loc'])) . '</loc>'
    replace with
    PHP Code:
    $content .= "\n\t" '<loc>' htmlspecialchars($this->registry->options['bburl'] . '/sitemaps/' urlencode($sitemap['loc'])) . '</loc>'
    Now configure google sitemaps to view your file locate on www.yoursite.com/forums/sitemaps/vbulletin_sitemap_index.xml.gz
    Last edited by desordeiro; Fri 18th Nov '11, 6:10am.

  • #2
    thanks alot... i'm looking for this one.

    Comment


    • #3
      WHOLLY CRAP!!!

      You know how many hundreds of posts there are regarding this problem, and you fixed it with one line of code?

      Unbelievable that vb spent not one second to fix this from the betas all the way to the release.

      Thank you thank you thank you!!!!

      (Works, by the way! - Can the hard-coded '/sitemaps/' hopefully can be changed to the variable name that holds the sitemap path if someone knows what that variable is called...)

      Oh, and XMLSitemap.php is still pooched.
      -Andy.
      http://www.checkcheckonetwo.com
      http://www.mindplacesupport.com

      Comment


      • #4
        Hasnt made any difference for me? It'll still generate them as before, but google still returns 404 not found!

        Comment


        • #5
          Thanks problem is solved

          Originally posted by pvo_dave View Post
          Hasnt made any difference for me? It'll still generate them as before, but google still returns 404 not found!
          /home/site/forums/sitemaps .... Save.. is ok
          With
          '<loc>' . htmlspecialchars($this->registry->options['bburl'] . '/sitemaps/' . urlencode($sitemap['loc'])) . '</loc>';

          Same

          Comment


          • #6
            Thanks! and that works!

            Brilliant!

            Comment


            • #7
              Originally posted by AdemGENĒ View Post
              Thanks problem is solved


              /home/site/forums/sitemaps .... Save.. is ok
              With
              '<loc>' . htmlspecialchars($this->registry->options['bburl'] . '/sitemaps/' . urlencode($sitemap['loc'])) . '</loc>';

              Same
              Not sure I get what you are saying here? Are you confirming that like before you can still save, but google gives you a 404? - Curious as you posted above that saying the problem is solved?!

              Dave.

              Comment


              • #8
                Thanks! I just made those changes and Google accepted the sitemap. Now let's see if it accepts it next time it's built.

                Thanks for the fix!

                Comment


                • #9
                  I tried this but its still not working for me. Any ideas?
                  Vote for these items in the tracker: Image Watermarking ----- Search Algorithm Sucks ----- Drop Main CSS section from style manager ------ Simplify process to accept pending group join requests ------ Add option to publish to the wall of a "Fan Page" in addition to the user's personal FB wall. ------ CMS Should physically resize images into thumbnails and not scale via CSS

                  Comment


                  • #10
                    Originally posted by pvo_dave View Post
                    Not sure I get what you are saying here? Are you confirming that like before you can still save, but google gives you a 404? - Curious as you posted above that saying the problem is solved?!

                    Dave.
                    My bad English

                    /home/site/forums/sitemaps => /home/site/forums/sitemap/ I've set did not work, 404 error => /home/site/forums/sitemaps I changed my google has accepted

                    Because in the code sitemaps written

                    Comment


                    • #11
                      Thanks it worked .
                      http://www.randalstowncsc.net/

                      Comment


                      • #12
                        Worked for me too! Thanks
                        sigpic

                        Comment


                        • #13
                          Originally posted by desordeiro View Post
                          settings > options > XML Sitemaps > Sitemap File Path .. define path with sitemaps.. example: /home/site/forums/sitemaps .... Save.. is ok

                          In includes/class_sitemaps.php line 757 look this:
                          PHP Code:
                          $content .= "\n\t" '<loc>' htmlspecialchars($this->registry->options['bburl'] . '/xmlsitemap.php?fn=' urlencode($sitemap['loc'])) . '</loc>'
                          replace with
                          PHP Code:
                          $content .= "\n\t" '<loc>' htmlspecialchars($this->registry->options['bburl'] . '/sitemaps/' urlencode($sitemap['loc'])) . '</loc>'
                          Now configure google sitemaps to view your file locate on www.yoursite.com/forums/sitemaps/vbulletin_sitemap_index.xml.gz

                          wow
                          thanks alot
                          the best Forum You Ever See. Best style and Best Index www.nusantaraku.org

                          i need to make a link with you, do u need to make a link with my forum? together we achieve more

                          Comment


                          • #14
                            FWIW,

                            I tried this before I used the default and it failed. What vB has in the script as of today, works perfectly. No need to edit the sitemap code.
                            Cheers!

                            RECORDING ORG
                            created for musicians, by musicians

                            Comment


                            • #15
                              Originally posted by audiokid View Post
                              I tried this before I used the default and it failed. What vB has in the script as of today, works perfectly. No need to edit the sitemap code.
                              Yeah I read this and wasn't sure what the problem was. Things worked fine here as well.
                              <b>Erik J. Barzeski</b>

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X