Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » SOLVED >> Tag Cloud text tags all the same size "popular"

Discuss the Blog Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3
Go to End
Author Topic: 3241 Views
  • Funfair77
    Avatar
    Community Member
    49 Posts

    SOLVED >> Tag Cloud text tags all the same size "popular" Link to this post

    Hello,

    I have a question about the TAG Cloud widget in the blogg module (I use the latest version).
    All my tags hold the same size. I clicked lots of times (in different browsers, on different computers) on one tag to see if the other tags will go to the state of "not-popular". Nothing!

    Do I have to activate this option?

    Thank you!

    Marnix

    CSS code tagcloud.css

    .tagcloud .not-popular { font-size: 1em; }
    .tagcloud .not-very-popular { font-size: 1.3em; }
    .tagcloud .somewhat-popular { font-size: 1.6em; }
    .tagcloud .popular { font-size: 1.9em; }
    .tagcloud .very-popular { font-size: 2.2em; }
    .tagcloud .ultra-popular { font-size: 2.5em; }

  • Funfair77
    Avatar
    Community Member
    49 Posts

    Re: SOLVED >> Tag Cloud text tags all the same size "popular" Link to this post

    Does nobody has this TAG size problem?

    Marnix

  • lanks
    Avatar
    Community Member
    61 Posts

    Re: SOLVED >> Tag Cloud text tags all the same size "popular" Link to this post

    Hi funfair I also have this problem. I haven't tried to find out why yet but if you found a solution please let us know.

  • Funfair77
    Avatar
    Community Member
    49 Posts

    Re: SOLVED >> Tag Cloud text tags all the same size "popular" Link to this post

    Hello lanks,

    Nice to hearing from you.. so I'm not the only one with this problem. I hope someone stands up and give us the solution or a tip of the solution.

    Marnix

  • Paddawan
    Avatar
    Community Member
    1 Post

    Re: SOLVED >> Tag Cloud text tags all the same size "popular" Link to this post

    Yip, I am having the same issue.

  • Funfair77
    Avatar
    Community Member
    49 Posts
  • Funfair77
    Avatar
    Community Member
    49 Posts

    Re: SOLVED >> Tag Cloud text tags all the same size "popular" Link to this post

    Does it only work from 100tags or something?

  • Artyom
    Avatar
    Community Member
    22 Posts

    Re: SOLVED >> Tag Cloud text tags all the same size "popular" Link to this post

    Ok, so there are a few different possible issues here, I think.

    1) The "popularity" algorithm itself, which generates the popularity css classes
    2) The css classes for popularity being rendered as you'd expect

    1) The algorithm is in TagCloudWidget::TagsCollection()
    and it tends to weight things toward the middle with very few tags, so tends to produce several tags with the class "popular"

    2) The styles are .tagcloud .popular etc... and the may be being masked by something else on your page. (I, for example, had them masked by something called #RightSidecar a {} ... ) Unfortunately, this is in blog/css/tagcloud.css, and that is loaded with Requirements::css("blog/css/tagcloud.css") path, and not themedCSS, so you can't just put a new one in mytheme_blog and have it picked up instead. (I've filed a bug against that) So you have to override it with some other more specific identifier --probably one that starts with #. See the css scope rules for this.

    To isolates these two issues, I made a fke include something like the following:

          <h3>Fake Tag Cloud - for testing</h3>
          <p class="tagcloud">
          <a href="/blog/tag/tag1" class="not-popular">tag1</a>
          <a href="/blog/tag/tag2" class="not-very-popular">tag2/a>
          <a href="/blog/tag/tag3" class="popular">tag3</a>
          <a href="/blog/tag/tag4" class="very-popular">tag4</a>
          <a href="/blog/tag/tag5" class="popular">tag5</a>
          <a href="/blog/tag/tag6" class="utlra-popular">tag6</a>
    </p>

    If you do this, make sure you put this exactly where your tag cloud would go.. right above the call to $Sidebar, so that the css scope rules are the same in that part of the page. THis will sort out any css issues/

    As far as the algprthm, it seems to be doing something reasonable, so I for one, am just going to keep an eye on it as the blog grows, and see if its ok.

    hope this helps

    3241 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.