rejetto forum
February 04, 2012, 07:35:03 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Multiple templates (based on browser)  (Read 2697 times)
0 Members and 1 Guest are viewing this topic.
etherknight
Regular poster
**
Offline Offline

United States United States

Posts: 23


View Profile Email
« on: October 03, 2010, 09:24:03 PM »

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).
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11754


View Profile
« Reply #1 on: October 10, 2010, 11:25:06 AM »

yes, it's possible.
i'll tell you more when i'm back home.
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11754


View Profile
« Reply #2 on: October 10, 2010, 04:31:05 PM »

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 .}
:}.}
Logged
etherknight
Regular poster
**
Offline Offline

United States United States

Posts: 23


View Profile Email
« Reply #3 on: October 10, 2010, 05:54:47 PM »

Sweet. I will give it a try. I will let you know how it goes! Thanks Smiley
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11754


View Profile
« Reply #4 on: October 10, 2010, 07:40:21 PM »

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.
Logged
Onoitsu2
Occasional poster
*
Offline Offline

United States United States

Posts: 1


View Profile Email
« Reply #5 on: February 09, 2011, 05:10:16 PM »

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.
Logged
rejetto forum
« Reply #5 on: February 09, 2011, 05:10:16 PM »

Do you like this software? Consider even $2
 Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11754


View Profile
« Reply #6 on: February 10, 2011, 04:49:23 PM »

good to hear it works for you.
what was discussed here before it's only related to version 2.3, anyway.
Logged
stonecooper
Occasional poster
*
Offline Offline

China China

Posts: 8


View Profile
« Reply #7 on: August 12, 2011, 08:47:08 PM »

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?
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11754


View Profile
« Reply #8 on: August 22, 2011, 10:53:16 AM »

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
Logged
BobS!nce1981
Occasional poster
*
Offline Offline

United States United States

Posts: 2


View Profile
« Reply #9 on: September 05, 2011, 04:51:14 PM »

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
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11754


View Profile
« Reply #10 on: September 17, 2011, 12:43:33 PM »

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.
Logged
BobS!nce1981
Occasional poster
*
Offline Offline

United States United States

Posts: 2


View Profile
« Reply #11 on: September 19, 2011, 07:16:49 AM »

Ok.  Sorry to ask, but how do i do that?

Thanks.
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1468



View Profile WWW
« Reply #12 on: September 19, 2011, 07:26:57 AM »

you can see inside the RAWR-Designs template: section SPECIAL IMPORT

Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11754


View Profile
« Reply #13 on: October 04, 2011, 04:39:01 AM »

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).
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page January 12, 2012, 01:33:00 AM
anything