Display different message to different users?
#1
My forum has both, english and french speaking members. I have created a front page and at the Welcome Block I want to display a message in french to the french users but if the user is an english speaking one, then I want the message to be in english. I want that so it can auto detect the users emails and display the message based on it. All my french members use a .fr email, mostly wanadoo. Can someone know if this can be done?
Reply
#2
You could just make a duplicate of your theme that all the french users would use, and it would have the message in french. And the defualt theme would have it in English for the other users.
Love,
Chase
Reply
#3
I am not sure how to do that. Can you tell me please?
Reply
#4
Should be quite simple to do this as a plugin, I'll move this to requests for you Smile
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#5
(2009-07-04, 09:04 PM)MattRogowski Wrote: Should be quite simple to do this as a plugin, I'll move this to requests for you Smile

Can you do it please? This is very important for me. Thank you Smile
Reply
#6
No one knows to do this?
Reply
#7
Atm I don''t have much time to look at it but tomorrow I will see what I can do.
Ok broger, try this. I just tested it and it works fine.

$frenchemails = "[email protected]";
if ($frenchemails = substr($frenchemails, -3) == ".fr"{
echo "<p>Bonur bla bla french message </p>";
}else{
echo "<p>Welcome bla bla english message</p>";
}

What I did here, is that I passed the substr() function a test negative number as its second starting index argument. So it will count from the end rather than the begining of the string. I.e. It will show the french message to all your members that have submitted an email address ending in .fr and another message to all your other members who have submitted a different email address.

Atm my free time is very limited. I don''t have time to make it in a plugin. If you can''t implement it yourself, then ask someone else to do it for you. Note that you might have to pay them cos not everyone has lots of free time.
[Image: sig.gif]

Contact me in private only if you need paid help with mybb-related issues. Otherwise, please don''t, unless I invite you to. Thanks Smile
Reply
#8
Omg, I love you in a so non gay way. You are the man. Can you do it for me please? I would rather pay you than someone else. I will send you an email too with some other things that I want done for my forum.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)