bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Unable to add Mutibyte Character Tags

(16 posts)
  • Started 1 year ago by firetheweb
  • Latest reply from funkylovebunny
  • This topic is not a support question
  1. It seems that the function in the file
    bb_includes/formatting_functions.php
    sanitize_with_dashes()
    prevent me from adding Chinese tags to my posts.

    I also tried to add Japanese tags, it failed too.
    I am working on the problem now and I want to know if we have already got a solution here.

    Posted 1 year ago #
  2. Here is a hacked version, I have tested it for Chinese and Japanese tags and it works.Basically, it just excludes mutibyte chars(\x80-\xff) from the stopdata.

    function sanitize_with_dashes( $text ) {
    $text = strip_tags($text);

    $text = remove_accents($text);

    $text = strtolower($text);

    $text = preg_replace('/&(^\x80-\xff)+?;/', '', $text); // kill entities
    $text = preg_replace('/[^a-z0-9\x80-\xff _-]/', '', $text);
    $text = preg_replace('/\s+/', '-', $text);
    $text = preg_replace(array('|-+|', '|_+|'), array('-', '_'), $text); // Kill the repeats

    return $text;
    }

    Posted 1 year ago #
  3. count0
    Member

    This hacked version works very well in Japanese!

    Posted 1 year ago #
  4. firetheweb, that works for cyrillic, i can Add tags BUT i cannot search topics by that tags :(

    Any suggestions???

    Posted 1 year ago #
  5. This hacked version not works for cyrillic.

    I've make a plugin for automatic transliteration of tags.

    The plugin is available for view here and for download here

    Этот плагин действительно не работает для кириллицы. Вместо него я сделал плагин для автоматической транслитерации тэгов.
    Плагин можно посмотреть здесь и загрузить здесь

    Posted 1 year ago #
  6. count0
    Member

    LaSet,me too. I can add tags.but search by tag,not work.
    A1ex,download link is 404.

    Posted 1 year ago #
  7. Excuse :)

    The plugin is available for download here.

    Плагин можно загрузить здесь.

    Posted 1 year ago #
  8. This issue, which we can add Mutibyte Character Tags but ca not search by Mutibyte Character Tags is not solved in version 0.8. Does anybody have any patch/hack for this? many thanks.

    Posted 1 year ago #
  9. travelsuperlink (and others seeing this problem),

    If you could help us debug the problem, that'd be very helpful.

    http://trac.bbpress.org/ticket/585

    You can log in with your bbpress.org username/password.

    Posted 1 year ago #
  10. mdawaffe,

    sorry I just saw this post. I try it in this forum here, and it works perfect. However I knew it is not working in my personal forum. I will try it as in your tickets 585 and report to you the debugging code.

    thanks, and happy chinese new year to everyone.

    Franky

    Posted 1 year ago #
  11. funkylovebunny
    Member

    i tried the hack above but now the tag can be clicked but no topics show so i cant enter a topic to get the destroy the tag option. Is there any other way to destroy the tag?

    Posted 1 year ago #
  12. I think you could destroy the tag with phpMyAdmin or some other way, directly in the database, right?

    Posted 1 year ago #
  13. I think you could destroy the tag with phpMyAdmin or some other way, directly in the database, right?

    I don't recommend that at all, because I assume that there's a topic/tag-matching table somewhere and if that can't find the tag in the other table things will get extremely screwy.

    It is very rarely a good idea to directly modify the database.

    Posted 1 year ago #
  14. funkylovebunny
    Member

    it's ok, i killed it by deleting the post it was associated with and using the recount feature in the admin

    Posted 1 year ago #
  15. wenkong
    Member

    funkyloveb, so sorry for your inconvenience.
    I reply to your forum to testing the Multibyte character Tag.
    Do you have any way to show UTF8 tag properly?
    I try this post & fix 0.8.1 still not solve the problmes.

    Posted 1 year ago #
  16. funkylovebunny
    Member

    thats ok.

    I haven't found a way to make them work yet, hopefully there will be a solution soon

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.