reigyx_x wrote:

please tell me, where the example...?

The example of... ?

Great Modification ! Work fine, thanks.

But maybe don't forget to test the cookie too, so the user cannot modify it in order to inject something etc :

if($_GET['lang']) {
        if (file_exists('lang/'.$_GET["lang"].'/common.php')) {
            setcookie("thedefaultlang", $_GET['lang'], time()+3600);
            $TheDefaultLang = $_GET['lang'];
        } else {
            $TheDefaultLang = $forum_config['o_default_lang'];
        }
    } else { 
        if(isset($_COOKIE["thedefaultlang"]) 
           && file_exists('lang/'.$_COOKIE["thedefaultlang"].'/common.php')) {
            $TheDefaultLang = $_COOKIE["thedefaultlang"];
        } else {
            $TheDefaultLang = $forum_config['o_default_lang'];
        }
    }
    $forum_user['language'] = $TheDefaultLang;

3

(5 replies, posted in PunBB 1.4 troubleshooting)

I finally found what i was looking for... thx anyway.

4

(5 replies, posted in PunBB 1.4 troubleshooting)

So... can i see this mod please tongue ?

5

(5 replies, posted in PunBB 1.4 troubleshooting)

JamesBellinger wrote:

Hmm.

I did write a modification that, when it would normally choose the default language (none if specified), would instead autodetect the language based on their browser preferences.

Would this be useful to you?

Yes, very useful indeed smile !

6

(5 replies, posted in PunBB 1.4 troubleshooting)

Up, nobody have a clue on this sad ?

7

(5 replies, posted in PunBB 1.4 troubleshooting)

Hi, i want to manage the displayed language for each guest user without change defaut language or forcing the user to register, is it possible ?

Thanks a lot.