WordPress.org

Ready to get started?Download WordPress

Forums

rtMedia for WordPress, BuddyPress and bbPress
[resolved] Encoding bug (3 posts)

  1. R J
    Member
    Posted 10 months ago #

    I find an encoding problems: when album name truncating (more than 14 simbols), you'll see unexpected simbol in the end of string (see in attach).

    I modify string #240 in file app/main/profile/BPMediaAlbum.php

    Change it from

    <h3 title="<?php echo $this->name ?>"><a href="<?php echo $this->url ?>" title="<?php _e($this->description, BP_MEDIA_TXT_DOMAIN); ?>"><?php echo ( ( strlen($this->name) > 14 ) ? substr($this->name, 0, 14) . "&hellip;" : $this->name ); ?> </a><?php echo ' (' . count($this->media_entries) . ')'; ?></h3>

    to

    <h3 title="<?php echo $this->name ?>"><a href="<?php echo $this->url ?>" title="<?php _e($this->description, BP_MEDIA_TXT_DOMAIN); ?>"><?php echo ( ( strlen($this->name) > 40 ) ? mb_convert_encoding(substr($this->name, 0, 40), 'UTF-8', 'UTF-8') . "&hellip;" : $this->name ); ?> </a><?php echo ' (' . count($this->media_entries) . ')'; ?></h3>

    and this solve the problem. I think, "14" simbols in code - not flexible, you can include this to the Options page (it will be customizable).

    Another problem - I cant translate many words (yes, I create .po and .mo files in language folder).
    - "All Albums" in Media tab - translated only word "All", so i have "Все Albums";

    - Роман Пупкин добавил(а) Photo 4 дн. назад - I cant translate "Photo" world

    - and so on ...

    http://wordpress.org/extend/plugins/buddypress-media/

  2. Saurabh Shukla
    Member
    Plugin Contributor

    Posted 10 months ago #

    Hi,

    I agree. This is not the most elegant piece of code. We inserted it for the display issues we kept facing. We the rewritten plugin, we'll keep this in mind.

    See:

    http://wordpress.org/support/topic/no-more-support-here-use-httprtcampcomgroupsbuddypress-mediaforum

    http://rtcamp.com/news/getting-ready-for-rtmedia/

  3. Saurabh Shukla
    Member
    Plugin Contributor

    Posted 10 months ago #

    The Media types are not translatable properly. We'll fix that with rtMedia.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags