rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: etherknight on October 04, 2010, 02:24:03 AM
-
Can one configure so as to present a particular templates based on the browser family? For example, one connects with an iPhone and they get the iPhone template. But another user connects with a traditional browser, and gets the typical template. Perhaps it could be done by running multiple instances of HFS, using two URLs? Like www.whatever.stuff & mobile.whatever.stuff for mobile browser families...
My apologies if this is one of the gazillion questions that have already been discussed (could not find the topic in search).
-
yes, it's possible.
i'll tell you more when i'm back home.
-
there's no need for a different address.
probably the best solution is to ALT+F6 and paste something like this
[+request]
{.if|{.{.get|agent.} = iphone.}|{:
{.load tpl|myOtherTemplate.tpl .}
:}.}
-
Sweet. I will give it a try. I will let you know how it goes! Thanks :)
-
just a warning: the "load tpl" command won't run any installation on the template.
some templates may need to perform some actions at installation time, like rawr.
-
With regards to mobile devices, as far as blackberry devices, or at very least the BB Curve 9330 uploads fail quite often. Looks like
they simply timeout but once changed the default template upload link to load with the upload status pane have not had any uploads fail. And we are talking failures amounting to >75%. And now I can upload the entire listing with pics and vids. I use HFS for remote access of my files. No data plan so I am one that uses wifi and has every wifi work around imaginable. This failure was in the BB browser, Opera Mini 5.1.22303, as well as Bolt browser. I've set up MIME just right that I can stream mp3 and BB compatable videos, of which I have few.Absolutely LOVE!!! This software using 2.2f because it gets the job done for what I needed.
In fact this was posted from my BB in Bolt browser.
-
good to hear it works for you.
what was discussed here before it's only related to version 2.3, anyway.
-
Could someone explain more detail. How do I know the agent = iphone? If I use a Andriod device, how to set it?
{.load tpl|myOtherTemplate.tpl .}
Does the myOtherTemplate.tpl can include the path? Like ./mytmp/myOtherTemplate.tpl?
I used my Andriod device to do the test, from the dump log:
User-Agent: Mozilla/5.0 (Linux; U; Android 2.2; zh-cn; Desire_A8181 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
how to set this Marco?
-
the {.get|agent.} is a facility that currently doesn't support android.
anyway you can use something like
{.if|{.pos|android|{.header|User-Agent.}.}|{:
{.load tpl|myOtherTemplate.tpl .}
:}.}
and yes, you can use a full path for the file
-
Help please. Do I need to include another string by chance? Its loading the .tpl as I have specified the full path, but the images and whatnot that go with the theme aren't showing up.
Thanks,
Bob
-
welcome and sorry for the late reply bob,
some templates need you to manually load them first, because this way the run some commands (a sort of installation procedure) like adding needed folders.
after that you should be ok.
-
Ok. Sorry to ask, but how do i do that?
Thanks.
-
you can see inside the RAWR-Designs template: section SPECIAL IMPORT
-
it's ok if you just drag&drop the .TPL file into HFS.
you will be prompted for installation.
This requires to be done just once (but you have to save the virtual file system afterward).
-
it's ok if you just drag&drop the .TPL file into HFS.
you will be prompted for installation.
This requires to be done just once (but you have to save the virtual file system afterward).
I can add to template - my mobile template and use his through android?
If i will open site through android, will used mobile template?
-
it depends on how you "add" it.
try the method suggested above
-
Can I have two RAWR template to switch??
one for ipad/iphone
one for normal window
I try the above code but it can't load it
-
if you want multiple templates you have to read the rest, not just the my last answer
http://www.rejetto.com/forum/index.php/topic,9166.msg1052455.html#msg1052455
-
the {.get|agent.} is a facility that currently doesn't support android.
anyway you can use something like
{.if|{.pos|android|{.header|User-Agent.}.}|{:
{.load tpl|myOtherTemplate.tpl .}
:}.}
and yes, you can use a full path for the file
Please show an example of how and where to insert this code.
If it should be inserted in the TPL - please show by example. I do not understand where to insert it.
And another question: Can I do that with the browser loads a template from another iphone on the third Android device? Or at least two options, one for browser on a computer, the other on mobile
-
you can repeat the thing and get how many templates you want.
How to use it was explained here
probably the best solution is to ALT+F6 and paste something like this
[+request]
{.if|{.{.get|agent.} = iphone.}|{:
{.load tpl|myOtherTemplate.tpl .}
:}.}
-
you can repeat the thing and get how many templates you want.
How to use it was explained here
:(
I need that with a computer's browser opened a template for example terayon, and when coming from mobile devices and iphone andoid opened PABP such as a template.
How to do it?
I have read this entire post.
That's what I do:
I go to the HFS click ALT + F6 opens the file:
insert:
{. if | {. pos | android | {. header | User-Agent.}.} | {:
{. load tpl | http://liners.com/imig/mobail.tpl.}
:}.}
template does not work on mobile devices
What I doing wrong?
how to insert into one HFS two templates? One for mobile devices. another for desktop computers?
Is that even possible? Or should we open two HFS program?
-
1. you didn't paste the whole text, missing one line
2. you shouldn't load the template from the net, that's damn slow. Download it on your computer first.
-
1. you didn't paste the whole text, missing one line
2. you shouldn't load the template from the net, that's damn slow. Download it on your computer first.
That's what I do:
I go to the HFS click ALT + F6 opens the file:
That's what I put in - so, too, does not work :( (*does not load the template on your mobile device)
[+request]
{.if|{.pos|android|{.header|User-Agent.}.}|
{:{.load tpl|mytempleate-1.1.tpl .}:}.}
Show how to write?
-
if your template mytempleate-1.1.tpl is not in the same folder as HFS.EXE,
then you have to put an entire valid path for it, as
[+request]
{.if|{.pos|android|{.header|User-Agent.}.}|
{:{.load tpl|c:\hfs\mytempleate-1.1.tpl .}:}.}
-
I've done the same in "event" -
[+request]
{.if|{.pos|iPhone|{.header|User-Agent.}.}|
{:{.load tpl|d:\Server\mobile\iPhone\iPhone.tpl .}:}.}
Everything works, but why if I add new page, for example [not found] - doesn't work? But [not found] page works from main template. Help plz
-
thanks for reporting.
if you don't want to wait for the day a new version is officially published ou can find a temp version at http://ge.tt/4NZ1LjP1/v/0
-
thanks for reporting.
if you don't want to wait for the day a new version is officially published ou can find a temp version at http://ge.tt/4NZ1LjP1/v/0
nice :) But these pages (not found, deny, overload...etc) load css from the main template, others normally works :)
-
you mean it doesn't work?
-
As I know these pages created in new template must be without design.
I mean if I write
[Not found]
Test
that page must have only text, but my second template automatically loads css from main template and I think so should not be.
If I'm wrong, sorry :)
-
i know what you mean.
i was undecided about it, because both ways make sense.
for now i opted for this way, to keep the old template living under the one you load, because you can always override it.
In your case, that happens because you didn't define [error-page]
try!
-
some posts moved here
http://www.rejetto.com/forum/programmers-corner/add-folders/