Customizing SMF > SMF Coding Discussion

Long download names?

<< < (2/2)

Iomega0318:
Hmm that could still work...

MrPhil:
Maybe you could modify Sources/Subs.php's shorten_subject() to preserve a bit of the right end plus the extension, if there is a recognized extension (.exe, etc.). Instead of taking "length" of left end, take left end(length-len(right end)) ... right end. You might even do that in general (say, 8 characters off the right end, regardless of whether there's a real extension or not):

--- Code: --- return $smcFunc['substr']($subject, 0, $len-8) . '...' . $smcFunc['substr']($subject, -8, 8);

--- End code ---

Assuming -n works the same way as with the substr() function... I haven't tried it. My code assumes that $len will always be 9 or larger... you may want to check $len.

Navigation

[0] Message Index

[*] Previous page

Go to full version