Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change Permalinks

  • @domstie

    Member

    Hi, I would like to change the Permalinks to German. I can change the rewrite_rules in /bb-admin/rewrite_rules.php

    Code:
    Options -MultiViews

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase <?php bb_option( ‘path’ ); ?>

    RewriteRule ^page/([0-9]+)/?$ <?php bb_option( ‘path’ ); ?>index.php?page=$1 [L,QSA]
    RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ <?php bb_option( ‘path’ ); ?>forum.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^forum/([^/]+)/?$ <?php bb_option( ‘path’ ); ?>forum.php?id=$1 [L,QSA]
    RewriteRule ^forum/?$ <?php bb_option( ‘path’ ); ?> [R=302,L,QSA]
    RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ <?php bb_option( ‘path’ ); ?>topic.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^topic/([^/]+)/?$ <?php bb_option( ‘path’ ); ?>topic.php?id=$1 [L,QSA]
    RewriteRule ^topic/?$ <?php bb_option( ‘path’ ); ?> [R=302,L,QSA]
    RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ <?php bb_option( ‘path’ ); ?>tags.php?tag=$1&page=$2 [L,QSA]
    RewriteRule ^tags/([^/]+)/?$ <?php bb_option( ‘path’ ); ?>tags.php?tag=$1 [L,QSA]
    RewriteRule ^tags/?$ <?php bb_option( ‘path’ ); ?>tags.php [L,QSA]
    RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ <?php bb_option( ‘path’ ); ?>profile.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^profile/([^/]+)/([^/]+)/?$ <?php bb_option( ‘path’ ); ?>profile.php?id=$1&tab=$2 [L,QSA]
    RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ <?php bb_option( ‘path’ ); ?>profile.php?id=$1&tab=$2&page=$3 [L,QSA]
    RewriteRule ^profile/([^/]+)/?$ <?php bb_option( ‘path’ ); ?>profile.php?id=$1 [L,QSA]
    RewriteRule ^profile/?$ <?php bb_option( ‘path’ ); ?>profile.php [L,QSA]
    RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ <?php bb_option( ‘path’ ); ?>view.php?view=$1&page=$2 [L,QSA]
    RewriteRule ^view/([^/]+)/?$ <?php bb_option( ‘path’ ); ?>view.php?view=$1 [L,QSA]
    RewriteRule ^rss/?$ <?php bb_option( ‘path’ ); ?>rss.php [L,QSA]
    RewriteRule ^rss/topics/?$ <?php bb_option( ‘path’ ); ?>rss.php?topics=1 [L,QSA]
    RewriteRule ^rss/forum/([^/]+)/?$ <?php bb_option( ‘path’ ); ?>rss.php?forum=$1 [L,QSA]
    RewriteRule ^rss/forum/([^/]+)/topics/?$ <?php bb_option( ‘path’ ); ?>rss.php?forum=$1&topics=1 [L,QSA]
    RewriteRule ^rss/topic/([^/]+)/?$ <?php bb_option( ‘path’ ); ?>rss.php?topic=$1 [L,QSA]
    RewriteRule ^rss/tags/([^/]+)/?$ <?php bb_option( ‘path’ ); ?>rss.php?tag=$1 [L,QSA]
    RewriteRule ^rss/profile/([^/]+)/?$ <?php bb_option( ‘path’ ); ?>rss.php?profile=$1 [L,QSA]
    RewriteRule ^rss/view/([^/]+)/?$ <?php bb_option( ‘path’ ); ?>rss.php?view=$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^.*$ <?php bb_option( ‘path’ ); ?>index.php [L]
    </IfModule>

    bute where, in which files can I change the links? Is there a central function generating the links.

    e.g. old: http://www.forum.com/forum/topic/post-name

    new: http://www.forum.com/forum/thema/postname

    Thank you so much! dom

Viewing 4 replies - 1 through 4 (of 4 total)
  • @gquann

    Member

    Any news on this? I would love to see translated URLs.

    @thion

    Member

    Things like “tags” or “topic” can be translated directly within .htaccess file, as for the “post-name” – I think there’s no way to manipulate this yet, it is being sanitized deeply within bbPress core.

    @gquann

    Member

    But how do I change the corresponding links? If I just translate “topic” in the htaccess, bbpress will understand the translated urls but still generate links with the original “topic”, wouldn’t it?

    @bobbyh

    Member

    To change the corresponding links, you need to edit the functions in /bb-includes/template-functions.php. For instance, you’d change function get_forum_link and get_topic_link so they point to thema (instead of topic) and the German word for forum (instead of forum). This requires a core hack.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar