Author Topic: user sections via url  (Read 3105 times)

0 Members and 1 Guest are viewing this topic.

nermal

  • Guest
user sections via url
« 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....

Offline Giant Eagle

  • Tireless poster
  • ****
  • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
user sections via url
« Reply #1 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

:)

nermal

  • Guest
user sections via url
« Reply #2 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>

Offline ledufe

  • Tireless poster
  • ****
  • Posts: 272
  • LEandro DUpont FErreira
    • View Profile
    • http://ledufe.no-ip.info:2222
user sections via url
« Reply #3 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...
<<LeDuFe>>

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12949
    • View Profile
Re: user sections via url
« Reply #4 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 ?

Offline ledufe

  • Tireless poster
  • ****
  • Posts: 272
  • LEandro DUpont FErreira
    • View Profile
    • http://ledufe.no-ip.info:2222
Re: user sections via url
« Reply #5 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://www.rejetto.com/forum/index.php?topic=3800.0
« Last Edit: September 24, 2007, 07:40:17 PM by ledufe »
<<LeDuFe>>

Offline Giant Eagle

  • Tireless poster
  • ****
  • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
Re: user sections via url
« Reply #6 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.

marlonRJ

  • Guest
Re: user sections via url
« Reply #7 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...


Offline ledufe

  • Tireless poster
  • ****
  • Posts: 272
  • LEandro DUpont FErreira
    • View Profile
    • http://ledufe.no-ip.info:2222
Re: user sections via url
« Reply #8 on: September 26, 2007, 12:51:20 AM »
still trying here..
let you know when it done..
<<LeDuFe>>

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1879
    • View Profile
Re: user sections via url
« Reply #9 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

« Last Edit: September 26, 2007, 10:25:19 PM by mars »