Ok, i've tried the mod and it looks great!

Still i had to make some changes in the code. Futher i briefly describe what i've done. It would be great if you find several minutes to look the changes through and to comment them in case i've spoiled smth
1) i have CH installed => had to change
includes/class_config.php the way you've described in
phpBB-SEO-Simple-mod-Rewrite_V_0.0.2_CH_Edition . The replacement caused some problems with attach_mod and cache, so i used
- Code: Select all
if (!defined('IN_ADMIN') && !defined('IN_LOGIN') && !( strstr($basename, 'includes/') || strstr($basename, 'attach_mod/') || strstr($basename, 'cache/') || strstr($basename, 'language/')) )
instead of
- Code: Select all
if (!defined('IN_ADMIN') && !defined('IN_LOGIN') && !( strstr($basename, 'includes/') || strstr($basename, 'language/')) )
2) i changed .htaccess as you describe in the same file
3) as far as i cannot insert cyrillic chars in the urls and i have only two main categories and few forums, i've decided to translate forum names manually and to use urls e.g.
- Code: Select all
http://localhost/school-abitu/moscow-state-university/article7029.html
instead of
- Code: Select all
http://localhost/article7029.html
for my topics where
school-abitu is one of my categories and
moscow-state-university is one of my forums. Thus i added .* in rewrite_rules concerning topics & posts.
4) 3) caused problems with images and urls (because of two additional slashes), so i had to add strings
- Code: Select all
RewriteRule ^.*templates/(.*)$ templates/$1 [QSA,L]
RewriteRule ^.*images/(.*)$ images/$1 [QSA,L]
in htaccess file and to write
- Code: Select all
return 'http://localhost/' . $url;
instead of
- Code: Select all
return $url;
in append_sid function (sessions.php)
5) i defined array
rubr in your
class phpbb_seo - Code: Select all
$this->rubr2 = 'school-abitu/';
$this->rubr=array(
...
56 => $this->rubr2.'moscow-state-university',
...
);
6) instead of
- Code: Select all
'U_VIEW_TOPIC' => $config->url($this->requester_topics, $this->extra_parms + array(POST_TOPIC_URL => ((!empty($row['topic_moved_id']) && empty($this->extra_parms)) ? $row['topic_moved_id'] : $row['topic_id'])), true),
in class_topics.php i used
- Code: Select all
'U_VIEW_TOPIC' => $config->url($this->requester_topics, $this->extra_parms + array(POST_TOPIC_URL => ((!empty($row['topic_moved_id']) && empty($this->extra_parms)) ? $row['topic_moved_id'] : $row['topic_id'])) + array(POST_FORUM_URL => $row['forum_id']), true),
to make it possible to learn the forum id from topics url
7) finally i replaced
- Code: Select all
$this->url = $this->seo_static['topic'] . $this->get_vars[POST_TOPIC_URL] . $this->start . $this->seo_ext['topic'];
with
- Code: Select all
$this->url = $this->rubr[$this->get_vars[POST_FORUM_URL]] . '/' . $this->seo_static['topic'] . $this->get_vars[POST_TOPIC_URL] . $this->start . $this->seo_ext['topic'];
in your viewtopic() function and added the line
- Code: Select all
unset($this->get_vars[POST_FORUM_URL]);
That's all
I still have some problems with navigation and ppages

but i guess i can solve them myself)
Thanks a lot for your great work and for your help, dcz
