Component: Multi-Level Tags with Catchall Category

Aug 21, 2005 09:55

This code is just like that of Multi-Level Tags in Sidebar, except for the following three things ( Read more... )

code:tagsbox:multi-level, layout:component

Leave a comment

Comments 34

ainabarad March 29 2007, 21:35:29 UTC
Thank you so much for this! It's awesome! :D

Reply


ainabarad December 31 2007, 03:33:41 UTC
I love this code. Out of all the tutorials I've applied to my journal this one has to be my absolute favorite by far (Yes, really!) and even my friends use my tags to browse my journal, especially when they're searching for photos!

I recently changed the security on a ton of my entries from "friends only" to "private" and a lot of my friends are getting really confused when the tag count next to the tag is "wrong" according to how many entries they see when they click on the tag.

I realize that you haven't updated this journal since May and that I'll probably need to ask for help elsewhere as a result, but I wanted you to know how much I adore this tutorial and that my only suggestion for improving it would be to give the option for only the owner to see the tag count. (That way I could enjoy seeing the tag count there without my friends seeing it and getting confused by it.) LOL

Thank you again for this awesome code!!!

Reply

murklinstest December 31 2007, 20:09:52 UTC
OK, so I went to make the mod you requested and discovered that this code is rather seriously buggy. First step then is for you to recopy the code from this page, since I have now edited to contain new, fixed code. Copy everything that comes after #### End Config #### down to the next green section of text and paste it over that same section in your layer.

Once that is done, you can make the changes that switch your tag counts to only be visible to you:

1. Find the section of code that looks like this:

# mt:20050623
# If we're on a tag's last tier, we need to return a link to the tag,
# otherwise plain text is returned.
if (size $tags == ($pos + 1))
{
# mt:20050817
# Include the tag count and surround each list item with additional div for styling purposes.
$tier_code = """
$tier [$t.use_count]""";
}2. Edit it ( ... )

Reply

ainabarad December 31 2007, 20:36:35 UTC
You have an extra "}" right before the green section, but once I removed it, it compiled perfectly and works magnificently!!!! You are amazing!!! You should really post a link to this newer code (or the code itself) in component_help sometime!!! Thank you so very much again and Happy New Year!!! :)

P.S. Do you think they'll ever add a property for a visible tag count so people can see a count without it confusing them?

Reply

murklinstest December 31 2007, 20:58:44 UTC
Sorry, those were sloppy directions. I didn't even ask to look at your layer!

I used to post things at component_help and other S2 comms, but that generally leads to people asking me to help them implement, and while I was totally cool with that in 2005, now it just makes me feel really guilty because I mostly don't have the time or inclination ( ... )

Reply


fairwells January 24 2008, 14:43:10 UTC
Great tutorial. But I'm really confused. How do I make several catchall categories? I've got only misc. And I'd like to have several, but I don't know how to do that.

Reply

murklinstest January 24 2008, 18:33:38 UTC
Hmmm. I can't really see many of your tags on your journal, so I'm going to describe how this works from the very beginning -- please don't be insulted if you already know all this, I just need to make sure we're on the same page. So the very first thing you have to do with this code is put colons into your tag names. So let's say in my journal I talk about movies, tv shows and my real life and other random topics. My tags might be:

arrested development, bad dates, cloverfield, csi, food, greys anatomy, juno, sweeney todd, veronica mars, work, zombies

Now, I want to make my tags show up in a list, grouping all the tv show tags together, all the movies tags together and everything else into a catchall "misc" group. So I rename all my tags to look like this:

bad dates, food, movies:cloverfield, movies:juno, movies:sweeney todd, tv:arrested development, tv:csi, tv:greys anatomy, tv:veronica mars, work, zombies

Now, when I use the code above, my tags should display in a list like this:
  • movies
    • cloverfield
    • juno
    • sweeney todd
  • tv
    • arrested ( ... )

Reply

fairwells January 25 2008, 02:43:49 UTC
Thank you so very very much for taking out the time to explain that to me so clearly. That helped a great deal. Thank you so much. I understand now that the coding is done in the tags themselves not manually in the code. That was the part where I was confused. I thought it was the code itself, but now from your explanation and help at component_help I see that it's in the tags itself. I understand now. Thank you so much.
Now I have to redo all my tags.
I love this tutorial by the way. Thanks for making it and thank you again for explaining it. :)

Reply

murklinstest January 25 2008, 02:53:08 UTC
No problem at all, and you're most welcome! :)

Reply


Leave a comment

Up