Author Topic: iPhone template  (Read 27074 times)

0 Members and 1 Guest are viewing this topic.

Offline hugostwen

  • Occasional poster
  • *
  • Posts: 3
    • View Profile
iPhone template
« on: November 17, 2009, 06:29:48 AM »
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!

Follow members gave a thank to your post:

rapidfiretutorials, nooy, khuram_rafiq, hmg3099

Offline Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1805
    • View Profile
Re: iPhone template
« Reply #1 on: November 17, 2009, 11:32:26 AM »
You can add the file for the French language

There are no limitations in the distribution  and in the correction of this file  ;)
FRENCH MEMBER : Si vous comprenez la langue française,  n'hésitez pas à l'utiliser pour une meilleure aide de ma part

Online rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12838
    • View Profile
Re: iPhone template
« Reply #2 on: November 18, 2009, 06:43:34 PM »
wow, it looks good :)

Offline owais

  • Regular poster
  • **
  • Posts: 17
  • ;) :*
    • View Profile
    • Facebook link ;)
Re: iPhone template
« Reply #3 on: November 19, 2009, 04:29:38 AM »
thx nice template

fire2050

  • Guest
Re: iPhone template
« Reply #4 on: January 02, 2010, 01:44:19 AM »
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
Re: iPhone template
« Reply #5 on: January 20, 2010, 01:44:29 AM »
...  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
  • Insane poster
  • *****
  • Posts: 1805
    • View Profile
Re: iPhone template
« Reply #6 on: January 20, 2010, 03:46:21 PM »
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>.......

 :)
FRENCH MEMBER : Si vous comprenez la langue française,  n'hésitez pas à l'utiliser pour une meilleure aide de ma part

Offline letstry

  • Occasional poster
  • *
  • Posts: 3
    • View Profile
Re: iPhone template
« Reply #7 on: January 21, 2010, 10:45:46 AM »
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
  • Insane poster
  • *****
  • Posts: 1805
    • View Profile
Re: iPhone template
« Reply #8 on: January 21, 2010, 12:49:22 PM »
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, 01:19:03 PM by Mars »
FRENCH MEMBER : Si vous comprenez la langue française,  n'hésitez pas à l'utiliser pour une meilleure aide de ma part

Online rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12838
    • View Profile
Re: iPhone template
« Reply #9 on: January 21, 2010, 07:35:20 PM »
mars, you can find the operating system in the user-agent http header

Online rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12838
    • View Profile
Re: iPhone template
« Reply #10 on: January 22, 2010, 04:53:22 AM »

Offline Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1805
    • View Profile
Re: iPhone template
« Reply #11 on: January 22, 2010, 06:12:06 AM »
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 ;)
FRENCH MEMBER : Si vous comprenez la langue française,  n'hésitez pas à l'utiliser pour une meilleure aide de ma part

Online rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12838
    • View Profile
Re: iPhone template
« Reply #12 on: January 22, 2010, 09:44:15 AM »

Offline letstry

  • Occasional poster
  • *
  • Posts: 3
    • View Profile
Re: iPhone template
« Reply #13 on: January 23, 2010, 02:07:36 PM »

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

Online rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12838
    • View Profile
Re: iPhone template
« Reply #14 on: January 25, 2010, 09:02:37 AM »
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.