@ Conmark:
Habe es genau in der gleichen Zeile, habe es auch in der gleichen Stelle eingefügt wie du, nur erscheinen keine Sterne!?
Zählt dieser Mod auch die bereits geposteten post oder erst die neuen posts nach der installation?
Oder habe ich folgendes falsch gemacht:?
Open: viewtopic.php
Find
Tip: This may be a partial find and not the whole line.
$poster_posts =
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.
// 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_1d )
{
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
Comment:
Complete line should be $poster_posts = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $postrow[$i]['user_posts'] : '';
So habe ich es installiert:
$poster_posts =
( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $postrow[$i]['user_posts'] : '';
// 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_1d )
{
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
Dies war kein Problem:
Find
Tip: This may be a partial find and not the whole line.
'POSTER_RANK' => $poster_rank,
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.
'POSTER_STARS' => $poster_stars,
Gruß
Markus