SimplePortal
Development => Bugs => Fixed or Bogus Bugs => Topic started by: Garoun on July 02, 2010, 12:32:00 PM
-
SMF Version: 2.0 RC3
SP Version: 2.3.2
Error Log: No Errors reported
Issue: Leaving the 'Maximum Characters:' field empty for a BoardNews block seems inconsistent with help text.
Help text displayed:
If specified, posts exceeding this limit will be shortened and have an ellipsis (...), or a "Read More" link placed on the end.
I wanted my Boardnews Block posts to not be limited, display the full post regardless of length, so I left the field empty. (Refer to Settings image)
I did get the full post but had '...' appended to it. (refer to Example of block)
I checked the code I believe is running, "function sp_boardNews()", and noticed this:
This line will force the body text to always have the '...' even if I set length to 0:
$row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']) . '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">...</a>';
When what I think it should be something along these lines:
$addEllipsis = ($length > 0) ? '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">...</a>' : '';
$row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']) . $addEllipsis;
I can manually change the file but would rather report it as a bug in case it isn't the desired functionality so I don't make life more difficult when upgrading in the future.
-
Please feel free to move this to the Bug forum if it is truly a bug, I wasn't sure so put it here in case the current functionality was desired.
-
This issue isn't a bug as such, imo it treads the line between being a bug and being a feature request. I'll move it to the bug boards anyway as its something that should be changed.
Reported to the ProjectTracker: http://simpleportal.net/index.php?issue=392.0
Thank you for the report.
-
I agree that it sits on the fence :). Especially since there are various alternatives to achieve the desired effect.
Thanks again!