SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: Garoun on July 02, 2010, 12:32:00 PM

Title: Boardnews Block: 'Maximum Characters:' inconsistent with help info
Post 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:
Quote
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:
Code: [Select]
$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:
Code: [Select]
$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.
Title: Re: Boardnews Block: 'Maximum Characters:' inconsistent with help info
Post by: Garoun on July 02, 2010, 12:41:05 PM
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.
Title: Re: Boardnews Block: 'Maximum Characters:' inconsistent with help info
Post by: Nathaniel on July 02, 2010, 10:38:56 PM
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.
Title: Re: Boardnews Block: 'Maximum Characters:' inconsistent with help info
Post by: Garoun on July 03, 2010, 01:47:38 AM
I agree that it sits on the fence :).  Especially since there are various alternatives to achieve the desired effect.

Thanks again!
SimplePortal 2.3.8 © 2008-2024, SimplePortal