rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: bendioe50 on September 11, 2010, 03:43:02 PM

Title: disabling the '/' address using macro
Post by: bendioe50 on September 11, 2010, 03:43:02 PM
I want to know this sentence and

[link : http://www.rejetto.com/forum/index.php/topic,5950.0.html

"Can probably be improved with macro, the back button hiding and altering the breadcrumbs."

"Yes but this can be fixed by disabling the '/' address using macro. But you will have to work it out yourself, cause I am working on stuff. "]

I want to know how to write code..
Title: Re: disabling the '/' address using macro
Post by: rejetto on September 12, 2010, 01:15:25 PM
it's not clear to me to what it means the '/', if the character, or the root folder.
after that, also "disabling" has several meanings.
Title: Re: disabling the '/' address using macro
Post by: bendioe50 on September 13, 2010, 07:30:31 AM
First access root directory. and then, If you refresh(access,approche) the root directory, only redirect to root folder
Title: Re: disabling the '/' address using macro
Post by: rejetto on September 13, 2010, 11:12:32 AM
it took me a while to understand what you meant by "root directory" and "root folder".
the picture helped a lot.
what hfs version are you using?
when you access the / only index.html is provided, so there you can't really access /.
Title: Re: disabling the '/' address using macro
Post by: bendioe50 on September 13, 2010, 12:35:58 PM
HFS version 2.3 beta
build #269

Index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//KR" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex,nofollow">
<title>The Secret Chamber...</title>
</head>
<frameset rows="24,*" framespacing="0" frameborder="no" border="0">
   <frame src="/frame.html" name="leftFrame"  marginheight="1" marginwidth="20" frameborder="no" scrolling="no" id="leftFrame">
   <frame src="/root/" name="rightFrame" frameborder="no" scrolling="yes" id="rightFrame">    
 </frameset>
<noframes><body></body></noframes>
</html>

Frame.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//KR" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <title>BoneMan's Vids and Shouts</title>
</head>
<body style="background:#000;">
<embed src="/jwplayer/jwplayer.swf" width="1040" height="24" flashvars="file=/music/1.xml&autostart=true&playlist=right&shuffle=true&repeat=list&volume=20&playlistsize=350"/>
</body>
</html>
Title: Re: disabling the '/' address using macro
Post by: rejetto on September 14, 2010, 10:49:03 AM
i guess a good solution is to hide the link you marked in the first picture.

you should spot the text in the template,
and replace this
{.%folder%=/ .}

with this
{.%folder% <= /root/ .}

i hope it works, i didn't test.
Title: Re: disabling the '/' address using macro
Post by: bendioe50 on September 14, 2010, 04:35:17 PM
Thank you for your help.

Several problems arose.

Error(Server error ,Access denied , Cancel upload, No permission to access the folder)

----->occur same problem

So, I want to redirect to root folder
Title: Re: disabling the '/' address using macro
Post by: rejetto on September 15, 2010, 08:24:45 AM
what template are you using?
Title: Re: disabling the '/' address using macro
Post by: bendioe50 on September 15, 2010, 04:35:58 PM
attach template.

This template translated by korean.
Title: Re: disabling the '/' address using macro
Post by: rejetto on September 17, 2010, 07:02:35 AM
i downloaded your file, and applied the change i suggest you.
i could enter any folder, except the protected ones, i also uploaded successfully a file.
i met no error. Maybe you did something wrong.

you have to change this line

   {.if|{.{.!btn_back.}=on.}|{.if not|{.%folder%=/ .}|<div id="backBtn"><a href=".."><span>{.!lv_back.}</span></a></div>.}.}

with this line

   {.if|{.{.!btn_back.}=on.}|{.if not|{.%folder% <= /root/ .}|<div id="backBtn"><a href=".."><span>{.!lv_back.}</span></a></div>.}.}
Title: Re: disabling the '/' address using macro
Post by: bendioe50 on September 19, 2010, 03:32:37 AM
attach my error clip video link

http://www.youtube.com/watch?hl=en&v=Ng48xJGbbzw&gl=US (http://www.youtube.com/watch?hl=en&v=Ng48xJGbbzw&gl=US)
Title: Re: disabling the '/' address using macro
Post by: rejetto on September 19, 2010, 05:22:51 PM
1. when you click "back" the player goes away because of a problem with the template you are using.
you'll see there's
target="_parent"

in the upload page.
that's likely to be the thing that's breaking it.
if it's not that, it's a target=SOMETHING for sure.

2. you are asked for a password because that folder is protected, that is, access is restricted.
that should be the same with or without modification i suggested.
Title: Re: disabling the '/' address using macro
Post by: bendioe50 on September 20, 2010, 12:41:06 AM
thank you, rejetto

modification

1.   {.if|{.{.!btn_back.}=on.}|{.if not|{.%folder%=/ .}|<div id="backBtn"><a href=".."><span>{.!lv_back.}</span></a></div>.}.}


   {.if|{.{.!btn_back.}=on.}|{.if not|{.%folder% <= /root/ .}|<div id="backBtn"><a href=".."><span>{.!lv_back.}</span></a></div>.}.}

2.target="?????"

  target="bottom"   ****bottom is bottomframe name*****

3.{.if|{.{.!btn_back.}=on.}|<div id="backBtn"><a href="/"><span>{.!lv_back.}</span></a></div>.}

   {.if|{.{.!btn_back.}=on.}|<div id="backBtn"><a href="/root/"><span>{.!lv_back.}</span></a></div>.}