Test on locallhost
If UTF-8
edit file class_profileblock.php
line 710 and below
we get
But then it does not work for other encodings.
If UTF-8

edit file class_profileblock.php
line 710 and below
HTML:
mb_internal_encoding('utf-8');
// Get rid of BBCode so we're left with the username and :
$message = $message_orig = strip_bbcode($results_r['message'], false, false, false);
if (strtoupper($userinfo['username']))
{
$start = $origstart = strpos(strtoupper($message), strtoupper($userinfo['username']));
}
else
{
$start = $origstart = 0;
}
if ($start >= $this->registry->options['dbtech_usertag_postpreview_charlimit'])
{
// Get the new start pos
$prefix = '...';
$start -= $this->registry->options['dbtech_usertag_postpreview_charlimit'];
}
else
{
$prefix = '';
$start = 0;
}
$remaining = mb_substr($message, ($origstart + strlen($userinfo['username'] . ':')));
// - ($this->registry->options['dbtech_usertag_postpreview_charlimit'] * 2)
if ( mb_strlen($remaining) > $this->registry->options['dbtech_usertag_postpreview_charlimit'])
{
// Get the new end pos
$suffix = '...';
$end = $this->registry->options['dbtech_usertag_postpreview_charlimit'] - strlen($remaining);
$message = mb_substr($message, $start, $end);
}
else
{
$suffix = '';
$end = 0;
$message = mb_substr($message, $start);
}

But then it does not work for other encodings.
Upvote
0