FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TCWeb - filemanager with mod harbour
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

TCWeb - filemanager with mod harbour

Posted: Wed Jan 03, 2024 04:21 PM
Hello friends,
Best regards,
Otto

Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM

Re: TCWeb - filemanager with mod harbour

Posted: Thu Jan 04, 2024 10:35 AM

Otto,

Could you give us more detail about the way you design your screen .

With fivewin, we have resource workshop or pellec or .....

What is the same for web (HTML CSS screen design )

Thanks,

Philippe

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: TCWeb - filemanager with mod harbour

Posted: Thu Jan 04, 2024 10:44 AM
Hello friends,

I am in the process of extending the filename.prg (// FiveWin FileNames support functions) for mod harbour.

DosPAth2Web()
Here is a function that is needed when you want to open a page in the browser from TCWeb.


TCWeb is fun. First there was Norton Commander then it was often cloned - I use Total Commander.
And now I needed something for the web. So I'm trying to make a file manager for the web following the model of Total Commander.

Best regards,
Otto
Code (fw): Select all Collapse
/* DOS2Web( input )  

The `DOS2Web` function converts a local file system path to a web URL. 
It constructs the base URL from the server's HTTPS status and host name. 
It adjusts the local path by removing any trailing slashes and replacing backslashes with forward slashes. 
Then, it substitutes the local server path (from `DOCUMENT_ROOT`) with the base URL to create the web-accessible URL. 
The resulting URL is returned, representing the web path equivalent of the input DOS path. 
This function is typically used in a web server environment like mod_harbour to reference local resources in a web-accessible format. */


function DOSPath2Web( input )  
    local result := ""
    local cbase_url := ""
    local chtdocspath := LOWER( ALLTRIM( AP_GetEnv( "DOCUMENT_ROOT" ) )) 
    
    if AP_GetEnv( "HTTPS" )  = "on" 
        cbase_url := "https://"
    endif
    cbase_url += AP_HeadersIn()["Host"] 
    
    if RIGHT( chtdocspath, 1) = '/'
        chtdocspath := left( chtdocspath , ( len(chtdocspath) - 1) )
    endif
    
    input :=  STRTRAN( input, '\', '/' )
    result := STRTRAN( (input), (chtdocspath), cbase_url )
    
return ( result )
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: TCWeb - filemanager with mod harbour

Posted: Thu Jan 04, 2024 10:57 AM

Hello Philippe,

I code the screens. Mostly now with the help of ChatGPT.

What I use is Bootstrap 5 and still jQuery. I really try not to include any further libraries.


*** mod harbour - and HTML/JS - Bootstrap and jQuery ***

Everything else will only cause problems in the future.


With the preprocessor and patcher (HARBOURINO), I of course have a good framework.

Here, without knowing ChatGPT, I was lucky. It is optimal for collaboration with ChatGPT.

My program is modular, so I can easily pass parts to ChatGPT and get help.

Nevertheless, in the end, I have the original HTML code.

How far have you already delved into online programming?

Kind regards,

Otto

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: TCWeb - filemanager with mod harbour

Posted: Thu Jan 04, 2024 11:16 AM
Hello Philippe,

From HTML to Mod_Harbour
https://mybergland.com/fwforum/part1.mp4

Overview: Harbourino
https://mybergland.com/fwforum/managerchat3.mp4


Best regards,
Otto
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: TCWeb - filemanager with mod harbour

Posted: Sat Apr 27, 2024 10:01 AM
New function " move - copy " ready

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: TCWeb - filemanager with mod harbour

Posted: Thu Jul 04, 2024 10:12 AM
Hello friends,
new function: sorting table
Best regards,
Otto

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: TCWeb - filemanager with mod harbour

Posted: Sat Aug 09, 2025 01:08 PM

Continue the discussion