Example #1
0
function listcloud_ShowCloud()
{
    $text_content = file_get_contents(osc_base_url() . '/oc-content/uploads/listcloud_feeds.cache');
    $cloud = new PTagCloud(50);
    $cloud->setUTF8(true);
    $cloud->addTagsFromText($text_content);
    $cloud->setWidth("300px");
    echo $cloud->listcloud_Show();
}
Example #2
0
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
$text_content = $contents;
/*
"This is a very long text which I want to represent in " .
"my tag cloud. Normally this data would come from a database " .
"but this is irrelevant for this example. What is important is that " .
"the tag cloud data may come from any source you can imagine, like " .
"a computed variable, CSV file, database, or even another web page";
*/
?>

         <center>
            <?php 
$cloud = new PTagCloud(50);
$cloud->addTagsFromText($text_content);
$cloud->setWidth("300px");
echo $cloud->emitCloud();
?>
         </center>

         <script> writeFooter(); </script>

      </section>
      <!-- End: WordCloud Page -->

      <!-- Begin: RandomPhrase Page -->
      <section data-theme="a" id="pageRandomPhrase" data-role="page">

         <script> writeHeader("backextras", "settings"); </script>