$karmaLinks = "";
}
$daysKnown = (time() - $user['regdate']) / 86400;
$qPosts = "select count(*) from posts where user="******"select count(*) from threads where user="******"%1.02f", $user['posts'] / $daysKnown);
$averageThreads = sprintf("%1.02f", $threads / $daysKnown);
$score = (int) $daysKnown * 2 + $posts * 4 + $threads * 8 + ($karma - 100) * 3;
if ($user['minipic']) {
    $minipic = "<img src=\"" . $user['minipic'] . "\" alt=\"\" style=\"vertical-align: middle;\" />&nbsp;";
}
if ($user['rankset']) {
    $currentRank = GetRank($user);
    $toNextRank = GetToNextRank($user);
    if ($toNextRank) {
        $toNextRank = Plural($toNextRank, "post");
    }
}
if ($user['title']) {
    $title = str_replace("<br />", " &bull; ", strip_tags(CleanUpPost($user['title'], "", true), "<b><strong><i><em><span><s><del><img><a><br><small>"));
}
//$title = "";
if ($user['homepageurl']) {
    if ($user['homepagename']) {
        $homepage = "<a href=\"" . $user['homepageurl'] . "\">" . $user['homepagename'] . "</a> &mdash; " . $user['homepageurl'];
    } else {
        $homepage = "<a href=\"" . $user['homepageurl'] . "\">" . $user['homepageurl'] . "</a>";
    }
}
Exemple #2
0
    }
}
$daysKnown = (time() - $user['regdate']) / 86400;
if (!$daysKnown) {
    $daysKnown = 1;
}
$posts = FetchResult("select count(*) from {posts} where user={0}", $id);
$threads = FetchResult("select count(*) from {threads} where user={0}", $id);
$averagePosts = sprintf("%1.02f", $user['posts'] / $daysKnown);
$averageThreads = sprintf("%1.02f", $threads / $daysKnown);
//$deletedposts = FetchResult("SELECT COUNT(*) FROM {posts} p WHERE p.user={0} AND p.deleted!=0 AND p.deletedby!={0}", $id);
//$score = 1000 + (10 * $user['postplusones']) - (20 * $deletedposts);
$minipic = getMinipicTag($user);
if ($user['rankset']) {
    $currentRank = GetRank($user["rankset"], $user["posts"]);
    $toNextRank = GetToNextRank($user["rankset"], $user["posts"]);
    if ($toNextRank) {
        $toNextRank = Plural($toNextRank, "post");
    }
}
if ($user['title']) {
    $title = preg_replace('@<br.*?>\\s*(\\S)@i', ' &bull; $1', strip_tags(CleanUpPost($user['title'], "", true), "<b><strong><i><em><span><s><del><img><a><br><br/><small>"));
}
if ($user['homepageurl']) {
    $nofollow = "";
    if (Settings::get("nofollow")) {
        $nofollow = "rel=\"nofollow\"";
    }
    if ($user['homepagename']) {
        $homepage = "<a {$nofollow} target=\"_blank\" href=\"" . htmlspecialchars($user['homepageurl']) . "\">" . htmlspecialchars($user['homepagename']) . "</a> - " . htmlspecialchars($user['homepageurl']);
    } else {