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

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  HTML Logging - Multiple Spaces Ignored
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

HTML Logging - Multiple Spaces Ignored

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Wed 09 Jul 2003 03:30 PM (UTC)  quote  ]
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,775 posts)  [Biography] bio
Date Reply #1 on Wed 09 Jul 2003 06:20 PM (UTC)  quote  ]
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. ;)

main {
__if (Schrodinger_Cat is Alive or version >= "XP"){
____if version = "Vista" then Performance /= Number_of_Cores;
____call Functional_Code();}
__else
____call Crash_Windows();}
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Reply #2 on Wed 09 Jul 2003 06:54 PM (UTC)  quote  ]
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   Moderator
Date Reply #3 on Wed 09 Jul 2003 11:48 PM (UTC)  quote  ]
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  (19,383 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Thu 10 Jul 2003 03:03 AM (UTC)  quote  ]
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.


1,904 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]