• User Attivo

    ok e per vedere se funziona tutto pefettamente ?


  • User Attivo

    cosa ne dite di questo?
    melgio o peggio ?

    ############################################################## 
    ## MOD Title: phpBB static URLs mod_rewrite 1.0.0
    ## MOD Author: Craven de Kere (N/A) http://www.Able2Know.com 
    ## MOD Description: This mod should be added AFTER the Able2Know.com SEO mod 
    ## This mod makes static URLs (only for guests) for phpBB, for example topic-22234.html 
    ## Please read the author notes BEFORE using this mod.
    ## Check http://www.able2know.com/forums/about15132.html
    ## for the latest version or to get help with this MOD 
    ## 
    ## MOD Version: 1.0.0 
    ## 
    ## Installation Level: (Advanced) 
    ## Installation Time: 5 Minutes 
    ## Files To Edit: page_header.php,
    ## Included Files: n/a 
    ##############################################################  
    ## Author Notes: 
    ## Use this mod together with the Able2Know.com SEO Mod (http://www.able2know.com/forums/about15132.html)  
    ## Make backups and test this on a test forum if you can. This is not a typical mod.
    ## For an additional tutorial on preventing IP addresses from being logged see:
    ## http://www.able2know.com/forums/about22586.html
    ## 
    ############################################################## 
    ## MOD History: 
    ## 
    ##   2004-04-10 - Version 1.0.0 
    ##      - Initial public release.
    ## 
    ############################################################## 
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
    ##############################################################
    
    
    # 
    #-----[ OPEN ]------------------------------------------ 
    # 
    
    includes/page_header.php 
    
    # 
    #-----[ FIND ]------------------------------------------ 
    # 
    
    // 
    // Generate logged in/logged out status 
    // 
    
    # 
    #-----[ AFTER, ADD  ]------------------------------------------ 
    # 
    
    if ( !$userdata['session_logged_in'] )
    {
    ob_start(); 
    function replace_for_mod_rewrite(&$s) 
    { 
    $urlin = 
    array( 
    "'&#40;?<!/&#41;viewforum.php\?f=&#40;&#91;0-9&#93;*&#41;&topicdays=&#40;&#91;0-9&#93;*&#41;&start=&#40;&#91;0-9&#93;*&#41;'", 
    "'&#40;?<!/&#41;viewforum.php\?f=&#40;&#91;0-9&#93;*&#41;&mark=topics'", 
    "'&#40;?<!/&#41;viewtopic.php\?t=&#40;&#91;0-9&#93;*&#41;&watch=topic*'", 
    "'&#40;?<!/&#41;viewtopic.php\?t=&#40;&#91;0-9&#93;*&#41;&unwatch=topic*'", 
    "'&#40;?<!/&#41;viewtopic.php\?t=&#40;&#91;0-9&#93;*&#41;&highlight=*'",
    "'&#40;?<!/&#41;viewforum.php\?f=&#40;&#91;0-9&#93;*&#41;'", 
    "'&#40;?<!/&#41;viewtopic.php\?t=&#40;&#91;0-9&#93;*&#41;&view=previous'", 
    "'&#40;?<!/&#41;viewtopic.php\?t=&#40;&#91;0-9&#93;*&#41;&view=next'", 
    "'&#40;?<!/&#41;viewtopic.php\?t=&#40;&#91;0-9&#93;*&#41;&postdays=&#40;&#91;0-9&#93;*&#41;&postorder=&#40;&#91;a-zA-Z&#93;*&#41;&vote=viewresult'", 
    "'&#40;?<!/&#41;viewtopic.php\?t=&#40;&#91;0-9&#93;*&#41;&postdays=&#40;&#91;0-9&#93;*&#41;&postorder=&#40;&#91;a-zA-Z&#93;*&#41;&start=&#40;&#91;0-9&#93;*&#41;'", 
    "'&#40;?<!/&#41;viewtopic.php\?t=&#40;&#91;0-9&#93;*&#41;&start=&#40;&#91;0-9&#93;*&#41;&postdays=&#40;&#91;0-9&#93;*&#41;&postorder=&#40;&#91;a-zA-Z&#93;*&#41;&highlight=&#40;&#91;a-zA-Z0-9&#93;*&#41;'", 
    "'&#40;?<!/&#41;viewtopic.php\?t=&#40;&#91;0-9&#93;*&#41;&start=&#40;&#91;0-9&#93;*&#41;'", 
    "'&#40;?<!/&#41;viewtopic.php\?t=&#40;&#91;0-9&#93;*&#41;'", 
    "'&#40;?<!/&#41;viewtopic.php&p=&#40;&#91;0-9&#93;*&#41;'", 
    "'&#40;?<!/&#41;viewtopic.php\?p=&#40;&#91;0-9&#93;*&#41;'", 
    &#41;; 
    $urlout = array&#40; 
    "topic-\\1-\\2-\\3.html", 
    "mark-forum\\1.html", 
    "updates-topic\\1.html", 
    "stop-updates-topic\\1.html", 
    "about\\1.html&highlight=\\2", 
    "forum-\\1.html", 
    "ptopic\\1.html", 
    "ntopic\\1.html", 
    "view-poll\\1-\\2-\\3.html", 
    "about\\1-\\2-\\3-\\4.html", 
    "about\\1.html", 
    "about\\1-\\2.html", 
    "about\\1.html", 
    "post-\\1.html", 
    "post-\\1.html", 
    &#41;; 
    $s = preg_replace&#40;$urlin, $urlout, $s&#41;; 
    return $s; 
    &#125; 
    &#125;
    
    # 
    #-----&#91; OPEN &#93;------------------------------------------ 
    # 
    
    includes/page_tail.php 
    
    # 
    #-----&#91; FIND &#93;------------------------------------------ 
    # 
    
    $db->sql_close&#40;&#41;; 
    
    # 
    #-----&#91; AFTER, ADD  &#93;------------------------------------------ 
    # 
    
    if &#40; !$userdata&#91;'session_logged_in'&#93; &#41;
    &#123;
    $contents = ob_get_contents&#40;&#41;; 
    ob_end_clean&#40;&#41;; 
    echo replace_for_mod_rewrite&#40;$contents&#41;; 
    global $dbg_starttime; 
    &#125;
    
    # 
    #-----&#91; OPEN &#93;------------------------------------------ 
    #  
    
    .htaccess 
    
    # 
    #-----&#91; ADD  &#93;------------------------------------------ 
    #  
    
    RewriteEngine On 
    RewriteRule ^forums.* index.php &#91;L,NC&#93;
    RewriteRule ^post-&#40;&#91;0-9&#93;*&#41;.html&highlight=&#40;&#91;a-zA-Z0-9&#93;*&#41; viewtopic.php?p=$1&highlight=$2 &#91;L,NC&#93;
    RewriteRule ^post-&#40;&#91;0-9&#93;*&#41;.* viewtopic.php?p=$1 &#91;L,NC&#93;
    RewriteRule ^view-poll&#40;&#91;0-9&#93;*&#41;-&#40;&#91;0-9&#93;*&#41;-&#40;&#91;a-zA-Z&#93;*&#41;.* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult &#91;L,NC&#93;
    RewriteRule ^about&#40;&#91;0-9&#93;*&#41;.html&highlight=&#40;&#91;a-zA-Z0-9&#93;*&#41; viewtopic.php?t=$1&highlight=$2 &#91;L,NC&#93;
    RewriteRule ^about&#40;&#91;0-9&#93;*&#41;.html&view=newest viewtopic.php?t=$1&view=newest &#91;L,NC&#93;
    RewriteRule ^about&#40;&#91;0-9&#93;*&#41;-&#40;&#91;0-9&#93;*&#41;-&#40;&#91;a-zA-Z&#93;*&#41;-&#40;&#91;0-9&#93;*&#41;.* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 &#91;L,NC&#93;
    RewriteRule ^about&#40;&#91;0-9&#93;*&#41;-&#40;&#91;0-9&#93;*&#41;.* viewtopic.php?t=$1&start=$2 &#91;L,NC&#93;
    RewriteRule ^about&#40;&#91;0-9&#93;*&#41;.* viewtopic.php?t=$1 &#91;L,NC&#93;
    RewriteRule ^about&#40;&#91;0-9&#93;*&#41;.html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 &#91;L,NC&#93;
    RewriteRule ^mark-forum&#40;&#91;0-9&#93;*&#41;.html* viewforum.php?f=$1&mark=topics &#91;L,NC&#93;
    RewriteRule ^updates-topic&#40;&#91;0-9&#93;*&#41;.html* viewtopic.php?t=$1&watch=topic &#91;L,NC&#93;
    RewriteRule ^stop-updates-topic&#40;&#91;0-9&#93;*&#41;.html* viewtopic.php?t=$1&unwatch=topic &#91;L,NC&#93;
    RewriteRule ^forum-&#40;&#91;0-9&#93;*&#41;.html viewforum.php?f=$1 &#91;L,NC&#93;
    RewriteRule ^forum-&#40;&#91;0-9&#93;*&#41;.* viewforum.php?f=$1 &#91;L,NC&#93;
    RewriteRule ^topic-&#40;&#91;0-9&#93;*&#41;-&#40;&#91;0-9&#93;*&#41;-&#40;&#91;0-9&#93;*&#41;.* viewforum.php?f=$1&topicdays=$2&start=$3 &#91;L,NC&#93;
    RewriteRule ^ptopic&#40;&#91;0-9&#93;*&#41;.* viewtopic.php?t=$1&view=previous &#91;L,NC&#93;
    RewriteRule ^ntopic&#40;&#91;0-9&#93;*&#41;.* viewtopic.php?t=$1&view=next &#91;L,NC&#93;
    
    
    # 
    #-----&#91; OPEN &#93;------------------------------------------ 
    #  
    
    robots.txt 
    
    Disallow&#58; forums/post-*.html$ 
    Disallow&#58; forums/updates-topic.html*$ 
    Disallow&#58; forums/stop-updates-topic.html*$ 
    Disallow&#58; forums/ptopic*.html$ 
    Disallow&#58; forums/ntopic*.html$ 
    
    # 
    #-----&#91; OPEN &#93;------------------------------------------ 
    # 
    
    includes/functions.php 
    
    # 
    #-----&#91; FIND &#93;------------------------------------------ 
    #  
    
    if &#40;!empty&#40;$db&#41;&#41; 
    &#123; 
         $db->sql_close&#40;&#41;; 
    &#125; 
    
    # 
    #-----&#91; AFTER, ADD  &#93;------------------------------------------ 
    # 
    
    if &#40; !$userdata&#91;'session_logged_in'&#93; &#41;
    &#123;
    if &#40;stristr&#40;$url, 'http&#58;//'&#41;&#41; &#123; 
      header&#40;'Location&#58; ' . $url&#41;; 
      exit; 
    &#125; 
    &#125;
    
    # 
    #-----&#91; SAVE/CLOSE ALL FILES &#93;------------------------------------------ 
    # 
    # EoM 
    

  • Community Manager

    @alive said:

    ok e per vedere se funziona tutto pefettamente ?

    Fai il backup di quei due file e poi uppi tutto sul server 🙂


  • User Attivo

    non mi funziona mi da quest'errore

    Warning: Cannot modify header information - headers already sent by &#40;output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php&#58;34&#41; in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_tail.php on line 100
    
    Warning&#58; Cannot modify header information - headers already sent by &#40;output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php&#58;34&#41; in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_tail.php on line 101
    
    Warning&#58; Cannot modify header information - headers already sent by &#40;output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php&#58;34&#41; in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_tail.php on line 102
    
    Warning&#58; Cannot modify header information - headers already sent by &#40;output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php&#58;34&#41; in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php on line 739
    
    Warning&#58; Cannot modify header information - headers already sent by &#40;output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php&#58;34&#41; in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php on line 745
    
    Warning&#58; Cannot modify header information - headers already sent by &#40;output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php&#58;34&#41; in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php on line 746
    

  • Super User

    molto interessante 😉

    chi lo ha installato ha notato qualche differenza/miglioramento/peggioramento?

    grazie 🙂


  • Super User

    @alive said:

    non mi funziona mi da quest'errore

    Warning: Cannot modify header information - headers already sent by &#40;output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php&#58;34&#41; in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_tail.php on line 100
    
    
    

    apri page_tail.php dovresti eliminare le righe vuote in testa al file

    se non funziona ti spiego comunque l'errore

    in soldoni la pagina php prova a modificare le impostazione dell'Header HTTP quando già parte della pagina è stata composta per essere inviata al Browser, spesso può essere semplicemente una riga vuota a creare il problema

    :ciauz:


  • User Attivo

    in testa al file non ci sono righe vuote.

    Ti posto la pg:

    <?php
    /***************************************************************************
     *                              page_tail.php
     *                            -------------------
     *   begin                : Saturday, Feb 13, 2001
     *   copyright            &#58; &#40;C&#41; 2001 The phpBB Group
     *   email                &#58; [email][email protected][/email]
     *
     *   $Id&#58; page_tail.php,v 1.27.2.2 2002/11/26 11&#58;42&#58;12 psotfx Exp $
     *
     *
     ***************************************************************************/
    
    /***************************************************************************
     *
     *   This program is free software; you can redistribute it and/or modify
     *   it under the terms of the GNU General Public License as published by
     *   the Free Software Foundation; either version 2 of the License, or
     *   &#40;at your option&#41; any later version.
     *
     ***************************************************************************/
    
    if &#40; !defined&#40;'IN_PHPBB'&#41; &#41;
    &#123;
    	die&#40;'Hacking attempt'&#41;;
    &#125;
    
    //
    // CBACK.de CrackerTracker
    // Footer Parser and Counter
    //
    include&#40;$phpbb_root_path . 'ctracker/ct_footer.'.$phpEx&#41;;
    
    //
    // Show the overall footer.
    //
    $admin_link = &#40; $userdata&#91;'user_level'&#93; == ADMIN &#41; ? '[url="admin/index.' . $phpEx . '?sid=' . $userdata&#91;'session_id'&#93; . '"]' . $lang&#91;'Admin_panel'&#93; . '
    
    ' &#58; '';
    
    $template->set_filenames&#40;array&#40;
    	'overall_footer' => &#40; empty&#40;$gen_simple_header&#41; &#41; ? 'overall_footer.tpl' &#58; 'simple_footer.tpl'&#41;
    &#41;;
    
    $template->assign_vars&#40;array&#40;
    	'PHPBB_VERSION' => '2' . $board_config&#91;'version'&#93;,
    	'TRANSLATION_INFO' => &#40; isset&#40;$lang&#91;'TRANSLATION_INFO'&#93;&#41; &#41; ? $lang&#91;'TRANSLATION_INFO'&#93; &#58; '',
    	'ADMIN_LINK' => $admin_link&#41;
    &#41;;
    
    $template->pparse&#40;'overall_footer'&#41;;
    
    //
    // Close our DB connection.
    //
    $db->sql_close&#40;&#41;;
    
    
    /* Un-comment the line below to restrict Admins only to view page generation info */
    
    //if&#40; &#40;$userdata&#91;'session_logged_in'&#93;&#41; and &#40;$userdata&#91;'user_level'&#93; == ADMIN&#41; &#41;
    &#123;
    	$gzip_text = &#40;$board_config&#91;'gzip_compress'&#93;&#41; ? 'GZIP enabled' &#58; 'GZIP disabled';
    
    	$debug_text = &#40;DEBUG == 1&#41; ? 'Debug on' &#58; 'Debug off';
    
    	$excuted_queries = $db->num_queries;
    
    	$mtime = microtime&#40;&#41;;
    	$mtime = explode&#40;" ",$mtime&#41;;
    	$mtime = $mtime&#91;1&#93; + $mtime&#91;0&#93;;
    	$endtime = $mtime;
    
    	$gentime = round&#40;&#40;$endtime - $starttime&#41;, 4&#41;;
    
    	$sql_time = round&#40;$db->sql_time, 4&#41;;
    
    	$sql_part = round&#40;$sql_time / $gentime * 100&#41;;
    	$php_part = 100 - $sql_part;
    
    	echo '
    <div class="copyright" align="center">Page generation time&#58; '. $gentime .'s &#40;PHP&#58; '. $php_part .'% - SQL&#58; '. $sql_part .'%&#41; - SQL queries&#58; '. $excuted_queries .' - '. $gzip_text .' - '. $debug_text .'</div>';
    &#125;
    
    
    //
    // Compress buffered output if required and send to browser
    //
    //
    // begin keyword urls mod
    //
    
    header &#40;'Expires&#58; 0'&#41;;
    header &#40;'Pragma&#58; no-cache'&#41;;
    header &#40;'X-Powered-By&#58;'&#41;;
    header &#40;'Server&#58;'&#41;;
    
    if&#40; function_exists&#40;ob_gzhandler&#41; && $board_config&#91;'gzip_compress'&#93; == 1&#41;
    &#123;
    //	$gzip_contents = preg_replace&#40;"/&#40;\s+&#41;?&#40;\<.+\>&#41;&#40;\s+&#41;?/", "$2", rewrite_urls&#40;ob_get_contents&#40;&#41;&#41;&#41;;
    	$gzip_contents = rewrite_urls&#40;ob_get_contents&#40;&#41;&#41;;
    	ob_end_clean&#40;&#41;;
    	header&#40;'Vary&#58; Accept-Encoding'&#41;;
    	Header&#40;'X-Content-Original-Length&#58; ' . strlen&#40;$gzip_contents&#41;&#41;;
    	Header&#40;'X-Content-Encoded-By&#58; webmedic page optimizer'&#41;;
    //	$gzip_contents = preg_replace&#40;"//", "$2", $gzip_contents&#41;;
    //	Header&#40;'X-Content-Clean-Rem-Length&#58; ' . strlen&#40;$gzip_contents&#41;&#41;;
    //	$gzip_contents = preg_replace&#40;"/&#40;\s+&#41;?&#40;\<.+\>&#41;&#40;\s+&#41;?/", "$2", $gzip_contents&#41;;
    //	$gzip_contents = preg_replace&#40;"/\\r|\\n|\\f/", "", $gzip_contents&#41;;
    //	Header&#40;'X-Content-Clean-Space-Length&#58; ' . strlen&#40;$gzip_contents&#41;&#41;;
    //	$gzip_contents = preg_replace&#40;"/&#40;\S+&#41;\x20&#123;2,&#125;&#40;?=\S+&#41;/", "$1 ",  $gzip_contents&#41;;
    //	Header&#40;'X-Content-Clean-Space-Inside-Length&#58; ' . strlen&#40;$gzip_contents&#41;&#41;;
    	ob_start&#40;'ob_gzhandler'&#41;;
    	echo $gzip_contents;
    	ob_end_flush&#40;&#41;;
    //	header&#40;'Content-Length&#58; '.ob_get_length&#40;&#41;&#41;;
    	ob_end_flush&#40;&#41;;
    
    &#125;
    else
    &#123;
    //	$contents = preg_replace&#40;"/&#40;\s+&#41;?&#40;\<.+\>&#41;&#40;\s+&#41;?/", "$2", ob_get_contents&#40;&#41;&#41;;
    	$contents = rewrite_urls&#40;ob_get_contents&#40;&#41;&#41;;
    	ob_end_clean&#40;&#41;;
    	echo $contents;
    	global $dbg_starttime;
    &#125;
    
    //
    // end keyword urls mod
    //
    
    
    exit;
    
    ?>
    

  • User Attivo

    aiutatemi pls 😢 !


  • User Attivo

    vi siete dimenticati di me?


  • User Attivo

    ma nessuno mi aiuta a far funzionare questa mod?


  • Community Manager

    @alive said:

    ma nessuno mi aiuta a far funzionare questa mod?

    Guarda alive, neanche a me funziona, sono arrivato alla conclusione che ci sono alcune version di phpbb non compatibili.

    L'ultima prova è copiare il codice che ha dato Tuonorosso, poi non ci resta che trovare un'altra mod 🙂

    :ciauz:


  • User Attivo

    Quell'altra che avevo suggerito nell'altro post non va bene eh?


  • User Attivo

    In giro ho trovato anche questa

    mod: http://www.phpbbhacks.com/download.php?id=2207

    demo: http://eric.best-1.biz/

    cosa ne dite ?

    Poi ho trovato anche questa cosa, non so se può essere interessante:

    http://www.phpbb.com/kb/article.php?article_id=29 !

    Fatemi sapere, voi esperti 😄 !


  • Bannato User Attivo

    @Tuonorosso said:

    Ciao ragazzi,
    partendo da questo link http://www.computerbb.org/about2261.html ho trovato questo mods.

    Il fatto è che proprio non mi funziona. Le pagine mi rimangono sempre in .php?par=X invece che trasformarsi in xxxxx-vt-X.htm

    Ecco il codice:

    ># 
    #-----[ OPEN ]------------------------------------------ 
    # 
     
    includes/page_header.php 
     
    # 
    #-----[ FIND ]------------------------------------------ 
    # 
     
    $template->set_filenames(array( 
        'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl') 
    ); 
     
    # 
    #-----[ AFTER, ADD  ]------------------------------------------ 
    # 
     
    ob_start(); 
     
     
    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; 
     
    } 
     
     
    function rewrite_urls($content) 
    { 
     
        function if_query($amp) 
        { 
     
            if($amp != '') 
            { 
                return '?'; 
            } 
     
        } 
     
        $url_in = array('/(?<!\/)viewforum.php\?f=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*? )<\/a>/e', 
                '/(?<!\/)viewtopic.php\?p=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a> /e', 
                '/(?<!\/)viewtopic.php\?t=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a> /e'); 
     
        $url_out = array("make_url_friendly('\\6') . '-vf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'", 
                "make_url_friendly('\\6') . '-vp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'", 
                "make_url_friendly('\\6') . '-vt\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'"); 
     
        $content = preg_replace($url_in, $url_out, $content); 
     
        return $content; 
     
    }    
     
    # 
    #-----[ OPEN ]------------------------------------------ 
    # 
     
    includes/page_tail.php 
     
    # 
    #-----[ FIND ]------------------------------------------ 
    # 
     
    if ( $do_gzip_compress ) 
    { 
        // 
        // Borrowed from php.net! 
        // 
        $gzip_contents = ob_get_contents(); 
        ob_end_clean(); 
     
        $gzip_size = strlen($gzip_contents); 
        $gzip_crc = crc32($gzip_contents); 
     
        $gzip_contents = gzcompress($gzip_contents, 9); 
        $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); 
     
        echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; 
        echo $gzip_contents; 
        echo pack('V', $gzip_crc); 
        echo pack('V', $gzip_size); 
    } 
     
    # 
    #-----[ REPLACE, WITH  ]------------------------------------------ 
    # 
     
    if ( $do_gzip_compress ) 
    { 
        // 
        // Borrowed from php.net! 
        // 
        $gzip_contents = ob_get_contents(); 
        ob_end_clean(); 
        echo rewrite_urls($contents); 
        global $dbg_starttime; 
     
        $gzip_size = strlen($gzip_contents); 
        $gzip_crc = crc32($gzip_contents); 
     
        $gzip_contents = gzcompress($gzip_contents, 9); 
        $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); 
     
        echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; 
        echo $gzip_contents; 
        echo pack('V', $gzip_crc); 
        echo pack('V', $gzip_size); 
    } 
    else 
    { 
        $contents = ob_get_contents(); 
        ob_end_clean(); 
        echo rewrite_urls($contents); 
        global $dbg_starttime; 
    } 
    >```
     
    .HTACCESS
     
    Options +FollowSymlinks 
     
    

    RewriteEngine On
    #this may cause isues with subdirs and so I have not enabled it.
    #RewriteBase /

    RewriteRule [.]-vf([0-9]) viewforum.php?%{QUERY_STRING}&f=$1
    RewriteRule [.]-vp([0-9]) viewtopic.php?%{QUERY_STRING}&p=$1
    RewriteRule [.]-vt([0-9]) viewtopic.php?%{QUERY_STRING}&t=$1

    I dubbi che mi sono venuti sono 2:

    1. Avevo dei mods in queste 2 pagine, allora ho provato anche con page_header e page_tail presi vergini ma non funziona lo stesso
    2. Forse il mio problema è che ho l'indirizzo con sottodominio http: //forum.recensiamo.it , ma anche qui, provando a digitare un indirizzo con finale .htm la pagina si vede. Il problema sembra dunque nella scrittura degli url in maniera corretta. (da qui che il .htaccess sia corretto)

    Grazie a chiunque possa aiutarmi a comprendere il codice 😉

    PS: credo che il succo stia nel page_tail.phpHo applicato passo passo la modifica su un forum con template subsilver e senza altre mod rilevanti.

    Non mi è cambiato nulla. I link mi appaiono ancora come viewtopic.php?

    dove devo andare a modificare per far creare i link con in essi il titolo del topic :mmm:


  • Super User

    Un consiglio: ma perché, anziché perdere il sonno per cercare di far funzionare questi mod/hack per phpBB, non passate a un forum che abbia gli URL spider-friendly built-in? [url=http://www.simplemachines.org/]SMF è open-source, accessibile e mi pare che funzioni benissimo (potete vedere la 1.1 RC2 in azione sul [url=http://forum.joomla.org/]forum di Joomla.org). 🙂


  • Super User

    chissá, probabilmente perché, come me, non l'avevano mai sentito nominare 😄

    certo che [url=http://www.simplemachines.org/about/features.php]la lista di features é abbastanza indicativa... 😮


  • Super User

    @must said:

    chissá, probabilmente perché, come me, non l'avevano mai sentito nominare 😄
    Io lo sto "tenendo d'occhio" praticamente dalla nascita, e mi sembra davvero molto ben fatto: soltanto dal punto di vista dell'accessibilità, non c'è proprio confronto con phpBB, che però ha dalla sua il fatto di essere molto diffuso.


  • Bannato User Attivo

    @ArkaneFactors said:

    Un consiglio: ma perché, anziché perdere il sonno per cercare di far funzionare questi mod/hack per phpBB, non passate a un forum che abbia gli URL spider-friendly built-in? [url=http://www.simplemachines.org/]SMF è open-source, accessibile e mi pare che funzioni benissimo (potete vedere la 1.1 RC2 in azione sul [url=http://forum.joomla.org/]forum di Joomla.org). :)Sono masochista.
    Proprio non riesco a farlo andare...
    Mi d questo errore:
    Fatal error: Cannot redeclare if_query() (previously declared in /home/mhd-01/www.forumlibri.com/htdocs/forum/includes/page_header.php:146) in /home/mhd-01/www.forumlibri.com/htdocs/forum/includes/page_header.php on line 146

    che è proprio dove chiama la funzione:

     function if_query&#40;$amp&#41; 
        &#123; 
    
            if&#40;$amp != ''&#41;
    ``` :x  :x  :x 
    
    E poi io AMO il phpbb :D

  • Super User

    @fabioski said:

    Sono masochista.
    😄

    Fatal error: Cannot redeclare if_query&#40;&#41; &#40;previously declared in /home/mhd-01/www.forumlibri.com/htdocs/forum/includes/page_header.php&#58;146&#41; in /home/mhd-01/www.forumlibri.com/htdocs/forum/includes/page_header.php on line 146
    

    Hai incluso due (o più) volte page_header.php. 🙂

    Consiglio: usa [url=http://php.net/require_once]require_once per gli include. 😉


  • Bannato User Attivo

    @ArkaneFactors said:

    Fatal error: Cannot redeclare if_query&#40;&#41; &#40;previously declared in /home/mhd-01/www.forumlibri.com/htdocs/forum/includes/page_header.php&#58;146&#41; in /home/mhd-01/www.forumlibri.com/htdocs/forum/includes/page_header.php on line 146
    

    Hai incluso due (o più) volte page_header.php. 🙂

    Consiglio: usa [url=http://php.net/require_once]require_once per gli include. ;)Non ho modificato nulla del phpbb. E non so "metterci" le mani 😢
    Non so dove venga inclusa questa pageheader... 😢 😢 😢