The MU forums have moved to WordPress.org

MuTags - another solution for site wide tags (135 posts)

  1. mvkozyrev
    Member
    Posted 14 years ago #

    :( Does not working with non-English languages (like Russian). URL looks like http://mysite.tld/tag/мой_тэг, so "page not foud"

  2. mrhenry
    Member
    Posted 14 years ago #

    Did you try the new version?

    On my testserver it worked with chinese characters, so I guess that russian characters should work also.

    Edit: Just tested, and worked for me with russian characters.

  3. mvkozyrev
    Member
    Posted 14 years ago #

    Yes! Just tested. It's working!
    Non-English tagresult looks like httр://mysite.tld/tag/%d0%b1%d0%bb%d0%be%d0%b3%d0%be%d1%81%d0%b5%d1%80%d0%b2%d0%b8%d1%81

  4. theapparatus
    Member
    Posted 14 years ago #

    That's UTF8. That's what they should look like as that's how they're getting saved in the database.

    You probably want them to be converted back though, right? Hmmm....

  5. Konstan
    Member
    Posted 14 years ago #

    Upgraded and it works, but import tags still wont import more then 6 tags for me :( And all from my blog.

    Edit: the ñ character still shows up weird in the cloud tag, but when you click it, it works. Check out http://bloghost.cl

  6. mrhenry
    Member
    Posted 14 years ago #

    Konstan: Have you checked how the ñ gets recorded in wp_sitecategories, because for me it's recorded as ñ and it shows in the tagcloud also like ñ.

    Maybe you have the wrong db-charset defined at wp-config.php?

  7. Konstan
    Member
    Posted 14 years ago #

    Edited: I found out the issue. I had a different encoding before I did a server move a few months ago. So after the move, all the weird characters like ñ and words with accents got messed up. I dont know if there is a way to fix it. It used to be latin encoding, and then I switched to utf8.

    Edit 2: on the import issue, all the imported tags are marked blog_id 2, I dont know why it wont import after that. I have over 2000 users with blogs but it only imports tags from blog 2 :(

  8. mrhenry
    Member
    Posted 14 years ago #

    I think that the import issue is caused by nested foreach loops in ImportWpTags(). I searched this and it seems that this might be caused by a php bug. For some php versions it works fine, like on my test server (php 5.20).

    If someone knows how to handle the importing of tags in another way, please let me know.

  9. Konstan
    Member
    Posted 14 years ago #

    I am using php 5.1.6, I'll search around and see what I can do if anything.

  10. au8ust
    Member
    Posted 14 years ago #

    Non-English tags work now :D

    Now I just wonder if
    1. I could make the post list to be like this one http://wordpress.com/tag/life/ ?
    2. Sort tags by name, post, date, random

    Thanks for your plugin!

  11. veryid
    Member
    Posted 14 years ago #

    @mrhenry
    yes,it is working well on my site based on chinsee

    thank you!

  12. veryid
    Member
    Posted 14 years ago #

    i am so happy

  13. mrhenry
    Member
    Posted 14 years ago #

    au8ust: What do you mean by "like this"? You can pretty much customize the post list from tag_results.php. And you could use "the_excerpt" instead of "the_content" to show just a part of each post in a list. If you want avatars, you'll need another plugin for that. I guess you could also use a plugin to control how "the_content" is shown.
    The sort tags by name etc. is easy to do. I kinda forgot to add those options :) But I'll try to remember to add them to the next release...

    veryid: I'm happy that you're happy! :)

  14. au8ust
    Member
    Posted 14 years ago #

    @mrhenry
    Thanks for quick reply! :) I replace the_content with the_excerpt but it's not working since my users don't use <more> tag. I'll look around to fix this.

  15. mrhenry
    Member
    Posted 14 years ago #

    Heres a quick fix to show only a part of each post.
    Just place this in some php file in mu-plugins, or in your themes functions.php file.

    function content_intercept($content) {
    //how many characters to show from each post
    $maxchars = "200";
    $newcontent = ''.substr($content, 0, $maxchars).'...';
    return $newcontent;
    }

    if(tag_results()) {
    add_filter('the_content', 'content_intercept');
    }

  16. theworkisdone
    Member
    Posted 14 years ago #

    mrhenry, thanks for your effort. I want to report a small bug: The tag results function shows posts with future pubdates.

  17. mrhenry
    Member
    Posted 14 years ago #

    theworkisdone: Have you checked that your main blogs time settings are correct at options->general ?

  18. veryid
    Member
    Posted 14 years ago #

    mrhenry:do you use a IM as gtalk or msn ? i think that all of us can have a good chat.

  19. mrhenry
    Member
    Posted 14 years ago #

    Well I tend to use IRC if any. You might find me at #wpmu on freenode.net

  20. theworkisdone
    Member
    Posted 14 years ago #

    mrhenry, appreciate your help. well, the main blog is not two days behind all sub-blogs ;) The future posts shows up on tag results page, but when I click on the link the post is not shown in the sub-blog (vhost), cause it is not time to do so. the pubdate is two days ahead.

  21. Konstan
    Member
    Posted 14 years ago #

    Is there any way to make a separate page to show all tags? I mean, so far on my front page I have it limited to 30, but I'd like to create a link to say /tags/all and show X number of tags there.

    Is this possible?

  22. andrea_r
    Moderator
    Posted 14 years ago #

    Yes. Create a custom page template and stick the code there.

  23. mrhenry
    Member
    Posted 14 years ago #

    Konstan: Currently there's no wise way to show two or more tag clouds with different options. If you want to do this, you must edit the function mu_tag_cloud and the method get_global_tags.

    I'll try to upload tomorrow a new version with the support for multiple individual tag clouds...

  24. mrhenry
    Member
    Posted 14 years ago #

    Here it is: MuTags 0.2b It now has support for multiple individual tag clouds. You can override some settings set from the admin menu like this:
    <?php mu_tag_cloud($custom = array('limit' => '244', 'minsize' => '2')); ?>

  25. Konstan
    Member
    Posted 14 years ago #

    I think I found a small bug...for this new year I left a new entry and made it appear at 12:01 on 1/1/08, but it got added twice to the tag list.

    I think it was first added when I submitted it, and then again when the time was up for it to appear.

  26. mrhenry
    Member
    Posted 14 years ago #

    Yep, you're right.

    Find the line:

    "if (($post_type == 'post') && ($post_status !== 'draft')) {"

    and change it to:

    "if (($post_type == 'post') && ($post_status == 'publish')) {"

    (Located around line number 60)

    I now see that theworkisdone reported the same problem earlier, but thanks to Konstan I now figured what the problem was about, well anyway this small change fixed the problem for me...

  27. Konstan
    Member
    Posted 14 years ago #

    What file is supposed to have that? Its not in MuTags.php or the template files.

  28. mrhenry
    Member
    Posted 14 years ago #

    Sorry my bad. Find this line:

    "if (($post_type = 'post') && ($post_status != 'draft')) {"

    It's in MuTags.php around line 433 inside the function mu_insert_post and replace with the one I posted above.

  29. Konstan
    Member
    Posted 14 years ago #

    There we go, seems to be working :)

    What is the difference between having = and == in the code?

  30. mrhenry
    Member
    Posted 14 years ago #

    = is used to set a value for a variable and == is used to compare values.

About this Topic