2021-02-26, 06:27 PM
2021-02-26, 07:28 PM
2021-02-26, 08:08 PM
(2021-02-26, 07:28 PM)Mastersly Wrote: [ -> ]Read this https://community.mybb.com/thread-73891.htmlthanks for the support but this not what im looking for, i already created a css for each usergroup
i want to know how to display the usergroup css under the thread
in the forumdisplay_thread
i have this:
<div class="author smalltext">by {$thread['profilelink']}</div>
should i replace "author smalltext" with a variable ?
2021-02-26, 09:36 PM
(2021-02-26, 06:27 PM)beast Wrote: [ -> ]hi there,
how to disaply the usergroup css under the thread
you would use Lukasz's plugin: https://community.mybb.com/mods.php?action=view&pid=128 as that is you most precise and quickest way to accomplish this boardwide...
that should cover almost all username styling except for welcomeblock which can be solved with a quick core edit if desired:
in global.php
Find:
// Format the welcome back message
$lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link(htmlspecialchars_uni($mybb->user['username']), $mybb->user['uid']), $lastvisit);
change to:
// Format the welcome back message
//$lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link(htmlspecialchars_uni($mybb->user['username']), $mybb->user['uid']), $lastvisit);
// Format the welcome back message
$welcome_back_user = format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']);
$lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($welcome_back_user, $mybb->user['uid']), $lastvisit);
one could also if say not wanting to use the plugin or gid methods and say only had a few specific users (say only a few staff members) that you wanted to style one could do so by targeting specific uid:
ie: uid-1
/* uid-1 is an administrator so make it green, yep, green is good! */
.author a[href*="uid=1"]:visited,
.author a[href*="uid=1"]:link {
color: green !important;
}
and you would simply copy and modify the above to the respective uid-#s you needed to style.... etc, etc
Just for an example sake:
Edit Template: forumbit_depth1_forum_lastpost
This:
{$lastpost_profilelink}
To that:
<span class="author">{$lastpost_profilelink}</span>
Edit Template: forumbit_depth2_forum_lastpost
This:
{$lastpost_profilelink}
To that:
<span class="author">{$lastpost_profilelink}</span>
Edit Template: forumdisplay_thread
find:
<span class="lastpost smalltext">
change to that:
<span class="lastpost author smalltext">
etc, etc
Best of luck!
2021-03-13, 02:23 AM
ohh thanks man !
2021-03-13, 02:25 AM
(2021-03-13, 02:23 AM)beast Wrote: [ -> ]ohh thanks man !
no worries, glad it may of helped