Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a little if code?
#1
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.
Reply
#2
(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.
Reply
#3
(03-28-2013, 07:24 PM)Hostpro Wrote: Hidden content for guests
i 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?
Reply
#4
(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.
Reply
#5
your php code does not work..it do nothing
Reply
#6
(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 
Reply
#7
@Hostpro, if slide is added on homepage, when user isn't logged in, will never work your code.
Reply
#8
(03-28-2013, 08:55 PM)Admin Wrote: Hidden content for guests

Yes, user must be logged in for this to work.
Reply
#9
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 
Reply
#10
(03-28-2013, 09:36 PM)Admin Wrote: Hidden content for guests
but 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...
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)

About MN Shop

MafiaNet Shop is an online store where you can buy powerful scripts, cool templates, graphic components and many other digital goods.

              Quick Links

              User Links

              Advertise