Advertisement:

Author Topic: Topic Summary  (Read 30978 times)

Offline Lolafish

  • Jr. Member
  • **
  • Posts: 193
  • Gender: Female
  • Join the Fun - Where Goldies Rule!
    • pages/AquaPuppies-A-Goldfish-Community/17387501597 on Facebook
    • @aquapuppies on Twitter
    • AquaPuppies - A Goldfish Community
Re: Topic Summary
« Reply #40 on: October 06, 2011, 08:00:37 PM »
I've had this installed for a while now and I love it!  The only things is, I've been unable to adjust the column width. I've tried everything.  Is there an exact wording that it's looking for here?

Features & Options/Column Width (Must Be in Pixels 'px' or Percent '%')

For example, if I want to use 20 pixels, how exactly do I write that so that it's understood? 

AquaPuppies - A Goldfish Community
www.aquapuppies.com

Running SMF 2.0.2 & SimplePortal 2.3.5

Offline Lolafish

  • Jr. Member
  • **
  • Posts: 193
  • Gender: Female
  • Join the Fun - Where Goldies Rule!
    • pages/AquaPuppies-A-Goldfish-Community/17387501597 on Facebook
    • @aquapuppies on Twitter
    • AquaPuppies - A Goldfish Community
Re: Topic Summary
« Reply #41 on: October 06, 2011, 08:05:39 PM »
I've had this installed for a while now and I love it!  The only things is, I've been unable to adjust the column width. I've tried everything.  Is there an exact wording that it's looking for here?

Features & Options/Column Width (Must Be in Pixels 'px' or Percent '%')

For example, if I want to use 20 pixels, how exactly do I write that so that it's understood? 

I can get the percent to work, just not the pixels.

AquaPuppies - A Goldfish Community
www.aquapuppies.com

Running SMF 2.0.2 & SimplePortal 2.3.5

Offline RGMears

  • Semi-Newbie
  • *
  • Posts: 51
    • studio five
Re: Topic Summary
« Reply #42 on: June 28, 2020, 08:41:01 AM »
I realize this is an old thread, however, I am having trouble with a bit of code from this modification in the Subs.php file after upgrading to SMF 2.0.17.
In the error log I keep getting this:

preg_replace_callback(): Requires argument 2, 'preg_replace_callback('/(.{20})/u', '\$1< >', '$1')', to be a valid callback ... Line: 5027

Code: [Select]
if ($smcFunc['strlen']($message) > $modSettings['TopicSummary_maxwordlength'])
{
// This is done in a roundabout way because $breaker has "long words" :P.
$message = strtr($message, array($breaker => '< >', '&nbsp;' => $context['utf8'] ? "\xC2\xA0" : "\xA0"));
$message = preg_replace_callback('~(?<=[>;:!? ' . $non_breaking_space . '\]()]|^)([\w' . ($context['utf8'] ? '\pL' : '') . '\.]{' . ($modSettings['TopicSummary_maxwordlength'] + 1) . ',})~e' . ($context['utf8'] ? 'u' : ''),
'preg_replace_callback(\'/(.{' . ($modSettings['TopicSummary_maxwordlength']) . '})/' . ($context['utf8'] ? 'u' : '') . '\', \'\\$1< >\', \'$1\')', $message);
$message = strtr($message, array('< >' => $breaker, $context['utf8'] ? "\xC2\xA0" : "\xA0" => '&nbsp;'));
}

The line in question is this one:
Code: [Select]
'preg_replace_callback(\'/(.{' . ($modSettings['TopicSummary_maxwordlength']) . '})/' . ($context['utf8'] ? 'u' : '') . '\', \'\\$1< >\', \'$1\')', $message);
Any help is appreciated.