SimplePortal

Support => English Support => Topic started by: yameth on December 30, 2014, 08:02:37 AM

Title: Inconsistent character limit on board news block
Post by: yameth on December 30, 2014, 08:02:37 AM
Hello everyone and Happy New Year!

I am having a little trouble setting a consistent look on my frontpage with the board news block.

Let's say I want each item in the block, to show max 500 characters.

I do set the character limit by editing the block options at Admin > SimplePortal > Blocks.

The trouble is that some news respect the limit, while others are not shown at all. All caracters are deprecated. See attachment example (excuse my greek) :D.
I would expect that if a news item exceeds the given character limit, AT THAT point the deprecation would occur and not to the whole text.

Am I missing something?
Title: Re: Inconsistent character limit on board news block
Post by: Chen Zhen on December 30, 2014, 05:44:35 PM
yameth,

  The post text includes any BBCodes that you may be using which in some cases may add HTML (converted after the posts are truncated) that appear to be less than the configured limit. This means that in some cases more characters are actually being used compared to what is actually visible after the browser parses the HTML.

  I recently wrote a plugin that uses a different routine to truncate the SimplePortal Board News block.
It will ensure every posts displayed characters are uniform whilst preserving any links without breaking any HTML.
You are more than welcome to give it a try, available from this link: Truncate Board News (http://web-develop.ca/index.php?action=downloads;sa=view;down=9)

Regards.
Title: Re: Inconsistent character limit on board news block
Post by: yameth on January 01, 2015, 04:42:50 AM
Thank you very much Chen Zhen. I guess if I want to use the block I will have to customize it. I will try your solution even though as a rule I tend not to customize things, to keep upgrades simple.

It is a shame though as it is a great block and as it stands out of the box, it's just useless.

Thanks again.
Title: Re: Inconsistent character limit on board news block
Post by: asude on January 01, 2015, 05:43:00 AM
Just use the [cutoff] tag:

http://simpleportal.net/index.php?action=docs;area=the_cutoff_tag
Title: Re: Inconsistent character limit on board news block
Post by: Chen Zhen on January 01, 2015, 01:15:07 PM
yameth,

You do not have to customize any block. Just install the plugin I provided and it will allow your Board News block to work as you requested.
There is no editing for you to do.
SimplePortal 2.3.8 © 2008-2024, SimplePortal