'; // Prevent Chrome from auto completing fields when viewing/editing other members profiles if ($context['browser']['is_chrome'] && !$context['user']['is_owner']) echo ' '; // If an error occurred while trying to save previously, give the user a clue! if (!empty($context['post_errors'])) echo ' ', template_error_message(); // If the profile was update successfully, let the user know this. if (!empty($context['profile_updated'])) echo '
', $context['profile_updated'], '
'; } // Template for closing off table started in profile_above. function template_profile_below() { } // This template displays users details without any option to edit them. function template_summary() { global $context, $settings, $options, $scripturl, $modSettings, $txt; // Display the basic information about the user echo '

', $txt['summary'], '

', $context['member']['name'], ' ', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '

', $context['member']['avatar']['image'], '
    '; // What about if we allow email only via the forum?? if ($context['member']['show_email'] === 'yes' || $context['member']['show_email'] === 'no_through_forum' || $context['member']['show_email'] === 'yes_permission_override') echo '
  • ', $txt['email'], '
  • '; // Don't show an icon if they haven't specified a website. if ($context['member']['website']['url'] !== '' && !isset($context['disabled_fields']['website'])) echo '
  • ', ($settings['use_image_buttons'] ? '' . $context['member']['website']['title'] . '' : $txt['www']), '
  • '; // Are there any custom profile fields for the summary? if (!empty($context['custom_fields'])) { foreach ($context['custom_fields'] as $field) if (($field['placement'] == 1 || empty($field['output_html'])) && !empty($field['value'])) echo '
  • ', $field['output_html'], '
  • '; } echo ' ', !isset($context['disabled_fields']['icq']) && !empty($context['member']['icq']['link']) ? '
  • ' . $context['member']['icq']['link'] . '
  • ' : '', ' ', !isset($context['disabled_fields']['msn']) && !empty($context['member']['msn']['link']) ? '
  • ' . $context['member']['msn']['link'] . '
  • ' : '', ' ', !isset($context['disabled_fields']['aim']) && !empty($context['member']['aim']['link']) ? '
  • ' . $context['member']['aim']['link'] . '
  • ' : '', ' ', !isset($context['disabled_fields']['yim']) && !empty($context['member']['yim']['link']) ? '
  • ' . $context['member']['yim']['link'] . '
  • ' : '', '
', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $context['member']['online']['text'] . '' : $context['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $context['member']['online']['text'] . '' : ''; // Can they add this member as a buddy? if (!empty($context['can_have_buddy']) && !$context['user']['is_owner']) echo '
[', $txt['buddy_' . ($context['member']['is_buddy'] ? 'remove' : 'add')], ']'; echo '
'; echo ' '; echo '
'; if ($context['user']['is_owner'] || $context['user']['is_admin']) echo '
', $txt['username'], ':
', $context['member']['username'], '
'; if (!isset($context['disabled_fields']['posts'])) echo '
', $txt['profile_posts'], ':
', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')
'; // Only show the email address fully if it's not hidden - and we reveal the email. if ($context['member']['show_email'] == 'yes') echo '
', $txt['email'], ':
', $context['member']['email'], '
'; // ... Or if the one looking at the profile is an admin they can see it anyway. elseif ($context['member']['show_email'] == 'yes_permission_override') echo '
', $txt['email'], ':
', $context['member']['email'], '
'; if (!empty($modSettings['titlesEnable']) && !empty($context['member']['title'])) echo '
', $txt['custom_title'], ':
', $context['member']['title'], '
'; if (!empty($context['member']['blurb'])) echo '
', $txt['personal_text'], ':
', $context['member']['blurb'], '
'; // If karma enabled show the members karma. if ($modSettings['karmaMode'] == '1') echo '
', $modSettings['karmaLabel'], '
', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), '
'; elseif ($modSettings['karmaMode'] == '2') echo '
', $modSettings['karmaLabel'], '
+', $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], '
'; if (!isset($context['disabled_fields']['gender']) && !empty($context['member']['gender']['name'])) echo '
', $txt['gender'], ':
', $context['member']['gender']['name'], '
'; echo '
', $txt['age'], ':
', $context['member']['age'] . ($context['member']['today_is_birthday'] ? '   ' : ''), '
'; if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location'])) echo '
', $txt['location'], ':
', $context['member']['location'], '
'; echo '
'; // Any custom fields for standard placement? if (!empty($context['custom_fields'])) { $shown = false; foreach ($context['custom_fields'] as $field) { if ($field['placement'] != 0 || empty($field['output_html'])) continue; if (empty($shown)) { echo '
'; $shown = true; } echo '
', $field['name'], ':
', $field['output_html'], '
'; } if (!empty($shown)) echo '
'; } echo '
'; // Can they view/issue a warning? if ($context['can_view_warning'] && $context['member']['warning']) { echo '
', $txt['profile_warning_level'], ':
', $context['member']['warning'], '%'; // Can we provide information on what this means? if (!empty($context['warning_status'])) echo ' (', $context['warning_status'], ')'; echo '
'; } // Is this member requiring activation and/or banned? if (!empty($context['activate_message']) || !empty($context['member']['bans'])) { // If the person looking at the summary has permission, and the account isn't activated, give the viewer the ability to do it themselves. if (!empty($context['activate_message'])) echo '
', $context['activate_message'], ' (', $context['activate_link_text'], ')
'; // If the current member is banned, show a message and possibly a link to the ban. if (!empty($context['member']['bans'])) { echo '
', $txt['user_is_banned'], ' [' . $txt['view_ban'] . ']
'; } } echo '
', $txt['date_registered'], ':
', $context['member']['registered'], '
'; // If the person looking is allowed, they can check the members IP address and hostname. if ($context['can_see_ip']) { if (!empty($context['member']['ip'])) echo '
', $txt['ip'], ':
', $context['member']['ip'], '
'; if (empty($modSettings['disableHostnameLookup']) && !empty($context['member']['ip'])) echo '
', $txt['hostname'], ':
', $context['member']['hostname'], '
'; } echo '
', $txt['local_time'], ':
', $context['member']['local_time'], '
'; if (!empty($modSettings['userLanguage']) && !empty($context['member']['language'])) echo '
', $txt['language'], ':
', $context['member']['language'], '
'; echo '
', $txt['lastLoggedIn'], ':
', $context['member']['last_login'], '
'; // Are there any custom profile fields for the summary? if (!empty($context['custom_fields'])) { $shown = false; foreach ($context['custom_fields'] as $field) { if ($field['placement'] != 2 || empty($field['output_html'])) continue; if (empty($shown)) { $shown = true; echo '
    '; } echo '
  • ', $field['output_html'], '
  • '; } if ($shown) echo '
'; } // Show the users signature. if ($context['signature_enabled'] && !empty($context['member']['signature'])) echo '
', $txt['signature'], ':
', $context['member']['signature'], '
'; echo '
'; } // Template for showing all the posts of the user, in chronological order. function template_showPosts() { global $context, $settings, $options, $scripturl, $modSettings, $txt; echo '

', (!isset($context['attachments']) && empty($context['is_topics']) ? $txt['showMessages'] : (!empty($context['is_topics']) ? $txt['showTopics'] : $txt['showAttachments'])), ' - ', $context['member']['name'], '

', $txt['pages'], ': ', $context['page_index'], '
'; // Button shortcuts $quote_button = create_button('quote.gif', 'reply_quote', 'quote', 'align="middle"'); $reply_button = create_button('reply_sm.gif', 'reply', 'reply', 'align="middle"'); $remove_button = create_button('delete.gif', 'remove_message', 'remove', 'align="middle"'); $notify_button = create_button('notify_sm.gif', 'notify_replies', 'notify', 'align="middle"'); // Are we displaying posts or attachments? if (!isset($context['attachments'])) { // For every post to be displayed, give it its own div, and show the important details of the post. foreach ($context['posts'] as $post) { echo '
', $post['counter'], '
', $post['board']['name'], ' / ', $post['subject'], '
« ', $txt['on'], ': ', $post['time'], ' »
'; if (!$post['approved']) echo '
', $txt['post_awaiting_approval'], '
'; echo ' ', $post['body'], '
'; if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete']) echo '
    '; // If they *can* reply? if ($post['can_reply']) echo '
  • ', $txt['reply'], '
  • '; // If they *can* quote? if ($post['can_quote']) echo '
  • ', $txt['quote'], '
  • '; // Can we request notification of topics? if ($post['can_mark_notify']) echo '
  • ', $txt['notify'], '
  • '; // How about... even... remove it entirely?! if ($post['can_delete']) echo '
  • ', $txt['remove'], '
  • '; if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete']) echo '
'; echo '
'; } } else { echo ' '; // Looks like we need to do all the attachments instead! $alternate = false; foreach ($context['attachments'] as $attachment) { echo ' '; $alternate = !$alternate; } // No posts? Just end the table with a informative message. if ((isset($context['attachments']) && empty($context['attachments'])) || (!isset($context['attachments']) && empty($context['posts']))) echo ' '; echo '
', $txt['show_attach_filename'], ' ', ($context['sort_order'] == 'filename' ? '' : ''), ' ', $txt['show_attach_downloads'], ' ', ($context['sort_order'] == 'downloads' ? '' : ''), ' ', $txt['message'], ' ', ($context['sort_order'] == 'subject' ? '' : ''), ' ', $txt['show_attach_posted'], ' ', ($context['sort_order'] == 'posted' ? '' : ''), '
', $attachment['filename'], '', !$attachment['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : '', ' ', $attachment['downloads'], ' ', $attachment['subject'], ' ', $attachment['posted'], '
', isset($context['attachments']) ? $txt['show_attachments_none'] : ($context['is_topics'] ? $txt['show_topics_none'] : $txt['show_posts_none']), '
'; } // Show more page numbers. echo '
', $txt['pages'], ': ', $context['page_index'], '
'; } // Template for showing all the buddies of the current user. function template_editBuddies() { global $context, $settings, $options, $scripturl, $modSettings, $txt; echo '

', $txt['editBuddies'], '

'; // If they don't have any buddies don't list them! if (empty($context['buddies'])) echo ' '; // Now loop through each buddy showing info on each. $alternate = false; foreach ($context['buddies'] as $buddy) { echo ' '; $alternate = !$alternate; } echo '
', $txt['name'], ' ', $txt['status'], ' ', $txt['email'], ' ', $txt['icq'], ' ', $txt['aim'], ' ', $txt['yim'], ' ', $txt['msn'], '
', $txt['no_buddies'], '
', $buddy['link'], ' ', $buddy['online']['label'], ' ', ($buddy['show_email'] == 'no' ? '' : '' . $txt['email'] . ''), ' ', $buddy['icq']['link'], ' ', $buddy['aim']['link'], ' ', $buddy['yim']['link'], ' ', $buddy['msn']['link'], ' ', $txt['buddy_remove'], '
'; // Add a new buddy? echo '

', $txt['buddy_add'], '

'; if (!empty($context['token_check'])) echo ' '; echo '
'; } // Template for showing the ignore list of the current user. function template_editIgnoreList() { global $context, $settings, $options, $scripturl, $modSettings, $txt; echo '

', $txt['editIgnoreList'], '

'; // If they don't have anyone on their ignore list, don't list it! if (empty($context['ignore_list'])) echo ' '; // Now loop through each buddy showing info on each. $alternate = false; foreach ($context['ignore_list'] as $member) { echo ' '; $alternate = !$alternate; } echo '
', $txt['name'], ' ', $txt['status'], ' ', $txt['email'], ' ', $txt['icq'], ' ', $txt['aim'], ' ', $txt['yim'], ' ', $txt['msn'], '
', $txt['no_ignore'], '
', $member['link'], ' ', $member['online']['label'], ' ', ($member['show_email'] == 'no' ? '' : '' . $txt['email'] . ''), ' ', $member['icq']['link'], ' ', $member['aim']['link'], ' ', $member['yim']['link'], ' ', $member['msn']['link'], ' ', $txt['ignore_remove'], '
'; // Add a new buddy? echo '

', $txt['ignore_add'], '

'; if (!empty($context['token_check'])) echo ' '; echo '
'; } // This template shows an admin information on a users IP addresses used and errors attributed to them. function template_trackActivity() { global $context, $settings, $options, $scripturl, $txt; // The first table shows IP information about the user. echo '

', $txt['view_ips_by'], ' ', $context['member']['name'], '

'; // The last IP the user used. echo '
', $txt['most_recent_ip'], ': ', (empty($context['last_ip2']) ? '' : '
(' . $txt['why_two_ip_address'] . ')'), '
', $context['last_ip'], ''; // Second address detected? if (!empty($context['last_ip2'])) echo ' , ', $context['last_ip2'], ''; echo '
'; // Lists of IP addresses used in messages / error messages. echo '
', $txt['ips_in_messages'], ':
', (count($context['ips']) > 0 ? implode(', ', $context['ips']) : '(' . $txt['none'] . ')'), '
', $txt['ips_in_errors'], ':
', (count($context['ips']) > 0 ? implode(', ', $context['error_ips']) : '(' . $txt['none'] . ')'), '
'; // List any members that have used the same IP addresses as the current member. echo '
', $txt['members_in_range'], ':
', (count($context['members_in_range']) > 0 ? implode(', ', $context['members_in_range']) : '(' . $txt['none'] . ')'), '

'; // Show the track user list. template_show_list('track_user_list'); } // The template for trackIP, allowing the admin to see where/who a certain IP has been used. function template_trackIP() { global $context, $settings, $options, $scripturl, $txt; // This function always defaults to the last IP used by a member but can be set to track any IP. // The first table in the template gives an input box to allow the admin to enter another IP to track. echo '

', $txt['trackIP'], '

', $txt['enter_ip'], ':    

'; // The table inbetween the first and second table shows links to the whois server for every region. if ($context['single_ip']) { echo '

', $txt['whois_title'], ' ', $context['ip'], '

'; foreach ($context['whois_servers'] as $server) echo ' ', $server['name'], '
'; echo '

'; } // The second table lists all the members who have been logged as using this IP address. echo '

', $txt['members_from_ip'], ' ', $context['ip'], '

'; if (empty($context['ips'])) echo '

', $txt['no_members_from_ip'], '

'; else { echo ' '; // Loop through each of the members and display them. foreach ($context['ips'] as $ip => $memberlist) echo ' '; echo '
', $txt['ip_address'], ' ', $txt['display_name'], '
', $ip, ' ', implode(', ', $memberlist), '

'; } template_show_list('track_message_list'); echo '
'; template_show_list('track_user_list'); } function template_showPermissions() { global $context, $settings, $options, $scripturl, $txt; echo '

', $txt['showPermissions'], '

'; if ($context['member']['has_all_permissions']) { echo '

', $txt['showPermissions_all'], '

'; } else { echo '

',$txt['showPermissions_help'],'

'; if (!empty($context['no_access_boards'])) { echo '

', $txt['showPermissions_restricted_boards'], '

', $txt['showPermissions_restricted_boards_desc'], ':
'; foreach ($context['no_access_boards'] as $no_access_board) echo ' ', $no_access_board['name'], '', $no_access_board['is_last'] ? '' : ', '; echo '
'; } // General Permissions section. echo '

', $txt['showPermissions_general'], '

'; if (!empty($context['member']['permissions']['general'])) { echo ' '; foreach ($context['member']['permissions']['general'] as $permission) { echo ' '; } echo '
', $txt['showPermissions_permission'], ' ', $txt['showPermissions_status'], '
', $permission['is_denied'] ? '' . $permission['name'] . '' : $permission['name'], ' '; if ($permission['is_denied']) echo ' ', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']),''; else echo ' ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']); echo '

'; } else echo '

', $txt['showPermissions_none_general'], '

'; // Board permission section. echo '

', $txt['showPermissions_select'], ':

'; if (!empty($context['member']['permissions']['board'])) { echo ' '; foreach ($context['member']['permissions']['board'] as $permission) { echo ' '; } echo '
', $txt['showPermissions_permission'], ' ', $txt['showPermissions_status'], '
', $permission['is_denied'] ? '' . $permission['name'] . '' : $permission['name'], ' '; if ($permission['is_denied']) { echo ' ', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), ''; } else { echo ' ', $txt['showPermissions_given'], ':  ', implode(', ', $permission['groups']['allowed']); } echo '
'; } else echo '

', $txt['showPermissions_none_board'], '

'; echo '
'; } } // Template for user statistics, showing graphs and the like. function template_statPanel() { global $context, $settings, $options, $scripturl, $modSettings, $txt; // First, show a few text statistics such as post/topic count. echo '

', $txt['statPanel_generalStats'], ' - ', $context['member']['name'], '

', $txt['statPanel_total_time_online'], ':
', $context['time_logged_in'], '
', $txt['statPanel_total_posts'], ':
', $context['num_posts'], ' ', $txt['statPanel_posts'], '
', $txt['statPanel_total_topics'], ':
', $context['num_topics'], ' ', $txt['statPanel_topics'], '
', $txt['statPanel_users_polls'], ':
', $context['num_polls'], ' ', $txt['statPanel_polls'], '
', $txt['statPanel_users_votes'], ':
', $context['num_votes'], ' ', $txt['statPanel_votes'], '
'; // This next section draws a graph showing what times of day they post the most. echo '

', $txt['statPanel_activityTime'], '

'; // If they haven't post at all, don't draw the graph. if (empty($context['posts_by_time'])) echo ' ', $txt['statPanel_noPosts'], ''; // Otherwise do! else { echo '
    '; // The labels. foreach ($context['posts_by_time'] as $time_of_day) { echo '
    ', sprintf($txt['statPanel_activityTime_posts'], $time_of_day['posts'], $time_of_day['posts_percent']), '
    ', $time_of_day['hour_format'], ' '; } echo '
'; } echo '
'; // Two columns with the most popular boards by posts and activity (activity = users posts / total posts). echo '

', $txt['statPanel_topBoards'], '

'; if (empty($context['popular_boards'])) echo ' ', $txt['statPanel_noPosts'], ''; else { echo '
'; // Draw a bar for every board. foreach ($context['popular_boards'] as $board) { echo '
', $board['link'], '
', sprintf($txt['statPanel_topBoards_memberposts'], $board['posts'], $board['total_posts_member'], $board['posts_percent']), '
', empty($context['hide_num_posts']) ? $board['posts'] : '', '
'; } echo '
'; } echo '
'; echo '

', $txt['statPanel_topBoardsActivity'], '

'; if (empty($context['board_activity'])) echo ' ', $txt['statPanel_noPosts'], ''; else { echo '
'; // Draw a bar for every board. foreach ($context['board_activity'] as $activity) { echo '
', $activity['link'], '
', sprintf($txt['statPanel_topBoards_posts'], $activity['posts'], $activity['total_posts'], $activity['posts_percent']), '
', $activity['percent'], '%
'; } echo '
'; } echo '
'; echo '

'; } // Template for editing profile options. function template_edit_options() { global $context, $settings, $options, $scripturl, $modSettings, $txt; // The main header! echo '

'; // Don't say "Profile" if this isn't the profile... if (!empty($context['profile_header_text'])) echo ' ', $context['profile_header_text']; else echo ' ', $txt['profile']; echo '

'; // Have we some description? if ($context['page_desc']) echo '

', $context['page_desc'], '

'; echo '
'; // Any bits at the start? if (!empty($context['profile_prehtml'])) echo '
', $context['profile_prehtml'], '
'; if (!empty($context['profile_fields'])) echo '
'; // Start the big old loop 'of love. $lastItem = 'hr'; foreach ($context['profile_fields'] as $key => $field) { // We add a little hack to be sure we never get more than one hr in a row! if ($lastItem == 'hr' && $field['type'] == 'hr') continue; $lastItem = $field['type']; if ($field['type'] == 'hr') { echo '

'; } elseif ($field['type'] == 'callback') { if (isset($field['callback_func']) && function_exists('template_profile_' . $field['callback_func'])) { $callback_func = 'template_profile_' . $field['callback_func']; $callback_func(); } } else { echo '
', $field['label'], ''; // Does it have any subtext to show? if (!empty($field['subtext'])) echo '
', $field['subtext'], ''; echo '
'; // Want to put something infront of the box? if (!empty($field['preinput'])) echo ' ', $field['preinput']; // What type of data are we showing? if ($field['type'] == 'label') echo ' ', $field['value']; // Maybe it's a text box - very likely! elseif (in_array($field['type'], array('int', 'float', 'text', 'password'))) echo ' '; // You "checking" me out? ;) elseif ($field['type'] == 'check') echo ' '; // Always fun - select boxes! elseif ($field['type'] == 'select') { echo ' '; } // Something to end with? if (!empty($field['postinput'])) echo ' ', $field['postinput']; echo '
'; } } if (!empty($context['profile_fields'])) echo '
'; // Are there any custom profile fields - if so print them! if (!empty($context['custom_fields'])) { if ($lastItem != 'hr') echo '
'; echo '
'; foreach ($context['custom_fields'] as $field) { echo '
', $field['name'], ':
', $field['desc'], '
', $field['input_html'], '
'; } echo '
'; } // Any closing HTML? if (!empty($context['profile_posthtml'])) echo '
', $context['profile_posthtml'], '
'; elseif ($lastItem != 'hr') echo '
'; // Only show the password box if it's actually needed. if ($context['require_password']) echo '
', $txt['current_password'], ':
', $txt['required_security_reasons'], '
'; echo '
'; // The button shouldn't say "Change profile" unless we're changing the profile... if (!empty($context['submit_button_text'])) echo ' '; else echo ' '; if (!empty($context['token_check'])) echo ' '; echo '

'; // Some javascript! echo ' '; // Any final spellchecking stuff? if (!empty($context['show_spellchecking'])) echo '
'; } // Personal Message settings. function template_profile_pm_settings() { global $context, $settings, $options, $scripturl, $modSettings, $txt; echo '


'; } // Template for showing theme settings. Note: template_options() actually adds the theme specific options. function template_profile_theme_settings() { global $context, $settings, $options, $scripturl, $modSettings, $txt; echo '
'; } function template_notification() { global $context, $settings, $options, $txt, $scripturl, $modSettings; // The main containing header. echo '

', $txt['profile'], '

', $txt['notification_info'], '

'; // Allow notification on announcements to be disabled? if (!empty($modSettings['allow_disableAnnounce'])) echo '
'; // More notification options. echo '
'; if (empty($modSettings['disallow_sendBody'])) echo '
'; echo '



'; if (!empty($context['token_check'])) echo ' '; echo '


'; template_show_list('topic_notification_list'); echo '
'; template_show_list('board_notification_list'); } // Template for choosing group membership. function template_groupMembership() { global $context, $settings, $options, $scripturl, $modSettings, $txt; // The main containing header. echo '

', $txt['profile'], '

', $txt['groupMembership_info'], '

'; // Do we have an update message? if (!empty($context['update_message'])) echo '
', $context['update_message'], '.
'; // Requesting membership to a group? if (!empty($context['group_request'])) { echo '

', $txt['request_group_membership'], '

', $txt['request_group_membership_desc'], ':
'; } else { echo ' '; $alternate = true; foreach ($context['groups']['member'] as $group) { echo ' '; if ($context['can_edit_primary']) echo ' '; echo ' '; $alternate = !$alternate; } echo '
', $txt['current_membergroups'], '
'; // Can they leave their group? if ($group['can_leave']) echo ' ' . $txt['leave_group'] . ''; echo '
'; if ($context['can_edit_primary']) echo '
'; // Any groups they can join? if (!empty($context['groups']['available'])) { echo '
'; $alternate = true; foreach ($context['groups']['available'] as $group) { echo ' '; $alternate = !$alternate; } echo '
', $txt['available_groups'], '
', (empty($group['color']) ? $group['name'] : '' . $group['name'] . ''), '', (!empty($group['desc']) ? '
' . $group['desc'] . '' : ''), '
'; if ($group['type'] == 3) echo ' ', $txt['join_group'], ''; elseif ($group['type'] == 2 && $group['pending']) echo ' ', $txt['approval_pending']; elseif ($group['type'] == 2) echo ' ', $txt['request_group'], ''; // '; echo '
'; } // Javascript for the selector stuff. echo ' '; } if (!empty($context['token_check'])) echo ' '; echo '
'; } function template_ignoreboards() { global $context, $txt, $settings, $scripturl; // The main containing header. echo '

', $txt['profile'], '

', $txt['ignoreboards_info'], '

    '; $i = 0; $limit = ceil($context['num_boards'] / 2); foreach ($context['categories'] as $category) { if ($i == $limit) { echo '
    • '; echo '
    • '; $i++; } echo '
  • '; } echo '

'; // Show the standard "Save Settings" profile button. template_profile_save(); echo '

'; } // Simple load some theme variables common to several warning templates. function template_load_warning_variables() { global $modSettings, $context; $context['warningBarWidth'] = 200; // Setup the colors - this is a little messy for theming. $context['colors'] = array( 0 => 'green', $modSettings['warning_watch'] => 'darkgreen', $modSettings['warning_moderate'] => 'orange', $modSettings['warning_mute'] => 'red', ); // Work out the starting color. $context['current_color'] = $context['colors'][0]; foreach ($context['colors'] as $limit => $color) if ($context['member']['warning'] >= $limit) $context['current_color'] = $color; } // Show all warnings of a user? function template_viewWarning() { global $context, $txt, $scripturl, $settings; template_load_warning_variables(); echo '

', sprintf($txt['profile_viewwarning_for_user'], $context['member']['name']), '

', $txt['profile_warning_name'], ':
', $context['member']['name'], '
', $txt['profile_warning_level'], ':
', $context['member']['warning'], '%
 
'; // There's some impact of this? if (!empty($context['level_effects'][$context['current_level']])) echo '
', $txt['profile_viewwarning_impact'], ':
', $context['level_effects'][$context['current_level']], '
'; echo '
'; template_show_list('view_warnings'); } // Show a lovely interface for issuing warnings. function template_issueWarning() { global $context, $settings, $options, $scripturl, $modSettings, $txt; template_load_warning_variables(); echo ' '; echo '

', $context['user']['is_owner'] ? $txt['profile_warning_level'] : $txt['profile_issue_warning'], '

'; if (!$context['user']['is_owner']) echo '

', $txt['profile_warning_desc'], '

'; echo '
'; if (!$context['user']['is_owner']) echo '
', $txt['profile_warning_name'], ':
', $context['member']['name'], '
'; echo '
', $txt['profile_warning_level'], ':'; // Is there only so much they can apply? if ($context['warning_limit']) echo '
', sprintf($txt['profile_warning_limit_attribute'], $context['warning_limit']), ''; echo '
 ', $txt['profile_warning_max'], '
', $txt['profile_warning_impact'], ':
'; // For non-javascript give a better list. foreach ($context['level_effects'] as $limit => $effect) echo ' ', sprintf($txt['profile_warning_effect_text'], $limit, $effect), '
'; echo '
'; if (!$context['user']['is_owner']) { echo '
', $txt['profile_warning_reason'], ':
', $txt['profile_warning_reason_desc'], '

', $txt['profile_warning_notify'], ':
', $txt['profile_warning_notify_subject'], ':
', $txt['profile_warning_notify_body'], ':

'; } echo '
'; if (!empty($context['token_check'])) echo ' '; echo '
'; // Previous warnings? echo '

', $txt['profile_warning_previous'], '

'; // Print the warnings. $alternate = 0; foreach ($context['previous_warnings'] as $warning) { $alternate = !$alternate; echo ' '; } if (empty($context['previous_warnings'])) echo ' '; echo '
', $txt['profile_warning_previous_issued'], ' ', $txt['profile_warning_previous_time'], ' ', $txt['profile_warning_previous_reason'], ' ', $txt['profile_warning_previous_level'], '
', $warning['issuer']['link'], ' ', $warning['time'], '
', $warning['reason'], '
'; if (!empty($warning['id_notice'])) echo '
'; echo '
', $warning['counter'], '
', $txt['profile_warning_previous_none'], '
', $txt['pages'], ': ', $context['page_index'], '
'; // Do our best to get pretty javascript enabled. echo ' '; } // Template to show for deleting a users account - now with added delete post capability! function template_deleteAccount() { global $context, $settings, $options, $scripturl, $txt, $scripturl; // The main containing header. echo '

', $txt['deleteAccount'], '

'; // If deleting another account give them a lovely info box. if (!$context['user']['is_owner']) echo '

', $txt['deleteAccount_desc'], '

'; echo '
'; // If they are deleting their account AND the admin needs to approve it - give them another piece of info ;) if ($context['needs_approval']) echo '
', $txt['deleteAccount_approval'], '
'; // If the user is deleting their own account warn them first - and require a password! if ($context['user']['is_owner']) { echo '
', $txt['own_profile_confirm'], '
', $txt['current_password'], ':      '; if (!empty($context['token_check'])) echo ' '; echo '
'; } // Otherwise an admin doesn't need to enter a password - but they still get a warning - plus the option to delete lovely posts! else { echo '
', $txt['deleteAccount_warning'], '
'; // Only actually give these options if they are kind of important. if ($context['can_delete_posts']) echo '
', $txt['deleteAccount_posts'], ':
'; echo '
'; if (!empty($context['token_check'])) echo ' '; echo '
'; } echo '

'; } // Template for the password box/save button stuck at the bottom of every profile page. function template_profile_save() { global $context, $settings, $options, $txt; echo '
'; // Only show the password box if it's actually needed. if ($context['require_password']) echo '
', $txt['current_password'], ':
', $txt['required_security_reasons'], '
'; echo '
'; } // Small template for showing an error message upon a save problem in the profile. function template_error_message() { global $context, $txt; echo '
', !empty($context['custom_error_title']) ? $context['custom_error_title'] : $txt['profile_errors_occurred'], ':
'; } // Display a load of drop down selectors for allowing the user to change group. function template_profile_group_manage() { global $context, $txt, $scripturl; echo '
', $txt['primary_membergroup'], ':
(', $txt['moderator_why_missing'], ')
', $txt['additional_membergroups'], ':
'; // For each membergroup show a checkbox so members can be assigned to more than one group. foreach ($context['member_groups'] as $member_group) if ($member_group['can_be_additional']) echo '
'; echo '
'; } // Callback function for entering a birthdate! function template_profile_birthdate() { global $txt, $context; // Just show the pretty box! echo '
', $txt['dob'], ':
', $txt['dob_year'], ' - ', $txt['dob_month'], ' - ', $txt['dob_day'], '
- -
'; } // Show the signature editing box? function template_profile_signature_modify() { global $txt, $context, $settings; echo '
', $txt['signature'], ':
', $txt['sig_info'], '

'; if ($context['show_spellchecking']) echo ' '; echo '

'; // If there is a limit at all! if (!empty($context['signature_limits']['max_length'])) echo ' ', sprintf($txt['max_sig_characters'], $context['signature_limits']['max_length']), ' ', $context['signature_limits']['max_length'], '
'; if ($context['signature_warning']) echo ' ', $context['signature_warning'], ''; // Load the spell checker? if ($context['show_spellchecking']) echo ' '; // Some javascript used to count how many characters have been used so far in the signature. echo '
'; } function template_profile_avatar_select() { global $context, $txt, $modSettings; // Start with the upper menu echo '
', $txt['personal_picture'], '
', !empty($context['member']['avatar']['allow_server_stored']) ? '
' : '', ' ', !empty($context['member']['avatar']['allow_external']) ? '
' : '', ' ', !empty($context['member']['avatar']['allow_upload']) ? '' : '', '
'; // If users are allowed to choose avatars stored on the server show selection boxes to choice them from. if (!empty($context['member']['avatar']['allow_server_stored'])) { echo '
Do Nothing
'; } // If the user can link to an off server avatar, show them a box to input the address. if (!empty($context['member']['avatar']['allow_external'])) { echo '
', $txt['avatar_by_url'], '
'; } // If the user is able to upload avatars to the server show them an upload box. if (!empty($context['member']['avatar']['allow_upload'])) { echo '
', ($context['member']['avatar']['id_attach'] > 0 ? '

' : ''), '
'; } echo '
'; } // Callback for modifying karam. function template_profile_karma_modify() { global $context, $modSettings, $txt; echo '
', $modSettings['karmaLabel'], '
', $modSettings['karmaApplaudLabel'], ' ', $modSettings['karmaSmiteLabel'], '
(', $txt['total'], ': ', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), ')
'; } // Select the time format! function template_profile_timeformat_modify() { global $context, $modSettings, $txt, $scripturl, $settings; echo '
', $txt['time_format'], ':
', $txt['help'], '  ', $txt['date_format'], '

'; } // Time offset? function template_profile_timeoffset_modify() { global $txt, $context; echo '
', $txt['time_offset'], ':
', $txt['personal_time_offset'], '
', $txt['timeoffset_autodetect'], '
', $txt['current_time'], ': ', $context['current_forum_time'], '
'; } // Theme? function template_profile_theme_pick() { global $txt, $context, $scripturl; echo '
', $txt['current_theme'], ':
', $context['member']['theme']['name'], ' ', $txt['change'], '
'; } // Smiley set picker. function template_profile_smiley_pick() { global $txt, $context, $modSettings, $settings; echo '
', $txt['smileys_current'], ':
:)
'; } // Change the way you login to the forum. function template_authentication_method() { global $context, $settings, $options, $scripturl, $modSettings, $txt; // The main header! echo '

', $txt['authentication'], '

', $txt['change_authentication'], '

 (?)
', $txt['authenticate_openid_url'], ':
', $txt['choose_pass'], ':
', $txt['verify_pass'], ':
'; if ($context['require_password']) echo '
', $txt['current_password'], ':
', $txt['required_security_reasons'], '
'; echo '
'; if (!empty($context['token_check'])) echo ' '; echo '
'; // The password stuff. echo ' '; } ?>