Esempio n. 1
0
        $hashtext .= $user->getUsername();
    }
    $hash = md5($hashtext);
    // Cache for 180 minutes
    $cache->Start($hash, 7200);
}
//Display all the tags
echo "<h2>" . T_("All tags") . "";
if ($userName) {
    echo " -- " . $userName;
}
echo "</h2>";
if ($current_page != "") {
    $strPopular = displayPopularTagsCloud(tagCloud(getPopularTags(-1, $userName), 5, 90, 225, $sortOrder), $current_page);
} else {
    $strPopular = displayPopularTagsCloud(tagCloud(getPopularTags(-1, $userName), 5, 90, 225, $sortOrder));
}
if ($strPopular != "") {
    echo "<p class=\"tags\">" . $strPopular . "</p>";
}
?>
<p id="sort">
 <?php 
echo T_("Sort by");
?>
:    <a href="?sortOrder=alphabet<?php 
echo $userStr;
?>
"><?php 
echo T_("Alphabet");
?>
Esempio n. 2
0
<?php

/**
 * 标签云
 *
 * @package custom
 */
if (!defined('__TYPECHO_ROOT_DIR__')) {
    exit;
}
$this->need('header.php');
?>
<div class="main-inner">
    <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
        <div class="post-header">
			<h2 class="post-title"><?php 
$this->title();
?>
</h2>
		</div>
        <div class="post-content markdown-body" itemprop="articleBody">
            <ul class="tag-list">
                <?php 
tagCloud(null, '<li><a href="{permalink}">{name}({count})</a></li>');
?>
            </ul>
        </div>
    </article>
</div><!-- end #main-->
<?php 
$this->need('footer.php');
Esempio n. 3
0
            }
            echo "<div class=\"rm_content\"><a href=\"" . $current_page . "\" title=\"" . T_("Remove all tags") . "\">[" . T_("remove all") . "]</a>\n" . $forAllStr . $strRelatedMinus . $strRelated . "</div><br>";
        } else {
            echo "<div class=\"rm_content\">" . $strRelated . "</div><br>";
        }
    }
}
if (in_array('popular', $blocks)) {
    if (!(IS_GETBOO && $userName == "")) {
        if ($current_page != "" && $current_page != "recent_tags.php") {
            $strPopular = displayPopularTagsCloud(tagCloud(getPopularTags(35, $userName), 5, 85, 170, "alphabet"), $current_page);
        } else {
            if (!$boolMain) {
                $strPopular = displayPopularTagsCloud(tagCloud(getPopularTags(35, $userName), 5, 85, 170, "alphabet"));
            } else {
                $strPopular = displayPopularTagsCloud(tagCloud(getPopularTags(50, $userName), 5, 85, 250, "alphabet"));
            }
        }
        if ($strPopular != "") {
            if ($userName != "") {
                $userStr = "?uname=" . $userName;
            }
            ?>
		<div class="rm_heading"><?php 
            echo T_("Popular tags");
            ?>
</div>
		<div class="rm_content"><?php 
            echo "<p class=\"menu_tags\">" . $strPopular . "</p>";
            ?>
</div>
Esempio n. 4
0
     }
     /*
      * Get paging info and pass it to smarty
      */
     //$mediaPages->setTotalResults($returnRows); // Pass the total number of results to the $pages object
     $mediaPagingArray = $mediaPages->getPagingArray();
     $mediaPagingArray['pageNumbers'] = range(0, $mediaPagingArray['totalPages']);
     unset($mediaPagingArray['pageNumbers'][0]);
     // Remove the 0 element from the beginning of the array
     $smarty->assign('mediaPaging', $mediaPagingArray);
     //$smarty->assign('resultsArray',$_SESSION['searchForm']['resultsArray']); // for testing
     //}
 }
 if (!$_SESSION['searchForm']['inSearch'] or !$returnRows) {
     if ($config['settings']['tagCloudOn'] == 1) {
         $smarty->assign('tags', tagCloud(false, $config['settings']['tagCloudSort']));
     } else {
         $smarty->assign('tags', " ");
     }
 }
 /*
  * Get the active media types
  */
 $mediaTypesResult = mysqli_query($db, "\r\n\t\t\tSELECT *\r\n\t\t\tFROM {$dbinfo[pre]}media_types \r\n\t\t\tWHERE active = 1\t\t\t\r\n\t\t\t");
 if (@($returnRows = mysqli_num_rows($mediaTypesResult))) {
     while ($mediaTypes = mysqli_fetch_assoc($mediaTypesResult)) {
         $mediaTypesArray[$mediaTypes['mt_id']] = $mediaTypes;
         // xxxx Language
         if (@in_array($mediaTypes['mt_id'], $_SESSION['searchForm']['mediaTypes'])) {
             $mediaTypesArray[$mediaTypes['mt_id']]['selected'] = true;
         }
Esempio n. 5
0
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

GetBoo is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GetBoo; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
***************************************************************************/
// Javascript from Scuttle project
require_once 'tags_functions.php';
$tagsStr = displayPopularTagsCloudSelect(tagCloud(getPopularTags(50, $username), 5, 90, 225, "alphabet"));
if ($tagsStr != null) {
    ?>
		<script type="text/javascript">
		Array.prototype.contains = function (ele) {
		    for (var i = 0; i < this.length; i++) {
		        if (this[i] == ele) {
		            return true;
		        }
		    }
		    return false;
		};

		Array.prototype.remove = function (ele) {
		    var arr = new Array();
		    var count = 0;