PHP Classes

File: showcloud.php

Recommend this page to a friend!
  Classes of Dmitry Sheiko   Multi-User Tag Cloud   showcloud.php   Download  
File: showcloud.php
Role: Example script
Content type: text/plain
Description: tag cloud generator
Class: Multi-User Tag Cloud
Manage clouds of tags added by multiple users
Author: By
Last change:
Date: 16 years ago
Size: 1,847 bytes


Class file image Download
* Tag Cloud Showing Script
* @package Tag Cloud
* @author $Author: sheiko $
* @version $Id: showcloud.php, v 1.0 sheiko Exp $
* @since v.1.0
* @copyright (c) Dmitry Sheiko

header("Content-type: text/html; charset=".DEFAULT_CHARSET);
$dbconnect)) die(" is corrupted");

$tc = new TagCloud();

$Headers = '<html>
    <title>Tag Cloud</title>
    <script language="JavaScript" type="text/javascript" src="tagcloud.js"></script>
        .tc_body { }
        .tc_body A { color: black; }
        .tc_content { padding: 0px 5px 0px 5px; }
        .tc_buttom {
            border-top: 1px white solid;
            border-left: 1px white solid;
            border-right: 1px #AAAAAA solid;
            border-bottom: 1px #AAAAAA solid;
            background-color: #EEEEEE;
            padding: 2px 4px 2px 4px;
            margin: 2px;
        .tc_buttom A {
            color: black;
            font-weight: bold;
            font-size: 12px;
            font-family: Arial, Tahoma;
            text-decoration: none;

$Output = '<div style="width: 200px;">
<div class="tc_buttom"><a href="">Tag Cloud</a></div>
<div class="tc_body" id="TagCloud">
$data = $tc->getClouds();
    foreach (
$data as $fetch) {
$Output .= '<a href="#" onClick="getList(\''.$fetch["tag"].'\', 0); return false;" title="'.$fetch["tag"].lang(" tag is found ").$fetch["index"].' '.lang("time(s)").'" style="font-size:'.$fetch["size"].';">'.$fetch["tag"].'</a> '."\n";
$Output .= '</div>
$_GET["js"])) {
$lines = split("\n", preg_replace("/\r/s","", $Output));
    foreach (
$lines as $line) {
"document.writeln('".preg_replace("/\'/", "\'", $line)."');\n";
} else print
$Headers . $Output . '</body></html>';