News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Topic Summary

Started by Nathaniel, August 26, 2008, 07:52:41 PM

Previous topic - Next topic

Lolafish

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

Lolafish

Quote from: Lolafish 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? 

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

RGMears

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

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:
'preg_replace_callback(\'/(.{' . ($modSettings['TopicSummary_maxwordlength']) . '})/' . ($context['utf8'] ? 'u' : '') . '\', \'\\$1< >\', \'$1\')', $message);

Any help is appreciated.

Advertisement: