MyBB Community Forums

Full Version: myBB Thread Cloud
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
but the size is too big

The tags are enormous Sad
goughy000 Wrote:
AlpereN Wrote:These codes have a problem because the font is very big

thats not a problem with the code, thats a problem with your understanding of a thread cloud. Wink

thx goughy000 i think this will be rare (and useful) php file.. good work man
AlpereN Wrote:but the size is too big

The tags are enormous Sad

seem fine to everyone else, must be your personal taste...

    $fontsize = ceil((($thread['replies']/25)*$multiply)+10);

change the +10 to something smaller,

e.g. +5
    $fontsize = ceil((($thread['replies']/25)*$multiply)+5);
but i said the true it's not a personal taste

Okey i done your change

Thanks it fixed
i see what you'r saying about the font being too large. i played around with the numbers, but still can't get the proportions right.

you can see an exmaple here: http://xrumxrum.com/forum/cloud.php

can anyone ehlp me please? should there be a range of replies to add 1 to?


Thanks!
A clarification.

$highest is equal to how many replies in a thread
$multiply = ($highest/25)*100;
Explanation: $multiply is multiplying the division of $highest by 100.


$fontsize = ceil((($thread['replies']/25)*$multiply)+10);

where $fontsize is dividing the $thread replies by 25 and multiplying it by $multiply and adding 10, where $multiply is equal to the value of $highest.

In fontsize, it's dividing the thread replies by 25 multiplying it by $multiply and adding ten to the answer of: ($thread['replies']/25)*$multiply) which makes up the font size. Don't forget that ciel returns the next highest integer value by rounding up what's in the quotes.

In conclusion; MadamZuZu, only change the +10 in $fontsize to increase or decrease the font size.
Hope this makes sense. Toungue
Pages: 1 2 3