1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sitemap for XenForo 1.5.2

Provides a sitemap that is used by the Google Crawler to index your pages

  1. optrex

    optrex Active Member

    That's fair enough Rigel,thanks for the response. I'm fairly new to XF itself, having only purchased during the last couple of weeks, but I will see if I can work my way around the code to change the paths. If I get stuck, I will try your suggestion.
  2. jonatan.wb

    jonatan.wb Member

    how to fix this error?

    Code:
    Generating forums...
    -- Excluded: http://www.sectorgamer.com/comunidad/forums/team-oficial-sg-en-la-twl.145/
    -- Excluded: http://www.sectorgamer.com/comunidad/forums/estrategias.146/
    -- Excluded: http://www.sectorgamer.com/comunidad/forums/resultados-de-los-scrims.147/
    -- Excluded: http://www.sectorgamer.com/comunidad/forums/usuarios-con-doble-cuenta-baneados.161/
    Generating threads...
    -- Starting at -1 and generating 10000 urls...
    Generating index file...
    All doneOcurrió un error, por favor inténte nuevamente más tarde.
    but in the meantime in google webmaster tools:

    sitemap.JPG
  3. XFacil.com

    XFacil.com Active Member

    I do not know why you get that error, but it is for other reasons.

    Salud2
  4. Hoffi

    Hoffi Well-Known Member

    If I remember correctly, you can add a priority to Sitemaps. What about to count the Likes and modify the prioirity with the number.
  5. ChemicalKicks

    ChemicalKicks Well-Known Member

    Why CHMOD 777 forgive me but isn't that a no no? Would 775 do?
  6. Dean

    Dean Well-Known Member

    First, thank you for this fantastic release. I had several issues and this sitemap fixed them. (y)

    Secondly - could it be changed to not have soft deleted threads in the site map? I noticed these types of threads were in my site map, and of course they were soft deleted, and I did not want them in the site map:
    NEW UNLOCKED APPLE IPAD 2 64GB(WI-FI +3G) AVAILABLE @ WHOLESALE PRICE
  7. Dean

    Dean Well-Known Member

    I am almost positive this is where to make the changes so soft deleted threads are not put into the sitemap, but I've no idea what the cleanest solution would be.
    Possibly in the function canView($data) (probably), or possibly a secondary check in function generate($totalThreads):

    \upload\library\CemZoo\Sitemap\Thread.php
    Code:
        /**
        * Append the information about the threads to the sitemap
        */
        public function generate($totalThreads)
        {
            $this->initialize();
    
            $db = XenForo_Application::get('db');
            $sql = "
                SELECT * FROM xf_thread thread
                WHERE thread_id > ?
                ORDER BY thread.thread_id
                ";
            $st = new Zend_Db_Statement_Mysqli($db, $sql);
            $st->execute( array( $this->lastThreadId ) );
    
            while ($data = $st->fetch())
            {
                $this->lastThreadId = $data['thread_id'];
    
                if ($this->canView($data))
                {
                    $url = XenForo_Link::buildPublicLink('canonical:threads', $data);
                    $this->addUrl($url, $data['post_date']);
    
                    // We may have to break if we reached the limit of threads to include in a single file
                    $totalThreads--;
                    if ($totalThreads <= 0)
                    {
                        break;
                    }
                }
            }
    
            // if we still have data, that means that we did not finish fetching the information
            $this->isFinished = !$st->fetch();
            $st->closeCursor();
        }
    
        /**
        * Check if the default (not registered) user can view the forum. We only expose through the sitemap the
        * information about the forums that are visible to all the public
        *
        * @param array $data        array with information for the forum
        * @return boolean
        */
        private function canView($data)
        {
            $nodeId = $data['node_id'];
    
            $errorPhrase = '';
            $nodePermissions = $this->defaultVisitor->getNodePermissions($nodeId);
            return $this->forumModel->canViewForum($data, $errorPhrase, $nodePermissions, $this->defaultVisitor->toArray());
        }
        
  8. Saeed

    Saeed Well-Known Member

    Not sure if anyone else is having a similar issue, so thought I'd ask here.

    I just upgraded to 1.1.0 beta 1. Prior to the upgrade, this is what this tool was doing on my site.

    /sitemap/sitemap.forums.1.xml.gz: URLs submitted = 28
    /sitemap/sitemap.threads.1.xml.gz: URLs submitted = 10000 (a)
    /sitemap/sitemap.threads.2.xml.gz: URLs submitted = 10000 (b)
    /sitemap/sitemap.threads.3.xml.gz: URLs submitted = 9919 (c)

    /sitemap/sitemap.xml.gz: URLs submitted = 29919 (a + b + c)
    As you can see, the last one was an index of the whole site and was hence a sum of a, b and c.
    However, now sitemap.xml.gz is showing 9919 URLs submitted as well, instead of 10000 + 10000 + 9919.
    I've re-run the tool and resubmitted to Google as well, but with the same results. Is anyone else facing a similar issue? :)
  9. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    I haven't tried yet with 1.1, I am upgrading my forums this weekend so I'll give it a test
    Veer and Saeed like this.
  10. Renegade

    Renegade Well-Known Member

    Will it index the add-on pages as well?
  11. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    no
  12. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    I see something similar with mine in Google Webmaster tools, however, when I click on sitemap.xml.gz I can see the complete detail (the threads and forums sitemap), and there the numbers are correct
  13. Saeed

    Saeed Well-Known Member

    Yeah, I'm seeing exactly the same behaviour here since yesterday. Sometimes it's adding up (in my post above) a + c, sometimes a + b. It seems the issue is at Google's end but not really sure what's happening though. o_O
  14. BrandonT

    BrandonT Member

    Got this error when doing the Run cron after install -

    v. 1.0.4

    Server Error

    curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set
    1. XenForo_Application::handlePhpError() in CemZoo/Sitemap/Ping.php at line 29
    2. CemZoo_Sitemap_Ping::pingUrl() in CemZoo/Sitemap/Ping.php at line 47
    3. CemZoo_Sitemap_Ping::pingGoogle() in CemZoo/Sitemap/Index.php at line 113
    4. CemZoo_Sitemap_Index->pingServices() in CemZoo/Sitemap/Index.php at line 78
    5. CemZoo_Sitemap_Index->generate() in CemZoo/Sitemap/CronEntry/RebuildSitemap.php at line 26
    6. CemZoo_Sitemap_CronEntry_RebuildSitemap::run() in XenForo/Model/Cron.php at line 353
    7. XenForo_Model_Cron->runEntry() in XenForo/ControllerAdmin/Cron.php at line 204
    8. XenForo_ControllerAdmin_Cron->actionRun() in XenForo/FrontController.php at line 310
    9. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    10. XenForo_FrontController->run() in /home/xengame1/public_html/admin.php at line 13
  15. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    From the error, seems that your PHP installation does not support it. It is throwing an error about safe_mode being enabled
  16. phpclub

    phpclub Member

    XenForo 1.1.0 Beta 1

    ================

    Generating forums...
    Generating threads...
    -- Starting at -1 and generating 10000 urls...
    Generating index file...
    All done

    An exception occurred: Cannot send headers; headers already sent in , line 0 in /srv/www/htdocs/dwteam/onga/www/forum/library/Zend/Controller/Response/Abstract.php on line 321

    Zend_Controller_Response_Abstract->canSendHeaders() in Zend/Controller/Response/Abstract.php at line 115
    Zend_Controller_Response_Abstract->setHeader() in XenForo/ViewRenderer/HtmlAdmin.php at line 17
    XenForo_ViewRenderer_HtmlAdmin->__construct() in XenForo/Dependencies/Admin.php at line 120
    XenForo_Dependencies_Admin->getViewRenderer() in XenForo/FrontController.php at line 499
    XenForo_FrontController->_getViewRenderer() in XenForo/FrontController.php at line 139
    XenForo_FrontController->run() in /srv/www/forum/admin.php at line 13
  17. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    That error is ok.
    That is because I am sending the "Generating forums, Generating threads" part and XenForo does not like the output. I think I will move that to a server error log instead.

    If you look inside sitemap/ your map should be there
  18. AzzidReign

    AzzidReign Well-Known Member

    Rigel,

    Thanks for a great sitemap. I was wondering if I could ask for certain features. If you look at sitemaps for IP.SEO and vBSEO, you will see that they have options to give certain things a priority. Things like hot threads, forum index, threads view, posts, members pages, etc. And even have the ability to go into the section options to set a higher or lower priority for that. This works well for my site and I would think many others as there are certain sections on our sites that we know is our higher performing section or sections.

    Also, I just want to make sure, anything not viewable by guests, you have it so those threads are not included in the sitemap, correct?

    Azzid
  19. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    It excludes the threads not viewable by guests, anything that an unregistered user cannot view, is not included in the sitemap.
    I'll take a look at the priority
  20. Gregory

    Gregory Member

    Just installed sitemap. I'm using the beta 4. I'm getting error after running:

    Generating forums...
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/fundraising-board.32/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/staging.85/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/site-announcements-and-news.91/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/member-announcements.94/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/tq-member-map.95/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/birthday-wishes.96/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/tq-newsletter.97/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/digital-camera.115/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/tech-tips.116/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/treasure-quest-support-group.118/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/moderator-forum.119/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/administration-discussion.120/
    -- Excluded: http://www.treasurequestxlt.com/community/index.php?forums/metal-detecting-videos.284/
    Generating threads...
    -- Starting at -1 and generating 10000 urls...
    -- Starting at 11035 and generating 10000 urls...
    -- Starting at 22772 and generating 10000 urls...
    -- Starting at 34108 and generating 10000 urls...
    -- Starting at 45286 and generating 10000 urls...
    Generating index file...
    All doneAn unexpected error occurred. Please try again later.

Share This Page