• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Ako assignovat hodnotu scriptu?
PostPosted: Wed Apr 04, 2012 12:25 pm 
Offline
Forum Members
Forum Members

Joined: Wed Mar 16, 2011 9:13 am
Posts: 206
zdravim

ako mam assignovat hodnotu scriptu(cervenou)?, lebo tento zapis nefunguje

<__script__ language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></__script>

{assign var='country_code' value='<__script__ language="JavaScript">document.write(geoip_country_code());</__script>'}

{if $country_code == 'CZ'}
tato stranka je v cestine
{elseif $country_code == 'AU' }
{redirect_page page='aus'}
{elseif $country_code == 'NZ' }
{redirect_page page='ire'}
{elseif $country_code == 'IR' }
{redirect_page page='nz'}
{else}
{* Nothing to do *}
{/if}


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Ako assignovat hodnotu scriptu?
PostPosted: Fri Apr 06, 2012 5:30 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Tue Oct 10, 2006 5:00 pm
Posts: 448
Location: Bratislava
To neurobis, bud urobis podmienku cez JS a redirect potom cez location.href alebo tu IP kontrolu urobis cez PHP, mozes pouzit aj toto:

http://software77.net/geo-ip/
Zdrojaky: http://uloz.to/xuvWotb/ip-files-zip


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Ako assignovat hodnotu scriptu?
PostPosted: Sun Apr 08, 2012 11:27 am 
Offline
Forum Members
Forum Members

Joined: Wed Mar 16, 2011 9:13 am
Posts: 206
kuzmany \kuzmany:
To neurobis, bud urobis podmienku cez JS a redirect potom cez location.href alebo tu IP kontrolu urobis cez PHP, mozes pouzit aj toto:

http://software77.net/geo-ip/
Zdrojaky: http://uloz.to/xuvWotb/ip-files-zip


diky za odpoved
nemozes ma trosku naviest ako sa robi podmienka cez JS kedze to cez ten assign nejde?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Ako assignovat hodnotu scriptu?
PostPosted: Mon Apr 09, 2012 12:08 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Tue Oct 10, 2006 5:00 pm
Posts: 448
Location: Bratislava
Takto nejak:)


<__script__ language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></__script>

<__script__>
var country_code = geoip_country_code();

if(country_code == "CZ"){
location.href="http://ceskaverziawebu";
}
</__script>


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting