shorten_subject

Description

Shortens a subject and adds " ..." to the end of it (if needed).

Syntax

string shorten_subject (string $subject, int $len)



Parameter $subject

Expected type: String
Description: The subject (of the topic, post or PM) that should be shortened



Parameter $len

Expected type: Integer
Description: How long the shortened subject should be before "..." is appended.



Return value

Expected type: String
Description: The shortened version of a subject, or the actual subject if the subject isn't longer than $len


Notes

  • In 1.1 Beta 3 Public through 1.1 RC2, uses strlen() and substr()
  • Starting with 1.1 RC3, relies on the functions specified by $func['strlen'] and $func['substr']
  • $func is used for internationalization stuff, and more info on that will be added at a later date
  • Only shortens the subject if $subject is longer than $len
Advertisement: