The code in this tutorial will create tag clouds, which can be inserted into a box in the sidebar, or into the tag page. A
tag cloud is an alphabetised list of tags where the most commonly used tags are depicted in a larger font or otherwise emphasized.
To do that, the tags have to be divided into different categories according to their number of
(
Read more... )
Comments 64
and because i'm picky, i'd make the tagcloud on TagsPage look more like an entry. the hacks i made up for haven or opal should be a good start with getting an idea of how i'd do it which, imo, looks neater since it's all entry-like and stuff. :)
Reply
2. Oooh, shiny! I'll have a look at it this weekend, thanks :)
Reply
2. yay! i'm all about consistency.
Reply
Reply
(The comment has been removed)
If you're interested in seeing tutorials before they come out, you could try monitoring s2flexitalk, our drafts/discussion community. Feel free to jump in to any active discussions, although I don't think there are any active right now. In any case, feel free to start your own! ;)
If you've got any cool new tutorials that you want to post to s2flexisquares, but you want someone to look over them first, you can also post them to s2flexitalk and just wait a bit. No guarantees that we'll catch everything, but someone will usually catch a bit of something (that sounds vaguely nasty).
*pimps*
Reply
Reply
Please make your theme layer viewable, and give us the link.
Reply
if ($min_use_count == $max_use_count)
{
$max_use_count = $max_use_count + 1;
}And how much do you want to bet that the OP's problem is that she's logged in in Firefox and so have no problems because she has a lot of tags, but she isn't logged in in IE, and thus sees only her unique tag with one use?
I'm going to add the line right now :)
Reply
And hee! So it is the browser's fault, and yet it's not :D
Reply
Reply
The simple tag list tutorial is here.
Reply
Reply
Reply
Drop tags that have less than x number of uses.
This should create a bubbling of the more common tags, and provide more of a difference in size.
Any help? :D thanks
Reply
The difference in size is something that you control anyway. Augment the increment and/or the number of categories :)
Here's the new tag cloud code (in green is what I changed):
#### TAG CLOUD CODE ####
###### Configuration ######
var int tag_category = 8; # The number can be changed if you want more or fewer categories.
var int basefontsize = 80; # size of the first tag category in percent of the default font size of the page.
var int increment = 50; # The difference in size between tag categories.
var string subject = "Tag cloud"; # Title of the tag page.
var int no_print_tag = 3 ; # Minimum number of uses of the tag for it to print.
###### End Configuration ######
var Page p = get_page();
var string list = "";
var int max_use_count = 0 ;
var int min_use_count ;
var int x ;
if (size $p->visible_tag_list() > 0)
{
# Define a maximum number of uses of the tags:
var TagDetail[] visible_tag_list = $p->visible_tag_list();
if($visible_tag_list)
{
foreach var TagDetail td ($p ( ... )
Reply
Reply
Reply
Leave a comment