Dark Help for TC 11.03 - Updated February 21st 2024

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *Fla$her »

petermad wrote: โ†‘2023-11-12, 22:53 UTChow does that work?
  1. Make a mass replacement in *.html of the string

    Code: Select all

    <link href="ie.css" type="text/css" rel="stylesheet">
    with this:

    Code: Select all

    <script language="javascript" src="external.js" type="text/javascript"></script>
    Or you can write it next, not the point.
  2. Throw into the chm root this external.js:

    Code: Select all

    var path = unescape(location.pathname), n = 0
    if( path.indexOf('::') != -1 ) {
    	if( path.charAt(0) == '@' ) { n = path.indexOf(':') + 1	}
    	document.writeln('<link rel="stylesheet" href="file://' + path.substring(n, path.lastIndexOf('\\') + 1) + 'style.css" type="text/css">')
    }
  3. Place ie.css with TotalcmdDark.chm, call (including in .js) style.css or something else, for example, TotalcmdDark.css.
Actually, it's possible to make the color settings taken from COMMANDER_INI (ColorsDark/ListerDark), but here it's necessary to spend some time on the selection of a suitable scheme.
Overquoting is evil! ๐Ÿ‘Ž
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *Usher »

2Fla$her
Does it work in Windows 9x?
Andrzej P. Wozniak
Polish subforum moderator
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *Fla$her »

2Usher
In Win95, definitely not, there was no javascript back then. And in 98/Me it's necessary to look, I haven't used them for "100 years".
Overquoting is evil! ๐Ÿ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *petermad »

2Fla$her
It works, but having to change all the 213 .htm files each time there is a new help file is a bit much compared to the 6 files I currently have to change (apart from the 31 . gif files which just have to be overwritten).

I am also sure that anybody that can edit an external css file can also figure out to edit the internal ie.css instead.

Anyway - if I do choose to implement it, I would not replace <link...> with <script...></script> I would just add <script...></script> after <link...> - in that way it will also work if the external css file is missing (if more than 1 style is set for an element, it is the last one that is applied).
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *Fla$her »

petermad wrote: โ†‘2023-11-13, 17:58 UTC I am also sure that anybody that can edit an external css file can also figure out to edit the internal ie.css instead.
Why did you decide that? Users will quickly figure out where to enter the color html code into css. But they will have problems with how to edit chm. By adding external css, you will simplify the approach for everyone, because people will only need to edit their file once and not replace it when updating chm.
petermad wrote: โ†‘2023-11-13, 17:58 UTCI would just add <script...></script> after <link...>
I agree, that's why I suggested it as an alternative.
Overquoting is evil! ๐Ÿ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *petermad »

License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *Fla$her »

2petermad
Well, sort of. It remains to figure out what to do with hsc6C4.hhc.
Overquoting is evil! ๐Ÿ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *petermad »

Fla$her wrote: โ†‘2023-11-13, 20:55 UTC 2petermad
Well, sort of. It remains to figure out what to do with hsc6C4.hhc.
Well first of all, it is not possible to set anything but the background color in hsc6C4.hhc. The colors of the list items cannot be set, you can see that discussed elsewhere in this forum, and on the net.

I tried running javascript in hsc6C4.hhc - but it is apparantly not supportet and neither is css.

I had hoped thet I could dynamically change the line that sets the background color:

Code: Select all

<param name="Background" value="0x202020">
with javascript, but no.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *Fla$her »

petermad wrote: โ†‘2023-11-13, 21:10 UTC Well first of all, it is not possible to set anything but the background color in hsc6C4.hhc.
Background is the primary thing for TotalcmdDark2.chm, that's why it's important. And why did you change other htm colors if they have no effect?
petermad wrote: โ†‘2023-11-13, 21:10 UTC I had hoped thet I could dynamically change the line that sets the background color:
And what did you do?
While I'm watching the article, I need to think about solutions.

In the meantime, please add /* comment */ to each line of TotalcmdDark.css.

By the way, the color for .s67 for some reason doesn't change. I look at the "Keyboard layout" page: 8 hotkeys from .p61 have changed color, the rest have not. :/
Last edited by Fla$her on 2023-11-14, 01:35 UTC, edited 1 time in total.
Overquoting is evil! ๐Ÿ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *petermad »

And what did you do?
I just tested a simple <script language="javascript" src="external.js" type="text/javascript">alert("hi")</script> - no alert, so no javascript support.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *Fla$her »

Understood. See the addition below.
Overquoting is evil! ๐Ÿ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *petermad »

By the way, the color for .s67 for some reason doesn't change. I look at the "Keyboard layout" page: 8 hotkeys from .p61 have changed color, the rest have not. :
That is not my doing, all those s and p classes are made by Ghislers HelpScribble program - I havent changed them, I have only changed the 5 first lines.

See the addition below
There is nothing below that line ??
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *Fla$her »

That is not my doing
I know. I just wanted confirmation.
There is nothing below that line ??
Are you talking about the first quote? As you can see.
Overquoting is evil! ๐Ÿ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *petermad »

Are you talking about the first quote? As you can see.
You wrote: " See the addition below" - my question is: below what?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Dark Help for TC 11.02 - Updated November 9th 2023

Post by *Fla$her »

At the bottom of the previous message.
I'm asking to format css in a slightly more readable form:

Code: Select all

body { background-color: #1F2B3D; color: #D0D1DB }
a:link    { color: #A8C2FF }
a:visited { color: #CDB5FF }
a:active  { color: #80FF00 }
a:hover   { color: #80FF00 }
.s3  { color: #FF265A }
.s5  { color: #FF265A }
.s22 { color: #FF265A }
.s38 { color: #FF265A }
.s54 { color: #93FFAD }
.s55 { color: #A8C2FF }
.s67 { color: #FF265A }
.s72 { color: #FF265A }
.p11 { color: #FF265A }
.p13 { color: #FF265A }
.p33 { color: #FF265A }
.p61 { color: #FF265A }
.p70 { color: #FF265A }
Last edited by Fla$her on 2023-11-14, 04:11 UTC, edited 1 time in total.
Overquoting is evil! ๐Ÿ‘Ž
Post Reply