Postcount Stars , was bedeuten die Sterne?
Verfasst: 28.05.2007 03:27
wie baue ich den MOD richtig ein, weil es in der datei keine richtige anleitung gibt - > MOD
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
// Posting Stars Hack START
$poster_stars = "";
if ( $userdata['session_logged_in'] )
{
if ( isset($poststars[$postrow[$i][user_id]]))
{
// If we calculated this before use the cache
$poster_stars = $poststars[$postrow[$i][user_id]];
}
else
{
$pposts = $postrow[$i]['user_posts'];
// Only do this if the users has at least one post
if ( $pposts )
{
$image_path = $phpbb_root_path . "/images/stars/";
// Calculate the parts
$posts_10k = floor($pposts/10000);
$posts_1k = floor($pposts%10000/1000);
$posts_1c = floor($pposts%1000/100);
$posts_1d = floor($pposts%100/10);
if ( $posts_1a )
{
$poster_stars .= ( !empty($poster_stars) ) ? '<br />' : '';
for ($starcount = 1; $starcount<= $posts_1a; $starcount++)
{
$poster_stars .= "<img src='{$image_path}hellyellow.gif'>";
}
}
if ( $posts_1d )
{
$poster_stars .= ( !empty($poster_stars) ) ? '<br />' : '';
for ($starcount = 1; $starcount<= $posts_1d; $starcount++)
{
$poster_stars .= "<img src='{$image_path}green.gif'>";
}
}
if ( $posts_1c )
{
$poster_stars .= ( !empty($poster_stars) ) ? '<br />' : '';
for ($starcount = 1; $starcount<= $posts_1c; $starcount++)
{
$poster_stars .= "<img src='{$image_path}yellow.gif'>";
}
}
if ( $posts_1k )
{
$poster_stars .= ( !empty($poster_stars) ) ? '<br />' : '';
for ($starcount = 1; $starcount<= $posts_1k; $starcount++)
{
$poster_stars .= "<img src='{$image_path}pink.gif'>";
}
}
if ( $posts_10k )
{
$poster_stars .= ( !empty($poster_stars) ) ? '<br />' : '';
for ($starcount = 1; $starcount<= $posts_10k; $starcount++)
{
$poster_stars .= "<img src='{$image_path}blink.gif'>";
}
}
$poster_stars .= '<br />';
// Cache it
$poststars[$postrow[$i][user_id]] = $poster_stars;
}
}
}
// Posting Stars Hack END
Code: Alles auswählen
$posts_10k = floor($pposts/10000);
$posts_1k = floor($pposts%10000/1000);
$posts_1c = floor($pposts%1000/100);
$posts_1d = floor($pposts%100/10);