Author Topic: New intermud logging page  (Read 3327 times)

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
New intermud logging page
« on: August 24, 2010, 12:13:12 PM »
Folks who used Tricky's old log page sorely miss it, and it's been a struggle to just get through
each day bearing that grief. DavidHaley has come to our aid, though, and set up a page to
log the intermud goings-on.

It's still in the testing phase, and more features will eventually show up, but here's
a preview of its basic being-there-ness:

http://www.mudworld.net/imud/logs/

-Crat

Offline quixadhal

  • BFF
  • ***
  • Posts: 618
    • View Profile
    • A Waste of Time
Re: New intermud logging page
« Reply #1 on: August 25, 2010, 05:54:07 AM »
Good job.

One small suggestion for readability.  Instead of (or perhaps in addition to?) the table frames, set the row colors to produce a greenbar or greybar effect.

For example:

Code: [Select]
<?php
for($i 0$i $number_of_entries$i++)
{
    
$bgcolor = ( $i ) ? "#DDDDDD" "#DDFFDD";
?>

    <tr class="logentry">
        <td bgcolor="<?php echo $bgcolor?>">2010-08-25 03:14:25<br>Kalinash@Fire_and_Ice</td>
        <td class="text" bgcolor="<?php echo $bgcolor?>">interesting...</td>
    </tr>
<?php
}
?>


Offline DavidHaley

  • Acquaintance
  • *
  • Posts: 6
    • View Profile
Re: New intermud logging page
« Reply #2 on: August 25, 2010, 11:04:57 AM »
Yeah, row banding is something I'll be adding shortly to make it more readable.

Offline DavidHaley

  • Acquaintance
  • *
  • Posts: 6
    • View Profile
Re: New intermud logging page
« Reply #3 on: September 01, 2010, 11:58:03 AM »
I fixed a bug where it blew up on non-standard ASCII characters, like accented letters and the like. Thanks to Ninja for using funny characters.  :)

Offline quixadhal

  • BFF
  • ***
  • Posts: 618
    • View Profile
    • A Waste of Time
Re: New intermud logging page
« Reply #4 on: September 06, 2010, 11:00:49 AM »
Darn furiners, usin' thar debil scripts!

Speaking of scripts... here's one for greasemonkey.

Code: [Select]
// ==UserScript==
// @name           Zebra
// @namespace      Dread Quixadhal
// @description    Alternating row colors
// @include        http://www.mudworld.net/imud/logs/*
// ==/UserScript==

var rows = document.getElementsByClassName('logentry');
var bold = true;
for (var i = rows.length - 1; i >= 0; i--) {
var thisRow = rows[i];
thisRow.style.backgroundColor = bold ? '#dfd' : '#fff';
bold = !bold;
}

Offline DavidHaley

  • Acquaintance
  • *
  • Posts: 6
    • View Profile
Re: New intermud logging page
« Reply #5 on: September 20, 2010, 11:21:06 AM »
I fixed a bug that made yesterday's log entries appear at the bottom, causing the logs to read:
<today>
<today-2>
<...>
<yesterday>