Parašė gakse· 2010 Bir. 8 22:06:25
#4
Visu pirma susirask
// Start Output Buffering
ob_start("");
ir pakeisk situo
// Change links to F-url
function f_url($buf) {
if(!substr_count($_SERVER[REQUEST_URI],"administration")){
$buf = preg_replace('#readarticle\.php\?article_id=([0-9]*?)(\'|")#si', 'skaityti-straipsni\1.html\2', $buf);
$buf = preg_replace('#articles\.php\?cat_id=([0-9]*?)(\'|")#si', 'straipsnis-kategorija-\1.html\2', $buf);
$buf = preg_replace('#downloads\.php\?cat_id=([0-9]*?)(\'|")#si', 'muzika-kategorija-\1.html\2', $buf);
$buf = preg_replace('#downloads\.php\?cat_id=([0-9]*?)(&|&)download_id=([0-9]*?)(\'|")#si', 'muzika-kategorija-\1-daina-\3.html\4', $buf);
$buf = preg_replace('#downloads\.php#si', 'siuntiniai.html', $buf);
$buf = preg_replace('#weblinks\.php\?cat_id=([0-9]*?)(\'|")#si', 'nuoroda-katalogas-\1.html\2', $buf);
$buf = preg_replace('#weblinks\.php\?cat_id=([0-9]*?)(&|&)weblink_id=([0-9]*?)(\'|")#si', 'nuoroda-katalogas-\1-strone-\3.html\4', $buf);
$buf = preg_replace('#weblinks\.php#si', 'nuoroda.html', $buf);
$buf = preg_replace('#contact\.php#si', 'kontaktai.html', $buf);
$buf = preg_replace('#photogallery\.php\?album_id=([0-9]*?)(\'|")#si', 'nuotraukos-albumas-\1.html\2', $buf);
$buf = preg_replace('#photogallery\.php\?photo_id=([0-9]*?)(\'|")#si', 'nuotraukos-foto-\1.html\2', $buf);
$buf = preg_replace('#showphoto\.php\?photo_id=([0-9]*?)(\'|")#si', 'rodyti-nuotrauka-\1.html\2', $buf);
$buf = preg_replace('#photogallery\.php#si', 'fotoalbumas.html', $buf);
$buf = preg_replace('#search\.php\?stype=f#si', 'ieskoti-forume.html', $buf);
$buf = preg_replace('#search\.php#si', 'ieskoti.html', $buf);
$buf = preg_replace('#profile\.php\?lookup=([0-9]*?)(\'|")#si', 'narys-\1.html\2', $buf);
$buf = preg_replace('#print\.php\?type=N(&|&)item_id=([0-9]*?)(\'|")#si', 'spausdinti-\2.html\3', $buf);
$buf = preg_replace('#print\.php\?type=A(&|&)item_id=([0-9]*?)(\'|")#si', 'spausdinti-stacia-\2.html\3', $buf);
$buf = preg_replace('#register\.php#si', 'registracija.html', $buf);
$buf = preg_replace('#lostpassword\.php#si', 'slaptazodis.html', $buf);
$buf = preg_replace('#ion/index\.html#si', 'ion/index.php', $buf);
$buf = preg_replace('#viewpage\.php\?page_id=([0-9]*?)(\'|")#si', 'puslapis-\1.html\2', $buf);
$buf = preg_replace('#news\.php\?readmore=([0-9]*?)(\'|")#si', 'filmas-\1.html\2', $buf);
$buf = preg_replace('#forum/index.php#si', 'forum/forumas.html', $buf);
$buf = preg_replace('#viewforum.php?forum_id=([0-9]*?)(\'|")#si', 'see-forum-1.html2', $buf);
}
return $buf;
}
// Start Output Buffering
ob_start("f_url");
}
pats atsirinksi ten susirasysi pagal save i maincore dek