[BETA] BartVB SiteMap Generator

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
xenador
Registered User
Posts: 89
Joined: Wed Nov 22, 2006 1:27 am

Re: [BETA] BartVB SiteMap Generator

Post by xenador »

so im trying to get this working but no luck so far...list of changes from last posted one are only:

run via sql:
insert into phpbb_config (config_name, config_value) values ('sitemap_bot_user', '28508');
insert into phpbb_config (config_name, config_value) values ('sitemap_directory', 'sitemaps/');
if I want create a ./sitemaps/ directory chmoded to 777

and finally
open ./includes/sitemap_functions.php

Find:

Code: Select all

    $sql = 'SELECT *
                    FROM ' . USERS_TABLE . '
                    WHERE user_id = ' . intval($config['sitemap_bot_user']);

and replace with:

Code: Select all

$sql = 'SELECT *
                FROM ' . USERS_TABLE . '
                WHERE user_id = 28508' ;
correct? or was there something I missed...Im not using the seo mods and still throwing the same errors as the first couple users where, I am using the last one posted...about halfway down the page.
derDiesel
Registered User
Posts: 7
Joined: Sat Mar 25, 2006 2:18 pm

Re: [BETA] BartVB SiteMap Generator

Post by derDiesel »

BartVB wrote:TODO (and I'm probably not going to do it :P)
[...]
- Automate generating the sitemaps
Jeah, pretty good idea! :D
User avatar
TheMoustic
Registered User
Posts: 76
Joined: Sat Aug 25, 2007 1:32 pm
Location: France

Re: [BETA] BartVB SiteMap Generator

Post by TheMoustic »

I've SEO MOD, I try that modification:

Code: Select all

insert into phpbb_config (config_name, config_value) values ('sitemap_bot_user', '1');
insert into phpbb_config (config_name, config_value) values ('sitemap_directory', 'sitemaps/');

Code: Select all

    <?php
    /**
    *
    * @package phpBB3
    * @version $Id: sitemap_functions.php 2007-11-26 Joshua2100 $
    * @copyright (c) 2007 Joshua www.commexcomputers.com
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    *
    */

    if (!defined('IN_PHPBB'))
    {
       exit;
    }
    // www.phpBB-SEO.com SEO TOOLKIT BEGIN
    if (empty($phpbb_seo) ) {
       require_once($phpbb_root_path . 'phpbb_seo/phpbb_seo_class.'.$phpEx);
       $phpbb_seo = new phpbb_seo();
    }
    // www.phpBB-SEO.com SEO TOOLKIT END
    // start
    function clean_for_xml($string)
    {
       // www.phpBB-SEO.com SEO TOOLKIT BEGIN
       global $phpbb_seo;
       return $phpbb_seo->format_url($string);
       // www.phpBB-SEO.com SEO TOOLKIT END
    }
    

Code: Select all

$sql = 'SELECT *
                FROM ' . USERS_TABLE . '
                WHERE user_id = 1' ;   

Code: Select all

cleaned out the bot_auth stuff.
                $f_xml .= '<loc>' . $board_url . "viewtopic.$phpEx?t=" . $row['topic_id'] . "</loc>\n";   
And clear out:

Code: Select all

       $bot_userdata = $db->sql_fetchrow($result);
       $bot_auth = new Auth();
       $bot_auth->acl($bot_userdata);   
and:

Code: Select all

       $bot_no_access = array();
       $bot_forum_auth_ary = $bot_auth->acl_getf('!f_read');
       foreach ($bot_forum_auth_ary as $forum_id => $not_allowed)
       {
          if ($not_allowed['f_read'])
          {
             $bot_no_access[] = (int) $forum_id;
          }
       }
   
But when I click on: Run now, I've:

Code: Select all

Fatal error: Using $this when not in object context in (...)/includes/sitemap_functions.php on line 102
Which is:

Code: Select all

            if (!function_exists('clean_url'))
            {
                trigger_error($user->lang['SEO_NOT_INT'] . adm_back_link($this->u_action), E_USER_WARNING);
            }  
Theory, it is when nothing works, and when we know why.
Practice, it is when everything works, and when we do not know why.

Here, both are combined: nothing works, and nobody knows why.
Albert Einstein
desertst0rm
Translator
Posts: 136
Joined: Fri Feb 01, 2008 9:43 pm

Re: [BETA] BartVB SiteMap Generator

Post by desertst0rm »

After clicking the Run Now button I'm getting this message "Unable to open sitemaps/sitemap_forums.xml for writing"
MikeShinoda
Registered User
Posts: 114
Joined: Tue Jun 12, 2007 10:30 am
Location: Wonderland
Contact:

Re: [BETA] BartVB SiteMap Generator

Post by MikeShinoda »

check the chmod permission
Noi:due corpi,due cuori,una sola anima,un unico grande sentimento ke può essere espresso da 2 sole grandi parole:Ti amo!
derDiesel
Registered User
Posts: 7
Joined: Sat Mar 25, 2006 2:18 pm

Re: [BETA] BartVB SiteMap Generator

Post by derDiesel »

Hey,
any idea to rebuild the sitemap via cron-task automatically?

thx :)
denis4o
Registered User
Posts: 80
Joined: Fri Dec 23, 2005 10:38 am
Location: Sofia, Bulgaria
Contact:

Re: [BETA] BartVB SiteMap Generator

Post by denis4o »

Any idea how long does it take google to index 2100 URL's from the sitemap? It indexed only 4 out of 2100 in a month. I'm so screwed with my rank now ...
Locked

Return to “[3.0.x] MODs in Development”