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.