Results 1 to 1 of 1

Thread: Shortening titles containing umlauts or other special characters

  1. #1
    Thread Starter
    Veteran bluecafe's Avatar
    Join Date
    Apr 2010
    Location
    Berlin
    Posts
    1,563
    Thanks
    58
    Thanked 359 Times in 273 Posts

    Shortening titles containing umlauts or other special characters

    Hi,
    classipress uses the functions
    strlen(get_the_title()) >= 45 and substr(get_the_title(), 0, 45)
    for shortening the titles on the titles in the ad overview. This works great unless there is an umlaut at the cutt-off point.

    A number of languages use umlauts or special characters that are multibyte characters thus the count may cut such a character which results in a display like this:

    umlaut.jpg

    It would be better to use mb_strlen() and mb_substr() which counts a multibyte character as one and no unwanted cuttings can happen anymore. Then it looks like it shoud

    umlaut2.jpg

    I was not sure if this should be considered as feature request or troubleshooting. But I think it would be good if the function could be replaced in future versions of classipress to avoid strange characters in the titles of some other languages.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Stripping quotes from titles
    By rodeoramsey in forum Help Using ClassiPress
    Replies: 0
    Last Post: May 12th, 2010, 02:36 PM
  2. How to edit the Nav Bar Titles - Add a Contact Us??
    By creekslist in forum Help Using ClassiPress
    Replies: 8
    Last Post: April 24th, 2010, 09:04 PM