15 years on The Web
miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

How to disable specific user language?

Author MyFairTux
#1 | Posted: 20 Dec 2007 05:15 | Edited by: MyFairTux 
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';
default: $lang='ges';

(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,

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
#3 | Posted: 20 Dec 2007 10:33 
I changed




That works perfect - thank you, Paul :-)

Best regards,

Specific miniBB Support Forums / Specific / How to disable specific user language? Top

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

 Short link for this topic:

You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB