2008-03-06, 11:00 AM
2008-03-06, 02:18 PM
heres the code, you have to adjust the select query to stop it including the forums you dont want it to, i havn't had time to make it do it auto based on user privs.
<?php
/**
* @author goughy000
* @copyright 2007
*/
define("IN_MYBB", 1);
require_once "./global.php";
require_once "./inc/class_parser.php";
$latestthreads = $db->query("SELECT * FROM `".TABLE_PREFIX."threads` ORDER BY `lastpost` DESC LIMIT 30");
$highest = 0;
while($thread = $db->fetch_array($latestthreads)){
if($thread['replies'] > $highest){
$highest = $thread['replies'];
}
}
$multiply = ($highest/25)*100;
$db->data_seek($latestthreads,0);
echo "<html><head><title>".$mybb->settings['bbname']." - Thread Cloud</title>";
echo $headerinclude;
echo "</head><body>";
echo $header;
echo " <table border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"tborder\">
<tr>
<td colspan=\"8\" class=\"thead\">
<strong>Latest Threads Cloud</strong>
</td>
</tr>
<tr>
<td class=\"trow1\" style=\"text-align: center;\">";
while($thread = $db->fetch_array($latestthreads)){
$fontsize = ceil((($thread['replies']/25)*$multiply)+10);
echo "<a href=\"".$mybb->settings['bburl']."/showthread.php?tid=".$thread['tid']."\"><span style=\"font-size:".$fontsize."px\">".$thread['subject']."</span></a> |\r\n";
}
echo "</td>
</tr>
</table>";
echo $footer;
echo "</body></html>";
?>
2008-03-07, 01:08 AM
You just put this in any .php file? This is cool... Never knew this existed.
2008-03-07, 12:54 PM
Can you give full code ?
This codes aren't true
This codes aren't true
2008-03-07, 01:34 PM
thanks very nice : )
2008-03-07, 05:02 PM
AlpereN Wrote:Can you give full code ?
This codes aren't true
this code is completely full code!!! i copied directly from my cloud.php file that i created.
and yes you can call it anything.php just make sure its in your mybb root.
2008-03-07, 09:45 PM
These codes have a problem because the font is very big
2008-03-07, 11:41 PM
AlpereN Wrote:These codes have a problem because the font is very big
Umm..that's a normal feature of a tag cloud.
2008-03-07, 11:48 PM
Thank you goughy. I like that codes. I'll use them for my new site which is about MyBB but it wont include a forum
2008-03-08, 12:21 AM
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.