Display different message to different users?
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?
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.
I am not sure how to do that. Can you tell me please?
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.
(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
No one knows to do this?
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>";
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
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.

Forum Jump:

Users browsing this thread: 1 Guest(s)