1

Re: Client helpers base URL

Is it possible to have the client helpers $base_url resolve the URL automatically rather than being hard coded. This is the one I'm talking about:

[img]http://i.imgur.com/ylmTi.png[/img]

While I'm on my home PC I need to have it set without a port number (as seen in the screenshot) but when I'm at work I need to have it set as http://hicks.192.168.1.101.xip.io:8101/indicia (don't worry about the weird URL - that's just to make it easier for me to access the warehouse from multiple devices on my local network). In Kohana's config.php I can set $config['site_domain'] = '/indicia'; and that works fine. Things only start to break down once the client helpers start pulling in jquery on the wrong domain. E.g.,

[img]http://i.imgur.com/6gdxx.png[/img]

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

2

Re: Client helpers base URL

Thanks Don, that would problably work. I can test for $_SERVER["SERVER_PORT"] as this is 80 when I connect from home and 8101 from work.

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

3

Re: Client helpers base URL

Hmm, it wasn't quite so simple and I could see I was going down an avenue that was introducing needless complexity. Instead I've given my dev warehouse an address on the open internet and I'm using port forwarding on my router to direct traffic to the VM it resides on. Work perfectly.

I might write-up this setup at some point. It's a useful way to run your own dev warehouse for testing and tinkering.

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital