• 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: 196
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  
 
 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: 426
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  
 
 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: 196
kuzmany wrote:
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  
 
 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: 426
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  
 
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:  
Arvixe - A CMSMS Partner