To get the users style to display when viewing their profile, you can add the following code. The code will obey if the board is set to override a users style and not display. So here we go.
OPEN
memberlist.php
FIND
(this find is on purpose so that you are in the correct location within memberlist.php)
Code: Select all
case 'viewprofile':
FIND
Code: Select all
// Get user...
$sql = 'SELECT *
FROM ' . USERS_TABLE . '
WHERE ' . (($username) ? "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "user_id = $user_id");
$result = $db->sql_query($sql);
REPLACE WITH
Code: Select all
// get the users style
// but only if board is set to not override
if (!$config['override_user_style'])
{
// Get user and their style
$sql = 'SELECT u.*, s.*
FROM ' . USERS_TABLE . ' u
LEFT JOIN ' . STYLES_TABLE . ' s
ON u.user_style = s.style_id
WHERE ' . (($username) ? "u.username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "u.user_id = $user_id");
$result = $db->sql_query($sql);
}
else
{
// Get user...
$sql = 'SELECT *
FROM ' . USERS_TABLE . '
WHERE ' . (($username) ? "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "user_id = $user_id");
$result = $db->sql_query($sql);
}
FIND
Code: Select all
'OCCUPATION' => (!empty($member['user_occ'])) ? censor_text($member['user_occ']) : '',
BEFORE, ADD
Code: Select all
'USER_STYLE' => isset($member['style_name']) ? $member['style_name'] .' '.$member['style_copyright'] : '',
OPEN
language/xxx/memberlist.php
FIND
Code: Select all
'SORT_POST_COUNT' => 'Post count',
AFTER, ADD
Code: Select all
'STYLE' => 'User Style',
OPEN
styles/prosilver/template/memberlist_view.html
FIND
Code: Select all
<!-- IF INTERESTS --><dt>{L_INTERESTS}:</dt> <dd>{INTERESTS}</dd><!-- ENDIF -->
AFTER ADD
Code: Select all
<!-- IF USER_STYLE --><dt>{L_STYLE}:</dt> <dd>{USER_STYLE}</dd><!-- ENDIF -->
Refresh the style and done.
You will end up with something that looks like the following.