I've got a problem with the "Shoutbox" module I can't seem to solve.
I think the space between the name of the poster, and the message is too big - how can I modify that?

I thought it might just be some paragraph styling, but I can't seem to locate where to change it..

Also.. Is there somehow the Name of poster could be a different color than the message?

See what I mean here:

http://krasch.dk/various/shoutboxhelp.jpg

Sorry if this is not the right place to post the question. I'm new to drupal community =/

Comments

dougo99’s picture

The same issue was killing me all day today and I finally hacked a solution using shoutbox.css by adding the following:

div.shoutbox-msg p{
margin-top: -.5em;
line-height: 1.25em;
}

This compressed it up fairly well and worked on Firefox, Chrome, IE7 and Opera. Couldn't figure out how the paragraph tag was wrapped around the shout. Simply removing and adding a little space between the nick and the shout would be my preferred formatting option - but I finally gave up on getting that to work. I'll probably revisit this later again...

Emmental’s picture

I've been trying to work this out as well, and finally managed it.

The call to the function check_markup() is wrapping a paragraph around the shout, but this shouldn't be removed as it protects against malicious code. Instead, remove the paragraph after it comes back from this function.

Edit shoutbox.module and find the function _shoutbox_sanitize_shout. Add this line to the end:

$shout->shout = str_replace(array("<p>", "</p>"), "", $shout->shout);

That will strip out the paragraph tags and result in the shout directly following the name as I believe was the original intention, e.g.

Emmental: Hi there!

You should probably undo your original CSS hack as well.

There's also an error in shoutbox.css which prevents the alternating background color of the shouts. To fix it, rename "shoutbox-even" to "shout-even" and "shoutbox-odd" to "shout-odd" in shoutbox.css.

vitalblue’s picture

Issue summary: View changes
Status: Active » Closed (outdated)