(2016-08-28, 03:05 PM)Luis Dirjan Wrote: [ -> ] (2016-08-28, 01:57 PM)eNvy Wrote: [ -> ]He wants to know how he can edit the core files in order to display the current usegroup style in all the templates.
There's a plugin that colour almost all the templates if you want to try it.
Yeah u right that what i mean..
do u know how to make or edit? can you show me how.
Well I think this "tutorial" was for MyBB 1.6 so... if you want to try it be careful because probably the code changed from one version to another (I don't know if this work or not).
Also this is not 100% in all the templates, but maybe you can learn how to style it for yourself and make the changes.
functions_forumlist.php
Search
$lastpost_profilelink = build_profile_link($lastpost_data['lastposter'], $lastpost_data['lastposteruid']);
Replace with
$user_profile_forum = get_user($lastpost_data['lastposteruid']);
$lastpost_data['lastposter'] = format_name($user_profile_forum['username'], $user_profile_forum['usergroup'], $user_profile_forum['displaygroup']);
$lastpost_profilelink = build_profile_link($lastpost_data['lastposter'], $lastpost_data['lastposteruid']);
forumdisplay.php
Search
$thread['author'] = $thread['uid'];
if(!$thread['username'])
{
$thread['username'] = $thread['threadusername'];
$thread['profilelink'] = $thread['threadusername'];
}
else
{
$thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);
}
Replace with
$thread['author'] = $thread['uid'];
if(!$thread['username'])
{
$thread['username'] = $thread['threadusername'];
$thread['profilelink'] = $thread['threadusername'];
}
else
{
$userformat = get_user($thread['uid']);
$thread_format = format_name($userformat['username'], $userformat['usergroup'], $userformat['displaygroup']);
$thread['profilelink'] = build_profile_link($thread_format, $thread['uid']);
}
Search
// Don't link to guest's profiles (they have no profile).
if($lastposteruid == 0)
{
$lastposterlink = $lastposter;
}
else
{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}
Replace with
if($lastposteruid == 0)
{
$lastposterlink = $lastposter;
}
else
{
$user_lastpost = get_user($lastposteruid);
$lastposter_formar = format_name($user_lastpost['username'], $user_lastpost['usergroup'], $user_lastpost['displaygroup']);
$lastposterlink = build_profile_link($lastposter_formar, $user_lastpost['uid']);
}
portal.php
Search
if($thread['lastposteruid'] == 0)
{
$lastposterlink = $thread['lastposter'];
}
else
{
$lastposterlink = build_profile_link($thread['lastposter'], $thread['lastposteruid']);
}
Replace with
if($thread['lastposteruid'] == 0)
{
$lastposterlink = $thread['lastposter'];
}
else
{
$user_portal_format = get_user($thread['lastposteruid']);
$portal_lastposter_thread = format_name($user_portal_format['username'], $user_portal_format['usergroup'], $user_portal_format['displaygroup']);
$lastposterlink = build_profile_link($portal_lastposter_thread, $user_portal_format['uid']);
}
Search
if($announcement['uid'] == 0)
{
$profilelink = htmlspecialchars_uni($announcement['threadusername']);
}
else
{
$profilelink = build_profile_link($announcement['username'], $announcement['uid']);
}
Replace with
if($announcement['uid'] == 0)
{
$profilelink = htmlspecialchars_uni($announcement['threadusername']);
}
else
{
$portaluserlink = get_user($announcement['uid']);
$namelinkportal = format_name($portaluserlink['username'], $portaluserlink['usergroup'], $portaluserlink['displaygroup']);
$profilelink = build_profile_link($namelinkportal, $portaluserlink['uid']);
}
Credits: Edson Ordaz
Link:
http://www.mybb-es.com/hilo-formato-del-...das-partes (Spanish)