I'll publish 2 verions of plugin (size tags by frequence and radom size tags)
Hi
very thanks
Persian/Farsi language for 0.5b add to Post: #50
Thanks
OK, tags are not repeated anymore, but I'm getting tons of "Divide by zero" errors because $max_amount is always 0. After fixing that (divide by 1 if $max_amount is 0), then $size is 0, so the tags don't show up.
(2009-09-13, 01:38 AM)laie_techie Wrote: [ -> ]OK, tags are not repeated anymore, but I'm getting tons of "Divide by zero" errors because $max_amount is always 0. After fixing that (divide by 1 if $max_amount is 0), then $size is 0, so the tags don't show up.
if($max_amount == 0)
{
// do the division by one here
}
else
{
// do the division by $max_amount here;
}
Try newest verion, if Im not wrong it should work.
(Tnx Tom for help)
I have got a question, have somebody got better idea how to size tags
I don't think this is good script:
$wielkosc = $exploded_tag[1];
$stcp_size = $mybb->settings['stcp_size'];
$perc = ($wielkosc * $stcp_size) / $max_amount;
$perc = $perc - ($wielkosc * $wielkosc);
$perc = ceil($perc);
$size = $perc;
$size = (int) $size;
Looks good
How many queries makes this plugin in each thread?
Thread one query
Index and forumdispaly - one tag - one query (if you got 300 tags per page 300 querys !! and I don't know what to do to make it beter :< )
(2009-09-13, 06:11 AM)Watt Wrote: [ -> ]Try newest verion, if Im not wrong it should work.
(Tnx Tom for help)
I have got a question, have somebody got better idea how to size tags
I don't think this is good script:
$wielkosc = $exploded_tag[1];
$stcp_size = $mybb->settings['stcp_size'];
$perc = ($wielkosc * $stcp_size) / $max_amount;
$perc = $perc - ($wielkosc * $wielkosc);
$perc = ceil($perc);
$size = $perc;
$size = (int) $size;
What variable defines the max length, and is
$size the maximum size of the tag? You could always do a strlen check and see if it's greater than $max_length.