rejetto forum
May 25, 2012, 09:00:02 PM *
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: %symbols% and macros in index  (Read 690 times)
0 Members and 2 Guests are viewing this topic.
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« on: October 23, 2010, 12:32:10 AM »

In my test version of HFS I have an "Index.html" cover page which is default file
mask for root.
This is in a real folder and root is bound to it. This folder is in the VFS.

My question is.... why doesn't  %ip% and macros work on this page?
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #1 on: October 23, 2010, 11:42:47 AM »

Files .html are passed on such which by hfs without analysis of the contents, it is necessary to rename the index.html by hfs.diff.tpl, because only this last one is considered as a template

 Grin Cheesy
Logged
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #2 on: October 23, 2010, 01:49:17 PM »

Ok, I copied the page content to Different template in Properties for root,
removed default file mask and unbound root.
Now the page is served, %ip% works, but now this page is all that can be accessed.
Now this page is file mask for all subfolders, and no link I've tried on this page will
access the file server. Even redirect on login fails.

Anyone know of a way around this?
« Last Edit: October 24, 2010, 10:31:48 AM by r][m » Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #3 on: October 24, 2010, 12:07:06 PM »

if you put your index.html as diff template on root, the hfs template is not served for all subfolder, i don't understand what you will to do, but it seems that you are turning in round   Grin
Logged
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #4 on: October 24, 2010, 06:01:25 PM »

Perhaps I didn't explain properly.
I want a index.html page as a home page, that shows users ip, and can perhaps run a macro.
This is the first thing a user sees when they come to hhtp://myaddress.com/.
This page is not protected, but has a link to log in to the server.

When this page is diff tpl, you get the login, but cannot get past this page.
You are returned to it no matter what address you put in the browser. This page
is inherited and served as default file mask for all sub folders of root here.

If you have a solution I'd like to see it.

Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11831


View Profile
« Reply #5 on: November 01, 2010, 06:40:15 AM »

sorry for the late reply.
try this diff tpl (i didn't test)

[]
{.if|{.%url% != /.}|{:
  {.comment| this is not the root, so we are loading the original main section then stop .}
  {.section||back=1.}
  {.break.}
:}.}
here goes your page content
Logged
rejetto forum
« Reply #5 on: November 01, 2010, 06:40:15 AM »

Do you like this software? Consider even $2
 Logged
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #6 on: November 02, 2010, 11:13:17 AM »

@ Rejetto
Thanks
[]
{.if|{.%url% != /.}|{:
  {.comment| this is not the root, so we are loading the original main section then stop .}
  {.section||back=1.}
  {.break.}
:}.}
{.load|/Pages/page1.html.}
The load macro stopped page1 from appearing on all server pages.
Now the index page log in link and %ip% works,
however macros like {.$section.} in the index page don't.
Expected?
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11831


View Profile
« Reply #7 on: November 08, 2010, 04:32:17 PM »

macros in external files "disabled" for security reasons.
you can circumvent this by passing through a variable
{.load|/Pages/page1.html|var=x.}{.^x.}
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 Today at 03:50:29 AM
anything