rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: nermal on September 24, 2007, 03:05:04 PM

Title: user sections via url
Post by: nermal on September 24, 2007, 03:05:04 PM
i use hfs for long time
and im starting to use the "user created symbols"
like [sym-somename] and calling it as %sym-somename%
and it is working just like the include in asp or php, but there feature that i want to ask
can we have the user created symbols to serve pages like the progress or the upload that are sections [progress] and [upload]
and we call it ~upload or ~progress

we could use this address operator to call some user section like the html files used in this post, instead the external html file, we could put it inside a single tpl file....
ex.: the wma.htm would become a section [sym-wma] and we could call it like ~sym-wma....
Title: user sections via url
Post by: Giant Eagle on September 24, 2007, 04:46:19 PM
[anything_you_want.html]
<html codez go here>

link to it using:
http://%host%/~anything_you_want.html

:)
Title: user sections via url
Post by: nermal on September 24, 2007, 06:01:58 PM
[anything_you_want.html]
<html codez go here>

link to it using:
http://%host%/~anything_you_want.html

:)

but this work only for the static content, the server side(the hfs symbols) dont work in this pages...like in this test...
i replaced the main section with this....

Code: [Select]
<html>
<head>
<frameset cols=200,*>
  <frame name=progress src="/~sym-sidemenu.html" scrolling=auto marginwidth=0>
  <frame src="~sym-main" scrolling=auto>
</frameset>
</head>
<body>
</body>
</html>

[sym-main]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  <style type="text/css">
  %style%
  </style>
  <title>HFS %folder%</title>
  <link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
%login-link%
%loggedin%
%upload-link%
<div id=folderlabel>folder</div>
<div id=folder>%folder%</div>
<div id=body>
%folder-comment%
%up%
%files%
</div>
<div id=footer>
<a href="http://www.rejetto.com/hfs/">HttpFileServer %version%</a>
<br />Servertime: %timestamp%
<br />Uptime: %uptime%
<br />Build-time: %build-time%
</div>
</body>
</html>

[sym-sidemenu.html]
<b>teste</b>
Title: user sections via url
Post by: ledufe on September 24, 2007, 06:53:01 PM
i never had used this thing before (the sym-section and the call to it in the address) but i just tested here and "nermal" is right, the %sym-name% work and it is being called right(http://%host%/~sym-name), but the symbols inside it no....

using the code posted here in this post, the test resulted in the same results.... not working....

it just print in the screen the symbols.... see the attached picture to watch it...
Title: Re: user sections via url
Post by: rejetto on September 24, 2007, 07:19:58 PM
you are trying to get the file list in [sym-main].

but what list do you expect it to show?


what files should i see accessing /~sym-main ?
Title: Re: user sections via url
Post by: ledufe on September 24, 2007, 07:37:52 PM
sorry rejetto, i was thinking in use this kind of solution to make some of my oldest wish using hfs...
i was trying to make the hfs act/looks like some file-explorer(windows explorer) with the folder tree, and my idea was to only show the folders at the left frame and show only the files and links at the main frame, this is only a test, and i used the code of the other post....

tell me if you can't understant me.....
i will try to make myself more clear, later, im at work now, but i will test it and post my tests here...

but trying to show what i want, see this post...
i want to make this really work
like in this picture

(http://img435.imageshack.us/img435/2999/tpltesticonview3id4.th.jpg) (http://img435.imageshack.us/my.php?image=tpltesticonview3id4.jpg)

http://www.rejetto.com/forum/index.php?topic=3800.0
Title: Re: user sections via url
Post by: Giant Eagle on September 25, 2007, 09:52:50 AM
The way you want it to be is do-able, requires some time, but could be done..

but.. you need JavaScript to achieve it.

HFS cant split the folders from the files, and you cant use 2 different templates at once.
Title: Re: user sections via url
Post by: marlonRJ on September 25, 2007, 11:10:41 PM
The way you want it to be is do-able, requires some time, but could be done..

but.. you need JavaScript to achieve it.

HFS cant split the folders from the files, and you cant use 2 different templates at once.

so...
how can it be done?
like explorer...

Title: Re: user sections via url
Post by: ledufe on September 26, 2007, 12:51:20 AM
still trying here..
let you know when it done..
Title: Re: user sections via url
Post by: Mars on September 26, 2007, 10:19:18 PM
i have test this:

create a new virtual folder or real folder
name it as you will by sample: test

put into advanced diff tpl 


<html>
<head>
<frameset cols=200,*>
  <frame name=progress src="/~sym-sidemenu.html" scrolling=auto marginwidth=0>
  <frame src="/~sym-main" scrolling=auto>
</frameset>
</head>
<body>
</body>
</html>
create a virtual folder into home directory and rename it  ~sym-main
right clic to the folder and hide it

put into advanced diff tpl


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0

Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  <style type="text/css">
  %style%
  </style>
  <title>HFS %folder%</title>
  <link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
%login-link%
%loggedin%
%upload-link%
<div id=folderlabel>folder</div>
<div id=folder>%folder%</div>
<div id=body>
%folder-comment%
%up%
%files%
</div>
<div id=footer>
<a href="http://www.rejetto.com/hfs/">HttpFileServer %version%</a>
<br />Servertime: %timestamp%
<br />Uptime: %uptime%
<br />Build-time: %build-time%
</div>
</body>
</html>



see your web page and select the directory TEST

html code as bug with frames
back button must desactivate frames created to work correctly

with javascript it is more easy to do what you want