News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Group Stars in User Area?

Started by jack_1985, September 10, 2014, 08:40:00 AM

Previous topic - Next topic

jack_1985

Hi guys!

I am trying to get the group star image to be displayed in the user area, on the top of every page. Like this:

Hello username

Show unread posts since last visit.
Show new replies to your posts.
September 10, 2014, 08:29:03 AM

I assumed this had to be done in the index.template file. But unfortunately, I just can't seem to figure what changes need to be done to achieve this...

Could anyone perhaps point me in the right direction? Any support or guidance would be greatly appreciated! :)

Kindred

well.... you would indeed do it in index.template.php

However, it's not as simple as just calling a variable...   the group badge(s) are not loaded under normal circumstances. Just the group ID...   which means that, to load the name or badges, you need to do a database query, with a JOIN.

$user_info['groups']

e.g.
$user_info
    [groups] => Array
        (
           
  • => 1
                [1] => 5
            )
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

jack_1985


Advertisement: