SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: Chen Zhen on June 12, 2010, 11:41:27 AM

Title: New small sub routine needed for Forum News/Posts display
Post by: Chen Zhen on June 12, 2010, 11:41:27 AM
IMAO - The code is currently SMF error free but not proper for web page display.

When displaying forum news/posts block (the pre-fab block that displays recent posts..) there is an option for how many characters to display from each post.   

Issue: The string from the post obviously contains all the character code up to how many characters are desired which is set in the block settings menu.
 The character code includes such things as line breaks,  links (a href ...), etc...
The problem is that the code can get cut-off in the middle of html command tags.

Solution: Write a small routine to search the string and omit the last tag in the string if it is incomplete.

ie.
Code: [Select]
A great recipe for oatmeal cookies is here...

Where the character code may actually have this value since it is cut off...
Code: [Select]
A great recipe for oatmeal cookies is here... <a href=

Where the routine should omit the ...
Code: [Select]
<a href=

... from the string since the tag is incomplete.



UD
Title: Re: New small sub routine needed for Forum News/Posts display
Post by: Nathaniel on September 26, 2010, 02:25:37 AM
Moved to the Bogus bugs board.

If you want to request this, then please make a new topic in the feature requests board. This is not a bug.

After issues with the previous slow method of limiting the length of messages in that block, the development team decided to enforce the simple limit, with the '[cutoff]' tag if you want to choose the exact cutoff location. It works well for most of SP's users, so we are unlikely to add any more complicated parsing.
SimplePortal 2.3.8 © 2008-2024, SimplePortal