Rangbilder für Unterschiedliche Styles?

Alles zu Styles, Templates, Icons und Smilies für phpBB 3.3, sowie allgemeine Designfragen zur Integration von phpBB in bestehende Websites.
Forumsregeln
Bei Style spezifischen Fragen ist der Stylename und die Downloadquelle des Styles erforderlich sowie die URL vom betroffenen Forum.
Antworten
Benutzeravatar
P@InKiLLeR
Mitglied
Beiträge: 149
Registriert: 26.10.2008 14:26
Kontaktdaten:

Rangbilder für Unterschiedliche Styles?

Beitrag von P@InKiLLeR »

Hallo,

das Tutorial von hier: https://www.phpbb.com/community/viewtop ... &t=2110443 hat ja prima bei phpbb 3.0 Funktioniert!

Bekomme den Code nur leider nicht für phpbb 3.1 angepasst,bei mir siehts so aus:

Code: Alles auswählen

function phpbb_get_user_rank($user_data, $user_posts)
{
    global $ranks, $config, $phpbb_root_path, $phpbb_path_helper, $phpbb_dispatcher, $user;

    $user_rank_data = array(
        'title'        => null,
        'img'        => null,
        'img_src'    => null,
    );

    /**
    * Preparing a user's rank before displaying
    *
    * @event core.modify_user_rank
    * @var    array    user_data        Array with user's data
    * @var    int        user_posts        User_posts to change
    * @since 3.1.0-RC4
    */

    $vars = array('user_data', 'user_posts');
    extract($phpbb_dispatcher->trigger_event('core.modify_user_rank', compact($vars)));

    if (empty($ranks))
    {
        global $cache;
        $ranks = $cache->obtain_ranks();
    }

    if (!empty($user_data['user_rank']))
    {

        $user_rank_data['title'] = (isset($ranks['special'][$user_data['user_rank']]['rank_title'])) ? $ranks['special'][$user_data['user_rank']]['rank_title'] : '';

        $user_rank_data['img_src'] = (!empty($ranks['special'][$user_data['user_rank']]['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $user->theme['theme_path'] . '/theme/images/ranks/' . $ranks['special'][$user_data['user_rank']]['rank_image']) : '';

        $user_rank_data['img'] = (!empty($ranks['special'][$user_data['user_rank']]['rank_image'])) ? '<img src="' . $user_rank_data['img_src'] . '" alt="' . $ranks['special'][$user_data['user_rank']]['rank_title'] . '" title="' . $user->theme['theme_path'] . '/theme/images/ranks/' . $ranks['special'][$user_data['user_rank']]['rank_title'] . '" />' : '';
    }
    else if ($user_posts !== false)
    {
        if (!empty($ranks['normal']))
        {
            foreach ($ranks['normal'] as $rank)
            {
                if ($user_posts >= $rank['rank_min'])
                {
                    $user_rank_data['title'] = $rank['rank_title'];
                    $user_rank_data['img_src'] = (!empty($rank['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $user->theme['theme_path'] . '/theme/images/ranks/' . $rank['rank_image']) : '';
                    $user_rank_data['img'] = (!empty($rank['rank_image'])) ? '<img src="' . $user_rank_data['img_src'] . '" alt="' . $rank['rank_title'] . '" title="' . $user->theme['theme_path'] . '/theme/images/ranks/' . $rank['rank_title'] . '" />' : '';
                    break;
                }
            }
        }
    }

    return $user_rank_data;
}
Bildausgabe siegt wie folgt aus,er findet den Style nicht:

Code: Alles auswählen

/forum/images/ranks//theme/images/ranks/26.png
Hat jemand eine Idee was falsch sein könnte,bin für jeden Tip dankbar :wink:
MfG Nico

deviantart | forum
Benutzeravatar
P@InKiLLeR
Mitglied
Beiträge: 149
Registriert: 26.10.2008 14:26
Kontaktdaten:

Re: Rangbilder für Unterschiedliche Styles?

Beitrag von P@InKiLLeR »

Keiner eine Idee was ich falsch gemacht habe? :-?
MfG Nico

deviantart | forum
Antworten

Zurück zu „Styles, Templates und Grafiken“