[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  HTML Logging - Multiple Spaces Ignored

HTML Logging - Multiple Spaces Ignored

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Wed 09 Jul 2003 03:30 PM (UTC)
Message
In HTML, when you have more than one space, you need to put it like "   " for three spaces, for example. MUSHclient doesn't seem to do this when outputting in HTML mode... it just prints out the spaces.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Shadowfyr   USA  (1,786 posts)  [Biography] bio
Date Reply #1 on Wed 09 Jul 2003 06:20 PM (UTC)
Message
Since muds are generally in fixed width, the HTML logging assumes that you will use something like <pre>..the log...</pre> to display it correctly. With that tag, everything in between is treated as 'pre-formatted' and the correct number of spaces appear in it. I suspect that the needed tags are not added automatically and that the HTML header you are adding to view the page is also missing this. HTML copy and paste is different, since setting colors requires that the color information be set 'before' starting the preformatted text. Tags are also rendered as typed in such, so any color changes are simply shown as tags, instead of executed when used the wrong way. I don't believe that logging stores the colors, so it doesn't bother to properly transition between the default web browsers use of non-fixed and unformatted text, but instead leaves this up to the person making the log to add.

Imho it would make life a bit easier if mushclient was smart enough to do:

<HTML>
<head>
Stuff from the header section.
</head>
<body>
<pre>
Your actual log.
</pre>
Anything in the footer section.
</body>
</html>

when actually using HTML logging. Instead we have to add all the needed tags in the right places to make it work. You simply missed one. ;)
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Reply #2 on Wed 09 Jul 2003 06:54 PM (UTC)
Message
I use HTML logging. Here's how mine is setup:

File Preamble:

<html>
<head>
<title>%N (%P) [%Y-%b-%d %a]</title>
</head>
<body bgcolor=#DCDCDC>
<font face="FixedSys" size="3">
<pre>
Times (on the left) are %z.
---------------------------------------------------------------------

File Postamble:

%N [%Y-%b-%d %a]
</pre>
</font>
</body>
</html>

Output lines:
Preamble:
%H:%M> 

Commands:
Preamble:
%H:%M> <font color=#FF8040>
Postamble:
</font>

Script Notes:
Preamble:
%H:%M> 

Now, I do some 'fancy' things with mine. I set the background colour to match the one I use on the mud, which is an off-white. I set commands to use the same colour as configured in MUSHclient. (MUSHclient doesn't seem to want to log commands in the command colour).

I notice there is a button on the log configuration screen: Standard HTML preamble\Postamble. I'm sure you could just press that to get the basic stuff you need.

(BTW, I agree with Shadowfyr, you need the <Pre></Pre> tags.)

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #3 on Wed 09 Jul 2003 11:48 PM (UTC)
Message
Thanks for the pointers... <pre> is indeed what I wanted.

I'm not sure I want to use the complete HTML pre/postamble, because I use automatic logging. I wouldn't want the logger to close the body/html tags every time I close a session :)

I use this as a preamble:

<html>
 <head>
 <title>Log of %N session</title>
 </head>
<body bgcolor=000000 text=ffffff>
<font face="courier new" size=3>
<pre>

and this as a postamble:

</pre>

And it seems to work just fine.

Thanks again for letting me know the way around this. :)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Thu 10 Jul 2003 03:03 AM (UTC)
Message
It's not really a bug - it is intended to work that way. Rather than cluttering up your log files with thousands of &nbsp; entries - which would make them very tedious to read when you edit the HTML, MUSHclient uses (or allows you to use) the well-documented <pre> ... </pre> feature of HTML which retains existing formatting, line breaks, etc.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


12,547 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]