Closed (outdated)
Project:
Shoutbox
Version:
6.x-1.0
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2009 at 10:38 UTC
Updated:
18 Mar 2016 at 11:12 UTC
Jump to comment: Most recent
Comments
Comment #1
dougo99 commentedThe 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...
Comment #2
Emmental commentedI'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.
Comment #3
vitalblue commented