Skip to content

Commit

Permalink
Revert changes to use old text shortener
Browse files Browse the repository at this point in the history
The old text shortener is not compatible with phpBB 3.2.
  • Loading branch information
marc1706 committed Jan 29, 2017
1 parent af78256 commit 93ea98f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions portal/fetch_posts.php
Expand Up @@ -651,10 +651,11 @@ protected function format_message($row, $text_length, &$posts_striped)
*/
public function shorten_message($message, $bbcode_uid, $length)
{
if (class_exists('\Nickvergessen\TrimMessage\TrimMessage'))
if (class_exists('\Marc1706\TextShortener\Shortener'))
{
$trim = new \Nickvergessen\TrimMessage\TrimMessage($message, $bbcode_uid, $length);
$message = $trim->message();
$trim = new \Marc1706\TextShortener\Shortener();
$message = $trim->setText($message)
->shortenText($length);
unset($trim);
}

Expand Down

3 comments on commit 93ea98f

@mdrideout
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually applying these changes was necessary for Global Announcements to work on my Board3 Portal on PHPBB version 3.2.8.

Global announcements was breaking the portal until this change was applied.

@angelperezleon
Copy link

@angelperezleon angelperezleon commented on 93ea98f Mar 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks muchly for this code snippet fix.
Fixed my issue "Cannot load XML: Premature end of data in tag r line 1"
on my phpbb 3.2.8 board with portal board3

@Galixte
Copy link
Contributor

@Galixte Galixte commented on 93ea98f Apr 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can find a phpBB 3.2.x version fixed for Board3 Portal extension, here: http://www.ezcom-fr.com/viewtopic.php?p=5632#p5632.

Please sign in to comment.