|
We try a different method
Go to Administration Panel >> Other >> URL Editor >> URL Preset select to Genoa/Seditio Compatible and save.
Open
modules/forums/inc/forums.functions.php
find:
PHP
1 |
$cot_extrafields [ $db_forum_topics ] = (! empty ( $cot_extrafields [ $db_forum_topics ])) ? $cot_extrafields [ $db_forum_topics ] : array ();
|
add after:
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
function sef_link( $cot_sef_title ){
$turkish = array ( 'ş' , 'Ş' , 'ı' , 'İ' , 'ğ' , 'Ğ' , 'ü' , 'Ü' , 'ö' , 'Ö' , 'ç' , 'Ç' );
$english = array ( 's' , 's' , 'i' , 'i' , 'g' , 'g' , 'u' , 'u' , 'o' , 'o' , 'c' , 'c' );
$cot_sef_title = str_replace ( $turkish , $english , $cot_sef_title );
$cot_sef_title = strtolower ( $cot_sef_title );
$cot_sef_title = preg_replace( '/&.+?;/' , '-' , $cot_sef_title );
$cot_sef_title = preg_replace( '/[^%a-z0-9 _-]/' , '-' , $cot_sef_title );
$cot_sef_title = preg_replace( '/\s+/' , '-' , $cot_sef_title );
$cot_sef_title = preg_replace( '|-+|' , '-' , $cot_sef_title );
$cot_sef_title = str_replace ( "--" , "-" , $cot_sef_title );
$cot_sef_title = trim( $cot_sef_title , '-' );
return $cot_sef_title ;
}
|
find:
PHP
1 |
$tmp [] = array (cot_url( 'forums' , 'm=topics&s=' . $x ), $structure [ 'forums' ][ $x ][ 'title' ]);
|
replace:
PHP
1 |
$tmp [] = array ( 'forums/topics/' . $cat . '/' , $structure [ 'forums' ][ $x ][ 'title' ]);
|
find:
PHP
1 |
$tag_prefix . 'URL' => cot_url( 'forums' , 'm=topics&s=' . $cat ),
|
replace:
PHP
1 |
$tag_prefix . 'URL' => 'forums/topics/' . $cat . '/' ,
|
find:
PHP
1 |
$tag_prefix . 'LASTPOST' => cot_rc_link( $new_elems ? cot_url( 'forums' , 'm=posts&q=' . $stat [ 'fs_lt_id' ] . '&n=unread' , '#unread' ) : cot_url( 'forums' , 'm=posts&q=' . $stat [ 'fs_lt_id' ] . '&n=last' , '#bottom' ), cot_cutstring( $stat [ 'fs_lt_title' ], 32)),
|
replace:
PHP
1 |
$tag_prefix . 'LASTPOST' => cot_rc_link( $new_elems ? 'forums/posts/' . $stat [ 'fs_lt_id' ] . '/unread/#unread' : 'forums/posts/' . $stat [ 'fs_lt_id' ] . '/' .sef_link( $stat [ 'fs_lt_title' ]). '/last/#bottom' , cot_cutstring( $stat [ 'fs_lt_title' ], 32)),
|
find:
PHP
1 |
$tag_prefix . 'LASTPOST_URL' => $new_elems ? cot_url( 'forums' , 'm=posts&q=' . $stat [ 'fs_lt_id' ] . '&n=unread' , '#unread' ) : cot_url( 'forums' , 'm=posts&q=' . $stat [ 'fs_lt_id' ] . '&n=last' , '#bottom' ),
|
replace:
PHP
1 |
$tag_prefix . 'LASTPOST_URL' => $new_elems ? 'forums/posts/' . $stat [ 'fs_lt_id' ] . '/' .sef_link( $stat [ 'fs_lt_title' ]). '/unread/#unread' : 'forums/posts/' . $stat [ 'fs_lt_id' ] . '/' .sef_link( $stat [ 'fs_lt_title' ]). '/last/#bottom' ,
|
save and reload ftp.
open modules/forums/inc/forums.topics.php
find:
PHP
1 |
cot_redirect(cot_url( 'forums' , "m=topics&s=" . $s , '' , true));
|
replace:
PHP
1 |
cot_redirect( 'forums/topics/".$s."/' , '' , true);
|
find:
PHP
1 |
$row [ 'ft_url' ] = cot_url( 'forums' , "m=posts&q=" . $row [ 'ft_movedto' ]);
|
replace:
PHP
1 |
$row [ 'ft_url' ] = "forums/posts/" . $row [ 'ft_movedto' ]. "/" .sef_link( $row [ 'ft_title' ]). "/" ;
|
find:
PHP
1 |
$row [ 'ft_lastposturl' ] = cot_url( 'forums' , "m=posts&q=" . $row [ 'ft_movedto' ]. "&n=last" , "#bottom" );
|
replace:
PHP
1 |
$row [ 'ft_lastposturl' ] = "forums/posts/" . $row [ 'ft_movedto' ]. "/" .sef_link( $row [ 'ft_title' ]). "/last/#bottom" ;
|
find:
PHP
1 |
$row [ 'ft_url' ] = cot_url( 'forums' , "m=posts&q=" . $row [ 'ft_id' ]);
|
replace:
PHP
1 |
$row [ 'ft_url' ] = "forums/posts/" . $row [ 'ft_id' ]. "/" .sef_link( $row [ 'ft_title' ]). "/" ;
|
find:
PHP
1 |
$row [ 'ft_lastposturl' ] = ( $usr [ 'id' ] > 0 && $row [ 'ft_updated' ] > $usr [ 'lastvisit' ]) ? cot_url( 'forums' , "m=posts&q=" . $row [ 'ft_id' ]. "&n=unread" , "#unread" ) : cot_url( 'forums' , "m=posts&q=" . $row [ 'ft_id' ]. "&n=last" , "#bottom" );
|
replace:
PHP
1 |
$row [ 'ft_lastposturl' ] = ( $usr [ 'id' ] > 0 && $row [ 'ft_updated' ] > $usr [ 'lastvisit' ]) ? "forums/posts/" . $row [ 'ft_id' ]. "/unread/#unread" : "forums/posts/" . $row [ 'ft_id' ]. "/last/#bottom" ;
|
find:
PHP
1 |
$jumpbox [cot_url( 'forums' , "m=topics&s=" . $key , '' , true)] = $val [ 'tpath' ];
|
replace:
PHP
1 |
$jumpbox [ "forums/topics/" . $key . "/, '', true" ] = $val [ 'tpath' ];
|
save and reload ftp
.htaccess (upload your root directory)
PHP
1 2 3 4 5 6 7 8 9 10 11 12 |
Options -Indexes
RewriteEngine On
RewriteBase "/"
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^forums/([^/-]+)/$ forums.php?m= $1 & [L,NC]
RewriteRule ^forums/([^/-]+)/([^/-]+)/$ forums.php?m= $1 &s= $2 & [L,NC]
RewriteRule ^forums/posts/([a-zA-Z0-9-_]+)/$ forums.php?m=posts&q= $1 & [L,NC]
RewriteRule ^forums/posts/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/$ forums.php?m=posts&q= $1 & $2 & [L,NC]
RewriteRule ^forums/posts/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([^/-]+)/$ forums.php?m=posts&q= $1 &= $2 &n= $3 & [L,NC]
|
Try again now
Gökhan YILDIZ
|