a little if code? - Printable Version +- MN Forum (http://forum.mn-shop.com) +-- Forum: Products (http://forum.mn-shop.com/forum-products.html) +--- Forum: Ask a Question (http://forum.mn-shop.com/forum-ask-a-question.html) +--- Thread: a little if code? (/thread-a-little-if-code.html) Pages:
1
2
|
a little if code? - deadlef - 03-28-2013 on my page i use a slider with pictures. i need a simple if else code. can someone help me. if language is de then use this slider...if language is englisch another slider. RE: a little if code? - Hostpro - 03-28-2013 (03-28-2013, 07:10 PM)deadlef Wrote: Hidden content for guests I don't think you can do it as language as that's determined by JS I believe. However I know you can do it by Country: PHP Code: Hidden content for guests Not tested but should work. RE: a little if code? - deadlef - 03-28-2013 (03-28-2013, 07:24 PM)Hostpro Wrote: Hidden content for guestsi will try later...the best think will be that the browser detect from which country user come and select automatically the language..is this not implemented in new update in register? that there detect the country? RE: a little if code? - Hostpro - 03-28-2013 (03-28-2013, 07:47 PM)deadlef Wrote: Hidden content for guests Yes but all that does is detect the Country and updates their Country in the DB. My code then selects the Country out the DB to show them the specific slider based on their Country. What if somebody goes on holiday and wants to keep up their exchanges they will get all this foreign text even though they may only speak English. RE: a little if code? - deadlef - 03-28-2013 your php code does not work..it do nothing RE: a little if code? - Hostpro - 03-28-2013 (03-28-2013, 08:17 PM)deadlef Wrote: Hidden content for guests Works for me: [IMG]Hidden content for guests[/IMG] Using code: PHP Code: Hidden content for guests Add this in and tell me the results: PHP Code: Hidden content for guests RE: a little if code? - Admin - 03-28-2013 @Hostpro, if slide is added on homepage, when user isn't logged in, will never work your code. RE: a little if code? - Hostpro - 03-28-2013 (03-28-2013, 08:55 PM)Admin Wrote: Hidden content for guests Yes, user must be logged in for this to work. RE: a little if code? - Admin - 03-28-2013 This is what your need to detect country based on IP (works only if you have v1.8.7). PHP Code: Hidden content for guests RE: a little if code? - deadlef - 03-29-2013 (03-28-2013, 09:36 PM)Admin Wrote: Hidden content for guestsbut the slider is online when unlogged. hmm nobody an idea? when englisch language is selected than the slider with englisch pictures...when germand selected than slider with german pictures... |