/themes/CurveClassic/Profile.template.php
PHP | 3386 lines | 2757 code | 392 blank | 237 comment | 303 complexity | e22b6da194d67b2d760207a6a747e199 MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-3.0
Large files files are truncated, but you can click here to view the full file
- <?php
- /**
- * @name ElkArte Forum
- * @copyright ElkArte Forum contributors
- * @license BSD http://opensource.org/licenses/BSD-3-Clause
- *
- * This software is a derived product, based on:
- *
- * Simple Machines Forum (SMF)
- * copyright: 2011 Simple Machines (http://www.simplemachines.org)
- * license: BSD, See included LICENSE.TXT for terms and conditions.
- *
- * @version 1.0 Alpha
- */
- // Template for the profile side bar - goes before any other profile template.
- function template_profile_above()
- {
- global $context, $settings, $options, $scripturl, $modSettings, $txt;
- echo '
- <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/profile.js"></script>';
- // Prevent Chrome from auto completing fields when viewing/editing other members profiles
- if (isBrowser('is_chrome') && !$context['user']['is_owner'])
- echo '
- <script type="text/javascript"><!-- // --><![CDATA[
- disableAutoComplete();
- // ]]></script>';
- // 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 '
- <div class="infobox">
- ', $context['profile_updated'], '
- </div>';
- }
- // 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_action_summary()
- {
- // Header block(s)
- echo '
- <div id="profile_header">';
- template_profile_block_buddies();
- echo '
- </div>';
- // left and right blocks, entered as left, right, left, right
- $templates = array(
- 'summary',
- 'user_info',
- 'other_info',
- 'contact',
- 'user_customprofileinfo',
- 'moderation',
- );
- $left = true;
- echo '
- <div id="profile_summary_container">';
- foreach ($templates as $template)
- {
- echo '
- <div class="float', $left ? 'left' : 'right', '" style="width:49.5%; margin:2px 2px; padding:0">
- <div>';
- $tcall = 'template_profile_block_' . $template;
- $tcall();
- echo '
- </div>
- </div>';
- // next row?
- if (!$left)
- echo '
- <br class="clear" />';
- $left = !$left;
- }
- // clear up odd number of blocks
- if (!$left)
- echo '
- <br class="clear" />';
- // end of the sidexside container
- echo'
- </div>';
- // Footer Block(s)
- echo '
- <div id="profile_footer">';
- template_profile_block_attachments();
- echo '
- <br class="clear" />
- </div>';
- }
- // Template for showing all the posts of the user, in chronological order.
- function template_action_showPosts()
- {
- global $context, $settings, $options, $scripturl, $modSettings, $txt;
- echo '
- <div class="cat_bar">
- <h3 class="catbg">
- ', (!isset($context['attachments']) && empty($context['is_topics']) ? $txt['showMessages'] : (!empty($context['is_topics']) ? $txt['showTopics'] : $txt['showAttachments'])), ' - ', $context['member']['name'], '
- </h3>
- </div>';
- // 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 '
- <div class="', $post['alternate'] == 0 ? 'windowbg2' : 'windowbg', ' core_posts">
- <div class="content">
- <div class="counter">', $post['counter'], '</div>
- <div class="topic_details">
- <h5><strong><a href="', $scripturl, '?board=', $post['board']['id'], '.0">', $post['board']['name'], '</a> / <a href="', $scripturl, '?topic=', $post['topic'], '.', $post['start'], '#msg', $post['id'], '">', $post['subject'], '</a></strong></h5>
- <span class="smalltext">« <strong>', $txt['on'], ':</strong> ', $post['time'], ' »</span>
- </div>
- <div class="list_posts">';
- if (!$post['approved'])
- echo '
- <div class="approve_post">
- <em>', $txt['post_awaiting_approval'], '</em>
- </div>';
- echo '
- ', $post['body'], '
- </div>';
- if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete'])
- echo '
- <ul class="quickbuttons">';
- // If they *can* reply?
- if ($post['can_reply'])
- echo '
- <li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '" class="reply_button"><span>', $txt['reply'], '</span></a></li>';
- // If they *can* quote?
- if ($post['can_quote'])
- echo '
- <li><a href="', $scripturl . '?action=post;topic=', $post['topic'], '.', $post['start'], ';quote=', $post['id'], '" class="quote_button"><span>', $txt['quote'], '</span></a></li>';
- // Can we request notification of topics?
- if ($post['can_mark_notify'])
- echo '
- <li><a href="', $scripturl, '?action=notify;topic=', $post['topic'], '.', $post['start'], '" class="notify_button"><span>', $txt['notify'], '</span></a></li>';
- // How about... even... remove it entirely?!
- if ($post['can_delete'])
- echo '
- <li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';profile;u=', $context['member']['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');" class="remove_button"><span>', $txt['remove'], '</span></a></li>';
- if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete'])
- echo '
- </ul>';
- echo '
- </div>
- </div>';
- }
- }
- 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 '
- <div class="tborder windowbg2 padding centertext" >
- ', isset($context['attachments']) ? $txt['show_attachments_none'] : ($context['is_topics'] ? $txt['show_topics_none'] : $txt['show_posts_none']), '
- </div>';
- }
- // Template for showing all the drafts of the user.
- function template_showDrafts()
- {
- global $context, $settings, $options, $scripturl, $modSettings, $txt;
- echo '
- <div class="pagesection">
- <div class="floatleft">
- ', $txt['pages'], ': ', $context['page_index'], '
- </div>
- </div>';
- // No drafts? Just show an informative message.
- if (empty($context['drafts']))
- echo '
- <div class="tborder windowbg2 padding centertext">
- ', $txt['draft_none'], '
- </div>';
- 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 '
- <div class="', $draft['alternate'] === 0 ? 'windowbg2' : 'windowbg', ' core_posts">
- <div class="content">
- <div class="counter">', $draft['counter'], '</div>
- <div class="topic_details">
- <h5><strong><a href="', $scripturl, '?board=', $draft['board']['id'], '.0">', $draft['board']['name'], '</a> / ', $draft['topic']['link'], '</strong> ';
- if (!empty($draft['sticky']))
- echo '<img src="', $settings['images_url'], '/icons/quick_sticky.png" alt="', $txt['sticky_topic'], '" title="', $txt['sticky_topic'], '" />';
- if (!empty($draft['locked']))
- echo '<img src="', $settings['images_url'], '/icons/quick_lock.png" alt="', $txt['locked_topic'], '" title="', $txt['locked_topic'], '" />';
- echo '
- </h5>
- <span class="smalltext">« <strong>', $txt['draft_saved_on'], ':</strong> ', ($draft['age'] > 0 ? sprintf($txt['draft_days_ago'], $draft['age']) : $draft['time']), (!empty($draft['remaining']) ? ', ' . sprintf($txt['draft_retain'], $draft['remaining']) : ''), '»</span>
- </div>
- <div class="list_posts">
- ', $draft['body'], '
- </div>
- <ul class="quickbuttons">
- <li>
- <a href="', $scripturl, '?action=post;', (empty($draft['topic']['id']) ? 'board=' . $draft['board']['id'] : 'topic=' . $draft['topic']['id']), '.0;id_draft=', $draft['id_draft'], '" class="reply_button"><span>', $txt['draft_edit'], '</span></a>
- </li>
- <li>
- <a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';area=showdrafts;delete=', $draft['id_draft'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['draft_remove'], '?\');" class="remove_button"><span>', $txt['draft_delete'], '</span></a>
- </li>
- </ul>
- </div>
- </div>';
- }
- }
- // Show page numbers.
- echo '
- <div class="pagesection">
- <div class="floatleft">
- ', $txt['pages'], ': ', $context['page_index'], '
- </div>
- </div>';
- }
- // 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();
- echo '
- <div class="generic_list_wrapper" id="edit_buddies">
- <div class="title_bar">
- <h3 class="titlebg">
- <img src="', $settings['images_url'], '/icons/online.png" alt="" class="icon" />', $txt['editBuddies'], '
- </h3>
- </div>
- <table class="table_grid table_layout">
- <tr class="catbg">
- <th class="first_th" scope="col" width="20%">', $txt['name'], '</th>
- <th scope="col">', $txt['status'], '</th>';
-
- if ($context['can_send_email'])
- echo '
- <th scope="col">', $txt['email'], '</th>';
- echo '
- <th class="last_th" scope="col"></th>
- </tr>';
- // If they don't have any buddies don't list them!
- if (empty($context['buddies']))
- echo '
- <tr class="windowbg2">
- <td colspan="8" align="center"><strong>', $txt['no_buddies'], '</strong></td>
- </tr>';
- // Now loop through each buddy showing info on each.
- $alternate = false;
- foreach ($context['buddies'] as $buddy)
- {
- echo '
- <tr class="', $alternate ? 'windowbg' : 'windowbg2', '">
- <td>', $buddy['link'], '</td>
- <td align="center"><a href="', $buddy['online']['href'], '"><img src="', $buddy['online']['image_href'], '" alt="', $buddy['online']['text'], '" title="', $buddy['online']['text'], '" /></a></td>';
- if ($context['can_send_email'])
- echo '
- <td align="center">', ($buddy['show_email'] == 'no' ? '' : '<a href="' . $scripturl . '?action=emailuser;sa=email;uid=' . $buddy['id'] . '" rel="nofollow"><img src="' . $settings['images_url'] . '/email_sm.png" alt="' . $txt['email'] . '" title="' . $txt['email'] . ' ' . $buddy['name'] . '" /></a>'), '</td>';
- echo '
- <td align="center"><a href="', $scripturl, '?action=profile;area=lists;sa=buddies;u=', $context['id_member'], ';remove=', $buddy['id'], ';', $context['session_var'], '=', $context['session_id'], '"><img src="', $settings['images_url'], '/icons/delete.png" alt="', $txt['buddy_remove'], '" title="', $txt['buddy_remove'], '" /></a></td>
- </tr>';
- $alternate = !$alternate;
- }
- echo '
- </table>
- </div>';
- // Add a new buddy?
- echo '
- <form action="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=lists;sa=buddies" method="post" accept-charset="UTF-8">
- <div class="tborder add_buddy">
- <div class="title_bar">
- <h3 class="titlebg">', $txt['buddy_add'], '</h3>
- </div>
- <div class="roundframe">
- <dl class="settings">
- <dt>
- <label for="new_buddy"><strong>', $txt['who_member'], ':</strong></label>
- </dt>
- <dd>
- <input type="text" name="new_buddy" id="new_buddy" size="30" class="input_text" />
- </dd>
- </dl>';
- if (!empty($context['token_check']))
- echo '
- <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
- echo '
- <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
- <input type="submit" value="', $txt['buddy_add_button'], '" class="button_submit" />
- <br class="clear_right" />
- </div>
- </div>
- </form>
- <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
- <script type="text/javascript"><!-- // --><![CDATA[
- var oAddBuddySuggest = new smc_AutoSuggest({
- sSelf: \'oAddBuddySuggest\',
- sSessionId: smf_session_id,
- sSessionVar: smf_session_var,
- sSuggestId: \'new_buddy\',
- sControlId: \'new_buddy\',
- sSearchType: \'member\',
- sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\',
- bItemList: false
- });
- // ]]></script>';
- }
- // Template for showing the ignore list of the current user.
- function template_editIgnoreList()
- {
- global $context, $settings, $options, $scripturl, $modSettings, $txt;
- echo '
- <div class="generic_list_wrapper" id="edit_buddies">
- <div class="title_bar">
- <h3 class="titlebg">
- <img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['editIgnoreList'], '
- </h3>
- </div>
- <table class="table_grid table_layout">
- <tr class="catbg">
- <th class="first_th" scope="col" width="20%">', $txt['name'], '</th>
- <th scope="col">', $txt['status'], '</th>';
- if ($context['can_send_email'])
- echo '
- <th scope="col">', $txt['email'], '</th>';
- echo '
- <th class="last_th" scope="col"></th>
- </tr>';
- // If they don't have anyone on their ignore list, don't list it!
- if (empty($context['ignore_list']))
- echo '
- <tr class="windowbg2">
- <td colspan="8" align="center"><strong>', $txt['no_ignore'], '</strong></td>
- </tr>';
- // Now loop through each buddy showing info on each.
- $alternate = false;
- foreach ($context['ignore_list'] as $member)
- {
- echo '
- <tr class="', $alternate ? 'windowbg' : 'windowbg2', '">
- <td>', $member['link'], '</td>
- <td align="center"><a href="', $member['online']['href'], '"><img src="', $member['online']['image_href'], '" alt="', $member['online']['text'], '" title="', $member['online']['text'], '" /></a></td>';
- if ($context['can_send_email'])
- echo '
- <td align="center">', ($member['show_email'] == 'no' ? '' : '<a href="' . $scripturl . '?action=emailuser;sa=email;uid=' . $member['id'] . '" rel="nofollow"><img src="' . $settings['images_url'] . '/email_sm.png" alt="' . $txt['email'] . '" title="' . $txt['email'] . ' ' . $member['name'] . '" /></a>'), '</td>';
-
- echo '
- <td align="center"><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=lists;sa=ignore;remove=', $member['id'], ';', $context['session_var'], '=', $context['session_id'], '"><img src="', $settings['images_url'], '/icons/delete.png" alt="', $txt['ignore_remove'], '" title="', $txt['ignore_remove'], '" /></a></td>
- </tr>';
- $alternate = !$alternate;
- }
- echo '
- </table>
- </div>';
- // Add to the ignore list?
- echo '
- <form action="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=lists;sa=ignore" method="post" accept-charset="UTF-8">
- <div class="tborder add_buddy">
- <div class="title_bar">
- <h3 class="titlebg">', $txt['ignore_add'], '</h3>
- </div>
- <div class="roundframe">
- <dl class="settings">
- <dt>
- <label for="new_buddy"><strong>', $txt['who_member'], ':</strong></label>
- </dt>
- <dd>
- <input type="text" name="new_ignore" id="new_ignore" size="25" class="input_text" />
- </dd>
- </dl>';
- if (!empty($context['token_check']))
- echo '
- <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
- echo '
- <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
- <input type="submit" value="', $txt['ignore_add_button'], '" class="button_submit" />
- <br class="clear_right" />
- </div>
- </div>
- </form>
- <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
- <script type="text/javascript"><!-- // --><![CDATA[
- var oAddIgnoreSuggest = new smc_AutoSuggest({
- sSelf: \'oAddIgnoreSuggest\',
- sSessionId: smf_session_id,
- sSessionVar: smf_session_var,
- sSuggestId: \'new_ignore\',
- sControlId: \'new_ignore\',
- sSearchType: \'member\',
- sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\',
- bItemList: false
- });
- // ]]></script>';
- }
- // 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 '
- <div class="generic_list_wrapper">
- <div class="title_bar">
- <h3 class="titlebg"><strong>', $txt['view_ips_by'], ' ', $context['member']['name'], '</strong></h3>
- </div>';
- // The last IP the user used.
- echo '
- <div id="tracking" class="windowbg2">
- <div class="content">
- <dl class="noborder">
- <dt>', $txt['most_recent_ip'], ':
- ', (empty($context['last_ip2']) ? '' : '<br />
- <span class="smalltext">(<a href="' . $scripturl . '?action=quickhelp;help=whytwoip" onclick="return reqOverlayDiv(this.href);">' . $txt['why_two_ip_address'] . '</a>)</span>'), '
- </dt>
- <dd>
- <a href="', $scripturl, '?action=profile;area=history;sa=ip;searchip=', $context['last_ip'], ';u=', $context['member']['id'], '">', $context['last_ip'], '</a>';
- // Second address detected?
- if (!empty($context['last_ip2']))
- echo '
- , <a href="', $scripturl, '?action=profile;area=history;sa=ip;searchip=', $context['last_ip2'], ';u=', $context['member']['id'], '">', $context['last_ip2'], '</a>';
- echo '
- </dd>';
- // Lists of IP addresses used in messages / error messages.
- echo '
- <dt>', $txt['ips_in_messages'], ':</dt>
- <dd>
- ', (count($context['ips']) > 0 ? implode(', ', $context['ips']) : '(' . $txt['none'] . ')'), '
- </dd>
- <dt>', $txt['ips_in_errors'], ':</dt>
- <dd>
- ', (count($context['ips']) > 0 ? implode(', ', $context['error_ips']) : '(' . $txt['none'] . ')'), '
- </dd>';
- // List any members that have used the same IP addresses as the current member.
- echo '
- <dt>', $txt['members_in_range'], ':</dt>
- <dd>
- ', (count($context['members_in_range']) > 0 ? implode(', ', $context['members_in_range']) : '(' . $txt['none'] . ')'), '
- </dd>
- </dl>
- </div>
- </div>
- </div>';
- // 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 '
- <div class="tborder">
- <div class="cat_bar">
- <h3 class="catbg">', $txt['trackIP'], '</h3>
- </div>
- <div class="roundframe">
- <form action="', $context['base_url'], '" method="post" accept-charset="UTF-8">
- <dl class="settings">
- <dt>
- <label for="searchip"><strong>', $txt['enter_ip'], ':</strong></label>
- </dt>
- <dd>
- <input type="text" name="searchip" value="', $context['ip'], '" class="input_text" />
- </dd>
- </dl>
- <input type="submit" value="', $txt['trackIP'], '" class="button_submit" />
- <br class="clear_right" />
- </form>
- </div>
- </div>
- <div class="generic_list_wrapper">';
- // The table inbetween the first and second table shows links to the whois server for every region.
- if ($context['single_ip'])
- {
- echo '
- <div class="title_bar">
- <h3 class="titlebg">', $txt['whois_title'], ' ', $context['ip'], '</h3>
- </div>
- <div class="windowbg2">
- <div class="padding">';
- foreach ($context['whois_servers'] as $server)
- echo '
- <a href="', $server['url'], '" target="_blank" class="new_win"', isset($context['auto_whois_server']) && $context['auto_whois_server']['name'] == $server['name'] ? ' style="font-weight: bold;"' : '', '>', $server['name'], '</a><br />';
- echo '
- </div>
- </div>';
- }
- // The second table lists all the members who have been logged as using this IP address.
- echo '
- <div class="title_bar">
- <h3 class="titlebg">', $txt['members_from_ip'], ' ', $context['ip'], '</h3>
- </div>';
- if (empty($context['ips']))
- echo '
- <p class="windowbg2 description"><em>', $txt['no_members_from_ip'], '</em></p>';
- else
- {
- echo '
- <table class="table_grid" cellspacing="0" width="100%">
- <thead>
- <tr class="catbg">
- <th class="first_th" scope="col">', $txt['ip_address'], '</th>
- <th class="last_th" scope="col">', $txt['display_name'], '</th>
- </tr>
- </thead>
- <tbody>';
- // Loop through each of the members and display them.
- foreach ($context['ips'] as $ip => $memberlist)
- echo '
- <tr>
- <td class="windowbg2"><a href="', $context['base_url'], ';searchip=', $ip, '">', $ip, '</a></td>
- <td class="windowbg2">', implode(', ', $memberlist), '</td>
- </tr>';
- echo '
- </tbody>
- </table>';
- }
- echo '
- </div>';
- template_show_list('track_message_list');
- echo '<br />';
- template_show_list('track_user_list');
- }
- function template_action_showPermissions()
- {
- global $context, $settings, $options, $scripturl, $txt;
- echo '
- <div class="cat_bar">
- <h3 class="catbg">
- <img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['showPermissions'], '
- </h3>
- </div>';
- if ($context['member']['has_all_permissions'])
- {
- echo '
- <p class="windowbg description">', $txt['showPermissions_all'], '</p>';
- }
- else
- {
- echo '
- <p class="description">',$txt['showPermissions_help'],'</p>
- <div id="permissions" class="flow_hidden">';
- if (!empty($context['no_access_boards']))
- {
- echo '
- <div class="cat_bar">
- <h3 class="catbg">', $txt['showPermissions_restricted_boards'], '</h3>
- </div>
- <div class="windowbg smalltext">
- <div class="content">', $txt['showPermissions_restricted_boards_desc'], ':<br />';
- foreach ($context['no_access_boards'] as $no_access_board)
- echo '
- <a href="', $scripturl, '?board=', $no_access_board['id'], '.0">', $no_access_board['name'], '</a>', $no_access_board['is_last'] ? '' : ', ';
- echo '
- </div>
- </div>';
- }
- // General Permissions section.
- echo '
- <div class="tborder">
- <div class="cat_bar">
- <h3 class="catbg">', $txt['showPermissions_general'], '</h3>
- </div>';
- if (!empty($context['member']['permissions']['general']))
- {
- echo '
- <table class="table_grid" width="100%" cellspacing="0">
- <thead>
- <tr class="titlebg">
- <th class="lefttext first_th" scope="col" width="50%">', $txt['showPermissions_permission'], '</th>
- <th class="lefttext last_th" scope="col" width="50%">', $txt['showPermissions_status'], '</th>
- </tr>
- </thead>
- <tbody>';
- foreach ($context['member']['permissions']['general'] as $permission)
- {
- echo '
- <tr>
- <td class="windowbg" title="', $permission['id'], '">
- ', $permission['is_denied'] ? '<del>' . $permission['name'] . '</del>' : $permission['name'], '
- </td>
- <td class="windowbg2 smalltext">';
- if ($permission['is_denied'])
- echo '
- <span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']),'</span>';
- else
- echo '
- ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']);
- echo '
- </td>
- </tr>';
- }
- echo '
- </tbody>
- </table>
- </div><br />';
- }
- else
- echo '
- <p class="windowbg2 description">', $txt['showPermissions_none_general'], '</p>';
- // Board permission section.
- echo '
- <div class="tborder">
- <form action="' . $scripturl . '?action=profile;u=', $context['id_member'], ';area=permissions#board_permissions" method="post" accept-charset="UTF-8">
- <div class="cat_bar">
- <h3 class="catbg">
- <a id="board_permissions"></a>', $txt['showPermissions_select'], ':
- <select name="board" onchange="if (this.options[this.selectedIndex].value) this.form.submit();">
- <option value="0"', $context['board'] == 0 ? ' selected="selected"' : '', '>', $txt['showPermissions_global'], ' </option>';
- if (!empty($context['boards']))
- echo '
- <option value="" disabled="disabled">---------------------------</option>';
- // Fill the box with any local permission boards.
- foreach ($context['boards'] as $board)
- echo '
- <option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['name'], ' (', $board['profile_name'], ')</option>';
- echo '
- </select>
- </h3>
- </div>
- </form>';
- if (!empty($context['member']['permissions']['board']))
- {
- echo '
- <table class="table_grid" width="100%" cellspacing="0">
- <thead>
- <tr class="titlebg">
- <th class="lefttext first_th" scope="col" width="50%">', $txt['showPermissions_permission'], '</th>
- <th class="lefttext last_th" scope="col" width="50%">', $txt['showPermissions_status'], '</th>
- </tr>
- </thead>
- <tbody>';
- foreach ($context['member']['permissions']['board'] as $permission)
- {
- echo '
- <tr>
- <td class="windowbg" title="', $permission['id'], '">
- ', $permission['is_denied'] ? '<del>' . $permission['name'] . '</del>' : $permission['name'], '
- </td>
- <td class="windowbg2 smalltext">';
- if ($permission['is_denied'])
- {
- echo '
- <span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '</span>';
- }
- else
- {
- echo '
- ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']);
- }
- echo '
- </td>
- </tr>';
- }
- echo '
- </tbody>
- </table>';
- }
- else
- echo '
- <p class="windowbg2 description">', $txt['showPermissions_none_board'], '</p>';
- echo '
- </div>
- </div>';
- }
- }
- // Template for user statistics, showing graphs and the like.
- function template_action_statPanel()
- {
- global $context, $settings, $options, $scripturl, $modSettings, $txt;
- // First, show a few text statistics such as post/topic count.
- echo '
- <div class="cat_bar">
- <h3 class="catbg">
- <img src="', $settings['images_url'], '/stats_info.png" alt="" class="icon" />
- ', $txt['statPanel_generalStats'], ' - ', $context['member']['name'], '
- </h3>
- </div>
- <div id="profileview">
- <div id="generalstats">
- <div class="windowbg2">
- <div class="content">
- <dl>
- <dt>', $txt['statPanel_total_time_online'], ':</dt>
- <dd>', $context['time_logged_in'], '</dd>
- <dt>', $txt['statPanel_total_posts'], ':</dt>
- <dd>', $context['num_posts'], ' ', $txt['statPanel_posts'], '</dd>
- <dt>', $txt['statPanel_total_topics'], ':</dt>
- <dd>', $context['num_topics'], ' ', $txt['statPanel_topics'], '</dd>
- <dt>', $txt['statPanel_users_polls'], ':</dt>
- <dd>', $context['num_polls'], ' ', $txt['statPanel_polls'], '</dd>
- <dt>', $txt['statPanel_users_votes'], ':</dt>
- <dd>', $context['num_votes'], ' ', $txt['statPanel_votes'], '</dd>
- </dl>
- </div>
- </div>
- </div>';
- // This next section draws a graph showing what times of day they post the most.
- echo '
- <div id="activitytime" class="flow_hidden">
- <div class="cat_bar">
- <h3 class="catbg">
- <img src="', $settings['images_url'], '/stats_history.png" alt="" class="icon" />', $txt['statPanel_activityTime'], '
- </h3>
- </div>
- <div class="windowbg2">
- <div class="content">';
- // If they haven't post at all, don't draw the graph.
- if (empty($context['posts_by_time']))
- echo '
- <span class="centertext">', $txt['statPanel_noPosts'], '</span>';
- // Otherwise do!
- else
- {
- echo '
- <ul class="activity_stats flow_hidden">';
- // The labels.
- foreach ($context['posts_by_time'] as $time_of_day)
- {
- echo '
- <li', $time_of_day['is_last'] ? ' class="last"' : '', '>
- <div class="bar" style="padding-top: ', ((int) (100 - $time_of_day['relative_percent'])), 'px;" title="', sprintf($txt['statPanel_activityTime_posts'], $time_of_day['posts'], $time_of_day['posts_percent']), '">
- <div style="height: ', (int) $time_of_day['relative_percent'], 'px;">
- <span>', sprintf($txt['statPanel_activityTime_posts'], $time_of_day['posts'], $time_of_day['posts_percent']), '</span>
- </div>
- </div>
- <span class="stats_hour">', $time_of_day['hour_format'], '</span>
- </li>';
- }
- echo '
- </ul>';
- }
- echo '
- <span class="clear" />
- </div>
- </div>
- </div>';
- // Two columns with the most popular boards by posts and activity (activity = users posts / total posts).
- echo '
- <div class="flow_hidden">
- <div id="popularposts">
- <div class="cat_bar">
- <h3 class="catbg">
- <img src="', $settings['images_url'], '/stats_replies.png" alt="" class="icon" />', $txt['statPanel_topBoards'], '
- </h3>
- </div>
- <div class="windowbg2">
- <div class="content">';
- if (empty($context['popular_boards']))
- echo '
- <span class="centertext">', $txt['statPanel_noPosts'], '</span>';
- else
- {
- echo '
- <dl>';
- // Draw a bar for every board.
- foreach ($context['popular_boards'] as $board)
- {
- echo '
- <dt>', $board['link'], '</dt>
- <dd>
- <div class="profile_pie" style="background-position: -', ((int) ($board['posts_percent'] / 5) * 20), 'px 0;" title="', sprintf($txt['statPanel_topBoards_memberposts'], $board['posts'], $board['total_posts_member'], $board['posts_percent']), '">
- ', sprintf($txt['statPanel_topBoards_memberposts'], $board['posts'], $board['total_posts_member'], $board['posts_percent']), '
- </div>
- <span>', empty($context['hide_num_posts']) ? $board['posts'] : '', '</span>
- </dd>';
- }
- echo '
- </dl>';
- }
- echo '
- </div>
- </div>
- </div>';
- echo '
- <div id="popularactivity">
- <div class="cat_bar">
- <h3 class="catbg">
- <img src="', $settings['images_url'], '/stats_replies.png" alt="" class="icon" />', $txt['statPanel_topBoardsActivity'], '
- </h3>
- </div>
- <div class="windowbg2">
- <div class="content">';
- if (empty($context['board_activity']))
- echo '
- <span>', $txt['statPanel_noPosts'], '</span>';
- else
- {
- echo '
- <dl>';
- // Draw a bar for every board.
- foreach ($context['board_activity'] as $activity)
- {
- echo '
- <dt>', $activity['link'], '</dt>
- <dd>
- <div class="profile_pie" style="background-position: -', ((int) ($activity['percent'] / 5) * 20), 'px 0;" title="', sprintf($txt['statPanel_topBoards_posts'], $activity['posts'], $activity['total_posts'], $activity['posts_percent']), '">
- ', sprintf($txt['statPanel_topBoards_posts'], $activity['posts'], $activity['total_posts'], $activity['posts_percent']), '
- </div>
- <span>', $activity['percent'], '%</span>
- </dd>';
- }
- echo '
- </dl>';
- }
- echo '
- </div>
- </div>
- </div>
- </div>';
- echo '
- </div>';
- }
- // Template for editing profile options.
- function template_edit_options()
- {
- global $context, $settings, $options, $scripturl, $modSettings, $txt;
- // The main header!
- echo '
- <form action="', (!empty($context['profile_custom_submit_url']) ? $context['profile_custom_submit_url'] : $scripturl . '?action=profile;area=' . $context['menu_item_selected'] . ';u=' . $context['id_member']), '" method="post" accept-charset="UTF-8" name="creator" id="creator" enctype="multipart/form-data" onsubmit="return checkProfileSubmit();">
- <div class="cat_bar">
- <h3 class="catbg">
- <img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />';
- // 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 '
- </h3>
- </div>';
- // Have we some description?
- if ($context['page_desc'])
- echo '
- <p class="windowbg description">', $context['page_desc'], '</p>';
- echo '
- <div class="windowbg2">
- <div class="content">';
- // Any bits at the start?
- if (!empty($context['profile_prehtml']))
- echo '
- <div>', $context['profile_prehtml'], '</div>';
- if (!empty($context['profile_fields']))
- echo '
- <dl>';
- // 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 '
- </dl>
- <hr width="100%" size="1" class="hrcolor clear" />
- <dl>';
- }
- 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 '
- <dt>
- <strong', !empty($field['is_error']) ? ' class="error"' : '', '>', $field['type'] !== 'label' ? '<label for="' . $key . '">' : '', $field['label'], $field['type'] !== 'label' ? '</label>' : '', '</strong>';
- // Does it have any subtext to show?
- if (!empty($field['subtext']))
- echo '
- <br />
- <span class="smalltext">', $field['subtext'], '</span>';
- echo '
- </dt>
- <dd>';
- // 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 '
- <input type="', $field['type'] == 'password' ? 'password' : 'text', '" name="', $key, '" id="', $key, '" size="', empty($field['size']) ? 30 : $field['size'], '" value="', $field['value'], '" ', $field['input_attr'], ' class="input_', $field['type'] == 'password' ? 'password' : 'text', '" />';
- // You "checking" me out? ;)
- elseif ($field['type'] == 'check')
- echo '
- <input type="hidden" name="', $key, '" value="0" /><input type="checkbox" name="', $key, '" id="', $key, '" ', !empty($field['value']) ? ' checked="checked"' : '', ' value="1" class="input_check" ', $field['input_attr'], ' />';
- // Always fun - select boxes!
- elseif ($field['type'] == 'select')
- {
- echo '
- <select name="', $key, '" id="', $key, '">';
- if (isset($field['options']))
- {
- // Is this some code to generate the options?
- if (!is_array($field['options']))
- $field['options'] = eval($field['options']);
- // Assuming we now have some!
- if (is_array($field['options']))
- foreach ($field['options'] as $value => $name)
- echo '
- <option value="', $value, '" ', $value == $field['value'] ? 'selected="selected"' : '', '>', $name, '</option>';
- }
- echo '
- </select>';
- }
- // Something to end with?
- if (!empty($field['postinput']))
- echo '
- ', $field['postinput'];
- echo '
- </dd>';
- }
- }
- if (!empty($context['profile_fields']))
- echo '
- </dl>';
- // Are there any custom profile fields - if so print them!
- if (!empty($context['custom_fields']))
- {
- if ($lastItem != 'hr')
- echo '
- <hr width="100%" size="1" class="hrcolor clear" />';
- echo '
- <dl>';
- foreach ($context['custom_fields'] as $field)
- {
- echo '
- <dt>
- <strong>', $field['name'], ': </strong><br />
- <span class="smalltext">', $field['desc'], '</span>
- </dt>
- <dd>
- ', $field['input_html'], '
- </dd>';
- }
- echo '
- </dl>';
- }
- // Any closing HTML?
- if (!empty($context['profile_posthtml']))
- echo '
- <div>', $context['profile_posthtml'], '</div>';
- // Only show the password box if it's actually needed.
- if ($context['require_password'])
- echo '
- <dl>
- <dt>
- <strong', isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : '', '><label for="oldpasswrd">', $txt['current_password'], ': </label></strong><br />
- <span class="smalltext">', $txt['required_security_reasons'], '</span>
- </dt>
- <dd>
- <input type="password" name="oldpasswrd" id="oldpasswrd" size="20" style="margin-right: 4ex;" class="input_password" />
- </dd>
- </dl>';
- echo '
- <hr class="hrcolor" />';
- // The button shouldn't say "Change profile" unless we're changing the profile...
- if (!empty($context['submit_button_text']))
- echo '
- <input type="submit" name="save" value="', $context['submit_button_text'], '" class="button_submit" />';
- else
- echo '
- <input type="submit" name="save" value="', $txt['change_profile'], '" class="button_submit" />';
- if (!empty($context['token_check']))
- echo '
- <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
- echo '
- <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
- <input type="hidden" name="u" value="', $context['id_member'], '" />
- <input type="hidden" name="sa" value="', $context['menu_item_selected'], '" />
- </div>
- </div>
- </form>';
- // Some javascript!
- echo '
- <script type="text/javascript"><!-- // --><![CDATA[
- function checkProfileSubmit()
- {';
- // If this part requires a password, make sure to give a warning.
- if ($context['require_password'])
- echo '
- // Did you forget to type your password?
- if (document.forms.creator.oldpasswrd.value == "")
- {
- alert("', $txt['required_security_reasons'], '");
- return false;
- }';
- // Any onsubmit javascript?
- if (!empty($context['profile_onsubmit_javascript']))
- echo '
- ', $context['profile_javascript'];
- echo '
- }';
- // Any totally custom stuff?
- if (!empty($context['profile_javascript']))
- echo '
- ', $context['profile_javascript'];
- echo '
- // ]]></script>';
- // Any final spellchecking stuff?
- if (!empty($context['show_spellchecking']))
- echo '
- <form name="spell_form" id="spell_form" method="post" accept-charset="UTF-8" target="spellWindow" action="', $scripturl, '?action=spellcheck">
- <input type="hidden" name="spellstring" value="" />
- <input type="hidden" name="fulleditor" value="" />
- </form>
- <script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/spellcheck.js"></script>';
- }
- // Personal Message settings.
- function template_profile_pm_settings()
- {
- global $context, $settings, $options, $scripturl, $modSettings, $txt;
- echo '
- <dt>
- <label for="pm_prefs">', $txt['pm_display_mode'], ':</label>
- </dt>
- <dd>
- <select name="pm_prefs" id="pm_prefs" onchange="if (this.value == 2 && !document.getElementById(\'copy_to_outbox\').checked) alert(\'', $txt['pm_recommend_enable_outbox'], '\');">
- <option value="0"', $context['display_mode'] == 0 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_all'], '</option>
- <option value="1"', $context['display_mode'] == 1 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_one'], '</option>
- <option value="2"', $context['display_mode'] == 2 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_linked'], '</option>
- </select>
- </dd>
- <dt>
- <label for="view_newest_pm_first">', $txt['recent_pms_at_top'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[view_newest_pm_first]" value="0" />
- <input type="checkbox" name="default_options[view_newest_pm_first]" id="view_newest_pm_first" value="1"', !empty($context['member']['options']['view_newest_pm_first']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>
- </dl>
- <hr />
- <dl>
- <dt>
- <label for="pm_receive_from">', $txt['pm_receive_from'], '</label>
- </dt>
- <dd>
- <select name="pm_receive_from" id="pm_receive_from">
- <option value="0"', empty($context['receive_from']) || (empty($modSettings['enable_buddylist']) && $context['receive_from'] < 3) ? ' selected="selected"' : '', '>', $txt['pm_receive_from_everyone'], '</option>';
- if (!empty($modSettings['enable_buddylist']))
- echo '
- <option value="1"', !empty($context['receive_from']) && $context['receive_from'] == 1 ? ' selected="selected"' : '', '>', $txt['pm_receive_from_ignore'], '</option>
- <option value="2"', !empty($context['receive_from']) && $context['receive_from'] == 2 ? ' selected="selected"' : '', '>', $txt['pm_receive_from_buddies'], '</option>';
- echo '
- <option value="3"', !empty($context['receive_from']) && $context['receive_from'] > 2 ? ' selected="selected"' : '', '>', $txt['pm_receive_from_admins'], '</option>
- </select>
- </dd>
- <dt>
- <label for="pm_email_notify">', $txt['email_notify'], '</label>
- </dt>
- <dd>
- <select name="pm_email_notify" id="pm_email_notify">
- <option value="0"', empty($context['send_email']) ? ' selected="selected"' : '', '>', $txt['email_notify_never'], '</option>
- <option value="1"', !empty($context['send_email']) && ($context['send_email'] == 1 || (empty($modSettings['enable_buddylist']) && $context['send_email'] > 1)) ? ' selected="selected"' : '', '>', $txt['email_notify_always'], '</option>';
- if (!empty($modSettings['enable_buddylist']))
- echo '
- <option value="2"', !empty($context['send_email']) && $context['send_email'] > 1 ? ' selected="selected"' : '', '>', $txt['email_notify_buddies'], '</option>';
- echo '
- </select>
- </dd>
- <dt>
- <label for="popup_messages">', $txt['popup_messages'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[popup_messages]" value="0" />
- <input type="checkbox" name="default_options[popup_messages]" id="popup_messages" value="1"', !empty($context['member']['options']['popup_messages']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>
- </dl>
- <hr />
- <dl>
- <dt>
- <label for="copy_to_outbox"> ', $txt['copy_to_outbox'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[copy_to_outbox]" value="0" />
- <input type="checkbox" name="default_options[copy_to_outbox]" id="copy_to_outbox" value="1"', !empty($context['member']['options']['copy_to_outbox']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>
- <dt>
- <label for="pm_remove_inbox_label">', $txt['pm_remove_inbox_label'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[pm_remove_inbox_label]" value="0" />
- <input type="checkbox" name="default_options[pm_remove_inbox_label]" id="pm_remove_inbox_label" value="1"', !empty($context['member']['options']['pm_remove_inbox_label']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>';
- }
- // 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 '
- <dt>
- <label for="show_board_desc">', $txt['board_desc_inside'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[show_board_desc]" value="0" />
- <input type="checkbox" name="default_options[show_board_desc]" id="show_board_desc" value="1"', !empty($context['member']['options']['show_board_desc']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>
- <dt>
- <label for="show_children">', $txt['show_children'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[show_children]" value="0" />
- <input type="checkbox" name="default_options[show_children]" id="show_children" value="1"', !empty($context['member']['options']['show_children']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>
- <dt>
- <label for="use_sidebar_menu">', $txt['use_sidebar_menu'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[use_sidebar_menu]" value="0" />
- <input type="checkbox" name="default_options[use_sidebar_menu]" id="use_sidebar_menu" value="1"', !empty($context['member']['options']['use_sidebar_menu']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>
- <dt>
- <label for="show_no_avatars">', $txt['show_no_avatars'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[show_no_avatars]" value="0" />
- <input type="checkbox" name="default_options[show_no_avatars]" id="show_no_avatars" value="1"', !empty($context['member']['options']['show_no_avatars']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>
- <dt>
- <label for="show_no_signatures">', $txt['show_no_signatures'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[show_no_signatures]" value="0" />
- <input type="checkbox" name="default_options[show_no_signatures]" id="show_no_signatures" value="1"', !empty($context['member']['options']['show_no_signatures']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>';
- if ($settings['allow_no_censored'])
- echo '
- <dt>
- <label for="show_no_censored">' . $txt['show_no_censored'] . '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[show_no_censored]" value="0" />
- <input type="checkbox" name="default_options[show_no_censored]" id="show_no_censored" value="1"' . (!empty($context['member']['options']['show_no_censored']) ? ' checked="checked"' : '') . ' class="input_check" />
- </dd>';
- echo '
- <dt>
- <label for="return_to_post">', $txt['return_to_post'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[return_to_post]" value="0" />
- <input type="checkbox" name="default_options[return_to_post]" id="return_to_post" value="1"', !empty($context['member']['options']['return_to_post']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>
- <dt>
- <label for="no_new_reply_warning">', $txt['no_new_reply_warning'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[no_new_reply_warning]" value="0" />
- <input type="checkbox" name="default_options[no_new_reply_warning]" id="no_new_reply_warning" value="1"', !empty($context['member']['options']['no_new_reply_warning']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>';
- if (!empty($modSettings['enable_buddylist']))
- echo '
- <dt>
- <label for="posts_apply_ignore_list">', $txt['posts_apply_ignore_list'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[posts_apply_ignore_list]" value="0" />
- <input type="checkbox" name="default_options[posts_apply_ignore_list]" id="posts_apply_ignore_list" value="1"', !empty($context['member']['options']['posts_apply_ignore_list']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>';
- echo '
- <dt>
- <label for="view_newest_first">', $txt['recent_posts_at_top'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[view_newest_first]" value="0" />
- <input type="checkbox" name="default_options[view_newest_first]" id="view_newest_first" value="1"', !empty($context['member']['options']['view_newest_first']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>';
- // Choose WYSIWYG settings?
- if (empty($modSettings['disable_wysiwyg']))
- echo '
- <dt>
- <label for="wysiwyg_default">', $txt['wysiwyg_default'], '</label>
- </dt>
- <dd>
- <input type="hidden" name="default_options[wysiwyg_default]" value="0" />
- <input type="checkbox" name="default_options[wysiwyg_default]" id="wysiwyg_default" value="1"', !empty($context['member']['options']['wysiwyg_default']) ? ' checked="checked"' : '', ' class="input_check" />
- </dd>';
- if (empty($modSettings['disableCustomPerPage']))
- {
- echo '
- <dt>
- <label for="topics_per_page">', $txt['topics_per_page'], '</label>
- </dt>
- <dd>
- <select name="default_options[topics_per_page]" id="topics_per_page">
- <option value="0"', empty($context['member']['options']['topics_per_page']) ? ' selected="selected"' : '', '>', $txt['per_page_default'], ' (', $modSettings['defaultMaxTopics'], ')</option>
- <option value="5"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 5 ? ' selected="selected"' : '', '>5</option>
- <option value="10"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 10 ? ' selected="selected"' : '', '>10</option>
- <option value="25"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 25 ? ' selected="selected"' : '', '>25</option>
- <option value="50"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 50 ? ' selected="selected"' : '', '>50</option>
- </select>
- </dd>
- <dt>
- <label for="messages_per_page">', $txt['messages_per_page'], '</label>
- </dt>
- <dd>
- <select name="default_options[messages_per_page]" id="messages_per_page">
- <option value="0"', empty($context['member']['options']['messages…
Large files files are truncated, but you can click here to view the full file