rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: catgirl on April 16, 2004, 05:34:52 AM
-
"up" button is bug.
no support chinese encode.(Only "UP"button)
(http://zhuluren.com/non/usr/10/10_2983_1.gif)
-
press "up" contain chinese character.
404 file not find
-
This bug complete fix, if rejetto add in you sources code
this string:
// build up base table
table:=NIL;
addArray(table, [
'%timestamp%', DateTimeToStr(now()),
'%version%', VERSION,
'%uptime%', uptimestr(),
'%folder%', includeTrailingChar('/', decodeURL(folder.url())),
//************** My modification ********************************
{correct russian or other chars in url in header "Up" \\hslib.encodeURL\\}
'%parent-folder%', hslib.encodeURL(includeTrailingChar('/', decodeURL(folder.parenturl())),True,True,False)
//************** End My modification ********************************
]);
-
Not compile :(
:( :cry:
-
what is not compile?
I can help you.
I fix bugs in sources code.
If you have any questions please go to my icq 331025557
or my mail skeeper@nm.ru
-
'%parent-folder%', hslib.encodeURL(includeTrailingChar('/', decodeURL(folder.parenturl())),True,True,False)
yes, i get the idea.
it is more desirable to not call the hslib.encodeURL(), but use the hiding function present in main module ... when possible.
i moved fullEncode:=TRUE; before the // build up base table
and inserted a call to encodeURL().
i hope this will work.
-
For comlete this problem i add code
i add new key word %efolder%
in template it is
-------------------------------------------------------------------------------
[files]
<div class=label>%number-folders% folders, %number-files% files - Total: %total-size%</div>
<table cellpadding=5>
<th><a href="%efolder%?sort=n"><span class=column>Filename</span></a>
<th><a href="%efolder%?sort=s"><span class=column>Filesize</span></a>
<th><a href="%efolder%?sort=t"><span class=column>Filetime</span></a>
<th class=column>Hits
%list%
</table>
-------------------------------------------------------------------------------
in programm
// build final page
if list='' then list:=tpl['nofiles']
else
begin
table2:=table;
//************** My modification ********************************
{correct russian chars in url in header "File , Size, Date Time"}
i:=0;
while i < length(table2) do
begin
if table2='%folder%' then
begin
temp:=hslib.encodeURL(table2[i+1],True,True,False);
addArray(table2, ['%efolder%',temp]);
break;
end;
inc(i,2);
end;
//************** End My modification *********************
addArray(table2, ['%list%',list]);
list:=x_template(tpl['files'], table2);
end;
-
i introduced the %encoded-folder% symbol as you proposed, but i don't understand why you used a loop to do it.
that's how i did
// build up base table
table:=NIL;
addArray(table, [
'\n', CRLF,
'%timestamp%', DateTimeToStr(now()),
'%version%', VERSION,
'%uptime%', uptimestr(),
'%folder%', includeTrailingChar('/', decodeURL(folder.url())),
'%encoded-folder%',
encodeURL(includeTrailingChar('/', decodeURL(folder.url()))),
'%parent-folder%',
encodeURL(includeTrailingChar('/', decodeURL(folder.parenturl())))
]);