miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

How to disable specific user language?

 
Author MyFairTux
Partaker
#1 | Posted: 20 Dec 2007 05:15 
Hi :-)

I have embedded minibb in my site successfully. This site has a central switch where you can change the current page from German to English and back. Once choosen the language, it is saved in a GET-Variable 'lang=en' or 'lang=de' ('de' is the default) and it is appended to any link (I choose GET so users can bookmark the site in their language).

Ok. Now I want mnibb to overtook this central language setting and placed the following code in setup_options.php:

switch ($_REQUEST['lang'])
{
case 'en': $lang='eng';
$indexphp='index.php?lang=en&';
$startIndex='index.php?lang=en';
break;
default: $lang='ges';
$indexphp='index.php?';
$startIndex='index.php';
}

(I don't use $setlang because I don't want to much GET-variables in my URL)

This works fine - but naturally only for anonym users.

For me it doesn't make much sense to choose language twice so I want to disable language setting in user preferences (no problem: changing the template) but also set the language for registered users to the one chosen on my site.

Where is the anchor to override an eventually set user language (I already have users with language set) with 'my' language?

May be I can change the corresponding database structure entry in setup_options.php ($dbUserSheme) to something void so minibb uses the default language $lang?
(its only an idea - I'm not very familiar with databases ...)

Many thanks for any hints,
Christoph

Author Paul
Lead Developer 
#2 | Posted: 20 Dec 2007 10:00 
I suppose you could try to edit bb_cookie.php file, $GLOBALS['langu'] variable there defines user's language taken from the database.

Author MyFairTux
Partaker
#3 | Posted: 20 Dec 2007 10:33 
I changed

$GLOBALS['langu']=$row[2];

into

$GLOBALS['langu']=$lang;


That works perfect - thank you, Paul :-)

Best regards,
Christoph

Specific miniBB Support Forums / Specific /
 How to disable specific user language?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