News:

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

Main Menu

[Help] Help edit smf

Started by Rodrigo_Gustin, January 30, 2019, 09:32:32 PM

Previous topic - Next topic

Rodrigo_Gustin

Hello, I installed SMF 2.0.15
for testing and as soon as I upgrade I will migrate it to a hosting, but I would like to ask for help I wanted to add a red strip equal to the one in the picture below in the position of administrators and moderators, could someone help me tell me how I do this ?


As I want.



How are you now.




Sir Osis of Liver

Hmm, well, in Display.template.php you should see this -



<li class="membergroup">', $message['member']['group'], '</li>';



So in index.css you can do something like this -



/* poster and postarea + moderation area underneath */

.membergroup
{
background-color: red;
display: inline-block;
width: 100px;
text-align: center;
border-radius: 5px 5px 5px 5px;
box-shadow: -5px 0 0 0 red, 5px 0 0 0 red;
}



Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Rodrigo_Gustin

Can someone help me to leave the same image as the one?

br360

The code Sir osis added will do what you are looking for. Add that code at the bottom of your index.css

The only thing I would recommend you add would be:

color: white;

That is so the text in the red background is white. So taking his code and adding the white text would look like this:

/* poster and postarea + moderation area underneath */

.membergroup
{
background-color: red;
display: inline-block;
width: 100px;
text-align: center;
        color: white;
border-radius: 5px 5px 5px 5px;
box-shadow: -5px 0 0 0 red, 5px 0 0 0 red;
}


br360

Also, if you want to move the 5 red squares from before the avatar to underneath it like that picture, find in your display.template.php:

// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
         if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
            echo '
                        <li class="postgroup">', $message['member']['post_group'], '</li>';
         echo '
                        <li class="stars">', $message['member']['group_stars'], '</li>';


and move that entire piece of code and place it after:

// Show avatars, images, etc.?
         if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
            echo '
                        <li class="avatar">
                           <a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
                              ', $message['member']['avatar']['image'], '
                           </a>
                        </li>';

Rodrigo_Gustin

Hello this index.css code should I put here?




I do not understand much if it can do for me the index.css is below.


GigaWatt

Here ya go ;).

Don't forget to backup the original index.css when you test this one out (in case something goes wrong). Just add another extension to it, like .bak ;).

Oh, and delete the double extension on this file (delete ".modded", leave it ending with ".css").
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Advertisement: