Localization

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
_Mitto_'s picture

I'm using i18n module.
This make /en/forum links (/sl/ - for me). This can be fixid in .htaccess ?

Or where should i look for make module more "flexible"?

Comments

Not sure I follow, is 1) =

arkepp's picture

Not sure I follow, is

1) = /sl/
or are you trying to do
2) /sl/forum

?

If number 1) then I don't really think this module cares.. unless you're doing two different forums, in which case I would look into using .htaccess if you insist on it being called forum/ for both.

If 2) and the forums live in different directories, then $phpbbcfg['path_abs'] and $phpbbcfg['path_rel'] have to be made more flexible.

You can easily do this since the configuration file is just a regular PHP file (another good reason to not store this stuff in the database).

It's supposed to say 1)

arkepp's picture

It's supposed to say

1) [drupa root] = /sl/

2) [drupal root]/sl/forum

(I forgot this site removes chevrons)

There is only one forum in

_Mitto_'s picture

There is only one forum in folder "/forum" and drupal root is "/".
Modul makes forum URL to
[drupal root]/[lang]/forum
(and all other are similar)
[lang] can be: en, sl, ....

yes, if we are using just /sl/ than we could write

<?php
$phpbbcfg
['path_abs'] = '/sl/forum/';
?>

I'm looking in Multilanguage - i18n module (Internationalization part) if i could make some exception for forum.

.

_Mitto_'s picture

.

localizer

abacs's picture

hi,

i'm using the localizer module.
same problem: mydomain/en/phpbb not workink.
in configuration.inc.php is set:
$phpbbcfg['path_abs'] = '/en/phpbb/';
the /en/phpbb/diagnostic working but on private message( /en/phpbb/inbox ) i get blank screen.

It's line 311 in

arkepp's picture

It's line 311 in phpbb.module that registers the path. You could register multiple paths, but afaict it's really the localization module that does not support menu paths.

How I fixed this issue

Andronua's picture

Hi!

I had same issue.
So in my custom module I used such code:

<?php
function _redirToPhpbb($param = '') {
   global
$base_url;
 
  
$redir = $base_url.'/forum';
$redir = (empty($param)) ? $redir : $redir.'/'.$param;
 
drupal_goto($redir);
}


/**
* Menu hook
*
*/
function mymodule_menu($may_cache) {
 
$items = array();
 
   if (
module_exists('i18n')) {
    
$items[] = array(
             
'path' => 'forum',
            
'callback' => '_redirToPhpbb',
            
'access' => TRUE,
               
'type' => MENU_CALLBACK
      
);
    
      
$items[] = array(
             
'path' => 'forum/inbox',
              
'callback' => '_redirToPhpbb',
            
'callback arguments' => array(
                       
'inbox'
             
),
               
'access' => TRUE,
               
'type' => MENU_CALLBACK
      
);
}

return
$items;
}
?>

That's mean that I check if we use i18n module, we simply redirect request to correct path to installed phpbb (for me it was installed into folder 'forum' into the root of the web site).

Also for some reason in phpbb.module dynamic menu link 'forum/inbox' was hidden for same user in different sections of the web site, so it was removed.

Maybe this code can help someone, cheers!

admin/settings/localizer

akis p's picture

in the last version of localizer there is a n a new option,

Language prefix,
choose
Append language prefix on specific pages:
select how you want the prefix,
then
Apply on every page except the listed pages.
where you can put the pages that you don't wont to get the prefix,
like,
forum*
chat*
gallery*

phpbb

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: