OK, hier nur ein kurzer Code um anstelle des Wohnorts die Anzahl der Beiträge des Users anzuzeigen.
Dazu muss die staff.php und die staff_body.tpl angepasst werden:
Code: Alles auswählen
# OPEN
staff.php
# SEARCH FOR
if( $mode != 'view_profile' )
{
$template->assign_block_vars('switch_list_staff', array());
$template->set_filenames(array('body' => 'staff_body.tpl'));
$template->assign_vars(array(
'L_USERNAME' => $lang['Username'],
'L_FORUMS' => $lang['Staff_forums'],
'L_LOCATION' => $lang['Location'],
# AFTER, ADD
'L_POSTS' => $lang['Posts'],
# SEARCH FOR
$template->assign_block_vars('switch_list_staff.user_level.staff', array(
# BEFORE, ADD
$view_profile = get_userdata($user_id);
$total_posts = get_db_stat('postcount');
$total_topics = get_db_stat('topiccount');
$sql_topics = "SELECT count(topic_id) AS user_topics FROM ". TOPICS_TABLE ." WHERE topic_poster = '". $view_profile['user_id'] ."'";
if( !($results_topics = $db->sql_query($sql_topics)) )
{
message_die(GENERAL_ERROR, 'error getting users post information.', '', __LINE__, __FILE__, $sql_topics);
}
$topics = $db->sql_fetchrow($results_topics);
$user_topics = ( $topics['user_topics'] != '0' ) ? $topics['user_topics'] : '0';
$memberdays = max(2, ( time() - $view_profile['user_regdate'] ) / 86400 );
$posts_per_day = $view_profile['user_posts'] / $memberdays;
$post_percent = ( $total_posts || $view_profile['user_posts'] != '0' ) ? min(100, ($view_profile['user_posts'] / $total_posts) * 100) : 0;
$topics_per_day = $user_topics / $memberdays;
$topic_percent = ( $total_topics || $view_profile['user_posts'] != '0' ) ? min(100, ($user_topics / $total_topics) * 100) : 0;
# SEARCH FOR
$template->assign_block_vars('switch_list_staff.user_level.staff', array(
'ROW_CLASS' => ( !($k % 2) ) ? $theme['td_class1'] : $theme['td_class2'],
'USERNAME' => $staff['username'],
'USER_STATUS' => $user_status,
'U_PROFILE' => append_sid("staff.$phpEx?mode=view_profile&". POST_USERS_URL ."=$user_id"),
'RANK' => $rank,
'RANK_IMAGE' => $rank_image,
'AVATAR' => $avatar,
'LOCATION' => $staff['user_from'],
# AFTER, ADD
'POSTS' => $view_profile['user_posts'],
'POST_PERCENT' => sprintf($lang['User_post_pct_stats'], $post_percent),
'POSTS_PER_DAY' => sprintf($lang['User_post_day_stats'], $posts_per_day),
'TOPICS' => $user_topics,
'TOPIC_PERCENT' => sprintf($lang['User_post_pct_stats'], $topic_percent),
'TOPICS_PER_DAY' => sprintf($lang['Staff_user_topic_day_stats'], $topics_per_day),
# OPEN
staff_body.tpl
# SEARCH FOR
<tr>
<th class="thTop">{L_USERNAME}</th>
<th class="thTop">{L_FORUMS}</th>
<th class="thTop">{L_LOCATION}</th>
<th class="thTop">{L_CONTACT}</th>
<th class="thTop">{L_MESSENGER}</th>
<th class="thCornerR">{L_WWW}</th>
</tr>
# REPLACE WITH
<tr>
<th class="thTop">{L_USERNAME}</th>
<th class="thTop">{L_FORUMS}</th>
<th class="thTop">{L_POSTS}</th>
<th class="thTop">{L_CONTACT}</th>
<th class="thTop">{L_MESSENGER}</th>
<th class="thCornerR">{L_WWW}</th>
</tr>
# SEARCH FOR
<td class="{switch_list_staff.user_level.staff.ROW_CLASS}" valign="top" align="center"><span class="genmed">{switch_list_staff.user_level.staff.LOCATION}</span></td>
# REPLACE WITH
<td class="{switch_list_staff.user_level.staff.ROW_CLASS}" valign="top" align="center"><span class="genmed">{switch_list_staff.user_level.staff.POSTS} {L_POSTS}<br>{switch_list_staff.user_level.staff.POST_PERCENT}<br>{switch_list_staff.user_level.staff.POSTS_PER_DAY}<br>{switch_list_staff.user_level.staff.POST_PERCENT}</span></td>
SAVE ALL FILES
Die Funktion " Letzter Beitrag " hab ich rausgelassen. Das wäre sonst zuviel Code....