rejetto forum

Software => HFS ~ HTTP File Server => Beta => Topic started by: rejetto on November 08, 2007, 05:15:46 PM

Title: Testing build #141
Post by: rejetto on November 08, 2007, 05:15:46 PM
download @ www.dovedove.it/hfs/hfs141.exe

what's new
+ default template with search, sort by extension
+ new template symbol: %lang% (language identifier furnished by the browser)
+ new template symbol: %ip2name% (as %ip% but translated with the "Address 2 name" feature of the log) www.rejetto.com/forum/?topic=4894
+ new URL parameter: ?search=XXX (shortcut for ?recursive&filter=*XXX* )
+ workaround for IE6+SSL+XML+Flash+Compressed browsing
+ new macro: {{load|XXX}} where XXX is a filename or an URL to include
+ new macro: {{header|XXX}} where XXX is the http header field name to get
- default sorting by extension was not working
Title: Re: Testing build #141
Post by: Comrade Elisey on November 08, 2007, 06:23:45 PM
i'm not understand this adds:
Quote
+ workaround for IE6+SSL+XML+Flash+Compressed browsing
+ new macro: {{load|XXX}} where XXX is a filename or an URL to include
+ new macro: {{header|XXX}} where XXX is the http header field name to get
:-\
Title: Re: Testing build #141
Post by: Giant Eagle on November 08, 2007, 06:24:49 PM
Could you explain a bit more about the {{header|XX}}??


About the search feature..
If the search returns no results, it now shows the contents of [nofiles], could it be possible to make it show the contents of [noresults] for example.
Cause telling the user that he either stumbled across an empty folder or his search didnt return any search results is a bit lame.

for the ppl that would not need [noresults], a simple [nofiles = noresults] would fix that ;D


And there is a bug:
Neither %folder% or %encoded-folder% return the correct folder path of the item that is being searched, if you simply add &recursive to the url it does show the path correctly.
Title: Re: Testing build #141
Post by: rejetto on November 08, 2007, 06:47:47 PM
{{load|C:\windows\win.ini}}

and you will get your win.ini included in the template

{{header}} extracts values from the http header sent by the client within the http request. you probably don't need it.
Title: Re: Testing build #141
Post by: ELEVENNNN on November 08, 2007, 10:44:24 PM
Was reverse sorting implemented in this build, I tryed ?rev in the previous build and it did something but there didnt seem to be a solid result that made sense from it.. does it need to be used in conjunction with something else, I just tryed:

%host%/?rev

I didnt see this in the changelog, could someone explain a little and is it working for you?
Also, could someone using the default template please post a link to your fileserver, I'd like to see it.
Title: Re: Testing build #141
Post by: rejetto on November 09, 2007, 01:24:55 AM
if you want to see the default tpl, you can just use "temporarily disable options".

what you mean by solid result? does it work or is there a bug?
Title: Re: Testing build #141
Post by: TSG on November 09, 2007, 02:00:28 AM
Cool, I will implement ?search= as a non-js quick search. And that load macro, but thats for tonight, I have to go into city for while bbl.
Title: Re: Testing build #141
Post by: rejetto on November 09, 2007, 02:08:42 AM
hint: someone will use the {{load}} to get text from other local servers, like apache
Title: Re: Testing build #141
Post by: Comrade Elisey on November 09, 2007, 02:10:10 AM
rejetto, tell me pls how to use {{load}}?
on example  :-[
Title: Re: Testing build #141
Post by: ELEVENNNN on November 09, 2007, 02:10:53 AM
Rejetto, thanks for the tip about the search, really easy way to do it.
As far as not getting a solid result, I meant each time I hit it it changed.  It wasnt like it was first doing a reverse sort, and then a normal sort... it completely changed, the results changed and there was some non ascii.  

I will upgrade to 141 and test when i get home. (leaving in 1 hour)

-Kurt
Title: Re: Testing build #141
Post by: rejetto on November 09, 2007, 02:21:25 AM
kurt, it works fine here. try to find the way to reproduce the problem.

comrade, i already explained with an example in the other post.
Title: Re: Testing build #141
Post by: ELEVENNNN on November 09, 2007, 03:18:58 AM
I'm home now.  Working on it... would have sent you an IM but your off.

I'll let you know I find, it happened on 140 and I havent upgraded yet.
Title: Re: Testing build #141
Post by: Foggy on November 09, 2007, 05:37:49 AM
+ workaround for IE6+SSL+XML+Flash+Compressed browsing

Thanks Rejetto, It works now. ;)
Title: Re: Testing build #141
Post by: ELEVENNNN on November 09, 2007, 06:35:40 AM
Rejetto, i can't reproduce that problem i was having anymore.. even on 140, i'll let you know if it arises again.

Foggy, you should get a site up that shows a demo of your flash player for lots of people to preview it and such, you could get a fairly loyal following.. I just enjoy rejetto's more because it's so clean, but if you could get yours a little more slimmed down and mainstream looking I think you've got a real shot.
Title: Re: Testing build #141
Post by: yhm_7 on November 09, 2007, 08:10:37 AM
I can serch and get result,but can't open item.
example:search "1210",can get result,but it's wrong url that link to the item.

 http://218.244.71.16:9000/
Title: Re: Testing build #141
Post by: KotUA on November 09, 2007, 08:23:28 AM
Similar problem (all folders real) ???
Title: Re: Testing build #141
Post by: Mars on November 09, 2007, 09:31:42 AM
To yhm_7

change for your template

<DIV class=button>
<FORM
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"
action="http://%host%:9000%folder%" method=get><INPUT size=10 name=search> <INPUT type=submit value=search>
</FORM></DIV>
Title: Re: Testing build #141
Post by: Mars on November 09, 2007, 11:23:59 AM
To rejetto : some add-ons or updates

Quote
function getBaseSymbolsTable
...
if assigned(conn) then
  addArray(result, [
    '%host%', conn.getHeader('host'),
    '%ip%', conn.address,
    '%port%',  srv.port,               
    '%ip2name%', localDNSget(conn.address),
    '%lang%', getTill(';',getTill(',',conn.getHeader('Accept-Language')))
  ]);


Quote
procedure TfileListing.fromFolder
var
  actualCount, physicalSize, toSkip: integer;
  attrFilter: TfileType;
  seeProtected, noEmptyFolders: boolean;
  filesFilter, foldersFilter, linksFilter: string;                           // linksfilter added to filter links by user
...
physicalSize:=length(dir);
actualCount:=physicalSize;
folder.getFiltersRecursively(filesFilter, foldersFilter);
linksFilter:=filesFilter;                                                       //add in first time to initiate  linksFilter
if assigned(data) then
  begin
  if filesFilter = '' then filesFilter:=par('files-filter');
  if filesFilter = '' then filesFilter:=par('filter');
 // include param line  links-fiters
  if linksFilter = '' then linksFilter:=par('links-filter');                              //add  
  if linksFilter = '' then linksFilter:=par('filter');                                      //add  
  if foldersFilter = '' then foldersFilter:=par('folders-filter');
  if foldersFilter = '' then foldersFilter:=par('filter');
  if (filesFilter+linksFilter+foldersFilter = '') and (par('search') > '') then   //mod  
     begin
       ......


I have not found in source class for Tmacro and TmacroCB using by function mcr
Title: Re: Testing build #141
Post by: TSG on November 09, 2007, 12:01:30 PM
Foggy, you should get a site up that shows a demo of your flash player for lots of people to preview it and such, you could get a fairly loyal following.. I just enjoy rejetto's more because it's so clean, but if you could get yours a little more slimmed down and mainstream looking I think you've got a real shot.

Second statement nulls the first, everyone likes the hfs search, even foggy himself. We only constructed the flash one because there was no better approach to searching, its just a coincidence that close to completing the search rejetto came up with a hfs one.

Also i haven't found any bugs with the hfs search since 140.

Although i do think we should complete it, i'll implement the interface next week and get foggy to post it up on the board. It'll use the scripts from RAWR-Player so the search box will be customisable to any template using flashvars.

I have almost completed the search and advanced search functionality for the ToG, I am almost set for release... few small things to add. Terayon on the other hand is lagging behind schedule a little. I've had ToG's interface ready for quite a few weeks now, its just the javascripts we are perfecting.
Posted on: November 09, 2007, 08:26:28 PM
To yhm_7

change for your template

<DIV class=button>
<FORM
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"
action="http://%host%:9000%folder%" method=get><INPUT size=10 name=search> <INPUT type=submit value=search>
</FORM></DIV>

lol, try this one on for size, you don't require the port, %host% has that in it already.

<form action="http://%host%%folder%" method="get">
   <input type="input" value="Search Here!" name="search" size="30"/>
   <input type="submit" value="Search"/>
</form>

This will search from the current directory... use the following for an entire database search...

<form action="/" method="get">
   <input type="input" value="Search Here!" name="search" size="30"/>
   <input type="submit" value="Search"/>
</form>

Also, i noticed wildcards are automatic :) thanks rejetto, the ToG now has a non-javascript search.

Javascript enabled gives a lot more functionality though, it'll have an advanced search button once its complete.
Title: Re: Searchresult not downloadable
Post by: Pit on November 09, 2007, 01:04:16 PM
Hi all,

i´ve also insert the new searchsection in the default template. The search give me results, but if i want to download from the resultsite i get an error "404 Not found".


[search]
<FORM
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"
action='/' method="get"><INPUT size=20 name=search> <INPUT type=submit value=Suche&nbsp;starten>
</FORM>

