• User

    ok 🙂


  • User

    In mapforum.php prova a cambiare

    $phpbb_root_path = './forum/';

    in

    $phpbb_root_path = '/forum/';

    In pratica ho tolto un punto


  • User

    va bene
    grazie del consiglio, provo anche questa 🙂


  • User

    Guardavo anche questa riga...

    define('PHPBB_PREFIX', 'phpbb_'); // Your phpBB tables prefix, WITHOUT the _ character.

    dice without _ allora dovrei mettere phpbb invece di phpbb_ ?


  • Super User

    @fabrizio77 said:

    Guardavo anche questa riga...

    define('PHPBB_PREFIX', 'phpbb_'); // Your phpBB tables prefix, WITHOUT the _ character.

    dice without _ allora dovrei mettere phpbb invece di phpbb_ ?

    Si, non l'avevi fatto? :mmm:


  • User

    no l ho notato ora... perche cmq il prefisso è phpbb_
    adesso l ho tolto e ho messo: define('PHPBB_PREFIX', 'phpbb');
    speriamo funzioni!


  • User

    ma se vado qui: http://www.sito.com/forum/mapforum.php dovrei vedere qualcosa in particolare? solo errori 😞


  • User

    @fabrizio77 said:

    ma se vado qui: http://www.sito.com/forum/mapforum.php dovrei vedere qualcosa in particolare? solo errori 😞

    http://www.sito.com/forum/mapforum.xml
    dovresti vedere quello che dovrebbe vedere google

    Se ti da errori ci sono ancora problemi

    Che errori ti da?


  • User

    Warning: main(/forum/extension.inc): failed to open stream: No such file or directory in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 111

    Warning: main(/forum/extension.inc): failed to open stream: No such file or directory in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 111

    Warning: main(): Failed opening '/forum/extension.inc' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 111

    Warning: main(/forum/common.): failed to open stream: No such file or directory in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 112

    Warning: main(/forum/common.): failed to open stream: No such file or directory in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 112

    Warning: main(): Failed opening '/forum/common.' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 112
    http://www.karima-ammar.comforum-65535.xml 1969-12-31
    Warning: mysql_query(): Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 165

    Warning: mysql_query(): A link to the server could not be established in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 165

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line **166

    questo è quello che dice ho provato a fare come avete detto e ho corretto quella riga che io avevo sbagliato a non correggere! per il resto non so.. fors eil mio mapforum.php è sbagliato?
    **


  • Super User

    @fabrizio77 said:

    Warning: main(/forum/extension.inc): failed to open stream: No such file or directory in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 111

    Warning: main(/forum/extension.inc): failed to open stream: No such file or directory in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 111

    Warning: main(): Failed opening '/forum/extension.inc' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 111

    Warning: main(/forum/common.): failed to open stream: No such file or directory in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 112

    Warning: main(/forum/common.): failed to open stream: No such file or directory in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 112

    Warning: main(): Failed opening '/forum/common.' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 112
    http://www.karima-ammar.comforum-65535.xml 1969-12-31
    Warning: mysql_query(): Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 165

    Warning: mysql_query(): A link to the server could not be established in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line 165

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/f/a/b/fabrizio77/html/forum/mapforum.php on line **166

    questo è quello che dice ho provato a fare come avete detto e ho corretto quella riga che io avevo sbagliato a non correggere! per il resto non so.. fors eil mio mapforum.php è sbagliato?
    **

    Posta il mapforum.php 🙂

    Ora che ho rivisto il mio mapforum.php e le righe con gli errori sembra che ci sia un problema com mysql... che versione di mysql hai? 4 o 5?


  • User

    ecco qui:
    function make_url_friendly($url)
    {

    $url = strtolower($url);
    
    $find = array(' ',
            '&',
            '\r\n',
            '\n',
            '/',
            '\\',
            '+');
    
    $url = str_replace ($find, '-', $url);
    
    $find = array(' ',
            'é',
            'è',
            'ë',
            'ê');
    
    $url = str_replace ($find, 'e', $url);
    
    $find = array(' ',
            'ó',
            'ò',
            'ô',
            'ö');
    
    $url = str_replace ($find, 'o', $url);
    
    $find = array(' ',
            'á',
            'à',
            'â',
            'ä');
    
    $url = str_replace ($find, 'a', $url);
    
    $find = array(' ',
            'í',
            'ì',
            'î',
            'ï');
    
    $url = str_replace ($find, 'i', $url);
    
    $find = array(' ',
            'ú',
            'ù',
            'û',
            'ü');
    
    $url = str_replace ($find, 'u', $url);
    
    $find = array('/[^a-z0-9\-<>]/',
            '/[\-]+/',
            '/<[^>]*>/');
    
    $repl = array('',
            '-',
            '');
    
    $url =  preg_replace ($find, $repl, $url);
    
    return $url;
    

    }

    // Some configuration options!
    define('FORUM_DOMAIN_ROOT', 'http://www.karima-ammar.com'); // Full URL with trailing slash!

    define('FORUM_URL_PREFIX', '-vf'); // What comes up before the forum ID?
    define('FORUM_URL_SUFFIX', '.html'); // What comes up after the forum ID?
    define('THREAD_URL_PREFIX', '-vt'); // What comes up before the thread ID?
    define('THREAD_URL_SUFFIX', '.html'); // What comes up after the thread ID?

    define('PHPBB_PREFIX', 'phpbb'); // Your phpBB tables prefix, WITHOUT the _ character.

    // --------------------------------------------------
    // You don't need to edit anything below this line!!!
    // --------------------------------------------------

    define('IN_PHPBB', true);
    $phpbb_root_path = '/forum/';
    include($phpbb_root_path . 'extension.inc');
    include($phpbb_root_path . 'common.'.$phpEx);

    if ($_GET['fid']) { $fid = $_GET['fid']; }

    // Sitemap File <sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">
    // URL Index File <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">';
    if (isset($fid)) {
    echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
    if ($fid == '65535') {
    // Let's first send out the header & homepage
    echo ' <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">'."\n";
    echo ' <url>
    <loc>'.FORUM_DOMAIN_ROOT.'</loc>
    <changefreq>daily</changefreq>
    </url>';
    // Let's send out a URL list of forums
    $sql = 'SELECT forum_id, forum_name FROM '.PHPBB_PREFIX.'forums WHERE auth_view = "0" and auth_read = "0" and forum_id not like "%-%"';
    $result = mysql_query($sql);
    while ($data = mysql_fetch_assoc($result)) {
    echo ' <url>
    <loc>'.FORUM_DOMAIN_ROOT.make_url_friendly($data['forum_name']).FORUM_URL_PREFIX.$data['forum_id'].FORUM_URL_SUFFIX.'</loc>
    <changefreq>daily</changefreq>
    </url>';
    }
    echo ' </urlset>';
    } else {
    // Let's check it's not a restricted forum
    $sql = 'SELECT forum_id FROM '.PHPBB_PREFIX.'forums WHERE auth_view = "0" and auth_read = "0" and forum_id = "'.$fid.'" and forum_id not like "%-%"';
    $result = mysql_query($sql);
    $data = mysql_fetch_assoc($result);
    if ($data['forum_id'] == $fid) {
    echo ' <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">'."\n";
    $sql = 'SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time FROM '.PHPBB_PREFIX.'topics t, '.PHPBB_PREFIX.'users u, '.PHPBB_PREFIX.'posts p, '.PHPBB_PREFIX.'posts p2, '.PHPBB_PREFIX.'users u2 WHERE t.forum_id = '.$fid.' AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id ORDER BY t.topic_type DESC, t.topic_last_post_id DESC';
    $result = mysql_query($sql);
    while ($data = mysql_fetch_assoc($result)) {
    echo ' <url>
    <loc>'.FORUM_DOMAIN_ROOT.make_url_friendly($data['topic_title']).THREAD_URL_PREFIX.$data['topic_id'].THREAD_URL_SUFFIX.'</loc>
    <lastmod>'.date('Y-m-d', $data['post_time']),'</lastmod>
    </url>';
    }
    echo ' </urlset>';
    }
    }
    } else {
    echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
    echo ' <sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">'."\n";
    // Let's create a link to the main forum index sitemap
    echo ' <sitemap>
    <loc>'.str_replace("forum/", "", FORUM_DOMAIN_ROOT).'forum-65535.xml</loc>
    <lastmod>'.date('Y-m-d', $data['post_time']),'</lastmod>
    </sitemap>';
    // Let's do a loop here and list all the forums!
    $sql = 'SELECT forum_id FROM '.PHPBB_PREFIX.'forums WHERE auth_view = "0" and auth_read = "0" and forum_id not like "%-%"';
    $result = mysql_query($sql);
    while ($data = mysql_fetch_assoc($result)) {
    echo ' <sitemap>
    <loc>'.str_replace("forum/", "", FORUM_DOMAIN_ROOT).'forum-'.$data['forum_id'].'.xml</loc>
    <lastmod>'.date('Y-m-d', $data['post_time']),'</lastmod>
    </sitemap>';
    }
    echo "\n".' </sitemapindex>';
    }

    ?>

    il database è 4, grazie per le risposte raga'


  • User

    Cambia

    define('FORUM_DOMAIN_ROOT', 'http://www.karima-ammar.com'); // Full URL with trailing slash!

    in

    define('FORUM_DOMAIN_ROOT', 'http://www.karima-ammar.com/'); // Full URL with trailing slash!


  • User

    @Pandasp said:

    Cambia

    define('FORUM_DOMAIN_ROOT', 'http://www.karima-ammar.com'); // Full URL with trailing slash!

    in

    define('FORUM_DOMAIN_ROOT', 'http://www.karima-ammar.com/'); // Full URL with trailing slash!

    provo 🙂


  • User

    Cambia

    define('PHPBB_PREFIX', 'phpbb'); // Your phpBB tables prefix, WITHOUT the _ character.

    in

    define('PHPBB_PREFIX', 'phpbb_'); // Your phpBB tables prefix, WITHOUT the _ character.

    nonostante quello che c'è scritto ci vuole il _

    ESEMPIO:

    $sql = 'SELECT forum_id, forum_name FROM '.PHPBB_PREFIX.'forums WHERE auth_view = "0" and auth_read = "0" and forum_id not like "%-%"';

    come è ora phpbbforums mentre da quanto ho capito tu hai phpbb_forums


  • User

    Bo 😞 ho fatto anche queste e niente, povero me!


  • Super User

    @Pandasp said:

    Cambia

    define('FORUM_DOMAIN_ROOT', 'http://www.karima-ammar.com'); // Full URL with trailing slash!

    in

    define('FORUM_DOMAIN_ROOT', 'http://www.karima-ammar.com/'); // Full URL with trailing slash!

    :mmm: a me funziona con l'indicazione del forum

    prova così

    define('FORUM_DOMAIN_ROOT', 'http://www.karima-ammar.com/forum/'); // Full URL with trailing slash!


  • User

    eheh
    scusate vi sto facendo impazzire


  • User

    @cionfs said:

    :mmm: a me funziona con l'indicazione del forum

    prova così

    define('FORUM_DOMAIN_ROOT', 'http://www.karima-ammar.com/forum/'); // Full URL with trailing slash!

    Ops, hai ragione


  • Super User

    @Pandasp said:

    Ops, hai ragione

    Vabbè capita 😉

    @fabrizio77 said:

    eheh
    scusate vi sto facendo impazzire

    Non ti preoccupare siamo quì per questo 😉


  • User

    niente.. e il bello è che gli errori restano sempre gli stessi