Page 1 of 1
TCWeb - filemanager with mod harbour
Posted: Wed Jan 03, 2024 4:21 pm
by Otto
Hello friends,
Best regards,
Otto
Re: TCWeb - filemanager with mod harbour
Posted: Thu Jan 04, 2024 10:35 am
by Jack
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
Re: TCWeb - filemanager with mod harbour
Posted: Thu Jan 04, 2024 10:44 am
by Otto
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: Select all | Expand
/* 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 )
Re: TCWeb - filemanager with mod harbour
Posted: Thu Jan 04, 2024 10:57 am
by Otto
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
Re: TCWeb - filemanager with mod harbour
Posted: Thu Jan 04, 2024 11:16 am
by Otto
Re: TCWeb - filemanager with mod harbour
Posted: Sat Apr 27, 2024 10:01 am
by Otto
New function " move - copy " ready
Re: TCWeb - filemanager with mod harbour
Posted: Thu Jul 04, 2024 10:12 am
by Otto
Hello friends,
new function: sorting table
Best regards,
Otto