The MU forums have moved to WordPress.org

Site Wide Tagging (22 posts)

  1. SteveAtty
    Member
    Posted 14 years ago #

    OK I've just upgraded upto the lastest WPMU which has its own tagging system. I've got the danalog wpmu site wide tags plug in which I guess is now pretty much obsolete. Has anyone got a process to migrate the tags from the danalog tags into the new 1.5 tags?

  2. lunabyte
    Member
    Posted 14 years ago #

    1.5 tags are like 1.3 tags... per blog.

  3. SteveAtty
    Member
    Posted 14 years ago #

    OK - was just wondering if I should start using the built in tags. I was on quite an old version (1.2 I think).

    Are there any plans to do a site wide tagging system for 1.5? I've tried searching but I'm having a bad day for search terms.

  4. lunabyte
    Member
    Posted 14 years ago #

    It's been brought up before, several times, and kicked out each time. Sitewide "anything" (posts, tags, etc) probably won't be something that ever makes it to the core.

    Granted, that's just my own personal guess based on their past development history.

  5. SteveAtty
    Member
    Posted 14 years ago #

    OK thanks. I think I remember that. I wonder if there is any easy way of extending the site wide tags so it picks up the tag words from the integrated tag box which means I can stop having two tag boxes.

    Might look at that when I've finished coding stuff at work

  6. andrea_r
    Moderator
    Posted 14 years ago #

    There *is* a sitewide tag plugin....

  7. SteveAtty
    Member
    Posted 14 years ago #

    Well I;m using danalog's site wide plug in but I now have two tag boxes under my editor window. So tweaking the site wide plugin to pick up the built in tag box rather than using its own would seem sensible

  8. andrea_r
    Moderator
    Posted 14 years ago #

    The other sitewide one doesn't put a new tag box under the write post (wow, that is odd).

    it just goes and snags tags from the single blog tables and build a group tag list.

  9. SteveAtty
    Member
    Posted 14 years ago #

    Ahhh

    I just found that there is an Simple Tags importer which works for each blog so I can now offer a global tag cloud (handy for the main page) and per blog tag cloud.

    Which sitewide tag system are you using?

  10. andrea_r
    Moderator
    Posted 14 years ago #

    Ah man, gotta go look it up...

    http://wpmudevorg.wordpress.com/project/MuTags

  11. SteveAtty
    Member
    Posted 14 years ago #

    Thanks for that. Looks good. I assume all new tags added automatically get imported into the global table?

  12. andrea_r
    Moderator
    Posted 14 years ago #

    My fuzzy brain says.... yes.

    As I remember, when a user adds a new tag, it updates the global table too. Then when it pulls sitewide tags for display, it just pulls from that one table and doesn't go through everyone blogs.

  13. demonicume
    Member
    Posted 14 years ago #

    I assume all new tags added automatically get imported into the global table?

    yes. there's also the option to drop and recreate the table. give it a shot, it's a smooth plugin.

  14. SteveAtty
    Member
    Posted 14 years ago #

    I started playing with it last night. It looks good. I put the 0.2 version in because of the note about 0.3 "bugs"

  15. SteveAtty
    Member
    Posted 14 years ago #

    I'm having some very odd problems with it running in subdirectory mode. Anyone else got it running in subdirectory mode?

  16. SteveAtty
    Member
    Posted 14 years ago #

    OK I've now fixed it working for subdirectories and I've also got it so that the Global Tags output page looks like the "single" blog tag page.

    It looks very nice!

  17. demonicume
    Member
    Posted 14 years ago #

    did you edit the plugin at all? i'd be interested in seeing what you did. admin at realsportsbloggers dot com.

  18. SteveAtty
    Member
    Posted 14 years ago #

    I did yes - couple of minor tweaks.

    Round about line 1047

    replace

    echo '<a href="/'.$Mu_tags->TagOpt['tag_base'].'s/'.$link.'" class="'.$cssclass.'" style="font-size: '.$size.''.$Mu_tags->TagOpt['tag_size_format'].'; color: '.ColorWeight($color_weight, $mincolor, $maxcolor).';"';

    with

    $lurl=get_bloginfo("url");
    $tlink="/tags/";
    if ($lurl=="YOUR BASE URL HERE"){
    $tlink="/blog/tags/";
    echo '<a href="'.$lurl.$tlink.$link.'" class="'.$cssclass.'" style="font-size: '.$size.''.$Mu_tags->TagOpt['tag_size_format'].'; color: '.ColorWeight($color_weight, $mincolor, $maxcolor).';"';'

    which copes with the fact that the base blog needs to be /blog/

    Note that I hard coded the /tag/ part. Just made it easier when I was trouble shooting it . You could still use $Mu_tags->TagOpt['tag_base']

    Also change the function current_tag to look like

    function current_tag() {
            global $Mu_tags;
            $tag = $Mu_tags->get_tag_results('true');
            $tagx=explode("/",$tag);
            echo $tagx[3];
    }

    and in function get_tag_results

    add

    $tagx=explode("/",$tag);
     $tag=$tagx[3];

    after the line:

    //$tag = remove_accents($tag);

    And to prove it works:

    http://canalplan.blogdns.com/steve/

  19. SteveAtty
    Member
    Posted 14 years ago #

    OK I've just noticed something odd.

    I have some posts tagged with the word "Maine" and I also have "Maine" as a category.

    These posts appear twice in the list of posts when I click on the word "Maine" in the tag cloud

  20. andrea_r
    Moderator
    Posted 14 years ago #

    Did you import the categories in with the tags? that'll do it. :)

  21. SteveAtty
    Member
    Posted 14 years ago #

    I suspect I did... but then again I suspect a lot of people might ;)

  22. SteveAtty
    Member
    Posted 14 years ago #

    So I've got a quick fix - It wont fix the weighting size on the tag cloud but it fixes the duplicate entries.

    Around about line 670 in MuTags.php there is :

    if($results == false) {
    $results = $wpdb->get_results("SELECT $this->dbtable.tag_id,
    $this->dbtable.post_id,

    change this to

    if($results == false) {
    $results = $wpdb->get_results("SELECT DISTINCT $this->dbtable.tag_id,
    $this->dbtable.post_id,

About this Topic

  • Started 14 years ago by SteveAtty
  • Latest reply from SteveAtty