rejetto forum

iPhone template

hugostwen · 34 · 44768

0 Members and 1 Guest are viewing this topic.

Offline hugostwen

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
Hello comrades,

I have created a true iPhone template:


The following futures are implemented:
- search
- sort
- new item mark
- handy navigation bar
- multi language (english and russian included)

The template will only work with HFS 2.3 or greater; macros must be enabled.

Installation instructions:
1. Unzip files to the HFS folder
2. With the HFS do: Menu-> HTML template -> Change file...
3. Select iMelange-1.1.tpl
4. Have fun !

You are welcome for questions and comments!


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
You can add the file for the French language

There are no limitations in the distribution  and in the correction of this file  ;)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile


fire2050

  • Guest
first of all, great work

but i cant for the life of me get this to work with users enabled

also i saw on another post where someone found a way to detect if youre on an iphone or a standard browser but the link that was posted was dead

seems like it would be similar to how hfs handles a different template for different folders



Offline hugostwen

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
...  to detect if youre on an iphone or a standard browser ....

It's a good idea! I hope, HFS is able to pass a http header value to a template. I need to spend some time to investigate the point. Will keep you up to date.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
it is posible to use the macro {.get|agent.} to know who is the distant browser

at the beginning of the default template add those lines with correct informations
Quote
{switch|{.get|agent.}
  |agent iphone|{:{.load|iphone template.}:}
  |agent x|{:{.load|template y.}:}
  |agent y{:{.load|template y.}:}
  |.....     |.....
  |{.section|main.} /switch.}

[main]
<html>.......

 :)


Offline letstry

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
Hi,

I tried this iphone template, its working,

But i have 3 diff kind of users, Pc based users ( Firefox / IE ) , Mac User , Iphone & Blackberry users,

How can i make this templates work based on diff device, i dont know much scripting,

Can give more info on this script

{switch|{.get|agent.}
  |agent iphone|{:{.load|iMelange-1.1.tpl}:}
  |agent windows|{:{.load|hfs.tpl.}:}
  |.....     |.....
{.section|main.} /switch.}


how to make it working for all of these needs

thanks , btw, i am using 2.3 version , i have around 50 users of this HFS app.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
make some test by including this macro on each hfs.tpl , note the message into the log of hfs and report here the result

{.add to log|connexion with browser agent {.get|agent.}.}
« Last Edit: January 21, 2010, 07:19:03 PM by Mars »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
mars, you can find the operating system in the user-agent http header



Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
Quote
mars, you can find the operating system in the user-agent http header

yes but i have no iphone and no Mac to find the exact information ;)



Offline letstry

  • Occasional poster
  • *
    • Posts: 3
    • View Profile

I can still not understand how can I have 2 diff template .

I need atleast 2 templates , one for iphone users and one for all others,

can you pl. provide working script which i can copy and paste


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i think the only possible way with current HFS version is to merge the 2 templates.
there's no way to have 2 templates and a script to use them both.
i will make this possible in the future. i hope *near* future.