'; // Prevent Chrome from auto completing fields when viewing/editing other members profiles if (isBrowser('is_chrome') && !$context['user']['is_owner']) echo ' '; // If an error occurred while trying to save previously, give the user a clue! 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 '

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

', $context['member']['avatar']['image'], '
    '; // @TODO fix the
      when no fields are visible // 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' && $context['can_send_email']) 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']['label'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $context['member']['online']['label'] . '' : ''; // 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'], ')
'; if ($context['can_send_email']) { // 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'], '

', !empty($context['page_index']) ? '
' : ''; // Button shortcuts $quote_button = create_button('quote.png', 'reply_quote', 'quote', 'class="centericon"'); $reply_button = create_button('reply_sm.png', 'reply', 'reply', 'class="centericon"'); $remove_button = create_button('delete.png', 'remove_message', 'remove', 'class="centericon"'); $notify_button = create_button('notify_sm.png', 'notify_replies', 'notify', 'class="centericon"'); // 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'], '
'; 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 template_show_list('attachments'); // No posts? Just end the table with a informative message. if ((isset($context['attachments']) && empty($context['attachments'])) || (!isset($context['attachments']) && empty($context['posts']))) echo ' ', isset($context['attachments']) ? $txt['show_attachments_none'] : ($context['is_topics'] ? $txt['show_topics_none'] : $txt['show_posts_none']), ' '; echo ' '; // Show more page numbers. if (!empty($context['page_index'])) echo '
'; } // Template for showing all the drafts of the user. function template_showDrafts() { global $context, $settings, $options, $scripturl, $modSettings, $txt; echo '
'; // Button shortcuts $edit_button = create_button('modify_inline.png', 'draft_edit', 'draft_edit', 'class="centericon"'); $remove_button = create_button('delete.png', 'draft_delete', 'draft_delete', 'class="centericon"'); // No drafts? Just show an informative message. if (empty($context['drafts'])) echo '
', $txt['draft_none'], '
'; else { // For every draft to be displayed, give it its own div, and show the important details of the draft. foreach ($context['drafts'] as $draft) { echo '
', $draft['counter'], '
', $draft['board']['name'], ' / ', $draft['topic']['link'], '    '; if (!empty($draft['sticky'])) echo '', $txt['sticky_topic'], ''; if (!empty($draft['locked'])) echo '', $txt['locked_topic'], ''; echo '
« ', $txt['on'], ': ', $draft['time'], ' »
', $draft['body'], '
'; } } // Show page numbers. echo '
'; } // Template for showing all the buddies of the current user. function template_editBuddies() { global $context, $settings, $options, $scripturl, $modSettings, $txt; $disabled_fields = isset($modSettings['disabled_profile_fields']) ? array_flip(explode(',', $modSettings['disabled_profile_fields'])) : array(); $buddy_fields = array('icq', 'aim', 'yim', 'msn'); echo '

', $txt['editBuddies'], '

'; if ($context['can_send_email']) echo ' '; // don't show them if they are disabled foreach ($buddy_fields as $key => $column) { if (!isset($disabled_fields[$column])) echo ' '; } echo ' '; // 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 ' '; if ($context['can_send_email']) echo ' '; // If these are off, don't show them foreach ($buddy_fields as $key => $column) { if (!isset($disabled_fields[$column])) echo ' '; } echo ' '; $alternate = !$alternate; } echo '
', $txt['name'], ' ', $txt['status'], '', $txt['email'], '', $txt[$column], '
', $txt['no_buddies'], '
', $buddy['link'], ' ', $buddy['online']['text'], '', ($buddy['show_email'] == 'no' ? '' : '' . $txt['email'] . ''), '', $buddy[$column]['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 ($context['can_send_email']) echo ' '; echo ' '; // 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 ' '; if ($context['can_send_email']) echo ' '; 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']['text'], '', ($member['show_email'] == 'no' ? '' : '' . $txt['email'] . ''), '', $member['icq']['link'], ' ', $member['aim']['link'], ' ', $member['yim']['link'], ' ', $member['msn']['link'], ' ', $txt['ignore_remove'], '
'; // Add to the ignore list? 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'], '


'; // 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), '
'; } echo '

'; 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_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['type'] !== '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'], '
'; // Only show the password box if it's actually needed. if ($context['require_password']) echo '

', $txt['required_security_reasons'], '
'; // 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 '
'; if ($settings['allow_no_censored']) echo '
'; echo '
'; if (!empty($modSettings['enable_buddylist'])) echo '
'; echo '
'; // Choose WYSIWYG settings? if (empty($modSettings['disable_wysiwyg'])) echo '
'; if (empty($modSettings['disableCustomPerPage'])) { echo '
'; } if (!empty($modSettings['cal_enabled'])) echo '
'; if (!empty($modSettings['drafts_enabled']) && !empty($modSettings['drafts_autosave_enabled'])) echo '
'; if (!empty($modSettings['drafts_enabled']) && !empty($modSettings['drafts_show_saved_enabled'])) echo '
'; 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 '

', !empty($context['token_check']) ? ' ' : '', '

'; 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['viewWarning_help'], '

', $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'], '


'; } echo '
'; if (!empty($context['token_check'])) echo ' '; echo '
'; // Previous warnings? template_show_list('view_warnings'); // 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 '
'; if (!empty($context['post_errors'])) { echo ' ', !empty($context['custom_error_title']) ? $context['custom_error_title'] : $txt['profile_errors_occurred'], ': '; } echo '
'; } // 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, $scripturl; echo ' '; echo ' '; 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 (!empty($context['show_preview_button'])) echo ' '; 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 '

', !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['help'], '  

'; } // Time offset? function template_profile_timeoffset_modify() { global $txt, $context; echo '

', $txt['personal_time_offset'], '
', $txt['hours'], ' [', $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 '
:)
'; } // 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 ' '; } ?>