Date: 07/06/00
- Next message: Darryl Ross: "Re: [phplib] Problem installing phplib"
- Previous message: Sylvan Ravinet: "Re: [phplib] Few questions about PHP"
- In reply to: Holger Blasum: "Re: [phplib] multiple (multi-language) login form"
- Next in thread: Gerald Estadieu: "Re: [phplib] multiple (multi-language) login form"
- Reply: Gerald Estadieu: "Re: [phplib] multiple (multi-language) login form"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
on 7/6/00 3:04 PM, Holger Blasum at blasum <email protected> wrote:
> On Thu, Jul 06, 2000 at 09:19:37PM +0200, Francis Bouchard wrote:
>> I want the login form to have a link that can lead to a french or spanish
>> login form. But since loginform.ihtml is included from auth_loginform() in
>> class Example_Auth, i added a variable in the class Example_auth and I do an
>> if($language ==1) then include(... /enloginform.ihtml
>> else include(.../frloginform.ihtml
>> endif
>>
>> but how do I set language(in the example_auth class) and recall
>> auth_loginform() from within the loginform.
>
> class Example_Auth extends Auth {
>
> var $language;
> ....
> function set_language ($lan) {
> $this->language = $lan;
> }
>
> ....
> function auth_validatelogin () {
> if ($this->language == "fr") ...
> }
> }
THE REAL PROBLEM IS HERE ! :)
this is exactly what i've done, but my problem is how "post" IN the
loginform, the $lan parameter when the user click on the us or french flag,
and not the "Log In" button
>
> Depending on your long term goals, it might be nicer to put the language into
> $sess or $user or its own class or to handle it globally (in all those case
> you have to "global" it inside the functions you use). As PHPLIB vars aren't
> private you could also access them directly (costs you a millisec less but
> worse style).
>
this is what i am doing, all my pages are done based on the user's language
the i have in my user class, but at login time, i don't know yet the
username and language, he is not logged, so i have to offer his the choice.
> BTW, for a quick solution, a far less contorted approach may be to put dynamic
> code into your login.ihtml, after all that'll give you less redundant code :-)
>
> If this doesn't answer the question, pls do not hesitate to ask again.
>
> Regards, Holger
>
> no software patents - pls sign http://petition.eurolinux.org
>
Thanks for all
-- Francis Bouchard Groupe d'Assurance Qualité (Macintosh) mailto://fbouchard <email protected> http://www.semantix.com--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: Darryl Ross: "Re: [phplib] Problem installing phplib"
- Previous message: Sylvan Ravinet: "Re: [phplib] Few questions about PHP"
- In reply to: Holger Blasum: "Re: [phplib] multiple (multi-language) login form"
- Next in thread: Gerald Estadieu: "Re: [phplib] multiple (multi-language) login form"
- Reply: Gerald Estadieu: "Re: [phplib] multiple (multi-language) login form"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

