Log in

No account? Create an account

Previous Entry | Next Entry

Tag cloud on one's tag page.

  • Sep. 13th, 2006 at 12:06 PM
I like the look of the tag cloud, but I find it too busy for a sidebar, so when someone in s2flexisquares posted a tutorial on how to put a tag cloud on one's tag page (there's also a tutorial on how to put it in the sidebar above that, but we don't need that here obviously), I jumped on it. When I switched to expressive, I missed my tag cloud on my tags page, so I decided to see if I could tweek the flexisquares code for it to fit expressive. I was happy to find it wasn't hard, and thought I'd share in case anyone else would like this too.

To save myself the trouble of having to copy and past massive amounts of code, I'm going to have you start by grabbing the code from over there, and following their directions. You can compile your layer if you want, it won't harm anything, but your subject line won't match anything you already have. What you need to do to make it blend in right and pick up your formatting from your entries is replace everything from "#### Print the tag cloud in an entry-like post ####" down with:

print """
<div class="post-asset asset">
<div class="asset-inner">
<div class="asset-header">
<h2 class="asset-name page-header2">
<div class="asset-content">
<div class="asset-body">
<br /></div></div></div></div>


I am still rather awkward with digging through layers to find the information I need, so there is a chance that there could be a better way to fix the part I had to change. If anyone sees a better way to do this, please comment and I'll update the entry to include the new information. Thanks to the s2flexisquares community for the original tutorial.


( 12 comments — Leave a comment )
Sep. 14th, 2006 05:17 am (UTC)
w00t! Worked nicely with my old component tags page code. Nice to have a useful tags page back.
Sep. 14th, 2006 05:31 am (UTC)
Huh, that's kinda a nifty view. I seem to have ducked out of the component community too quickly. I got frustrated with the absolutely horrible and hidden codebase, so I switched to flexisquares which seemed a little less stupid, as it wasn't table based (tables == teh devil) but I should remember that even if the foundation sucks, the people working with it to make it awesome are pretty darn creative.

I'll be sticking with the tag cloud myself, because I like the pretty, but that is awesome. Should I mention it in the entry too, in case others want it? Or do you think they'll find it via your comment?
Sep. 14th, 2006 07:01 am (UTC)
The tables in Component are nightmarish. It's not the tables so much as the way it's cut up so you accidentally bork the tables because a table element is only partially included in a code lump.

It's up to you if you ant to include it in the post or not. The howto is pretty much the same as your post anyway and as this post has been tagged as tags, I figure people would find it that way. It seems silly to duplicate a post about it.

Once you have lots of tags, the tag clouds look fantastic on a big scale, but fall over when you try to cram them into the sidebar. Lists aren't much better. I had to hack my sidebar tags with the scrolly bars to make it more user friendly. Maybe the sidebar should default to grab the top results instead of all 100 odd tags. Meh, you can't predict how people will use the system.
Sep. 14th, 2006 07:20 am (UTC)
The only time tables aren't a nightmare is when they're used correctly for what they were intended for, data. There is no excuse what so ever to use them for anything involving the structure of one's webpage. Especially if you're going to play the nesting game. That's the thing that really ticked me off with component, it couldn't bother to use cell spanning to use just one table, which is bad enough in itself but much more stable, no it had to nest a dozen or more tables within itself. That's part of the reason that layout times out so much, tables take forfrellingever to load, they put all sorts of pressure on the browser, on the server, and if you have even a slightly bogged down connection, will often blow up in your face, no matter how carefully you nest them. So I stand by my tables == teh devil statement of earlier. I probably only get so passionate about it because I've been working with web design for a while now. I've embraced web standards because they're so easy to work with, even when you have to cripple them to work with IE. There are often IE specific dren you can do to fake those features Microsoft hasn't gotten around to adding to IE, even though they've been a standard for a while. I'll spare you my IE/Microsoft rant though.

I'm sure if you can find someone who's pretty good at programming in s2, they can come up with a modification to the tag sidebar module to just grab the top so many, a random selection, or something else fun and useful. It's crazy what you can do with s2 if you've got programming experience, patience to learn the ticks of the language, and a good idea source.

My weakness is the programming end, so I'm good at copy and paste hack jobs with a system I hardly understand, thus leading to tutorials like this one, but when it comes to actually coming up with something more fancy than transitioning something from one style to another, or a simple "are you logged in?" thing (and that actually required some help, see the next entry in the community for that mess) I'm not much good past the idea stage. I really am a HTML and CSS girl, programming languages and I haven't really gotten along yet even though I'm trying to reach an understanding with php as it's so helpful on web pages. I'll have to see if I can dig up one of the people I've known who's really good with the programming end of things, as your idea for the tag sidebar module is cool and should be done.
Sep. 14th, 2006 08:45 am (UTC)
Right there with you on the IE workaround crap and poor use of tables. I deal with it all day at work too and could cheerfully throttle the IE developers.

There was an earlier tutorial on yanking the highest ranking tag out of a tag cloud, so it could probably be tweaked to limit the sidebar tag count to a set number. Not that it matters, as I'm happy with my scrolling list instead. I just thought it was a strange oversight to make from the initial developers.

I'm currently trying to port a Component hack for the topbar navigation from Component to Expressive, but there have been enough changes in the code base that it borks on compile. Most annoying, especially when I'm sure it's something basic. Once I get that sorted and previous/next links added to individual posts, I'll be happy.
May. 8th, 2007 12:28 pm (UTC)
I'm attempting to put a cloud on my tags page, but I seem to have gone wrong somewhere. As far as I can see I've followed the instructions correctly, but my tag page is staying exactly the same as it was before.

I've never used custom layers before, so I've absolutely no idea what I've done wrong, or how to fix it. I think I've made the layer visible: http://www.livejournal.com/customize/advanced/layerbrowse.bml?id=8545440

I'd be really grateful if someone could help me get this working.
May. 8th, 2007 10:09 pm (UTC)
I'm going to be trying this out today. If it works for me I'll do my best to assist you! I'm really just leaving this so I can mark it.
May. 8th, 2007 10:56 pm (UTC)
I did it and it worked gangbusters.

Now I noticed that you created a theme layer, but do you already have a different theme layer you are using? I assume so because your current theme isn't one of the Expressive ones I don't think.

Anyhow, what you will need to do is just incorporate the code into the current theme layer you are already using.

Let me know if this makes sense, I'll be on tonight.

May. 8th, 2007 10:57 pm (UTC)
Okay, looking at your layer, I think I see your problem. I see you're using the Butterflies Purple theme, but you don't have that theme's information listed in your custom layer for your tags page, so it looks like you've still got the standard theme layer selected (or you're using a separate custom theme layer). If you just have the system theme layer selected, you'll need to put the theme information (found here: layer 7379786) into your custom theme layer. Just copy and paste everything but the first two lines, and paste it after the third line: "layerinfo "source_viewable" = 1;".

Once you do that, you need to go back into to Customize Journal: Look and Feel, then select your "Tag Page Cloud" custom layer down at the bottom of the themes drop down list.

If you're already using a custom theme layer, then you'll need to take the code from your "Tag Page Cloud" theme layer (everything but the first three lines), and paste it into whichever custom theme layer you're already using. Looking at your journal, I didn't see anything to indicate you already had a custom theme layer in use, so I think you'll be following my first suggestion.

Let me know if you have any questions, or anything else I can help with. Good luck. :)
May. 9th, 2007 08:09 am (UTC)
Thank you both very much. Fabulously clear instructions, and I've managed to get it working now.

Thank you!
May. 9th, 2007 12:52 pm (UTC)
Sorry for yet another question - I can cope with html, but the LJ style stuff has me completely confused! I'd appreciate any help you can give me.

I love the new tag cloud, but I was wondering if it was possible to alter the rollover text. At the moment the rollover text displays the total number of tags, but I'd like to add the privacy settings to it, in the same way it is displayed on the sidabar tag cloud. E.G. to show "50 (friends only)" or "14 (private)".

May. 9th, 2007 05:07 pm (UTC)
Okay, I'm going to admit that I can't see where in the code it sets the mouse over part, so I think you're going to need a little more advanced help. As I don't think most community users typically comment surf on the older entries, I would suggest making a new post in the community explaining what you want to do, include links to your theme layer and this post, and wait for the more advanced users in the community to offer suggestions. Sorry I can't be more help.
( 12 comments — Leave a comment )

Latest Month

March 2016

S2 Help Communities


Powered by LiveJournal.com
Designed by chasethestars