If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.


SimplePortal

SimplePortal's bugs.

Bug Issue: Character Limit = 0 for RSS block impossible

Pages: [1]   Go Down

Offline AngelinaBelle

  • Support
  • *
  • Posts: 4885
  • Gender: Female
« on: October 02, 2012, 09:59:14 AM »
In function sp_rssFeed
Code: [Select]
  $items[] = array(
   'title' => $item['title'],
   'href' => $item['link'],
   'link' => $item['title'] == '' ? '' : ($item['link'] == '' ? $item['title'] : '<a href="' . $item['link'] . '" target="_blank" class="new_win">' . $item['title'] . '</a>'),
   'content' => $limit > 0 && $smcFunc['strlen']($item['description']) > $limit ? $smcFunc['substr']($item['description'], 0, $limit) . '...' : $item['description'],
   'date' => !empty($item['pubdate']) ? timeformat(strtotime($item['pubdate']), '%d %B') : '',
  );
So that, if $limit = 0, there is no character limit, and no cutoff of the description (very important if any HTML tags are allowed in the block).  However, it is effectively impossible to store a  value of 0.  If you attempt it, you will see the input box is empty on the next edit.  And in that case, a character limit of 150 is in effect, which can be disasterous for the entire page if HTML tags are allowed in the RSS content.
Code: [Select]
$limit = !empty($parameters['limit']) ? (int) $parameters['limit'] : 150;
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6476
  • The Amazing Coder!
« Reply #1 on: August 13, 2014, 03:45:10 PM »
Fixed for the upcoming version.
And slowly, you come to realize... It's all as it should be...

Pages: [1]   Go Up

Issue Changes

Change Member Time
Status changed from New to Resolved [SiNaN] August 13, 2014, 03:45:10 PM
Issue Assigned from (none) to [SiNaN] [SiNaN] August 13, 2014, 03:45:10 PM

Issue Details

  • Reported
    October 02, 2012, 09:59:14 AM
  • Updated
    August 13, 2014, 03:45:10 PM
  • View Status
    Public
  • Type
    Bug
  • Status
    Resolved
  • Priority
    Normal
  • Version
    2.3.4
  • Fixed in
    (none)
  • Assigned to
    [SiNaN]
  • Category
    (none)

Tags



Powered by: SMF Project Tools 0.5.4 © Niko Pahajoki 2007-2011