WordPress.org

Support

Support » Plugins and Hacks » [Resolved] No tags? help with bunny tags

[Resolved] No tags? help with bunny tags

  • My question is that i added bunny’s tag plugin around post 300. i dont really want to go and retag all of my old plugins. is there a way to make it so that if there are no tags, it says, “No Tags” not just a blank line?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator James Huff

    @macmanx

    Ultimate Tag Warrior will do this one it is completely installed (installed, activate, and called from the index via a php tag).

    http://www.neato.co.nz/ultimate-tag-warrior/

    hmm okay, but does this read from the stuff i already have for bunny?

    Moderator James Huff

    @macmanx

    No, sorry. You didn’t mention anything about already having tags.

    i do on my last 20 posts, which isnt that big of deal, but still.

    ill look into this one though, it looks nice.

    You can probably import the tags from bunny’s plugin – There’s a bit for importing data from custom fields; but I haven’t tried it with this particular plugin.. (You give it the name of the custom field; and the seperator, and it’ll turn the values into tags. It’ll go back the other way too (: )

    hmm thats interesting i didnt see that. i still wish there was an easy way to make bunny do what i want it to :/

    okay i got this new plugin all working, its way more complicated that bunny, which isnt nessisarily bad thing, but whatever, it works. thanks guys

    If you really want to use Bunny’s tags then make the following change in bunnys-tags.php. Replace the function get_bunny_tags_list (lines 115-130 ish) with this:


    // prepare the formatted list of tags -- this is what you mess with if your custom field values aren't formatted like described in the instructions
    function get_bunny_tags_list($before, $after, $separator)
    {
    global $bunny_strict;

    $technorati_tags=get_bunny_tags(' ', 'tags');
    $label="Tags";
    if(empty($technorati_tags)&&!$bunny_strict)
    {
    $technorati_tags=get_bunny_tags(', ', 'keywords');
    $label="Keywords";
    }
    if (empty($technorati_tags)) {
    $technorati_tags_list="No Tags";
    return($technorati_tags_list);
    } else {
    $technorati_tags_list=output_bunny_tags($technorati_tags, $before, $after, $separator);
    return($technorati_tags_list);
    }
    }

    It’s a quick fix. If there are no tags found then it returns the phrase ‘No Tags’. You can change this in the code and also include any html you want (for instance, <p class="tags">No Tags</p>).

    Don’t forget if you ever upgrade Bunny’s Tags you’ll lose this!

    cool thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] No tags? help with bunny tags’ is closed to new replies.
Skip to toolbar