New Tag Cloud
I have sort of moved towards Web 2.0. If you look to the top of the sidebar, you’ll see that I have a tag cloud. Whoopee.
The plugin is New Tag Cloud from FunnyDingo and is a piece of cake to install: unzip to the plugin directory, navigate to sidebar.php, add in the following line of code:
<?php
newtagcloud_output(array('maxcount' => 10, 'bigsize' => 18, 'smallsize' => 10, 'step' => 2, 'sizetype' => 'px'));
?>
wherever you want it to appear and then add tags to your posts.
And that’s it. Except to say that the code as shown on the site uses the backtick as shown on the key by your escape key. Use the other one, the vertical tick, or it isn’t true PHP.
titanium_geek
:
for me, it’s not a side bar but a bottom bar.
[Reply]
Monday, 19 November 2007, 00:15 CSTRay
:
On the main page or on this page?
[Reply]
Monday, 19 November 2007, 00:20 CSTtitanium_geek
:
just this page. Regular front page is still good.
[Reply]
Monday, 19 November 2007, 00:22 CSTRay
:
Yeah, I get that too. I’ve left a message for the theme designer because I can’t see what’s causing it.
[Reply]
Monday, 19 November 2007, 00:44 CSTdrew
:
I was curious, right clicked to view source and loaded the link to the CSS and see this for your sidebar:
#sidebar{
float:left;
width:190px;
margin:0 -230px 0 0;
padding:20px;
background:#eee;
}
Shouldn’t the float be “right” instead of left? I just think it’s by coincidence something on the main index page is pushing it off to the right side. I’d try that but as it seems like the most obvious reason it’s maybe not rendering properly.
[Reply]
Monday, 19 November 2007, 03:42 CSThari
:
I don’t think it’s the float: left or float: right that is causing the issue but because the width + margins is probably too much ( > 100%).
[Reply]
Monday, 19 November 2007, 08:43 CSTRay
:
float right pushes it to the bottom right, reducing to 90% doesn’t change the position though - it’s still at the bottom.
[Reply]
Monday, 19 November 2007, 08:48 CSTdrew
:
Yeah, it’s probably a combination of both. I’d say use float right, then play with the margins. Really doesn’t make sense to me to have a sidebar that floats “left” but is intended to be on the right side of the page.. ;)
[Reply]
Monday, 19 November 2007, 13:56 CSTRay
:
Odd. I’ve buggered about with the margins, making them bigger and smaller, done the same with the sidebar but nothing works.
[Reply]
Tuesday, 20 November 2007, 01:10 CSTSrini
:
Hi. Looking at the page source, I can say that it’s just a matter of improperly nested html. I see that the comments are outside div#content. Open the single.php file and make sure that
<?php comments_template(); ?>goes *inside*<div id="comment">and the corresponding</div>.[Reply]
Tuesday, 20 November 2007, 06:08 CSTSrini
:
sorry, the comments template should go inside
<div id="content">and the corresponding</div>.[Reply]
Tuesday, 20 November 2007, 06:10 CSTRay
:
Thanks Srini - I’ll give it a go tonight and let you know
[Reply]
Tuesday, 20 November 2007, 12:01 CSTRay
:
Srini - thanks. Moving the comments template fixed it completely. I will now stop playing with it in case I break something else :lol:
[Reply]
Tuesday, 20 November 2007, 20:21 CSTdrew
:
Heh, I missed that one. I still think you should change the float though.. kind of strange to have it floating to the left but appear on the right.. remember, I’m always right, no matter. ;)
[Reply]
Tuesday, 20 November 2007, 23:41 CSTRay
:
I changed the float, that’s how it got to the bottom right. So you were only half right :)
[Reply]
Wednesday, 21 November 2007, 00:04 CSThari
:
Yeah, it’s probably a combination of both. I’d say use float right, then play with the margins. Really doesn’t make sense to me to have a sidebar that floats “left†but is intended to be on the right side of the page.. ;)
Actually drew, it makes sense in certain context. In that, you want the layout of the page to be different from the order of the element in the HTML file. After all, CSS is just about that: arranging the elements of a page in whatever manner you want. So, if you want your content to be indexed first, but you want a left sidebar, using float: left; for the sidebar is a good idea (provided always that the content DIV has a float: right; attribute)
I hope that makes sense.
[Reply]
Wednesday, 21 November 2007, 05:37 CSTdrew
:
Nope, Drew makes sense.. ;)
Looking at the code though, seems everything is in the wrapper with content, comments and sidebar with their own div tags, so it just seems to make more sense to have it float right to me. Oh well. I’m thinking of a person who’s just staring at the code and not the page as a whole, you see it as “float:left”, most people would assume without looking at everything else, the object will display on the left side, not right. That’s a reason I’m saying it doesn’t make sense.
If I want you to turn left, I don’t say, turn right cause I meant for you to turn left but stay on the right side after turning left.. ;)
[Reply]
Wednesday, 21 November 2007, 07:25 CSThari
:
Float: right and float: left have two different objectives drew.
When you float an object left or right, it’s not in relation to the whole page, but within the frame where it’s floating. So if there is space for a floating object in the left of another object, it will be right in relation to that object, but it will actually align to the left of the frame in which it is placed and not to the right.
That’s what it’s about.
[Reply]
Sunday, 25 November 2007, 13:11 CSThari
:
What I mean is easily understood by this example
Assume A and B are two floating frames. A comes before B in the XHTML file and A and B float to the left.
So the output will be:
A—-B——-
Now A is float to the left and B to the right, it will appear like this:
A———–B
Now A is float to the right and B to the left it will appear like this
B———–A
Now both are floating to the right
——A—–B
[Reply]
Sunday, 25 November 2007, 13:13 CSTdrew
:
Hari, I know, you don’t have to explain. I’m just being sarcastic in a sense. ;)
[Reply]
Sunday, 25 November 2007, 15:57 CSThari
:
I know you know a lot about web and CSS, Drew, but I wanted to inform the people who weren’t aware of the issue… It is confusing, you’re very correct. i had a lot of trouble with floating frames until I really experimented a lot.
[Reply]
Monday, 26 November 2007, 04:23 CSTTool Belts
:
wow great code, it is really easy to install.
[Reply]
Monday, 9 June 2008, 17:14 CDT