• 17-05-2008, 11:44:39
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.



    katagoriler


    Tire Tireden Tireli Fotoğrafları Pazarı Kutsan Tirespor belediyesi haberi


    $story->title = str_replace(" ","-",$story->title);
    mainfile.php
    <?php
     
    $GLOBALS['_rewriteRulesFrom'] = array(
       '/forum/',
     '/haber-',
     '/konu-',
     
     '/arsiv-',
     
    );
    $GLOBALS['_rewriteRulesTo'] = array(
        '/modules/newbbex/',
        '/modules/news/article.php?storyid=',
     
    '/modules/news/index.php?storytopic=',
        '/modules/news/print.php?storyid=',
    );
     
     
        $GLOBALS['_abs_offset'] = preg_replace('/https?:\/\/'.$_SERVER["HTTP_HOST"].'/','',XOOPS_URL);
        $GLOBALS['_rewriteRulesTo1'] = preg_replace('/^(.*)$/e','"!('.XOOPS_URL.'|\"".$GLOBALS["_abs_offset"]."|\'".$GLOBALS["_abs_offset"].")".preg_quote("\1","!")."!"', $GLOBALS['_rewriteRulesTo']);
        $GLOBALS['_rewriteRulesFrom1'] = preg_replace('/^(.*)$/','\\\1\1',$GLOBALS['_rewriteRulesFrom']);
     
        function modul_turkcelestirici( $s ) {
        $s = preg_replace($GLOBALS['_rewriteRulesTo1'],$GLOBALS['_rewriteRulesFrom1'], $s);
        while($i<=count($GLOBALS['_rewriteRulesFrom'])) {
        $s = preg_replace( '/('.preg_quote(XOOPS_URL,'/').'|"|\')'.preg_quote($GLOBALS['_rewriteRulesTo'][$i],'/').'/' ,"\\1".$GLOBALS['_rewriteRulesFrom'][$i] , $s ) ;
     $i++;
        }
        return $s;
        }
        if (empty($_SERVER['REDIRECT_URL']) || ($_SERVER['REDIRECT_URL'] == $_SERVER['REQUEST_URI'])) {
        if (empty($_SERVER['REDIRECT_REDIRECT_STATUS'])) {
        if (($_changer_url=modul_turkcelestirici('"'.$_SERVER['REQUEST_URI'].'"')) != '"'.$_SERVER['REQUEST_URI'].'"') {
        header('Location: ' . str_replace('"','',$_changer_url));
        }
        }
        }
        $_SERVER['REQUEST_URI'] = str_replace( $GLOBALS['_rewriteRulesFrom'],$GLOBALS['_rewriteRulesTo'], @$_SERVER['REQUEST_URI'] ) ;
        $_SERVER['HTTP_REFERER'] = str_replace($GLOBALS['_rewriteRulesFrom'], $GLOBALS['_rewriteRulesTo'], @$_SERVER['HTTP_REFERER'] ) ;
     
        ob_start( 'modul_turkcelestirici' ) ;
    .htaccess
    RewriteEngine on
    RewriteRule ^konu-(.*)$  modules/news/index.php?storytopic=$1 [L]
     
    RewriteRule ^haber-(.*)$  modules/news/article.php?storyid=$1 [L]
     
    RewriteRule ^arsiv-(.*)$ modules/news/print.php?storyid=$1 [L]
    örnek - example : 1
    $this->keywords = str_replace(" ","-",$this->keywords);



    $story['title'] = "<a href='".XOOPS_URL."/modules/news/article.php?storyid=".$this->storyid()."/".$this->keywords()."'".$story['infotips'].">".$this->title()."</a>";
    .............
    örnek - example : 2

    $this->title = str_replace(" ","-",$this->title);

    $story['title'] = "<a href='".XOOPS_URL."/modules/news/article.php?storyid=".$this->storyid()."/".$this->title()."'".$story['infotips'].">".$this->title()."</a>";

    example str_replace 1
    $story->title = str_replace('ç','c',$story->title);
    $story->title = str_replace('Ç','c',$story->title);
    example str_replace 2

    $this->keywords = str_replace ("ç","c",$this->keywords);
    $this->keywords = str_replace ("?","g",$this->keywords);
    $this->keywords = str_replace ("?","i",$this->keywords);
    ..............
    result
    news seo

    :-D
  • 14-10-2008, 11:27:18
    #2
    Paylaşım için tşkler emeğine sağlık.. birkaç sorum olucak

    http://www.xxxxx.net/haber-4
    bu şekilde oldu ama benim istediğim ;
    http://www.xxxxx.net/haber-4-ornek-haber-basligi-htm

    birde en son yazdığın kodları anlıyamadım. Tşkler