MyBB Community Forums

Full Version: Portal Announcement Cut Off Plugin Not Parsing All MyCode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have installed this plugin: http://mods.mybb.com/view/portal-announcement-cut-off

And when posters use
[list]
it is not parsed into HTML but displayed as plain text in the announcements. It works fine in the actual thread or if I disable the plugin.

It's a useful plugin, so a fix would be highly appreciated.

I quickly came up with a rough solution on my own. In the plugin file after:

$announcement['message'] = my_substr($announcement['message'], 0, $cutoff);

add:

if(strpos($announcement['message'],'[list]')) {
  if(!strpos($announcement['message'],'[/list]')) {
    $announcement['message'] .= "[/list]";
  }
}

The problem is that in some cases it cuts off the announcement message before the "[/list]" and so I have simply appended it in such cases so that the list is formed regardless.