Пример #1
0
<?php

include "functions.php";
$safe_tag = mysql_escape_string($_GET['tag']);
$PAGE_TYPE = "search";
$PAGE_TITLE = $config["name"] . " - Items tagged {$safe_tag}";
include "header.php";
print "<div class='sidebar'>";
$similar = get_similar_tags($safe_tag, 50);
if ($similar) {
    print "<div class='sidebox'>";
    print "<div class='sidebox_title'>Similar tags</div>";
    print "<div class='sidebox_content'>";
    print "<p class='description'>Posts tagged with \"{$safe_tag}\" are also tagged with...</p>";
    print_tagcloud($similar);
    print "</div>";
    print "</div>";
}
$users = find_connotea_users_with($safe_tag, 10);
if ($users) {
    print "<div class='sidebox'>";
    print "<div class='sidebox_title'>Connotea users</div>";
    print "<div class='sidebox_content'>";
    print "<p class='description'>Connotea users who tag items with \"{$safe_tag}\" include...</p>";
    foreach ($users as $key => $value) {
        print "<p><a href='http://www.connotea.org/user/{$key}'>{$key}</a>";
    }
    print "</div>";
    print "</div>";
}
$blogs = get_blogs_using_tag($safe_tag, 25);
Пример #2
0
$PAGE_TITLE = $config["name"] . " - Journal details";
include "header.php";
$safe_journal_id = mysql_escape_string($_GET['journal_id']);
$last_month = date("Y-m-d", mktime(0, 0, 0, date(m) - 1, date(d), date(Y)));
if ($safe_journal_id) {
    ?>
<div class='sidebar'>
<?php 
    $stats = get_journal_stats($safe_journal_id);
    ?>
<div class='sidebox'>
<div class='sidebox_title'>Tags associated with this publisher</div>
<div class='sidebox_content'>
<?php 
    $tags = get_tags_for_journal($safe_journal_id, 50);
    print_tagcloud($tags);
    ?>
</div>
</div>

<div class='sidebox'>
<div class='sidebox_title'>Stats</div>
<div class='sidebox_content'>
<?php 
    if ($stats) {
        print_journal_stats($safe_journal_id, $stats);
    }
    ?>
</div>
</div>
Пример #3
0
</td>
</tr>
</table>
<?php 
$blog_ids = array();
$blog_names = array();
$blog_tags = array();
if ($connotea_tags) {
    $valid_tags = validate_tags(array_keys($connotea_tags));
    if (!$valid_tags) {
        print "<h3>Sorry</h3>";
        print "<p>None of the tags in " . $_SAFE['connotea_username'] . "'s library are in the Postgenomic index.";
        print_r($connotea_tags);
    } else {
        print "<h3>Matched Connotea tags</h3>";
        print_tagcloud($valid_tags);
        # try and match up tags with blogs in the database
        foreach ($connotea_tags as $tag => $freq) {
            $post_ids = get_posts_with_tag($tag);
            # what blogs are these posts from?
            if ($post_ids) {
                $done = array();
                $posts = get_posts("cited", array("post_id" => $post_ids));
                if ($posts) {
                    foreach ($posts as $post) {
                        if ($done[$post['blog_id']]) {
                            next;
                        } else {
                            if ($_SAFE['use_weighting']) {
                                $blog_ids[$post['blog_id']] += $freq;
                            } else {