if i set the action to "http://%host%%folder%" - the search didn´t work.

Search for BENZ as an example.

Please can you help me? - Thanks very very much

Here you can have a look: http://phampel.dyndns.org (http://phampel.dyndns.org)
Title: Re: Searchresult not downloadable
Post by: maverick on November 09, 2007, 01:26:00 PM
i´ve also insert the new searchsection. The search give me results, but if i want to download from the resultsite i get an error "404 Not found".

Yes, I noticed the same problem even with the default template.  Search Results are not downloadable - 404 file not found - wrong path to search results.   Changing the form action to what some suggest in above replies don't work either.  That code should have been tested first before being posted as a working fix.


Rejetto will have to check this out.


Title: Re: Testing build #141
Post by: TSG on November 09, 2007, 01:47:02 PM
I can confirm this bug, i'm sure its easy to fix. The new section is not the cause :) thats just somewhere to put the search form.

Its just missing the folder path.

Its nice to see the macro's are working, i am converting a couple of mine now.
Title: Re: Testing build #141
Post by: TCube on November 09, 2007, 01:50:40 PM
Same pblm : not downloading (i.e damn template)
I'll will load a full music library just to check if is reasonnable to get the "search function" onto the main template  ;D (otherwise it 'll be set in diff. template) one nice thing : works perfectly with files extentions
Tcube

*** Also, after the search result page is displayed, there should be a link on this page to take you back to where you were or back to the home page to get you out of search.***

something to do with breadcrumbs (http://xs221.xs.to/xs221/07455/craquage.gif) (http://xs.to)
Title: Re: Testing build #141
Post by: Mars on November 09, 2007, 04:01:44 PM
By waiting for the corrective, use the syntax

?recursive&filter=mask

on the place of
 
?search=mask

it makes the same job with the good links

test the two syntax and see at the status bar when mouse goes over a link
Title: Re: Testing build #141
Post by: TSG on November 09, 2007, 05:13:03 PM
By waiting for the corrective, use the syntax

?recursive&filter=mask

on the place of
 
?search=mask

it makes the same job with the good links

test the two syntax and see at the status bar when mouse goes over a link

that way doesn't work mars, you have to put stars around the wildcard. thats one of the reasons i edited your post in the first place.

?recursive&filter=*mask* or ?filter=*mask*&recursive
 
in the place of:
?search=mask

try offering correct advice mars, thats two three times you've posted incorrect code. it's only helpful if it works.
Title: Re: Testing build #141
Post by: Pit on November 09, 2007, 05:23:13 PM
Super - this workaround does it right. But where must i insert it in the default template? There isnt a point like this. Thanks for your answer.
Title: Re: Testing build #141
Post by: TSG on November 09, 2007, 05:34:24 PM
Ye thats the problem with that method, you cant use it without javascript if you want a search form, reason why rejetto made a simple version. But with some javascript the complex way becomes very powerful.

I have made one of these javascript forms on my server, and a non-javascript form which will appear when js is off.
Title: Re: Testing build #141
Post by: Pit on November 09, 2007, 05:37:04 PM
Thanks, now than i must wait for an update from Rejetto.  ;)
Title: Re: Testing build #141
Post by: Comrade Elisey on November 09, 2007, 11:48:11 PM
some problems with "search":

i put that code in my template:
Quote
<form action="http://%host%%folder%" method="get">
   <input type="input" value="Search Here!" name="search" size="30"/>
   <input type="submit" value="Search"/>
</form>

example, i wanna search "music.mp3" and this file placed at http://%host%/music/music.mp3.
i write "music.mp3" into searchform and OK, then in file list below it show me "music.mp3" file, but link on this file is "http://%host%/music.mp3"...

can u explain me what i do wrong?
or it is bug?  ???
Title: Re: Testing build #141
Post by: Mars on November 10, 2007, 12:09:28 AM
by waiting for the next build with corrective you can use this


<form action="http://%host%%folder%" method="get">
   <input type="input" value="" name="recursive" size="1" style="display:none"/>
   <input type="input" value="Search from Current Folder" name="filter" size="30"/>
   <input type="submit" value="Search"/>
</form>
<form action="/" method="get">
   <input type="input" value="" name="recursive" size="1" style="display:none"/>
   <input type="input" value="Search from ROOT" name="filter" size="30"/>
   <input type="submit" value="Search"/>
</form>
Title: Re: Testing build #141
Post by: rejetto on November 10, 2007, 01:42:12 AM
I can serch and get result,but can't open item.
example:search "1210",can get result,but it's wrong url that link to the item.

yes, sorry, this bug will be fixed in next build
Title: Re: Testing build #141
Post by: ELEVENNNN on November 10, 2007, 02:37:45 AM
yhm, you inadvertently answered my question about a sample search from above. thanks.