commit bfecece60dd0fcf0c139747425513d0d4b9bb570 Author: Antoine Le Gonidec Date: Wed Jul 24 10:55:50 2024 +0200 Import the theme from the Khaganat forum diff --git a/Admin.template.php b/Admin.template.php new file mode 100644 index 0000000..5b69864 --- /dev/null +++ b/Admin.template.php @@ -0,0 +1,1672 @@ +'; + + echo ' +
'; + + // Display the "live news" from simplemachines.org. + echo ' +
+
+

+ ', $txt['live'], ' +

+
+
+
', $txt['smf_news_cant_connect'], '
+
+
'; + + // Show the user version information from their server. + echo ' +
+ +
+
+ ', $txt['support_versions'], ':
+ ', $txt['support_versions_forum'], ': + ', $context['forum_version'], '
+ ', $txt['support_versions_current'], ': + ??
+ ', $context['can_admin'] ? '' . $txt['version_check_more'] . '' : '', '
'; + + // Display all the members who can administrate the forum. + echo ' +
+ ', $txt['administrators'], ': + ', implode(', ', $context['administrators']); + + // If we have lots of admins... don't show them all. + if (!empty($context['more_admins_link'])) + echo ' + (', $context['more_admins_link'], ')'; + + echo ' +
+
+
+
'; + + foreach ($context[$context['admin_menu_name']]['sections'] as $area_id => $area) + { + echo ' +
+ ', $area['title'], ''; + + foreach ($area['areas'] as $item_id => $item) + { + // No point showing the 'home' page here, we're already on it! + if ($area_id == 'forum' && $item_id == 'index') + continue; + + $url = isset($item['url']) ? $item['url'] : $scripturl . '?action=admin;area=' . $item_id . (!empty($context[$context['admin_menu_name']]['extra_parameters']) ? $context[$context['admin_menu_name']]['extra_parameters'] : ''); + + if (!empty($item['icon_file'])) + echo ' + ', $item['label'], ''; + else + echo ' + ', $item['label'], ''; + } + + echo ' +
'; + } + + // The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization. + if (empty($modSettings['disable_smf_js'])) + echo ' + + '; + + // This sets the announcements and current versions themselves ;). + echo ' + '; +} + +/** + * Show some support information and credits to those who helped make this. + */ +function template_credits() +{ + global $context, $settings, $scripturl, $txt; + + // Show the user version information from their server. + echo ' +
+
+

+ ', $txt['support_title'], ' +

+
+
+ + ', $txt['support_versions'], ':
+ ', $txt['support_versions_forum'], ': + ', $context['forum_version'], '', $context['can_admin'] ? ' ' . $txt['version_check_more'] . '' : '', '
+ ', $txt['support_versions_current'], ': + ??
'; + + // Display all the variables we have server information for. + foreach ($context['current_versions'] as $version) + { + echo ' + ', $version['title'], ': + ', $version['version'], ''; + + // more details for this item, show them a link + if ($context['can_admin'] && isset($version['more'])) + echo + ' ', $txt['version_check_more'], ''; + echo ' +
'; + } + + echo ' +
'; + + // Point the admin to common support resources. + echo ' +
+

+ ', $txt['support_resources'], ' +

+
+
+

', $txt['support_resources_p1'], '

+

', $txt['support_resources_p2'], '

+
'; + + // The most important part - the credits :P. + echo ' +
+

+ ', $txt['admin_credits'], ' +

+
+
'; + + foreach ($context['credits'] as $section) + { + if (isset($section['pretext'])) + echo ' +

', $section['pretext'], '

+
'; + + echo ' +
'; + + foreach ($section['groups'] as $group) + { + if (isset($group['title'])) + echo ' +
+ ', $group['title'], ': +
'; + + echo ' +
', implode(', ', $group['members']), '
'; + } + + echo ' +
'; + + if (isset($section['posttext'])) + echo ' +
+

', $section['posttext'], '

'; + } + + echo ' +
+
'; + + // This makes all the support information available to the support script... + echo ' + + + '; + + // This sets the latest support stuff. + echo ' + '; +} + +/** + * Displays information about file versions installed, and compares them to current version. + */ +function template_view_versions() +{ + global $context, $scripturl, $txt; + + echo ' +
+

+ ', $txt['admin_version_check'], ' +

+
+
', $txt['version_check_desc'], '
+
+ + + + + + + + + '; + + // The current version of the core SMF package. + echo ' + + + + + '; + + // Now list all the source file versions, starting with the overall version (if all match!). + echo ' + + + + + + +
+ ', $txt['admin_smffile'], ' + + ', $txt['dvc_your'], ' + + ', $txt['dvc_current'], ' +
+ ', $txt['admin_smfpackage'], ' + + ', $context['forum_version'], ' + + ?? +
+ ', $txt['dvc_sources'], ' + + ?? + + ?? +
+ + + '; + + // Loop through every source file displaying its version - using javascript. + foreach ($context['file_versions'] as $filename => $version) + echo ' + + + + + '; + + // Default template files. + echo ' + +
+ ', $filename, ' + + ', $version, ' + + ?? +
+ + + + + + + + + +
+ ', $txt['dvc_default'], ' + + ?? + + ?? +
+ + + '; + + foreach ($context['default_template_versions'] as $filename => $version) + echo ' + + + + + '; + + // Now the language files... + echo ' + +
+ ', $filename, ' + + ', $version, ' + + ?? +
+ + + + + + + + + +
+ ', $txt['dvc_languages'], ' + + ?? + + ?? +
+ + + '; + + foreach ($context['default_language_versions'] as $language => $files) + { + foreach ($files as $filename => $version) + echo ' + + + + + '; + } + + echo ' + +
+ ', $filename, '.', $language, '.php + + ', $version, ' + + ?? +
'; + + // Display the version information for the currently selected theme - if it is not the default one. + if (!empty($context['template_versions'])) + { + echo ' + + + + + + + + +
+ ', $txt['dvc_templates'], ' + + ?? + + ?? +
+ + + '; + + foreach ($context['template_versions'] as $filename => $version) + echo ' + + + + + '; + + echo ' + +
+ ', $filename, ' + + ', $version, ' + + ?? +
'; + } + + // Display the tasks files version. + if (!empty($context['tasks_versions'])) + { + echo ' + + + + + + + + +
+ ', $txt['dvc_tasks'], ' + + ?? + + ?? +
+ + + '; + + foreach ($context['tasks_versions'] as $filename => $version) + echo ' + + + + + '; + + echo ' + +
+ ', $filename, ' + + ', $version, ' + + ?? +
'; + } + + echo ' +
'; + + /* Below is the hefty javascript for this. Upon opening the page it checks the current file versions with ones + held at simplemachines.org and works out if they are up to date. If they aren't it colors that files number + red. It also contains the function, swapOption, that toggles showing the detailed information for each of the + file categories. (sources, languages, and templates.) */ + echo ' + + '; + +} + +/** + * Form for stopping people using naughty words, etc. + */ +function template_edit_censored() +{ + global $context, $scripturl, $txt, $modSettings; + + if (!empty($context['saved_successful'])) + echo ' +
', $txt['settings_saved'], '
'; + + // First section is for adding/removing words from the censored list. + echo ' +
+
+

+ ', $txt['admin_censored_words'], ' +

+
+
+

', $txt['admin_censored_where'], '

'; + + // Show text boxes for censoring [bad ] => [good ]. + foreach ($context['censored_words'] as $vulgar => $proper) + echo ' +
+ => +
'; + + // Now provide a way to censor more words. + echo ' +
+ => +
+
+ + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
'; + + // This table lets you test out your filters by typing in rude words and seeing what comes out. + echo ' +
+

+ ', $txt['censor_test'], ' +

+
+
+

+ + +

+
+ + + +
'; +} + +/** + * This is the page shown when we've temporarily paused things such as during maintenance tasks, sending newsletters, etc. + */ +function template_not_done() +{ + global $context, $txt, $scripturl; + + echo ' +
+

+ ', $txt['not_done_title'], ' +

+
+
+ ', $txt['not_done_reason']; + + if (!empty($context['continue_percent'])) + echo ' +
+ ', $context['continue_percent'], '% +
+
'; + + if (!empty($context['substep_enabled'])) + echo ' +
+ ', $context['substep_title'], ' (', $context['substep_continue_percent'], '%) +
+
'; + + echo ' +
'; + + // Do we have a token? + if (isset($context['not_done_token']) && isset($context[$context['not_done_token'] . '_token'], $context[$context['not_done_token'] . '_token_var'])) + echo ' + '; + + echo ' + + ', $context['continue_post_data'], ' +
+
+ '; +} + +/** + * Template for showing settings (Of any kind really!) + */ +function template_show_settings() +{ + global $context, $txt, $scripturl; + + if (!empty($context['saved_successful'])) + echo ' +
', $txt['settings_saved'], '
'; + elseif (!empty($context['saved_failed'])) + echo ' +
', sprintf($txt['settings_not_saved'], $context['saved_failed']), '
'; + + if (!empty($context['settings_pre_javascript'])) + echo ' + '; + + if (!empty($context['settings_insert_above'])) + echo $context['settings_insert_above']; + + echo ' +
'; + + // Is there a custom title? + if (isset($context['settings_title'])) + echo ' +
+

', $context['settings_title'], '

+
'; + + // Have we got a message to display? + if (!empty($context['settings_message'])) + { + $tag = !empty($context['settings_message']['tag']) ? $context['settings_message']['tag'] : 'span'; + + echo ' +
'; + + if (is_array($context['settings_message'])) + echo ' + <', $tag, !empty($context['settings_message']['class']) ? ' class="' . $context['settings_message']['class'] . '"' : '', '> + ', $context['settings_message']['label'], ' + '; + else + echo $context['settings_message']; + + echo ' +
'; + } + + // Filter out any redundant separators before we start the loop + $context['config_vars'] = array_filter( + $context['config_vars'], + function ($v) use ($context) + { + static $config_vars, $prev; + + $at_start = is_null($config_vars); + $config_vars = $at_start ? $context['config_vars'] : $config_vars; + + $next = next($config_vars); + $at_end = key($config_vars) === null; + + if (!$at_start && !$at_end) + { + $div_types = array('title', 'desc'); + $at_start = isset($prev['type']) && in_array($prev['type'], $div_types); + $at_end = isset($next['type']) && in_array($next['type'], $div_types); + } + + $prev = $v; + return ($v === '' && ($at_start || $at_end || $v === $next)) ? false : true; + } + ); + + // Now actually loop through all the variables. + $is_open = false; + foreach ($context['config_vars'] as $config_var) + { + // Is it a title or a description? + if (is_array($config_var) && ($config_var['type'] == 'title' || $config_var['type'] == 'desc')) + { + // Not a list yet? + if ($is_open) + { + $is_open = false; + echo ' + + '; + } + + // A title? + if ($config_var['type'] == 'title') + { + echo ' +
+

+ ', ($config_var['help'] ? '' : ''), ' + ', $config_var['label'], ' +

+
'; + } + // A description? + else + { + echo ' +
+ ', $config_var['label'], ' +
'; + } + + continue; + } + + // Not a list yet? + if (!$is_open) + { + $is_open = true; + echo ' +
+
'; + } + + // Hang about? Are you pulling my leg - a callback?! + if (is_array($config_var) && $config_var['type'] == 'callback') + { + if (function_exists('template_callback_' . $config_var['name'])) + call_user_func('template_callback_' . $config_var['name']); + + continue; + } + + if (is_array($config_var)) + { + // First off, is this a span like a message? + if (in_array($config_var['type'], array('message', 'warning'))) + { + echo ' + + ', $config_var['label'], ' + '; + } + // Otherwise it's an input box of some kind. + else + { + echo ' + '; + + // Some quick helpers... + $javascript = $config_var['javascript']; + $disabled = !empty($config_var['disabled']) ? ' disabled' : ''; + $subtext = !empty($config_var['subtext']) ? '
' . $config_var['subtext'] . '' : ''; + + // Various HTML5 input types that are basically enhanced textboxes + $text_types = array('color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'time'); + + // Show the [?] button. + if ($config_var['help']) + echo ' + '; + + echo ' + ', $config_var['label'], '', $subtext, ($config_var['type'] == 'password' ? '
' . $txt['admin_confirm_password'] . '' : ''), ' + + ', + $config_var['preinput']; + + // Show a check box. + if ($config_var['type'] == 'check') + echo ' + '; + // Escape (via htmlspecialchars.) the text box. + elseif ($config_var['type'] == 'password') + echo ' +
+ '; + // Show a selection box. + elseif ($config_var['type'] == 'select') + { + echo ' + '; + } + + // List of boards? This requires getBoardList() having been run and the results in $context['board_list']. + elseif ($config_var['type'] == 'boards') + { + $first = true; + echo ' + [ ', $txt['select_boards_from_list'], ' ] +
+ + ', $txt['select_boards_from_list'], ' + '; + + foreach ($context['board_list'] as $id_cat => $cat) + { + if (!$first) + echo ' +
'; + echo ' + ', $cat['name'], ' +
    '; + + foreach ($cat['boards'] as $id_board => $brd) + echo ' +
  • '; + + echo ' +
'; + $first = false; + } + echo ' +
+ + ', $txt['check_all'], ' +
'; + } + // Text area? + elseif ($config_var['type'] == 'large_text') + echo ' + '; + // Permission group? + elseif ($config_var['type'] == 'permissions') + theme_inline_permissions($config_var['name']); + + // BBC selection? + elseif ($config_var['type'] == 'bbc') + { + echo ' +
+ ', $context['bbc_sections'][$config_var['name']]['title'], ' +
    '; + + foreach ($context['bbc_sections'][$config_var['name']]['columns'] as $bbcColumn) + { + foreach ($bbcColumn as $bbcTag) + echo ' +
  • + ', $bbcTag['show_help'] ? ' (?)' : '', ' +
  • '; + } + echo '
+ +
'; + } + // A simple message? + elseif ($config_var['type'] == 'var_message') + echo ' + + ', $config_var['var_message'], ' +
'; + // Assume it must be a text box + else + { + // Figure out the exact type - use "number" for "float" and "int". + $type = in_array($config_var['type'], $text_types) ? $config_var['type'] : ($config_var['type'] == 'int' || $config_var['type'] == 'float' ? 'number' : 'text'); + + // Extra options for float/int values - how much to decrease/increase by, the min value and the max value + // The step - only set if incrementing by something other than 1 for int or 0.1 for float + $step = isset($config_var['step']) ? ' step="' . $config_var['step'] . '"' : ($config_var['type'] == 'float' ? ' step="0.1"' : ''); + + // Minimum allowed value for this setting. SMF forces a default of 0 if not specified in the settings + $min = isset($config_var['min']) ? ' min="' . $config_var['min'] . '"' : ''; + + // Maximum allowed value for this setting. + $max = isset($config_var['max']) ? ' max="' . $config_var['max'] . '"' : ''; + + echo ' + '; + } + + echo isset($config_var['postinput']) ? ' + ' . $config_var['postinput'] : '', ' + '; + } + } + else + { + // Just show a separator. + if ($config_var == '') + echo ' + +
+
'; + else + echo ' +
+ ' . $config_var . ' +
+
'; + } + } + + if ($is_open) + echo ' +
'; + + if (empty($context['settings_save_dont_show'])) + echo ' + '; + + if ($is_open) + echo ' + '; + + // At least one token has to be used! + if (isset($context['admin-ssc_token'])) + echo ' + '; + + if (isset($context['admin-dbsc_token'])) + echo ' + '; + + if (isset($context['admin-mp_token'])) + echo ' + '; + + echo ' + +
'; + + if (!empty($context['settings_post_javascript'])) + echo ' + '; + + if (!empty($context['settings_insert_below'])) + echo $context['settings_insert_below']; + + // We may have added a board listing. If we did, we need to make it work. + addInlineJavascript(' + $("legend.board_selector").closest("fieldset").hide(); + $("a.board_selector").click(function(e) { + e.preventDefault(); + $(this).hide().next("fieldset").show(); + }); + $("fieldset legend.board_selector a").click(function(e) { + e.preventDefault(); + $(this).closest("fieldset").hide().prev("a").show(); + }); + ', true); +} + +/** + * Template for showing custom profile fields. + */ +function template_show_custom_profile() +{ + global $context, $txt; + + if (!empty($context['saved_successful'])) + echo ' +
', $txt['settings_saved'], '
'; + + // Standard fields. + template_show_list('standard_profile_fields'); + + echo ' + +
'; + + // Custom fields. + template_show_list('custom_profile_fields'); +} + +/** + * Template for editing a custom profile field + */ +function template_edit_profile_field() +{ + global $context, $txt, $scripturl; + + // All the javascript for this page - quite a bit in script.js! + echo ' + '; + + // any errors messages to show? + if (isset($_GET['msg'])) + { + loadLanguage('Errors'); + + if (isset($txt['custom_option_' . $_GET['msg']])) + echo ' +
', + $txt['custom_option_' . $_GET['msg']], ' +
'; + } + + echo ' +
+
+

', $context['page_title'], '

+
+
+
+ ', $txt['custom_edit_general'], ' + +
+
+ +
+ ', $txt['custom_edit_name_desc'], ' +
+
+ +
+
+ + + +
+ ', $txt['custom_edit_name_desc'], ' +
+
+ +
+
+
+ ', $txt['custom_edit_profile_desc'], ' +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ ', $txt['custom_edit_enclose_desc'], ' +
+
+ +
+
+
+
+ ', $txt['custom_edit_input'], ' +
+
+ +
+
+ +
+
+
+ ', $txt['custom_edit_max_length_desc'], ' +
+
+ +
+
+ +
+
+ ', $txt['custom_edit_dimension_row'], ': + ', $txt['custom_edit_dimension_col'], ': +
+
+ +
+
+ +
+
+ +
+ ', $txt['custom_edit_options_desc'], ' +
+ ', $txt['custom_edit_name_desc'], ' +
+
'; + + foreach ($context['field']['options'] as $k => $option) + echo ' + ', $k == 0 ? '' : '
', ''; + + echo ' + + [', $txt['custom_edit_options_more'], '] +
+
+ +
+
+ +
+
+
+
+ ', $txt['custom_edit_advanced'], ' +
+
+ +
+ ', $txt['custom_edit_mask_desc'], ' +
+
+ +
+ + + +
+
+
+ ', $txt['custom_edit_privacy_desc'], ' +
+
+ +
+
+
+ ', $txt['custom_edit_can_search_desc'], ' +
+
+ +
+
+
+ ', $txt['custom_edit_active_desc'], ' +
+
+ +
+
+
+ '; + + if ($context['fid']) + echo ' + '; + + echo ' +
+ + +
'; + + // Get the javascript bits right! + echo ' + '; +} + +/** + * Results page for an admin search. + */ +function template_admin_search_results() +{ + global $context, $txt; + + echo ' +
+ ', template_admin_quick_search(), ' +

+ + ', sprintf($txt['admin_search_results_desc'], $context['search_term']), ' + +

+
+
'; + + if (empty($context['search_results'])) + { + echo ' +

+ ', $txt['admin_search_results_none'], ' +

'; + } + else + { + echo ' +
    '; + + foreach ($context['search_results'] as $result) + { + // Is it a result from the online manual? + if ($context['search_type'] == 'online') + { + echo ' +
  1. +

    + ', $result['title'], ' +

    +

    + ', $result['snippet'], ' +

    +
  2. '; + } + // Otherwise it's... not! + else + { + echo ' +
  3. + ', $result['name'], ' [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'], ']'; + + if ($result['help']) + echo ' +

    ', $result['help'], '

    '; + + echo ' +
  4. '; + } + } + echo ' +
'; + } + + echo ' +
'; +} + +/** + * This little beauty shows questions and answer from the captcha type feature. + */ +function template_callback_question_answer_list() +{ + global $txt, $context; + + foreach ($context['languages'] as $lang_id => $lang) + { + $lang_id = strtr($lang_id, array('-utf8' => '')); + $lang['name'] = strtr($lang['name'], array('-utf8' => '')); + + echo ' + +
+ ', $lang['name'], ' +
+
+ ', $txt['setup_verification_question'], ' +
+
+ ', $txt['setup_verification_answer'], ' +
'; + + if (!empty($context['qa_by_lang'][$lang_id])) + foreach ($context['qa_by_lang'][$lang_id] as $q_id) + { + $question = $context['question_answers'][$q_id]; + + echo ' +
+ +
+
'; + + foreach ($question['answers'] as $answer) + echo ' + '; + + echo ' + +
'; + } + + echo ' +
[ ', $txt['setup_verification_add_more'], ' ]
+
+
'; + } +} + +/** + * Repairing boards. + */ +function template_repair_boards() +{ + global $context, $txt, $scripturl; + + echo ' +
+

', + $context['error_search'] ? $txt['errors_list'] : $txt['errors_fixing'], ' +

+
+
'; + + // Are we actually fixing them, or is this just a prompt? + if ($context['error_search']) + { + if (!empty($context['to_fix'])) + { + echo ' + ', $txt['errors_found'], ': + +

+ ', $txt['errors_fix'], ' +

+

+ ', $txt['yes'], ' - ', $txt['no'], ' +

'; + } + else + echo ' +

', $txt['maintain_no_errors'], '

+

+ ', $txt['maintain_return'], ' +

'; + } + else + { + if (!empty($context['redirect_to_recount'])) + { + echo ' +

+ ', $txt['errors_do_recount'], ' +

+
+ + + +
'; + } + else + { + echo ' +

', $txt['errors_fixed'], '

+

+ ', $txt['maintain_return'], ' +

'; + } + } + + echo ' +
'; + + if (!empty($context['redirect_to_recount'])) + { + echo ' + '; + } +} + +/** + * Retrieves info from the php_info function, scrubs and preps it for display + */ +function template_php_info() +{ + global $context, $txt; + + echo ' +
+
+

+ ', $txt['phpinfo_settings'], ' +

+
'; + + // for each php info area + foreach ($context['pinfo'] as $area => $php_area) + { + echo ' + + + + + + + + + '; + + $localmaster = true; + + // and for each setting in this category + foreach ($php_area as $key => $setting) + { + // start of a local / master setting (3 col) + if (is_array($setting)) + { + if ($localmaster) + { + // heading row for the settings section of this category's settings + echo ' + + + + + '; + + $localmaster = false; + } + + echo ' + + '; + + foreach ($setting as $key_lm => $value) + echo ' + '; + + echo ' + '; + } + // just a single setting (2 col) + else + { + echo ' + + + + '; + } + } + echo ' + +
', $area, '
', $txt['phpinfo_itemsettings'], '', $txt['phpinfo_localsettings'], '', $txt['phpinfo_defaultsettings'], '
', $key, '', $value, '
', $key, '', str_replace(',', ', ', $setting), '
+
'; + } + + echo ' +
'; +} + +/** + * Content shown above the clean cache button + */ +function template_clean_cache_button_above() +{ +} + +/** + * Content shown below the clean cache button? + */ +function template_clean_cache_button_below() +{ + global $txt, $scripturl, $context; + + echo ' +
+

', $txt['maintain_cache'], '

+
+
+
+

', $txt['maintain_cache_info'], '

+ + + +
+
'; +} + +/** + * This shows the admin search form + */ +function template_admin_quick_search() +{ + global $context, $txt, $scripturl; + + if ($context['user']['is_admin']) + echo ' + '; +} + +?> \ No newline at end of file diff --git a/Agreement.template.php b/Agreement.template.php new file mode 100644 index 0000000..b9d4782 --- /dev/null +++ b/Agreement.template.php @@ -0,0 +1,88 @@ +'; + + if (!empty($context['agreement'])) + { + echo ' +
+

', $txt['agreement' . (!empty($context['can_accept_agreement']) ? '_updated' : '')], '

+
'; + + if (!empty($context['can_accept_agreement'])) + { + echo ' +
+ ', $txt['agreement_updated_desc'], ' +
'; + } + elseif (!empty($context['agreement_accepted_date'])) + { + echo ' +
+ ', sprintf($txt['agreement_accepted'], timeformat($context['agreement_accepted_date'], false)), ' +
'; + } + + echo ' +
+ ', $context['agreement'], ' +
'; + } + + if (!empty($context['privacy_policy'])) + { + echo ' +
+

', $txt['privacy_policy' . (!empty($context['can_accept_privacy_policy']) ? '_updated' : '')], '

+
'; + + if (!empty($context['can_accept_privacy_policy'])) + { + echo ' +
+ ', $txt['privacy_policy_updated_desc'], ' +
'; + } + elseif (!empty($context['privacy_policy_accepted_date'])) + { + echo ' +
+ ', sprintf($txt['privacy_policy_accepted'], timeformat($context['privacy_policy_accepted_date'], false)), ' +
'; + } + + echo ' +
+ ', $context['privacy_policy'], ' +
'; + } + + if (!empty($context['accept_doc'])) + echo ' +
+ + +
+ '; +} + +?> \ No newline at end of file diff --git a/BoardIndex.template.php b/BoardIndex.template.php new file mode 100644 index 0000000..78f33df --- /dev/null +++ b/BoardIndex.template.php @@ -0,0 +1,606 @@ +'; + + foreach ($context['news_lines'] as $news) + echo ' +
  • ', $news, '
  • '; + + echo ' + + '; + } +} + +/** + * This actually displays the board index + */ +function template_main() +{ + global $context, $txt, $scripturl; + + echo ' +
    '; + + /* Each category in categories is made up of: + id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?), + new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image), + and boards. (see below.) */ + foreach ($context['categories'] as $category) + { + // If theres no parent boards we can see, avoid showing an empty category (unless its collapsed) + if (empty($category['boards']) && !$category['is_collapsed']) + continue; + + echo ' +
    +
    +
    +
    + '; + // If this category even can collapse, show a link to collapse it. Only if we are logged. + if ($category['can_collapse']) + echo ' + '; + + echo '

    '; + + + + echo ' + ', $category['link'], ' +

    ', !empty($category['description']) ? ' +
    ' . $category['description'] . '
    ' : '', ' +
    +
    +
    ', $txt['board_topics'], '
    ', $txt['posts'], '
    +
    ', $txt['last_post'], '
    +
    + +
    +
    '; + } + + echo ' +
    '; + + // Show the mark all as read button? + if ($context['user']['is_logged'] && !empty($context['categories'])) + echo ' +
    + ', template_button_strip($context['mark_read_button'], 'right'), ' +
    '; +} + +/** + * Outputs the board icon for a standard board. + * + * @param array $board Current board information. + */ +function template_bi_board_icon($board) +{ + global $context, $scripturl; + // L'icone devant le forum de niveau 1. Passé de "a" à "div" pour simplifier la navigation au clavier + echo ' +
    '; +} + +/** + * Outputs the board icon for a redirect. + * + * @param array $board Current board information. + */ +function template_bi_redirect_icon($board) +{ + global $context, $scripturl; + + echo ' + '; +} + +/** + * Outputs the board info for a standard board or redirect. + * + * @param array $board Current board information. + */ +function template_bi_board_info($board) +{ + global $context, $scripturl, $txt; + + echo ' +

    + ', $board['name'], ' +

    '; + + // Has it outstanding posts for approval? + if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) + echo ' + !'; + + echo ' +
    ', $board['description'], '
    '; + + // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) + if (!empty($board['link_moderators'])) + echo ' +

    ', count($board['link_moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '

    '; +} + +/** + * Outputs the board stats for a standard board. + * + * @param array $board Current board information. + */ +function template_bi_board_stats($board) +{ + global $txt; + + echo ' +
    + ', comma_format($board['topics']), ' +
    +
    + ', comma_format($board['posts']), ' +
    + '; +} + +/** + * Outputs the board stats for a redirect. + * + * @param array $board Current board information. + */ +function template_bi_redirect_stats($board) +{ + global $txt; + + echo ' +

    + ', $txt['redirects'], ': ', comma_format($board['posts']), ' +

    '; +} + +/** + * Outputs the board lastposts for a standard board or a redirect. + * When on a mobile device, this may be hidden if no last post exists. + * + * @param array $board Current board information. + */ +function template_bi_board_lastpost($board) +{ + if (!empty($board['last_post']['id'])) + echo + '

    ', $board['last_post']['last_post_message'], '

    '; +} + +/** + * Outputs the board children for a standard board. + * + * @param array $board Current board information. + */ +function template_bi_board_children($board) +{ + global $txt, $scripturl, $context; + + // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) + if (!empty($board['children'])) + { + // Sort the links into an array with new boards bold so it can be imploded. + $children = array(); + /* Each child in each board's children has: + id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ + foreach ($board['children'] as $child) + { //ici le lien vers les sous-forum et la façon dont ils s'affichent. Juste les liens ! + if (!$child['is_redirect']) + $child['link'] = '' . ($child['new'] ? ' + + ' . $txt['new'] . ' + ' : '') . ' + + + ' . $child['name'] . ' + + + '; + else + $child['link'] = '' . $child['name'] . ''; + + // Has it posts awaiting approval? + if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) + $child['link'] .= ' !'; + + // Ici la mise en forme des catégories des enfants. Probablement pas au bon endroit...Todo afficher le bon lien ! + //Lien en trop, redondant avec le titre ensuite + // + // + $children[] = $child['new'] ? ' + +
    +
    + +
    + +
    +
    +

    ' . $child['link'] . '

    +
    ' . $child['description'] . ' +
    +
    +
    +
    ' . comma_format($child['topics']) . '
    +
    ' . comma_format($child['posts']) . '
    +
    +
    +
    ' : ' + + +
    +
    + +
    +
    +
    +

    ' . $child['link'] . '

    +
    ' . $child['description'] . ' +
    +
    +
    +
    ' . comma_format($child['topics']) . '
    +
    ' . comma_format($child['posts']) . '
    +
    +
    +
    +
    + '; + } + + echo ' +
    +

    + ', implode(' ', $children), ' +

    +
    '; + // c'est là qu'est le truc pour "Sous-sections". Balise autour du "implode" fonctionne mais... pas assez pointu. + // TODO : ajouter aussi nb de messages, dernier message, etc. Mais une fois que c'est ok sur le forum parent car on va recopier... + } +} + +/** + * The lower part of the outer layer of the board index + */ +function template_boardindex_outer_below() +{ + template_info_center(); +} + +/** + * Displays the info center + */ +function template_info_center() +{ + global $context, $options, $txt; + + if (empty($context['info_center'])) + return; + + // Here's where the "Info Center" starts... + echo ' +
    +
    + + + +
    '; + + // Info center collapse object. + echo ' + '; +} + +/** + * The recent posts section of the info center + */ +function template_ic_block_recent() +{ + global $context, $scripturl, $settings, $txt; + + // This is the "Recent Posts" bar. + echo ' +
    +

    + ', $txt['recent_posts'], ' +

    +
    +
    '; + + // Only show one post. + if ($settings['number_recent_posts'] == 1) + { + // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.) + echo ' +

    + ', $txt['recent_view'], ' ', sprintf($txt['is_recent_updated'], '"' . $context['latest_post']['link'] . '"'), ' (', $context['latest_post']['time'], ')
    +

    '; + } + // Show lots of posts. + elseif (!empty($context['latest_posts'])) + { + echo ' + + + + + + + '; + + /* Each post in latest_posts has: + board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), + subject, short_subject (shortened with...), time, link, and href. */ + foreach ($context['latest_posts'] as $post) + echo ' + + + + + + '; + echo ' +
    ', $txt['message'], '', $txt['author'], '', $txt['board'], '', $txt['date'], '
    ', $post['link'], '', $post['poster']['link'], '', $post['board']['link'], '', $post['time'], '
    '; + } + echo ' +
    '; +} + +/** + * The calendar section of the info center + */ +function template_ic_block_calendar() +{ + global $context, $scripturl, $txt; + + // Show information about events, birthdays, and holidays on the calendar. + echo ' +
    +

    + ', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], ' +

    +
    '; + + // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P + if (!empty($context['calendar_holidays'])) + echo ' +

    + ', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), ' +

    '; + + // People's birthdays. Like mine. And yours, I guess. Kidding. + if (!empty($context['calendar_birthdays'])) + { + echo ' +

    + ', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], ''; + + // Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) + foreach ($context['calendar_birthdays'] as $member) + echo ' + ', $member['is_today'] ? '' : '', $member['name'], $member['is_today'] ? '' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '' : ', '; + + echo ' +

    '; + } + + // Events like community get-togethers. + if (!empty($context['calendar_events'])) + { + echo ' +

    + ', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], ' '; + + // Each event in calendar_events should have: + // title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. + foreach ($context['calendar_events'] as $event) + echo ' + ', $event['can_edit'] ? ' ' : '', $event['href'] == '' ? '' : '', $event['is_today'] ? '' . $event['title'] . '' : $event['title'], $event['href'] == '' ? '' : '', $event['is_last'] ? '
    ' : ', '; + echo ' +

    '; + } +} + +/** + * The stats section of the info center + */ +function template_ic_block_stats() +{ + global $scripturl, $txt, $context, $settings; + + // Show statistical style information... + echo ' +
    +

    + ', $txt['forum_stats'], ' +

    +
    +

    + ', $context['common_stats']['boardindex_total_posts'], '', !empty($settings['show_latest_member']) ? ' - ' . $txt['latest_member'] . ': ' . $context['common_stats']['latest_member']['link'] . '' : '', '
    + ', (!empty($context['latest_post']) ? $txt['latest_post'] . ': "' . $context['latest_post']['link'] . '" (' . $context['latest_post']['time'] . ')
    ' : ''), ' + ', $txt['recent_view'], ' +

    '; +} + +/** + * The who's online section of the info center + */ +function template_ic_block_online() +{ + global $context, $scripturl, $txt, $modSettings, $settings; + // "Users online" - in order of activity. + echo ' +
    +

    + ', $context['show_who'] ? '' : '', ' ', $txt['online_users'], '', $context['show_who'] ? '' : '', ' +

    +
    +

    + ', $context['show_who'] ? '' : '', '', $txt['online'], ': ', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users']; + + // Handle hidden users and buddies. + $bracketList = array(); + + if ($context['show_buddies']) + $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']); + + if (!empty($context['num_spiders'])) + $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']); + + if (!empty($context['num_users_hidden'])) + $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']); + + if (!empty($bracketList)) + echo ' (' . implode(', ', $bracketList) . ')'; + + echo $context['show_who'] ? '' : '', ' + +  - ', $txt['most_online_today'], ': ', comma_format($modSettings['mostOnlineToday']), ' -  + ', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
    '; + + // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link. + /*if (!empty($context['users_online'])) + { + echo ' + ', sprintf($txt['users_active'], $modSettings['lastActive']), ': ', implode(', ', $context['list_users_online']); + + // Showing membergroups? + if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) + echo ' + ' . implode(', ', $context['membergroups']) . ''; + }*/ + + echo ' +

    '; +} + +?> diff --git a/Calendar.template.php b/Calendar.template.php new file mode 100644 index 0000000..7485a34 --- /dev/null +++ b/Calendar.template.php @@ -0,0 +1,1237 @@ +'; + + // Show the mini-blocks if they're enabled. + if (empty($context['blocks_disabled'])) + echo ' +
    + ', template_show_month_grid('prev', true), ' + ', template_show_month_grid('current', true), ' + ', template_show_month_grid('next', true), ' +
    '; + + // What view are we showing? + if ($context['calendar_view'] == 'viewlist') + echo ' +
    + ', template_show_upcoming_list('main'), ' +
    '; + elseif ($context['calendar_view'] == 'viewweek') + echo ' +
    + ', template_show_week_grid('main'), ' +
    '; + else + echo ' +
    + ', template_show_month_grid('main'), ' +
    '; + + // Close our wrapper. + echo ' + '; +} + +/** + * Display a list of upcoming events, birthdays, and holidays. + * + * @param string $grid_name The grid name + * @return void|bool Returns false if the grid doesn't exist. + */ +function template_show_upcoming_list($grid_name) +{ + global $context, $scripturl, $txt; + + // Bail out if we have nothing to work with + if (!isset($context['calendar_grid_' . $grid_name])) + return false; + + // Protect programmer sanity + $calendar_data = &$context['calendar_grid_' . $grid_name]; + + // Do we want a title? + if (empty($calendar_data['disable_title'])) + echo ' +
    +

    + ', $txt['calendar_upcoming'], ' +

    +
    '; + + // Give the user some controls to work with + template_calendar_top($calendar_data); + + // Output something just so people know it's not broken + if (empty($calendar_data['events']) && empty($calendar_data['birthdays']) && empty($calendar_data['holidays'])) + echo ' +
    ', $txt['calendar_empty'], '
    '; + + // First, list any events + if (!empty($calendar_data['events'])) + { + echo ' +
    +
    +

    ', str_replace(':', '', $txt['events']), '

    +
    + +
    '; + } + + // Next, list any birthdays + if (!empty($calendar_data['birthdays'])) + { + echo ' +
    +
    +

    ', str_replace(':', '', $txt['birthdays']), '

    +
    +
    '; + + foreach ($calendar_data['birthdays'] as $date) + { + echo ' +

    + ', $date['date_local'], ': '; + + unset($date['date_local']); + + $birthdays = array(); + + foreach ($date as $member) + $birthdays[] = '' . $member['name'] . (isset($member['age']) ? ' (' . $member['age'] . ')' : '') . ''; + + echo implode(', ', $birthdays); + + echo ' +

    '; + } + + echo ' +
    +
    '; + } + + // Finally, list any holidays + if (!empty($calendar_data['holidays'])) + { + echo ' +
    +
    +

    ', str_replace(':', '', $txt['calendar_prompt']), '

    +
    +
    +

    '; + + $holidays = array(); + + foreach ($calendar_data['holidays'] as $date) + { + $date_local = $date['date_local']; + unset($date['date_local']); + + foreach ($date as $holiday) + $holidays[] = $holiday . ' (' . $date_local . ')'; + } + + echo implode(', ', $holidays); + + echo ' +

    +
    +
    '; + } +} + +/** + * Display a monthly calendar grid. + * + * @param string $grid_name The grid name + * @param bool $is_mini Is this a mini grid? + * @return void|bool Returns false if the grid doesn't exist. + */ +function template_show_month_grid($grid_name, $is_mini = false) +{ + global $context, $txt, $scripturl, $modSettings; + + // If the grid doesn't exist, no point in proceeding. + if (!isset($context['calendar_grid_' . $grid_name])) + return false; + + // A handy little pointer variable. + $calendar_data = &$context['calendar_grid_' . $grid_name]; + + // Some conditions for whether or not we should show the week links *here*. + if (isset($calendar_data['show_week_links']) && ($calendar_data['show_week_links'] == 3 || (($calendar_data['show_week_links'] == 1 && $is_mini === true) || $calendar_data['show_week_links'] == 2 && $is_mini === false))) + $show_week_links = true; + else + $show_week_links = false; + + // Assuming that we've not disabled it, show the title block! + if (empty($calendar_data['disable_title'])) + { + echo ' +
    +

    '; + + // Previous Link: If we're showing prev / next and it's not a mini-calendar. + if (empty($calendar_data['previous_calendar']['disabled']) && $calendar_data['show_next_prev'] && $is_mini === false) + echo ' + + « + '; + + // Next Link: if we're showing prev / next and it's not a mini-calendar. + if (empty($calendar_data['next_calendar']['disabled']) && $calendar_data['show_next_prev'] && $is_mini === false) + echo ' + + » + '; + + // Arguably the most exciting part, the title! + echo ' + ', $txt['months_titles'][$calendar_data['current_month']], ' ', $calendar_data['current_year'], ' +

    +
    '; + } + + // Show the controls on main grids + if ($is_mini === false) + template_calendar_top($calendar_data); + + // Finally, the main calendar table. + echo ' + '; + + // Show each day of the week. + if (empty($calendar_data['disable_day_titles'])) + { + echo ' + '; + + // If we're showing week links, there's an extra column ahead of the week links, so let's think ahead and be prepared! + if ($show_week_links === true) + echo ' + '; + + // Now, loop through each actual day of the week. + foreach ($calendar_data['week_days'] as $day) + echo ' + '; + + echo ' + '; + } + + // Our looping begins on a per-week basis. + foreach ($calendar_data['weeks'] as $week) + { + // Some useful looping variables. + $current_month_started = false; + $count = 1; + $final_count = 1; + + echo ' + '; + + // This is where we add the actual week link, if enabled on this location. + if ($show_week_links === true) + echo ' + '; + + // Now loop through each day in the week we're on. + foreach ($week['days'] as $day) + { + // What classes should each day inherit? Day is default. + $classes = array('days'); + if (!empty($day['day'])) + { + $classes[] = !empty($day['is_today']) ? 'calendar_today' : 'windowbg'; + + // Additional classes are given for events, holidays, and birthdays. + foreach (array('events', 'holidays', 'birthdays') as $event_type) + if (!empty($day[$event_type])) + $classes[] = $event_type; + } + else + { + $classes[] = 'disabled'; + } + + // Now, implode the classes for each day. + echo ' + '; + + ++$count; + } + + echo ' + '; + } + + // The end of our main table. + echo ' +
    ', !empty($calendar_data['short_day_titles']) || $is_mini === true ? $txt['days_short'][$day] : $txt['days'][$day], '
    + » + '; + + // If it's within this current month, go ahead and begin. + if (!empty($day['day'])) + { + // If it's the first day of this month and not a mini-calendar, we'll add the month title - whether short or full. + $title_prefix = !empty($day['is_first_of_month']) && $context['current_month'] == $calendar_data['current_month'] && $is_mini === false ? (!empty($calendar_data['short_month_titles']) ? $txt['months_short'][$calendar_data['current_month']] . ' ' : $txt['months_titles'][$calendar_data['current_month']] . ' ') : ''; + + // The actual day number - be it a link, or just plain old text! + if (!empty($modSettings['cal_daysaslink']) && $context['can_post']) + echo ' + ', $title_prefix, $day['day'], ''; + elseif ($is_mini) + echo ' + ', $title_prefix, $day['day'], ''; + else + echo ' + ', $title_prefix, $day['day'], ''; + + // A lot of stuff, we're not showing on mini-calendars to conserve space. + if ($is_mini === false) + { + // Holidays are always fun, let's show them! + if (!empty($day['holidays'])) + echo ' +
    + ', $txt['calendar_prompt'], ' ', implode(', ', $day['holidays']), ' +
    '; + + // Happy Birthday Dear Member! + if (!empty($day['birthdays'])) + { + echo ' +
    + ', $txt['birthdays'], ' '; + + /* Each of the birthdays has: + id, name (person), age (if they have one set?), and is_last. (last in list?) */ + $use_js_hide = empty($context['show_all_birthdays']) && count($day['birthdays']) > 15; + $birthday_count = 0; + foreach ($day['birthdays'] as $member) + { + echo '', $member['name'], '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] || ($count == 10 && $use_js_hide) ? '' : ', '; + + // 9...10! Let's stop there. + if ($birthday_count == 10 && $use_js_hide) + // !!TODO - Inline CSS and JavaScript should be moved. + echo '...
    (', sprintf($txt['calendar_click_all'], count($day['birthdays'])), ')
    '; + + echo ' +
    '; + } + + // Any special posted events? + if (!empty($day['events'])) + { + // Sort events by start time (all day events will be listed first) + uasort( + $day['events'], + function($a, $b) + { + if ($a['start_timestamp'] == $b['start_timestamp']) + return 0; + + return ($a['start_timestamp'] < $b['start_timestamp']) ? -1 : 1; + } + ); + + echo ' +
    + ', $txt['events'], '
    '; + + /* The events are made up of: + title, href, is_last, can_edit (are they allowed to?), and modify_href. */ + foreach ($day['events'] as $event) + { + $event_icons_needed = ($event['can_edit'] || $event['can_export']) ? true : false; + + echo ' +
    + ', $event['link'], '
    + '; + + if (!empty($event['start_time_local']) && $event['starts_today'] == true) + echo trim(str_replace(':00 ', ' ', $event['start_time_local'])); + elseif (!empty($event['end_time_local']) && $event['ends_today'] == true) + echo strtolower($txt['ends']), ' ', trim(str_replace(':00 ', ' ', $event['end_time_local'])); + elseif (!empty($event['allday'])) + echo $txt['calendar_allday']; + + echo ' + '; + + if (!empty($event['location'])) + echo ' +
    + ' . $event['location'] . ''; + + if ($event['can_edit'] || $event['can_export']) + { + echo ' + '; + + // If they can edit the event, show an icon they can click on.... + if ($event['can_edit']) + echo ' + + + '; + + // Exporting! + if ($event['can_export']) + echo ' + + + '; + + echo ' +
    '; + } + + echo ' +
    '; + } + + echo ' +
    '; + } + } + $current_month_started = $count; + } + // Otherwise, assuming it's not a mini-calendar, we can show previous / next month days! + elseif ($is_mini === false) + { + if (empty($current_month_started) && !empty($context['calendar_grid_prev'])) + echo '', $context['calendar_grid_prev']['last_of_month'] - $calendar_data['shift']-- +1, ''; + elseif (!empty($current_month_started) && !empty($context['calendar_grid_next'])) + echo '', $current_month_started + 1 == $count ? (!empty($calendar_data['short_month_titles']) ? $txt['months_short'][$context['calendar_grid_next']['current_month']] . ' ' : $txt['months_titles'][$context['calendar_grid_next']['current_month']] . ' ') : '', $final_count++, ''; + } + + // Close this day and increase var count. + echo ' +
    '; +} + +/** + * Shows a weekly grid + * + * @param string $grid_name The name of the grid + * @return void|bool Returns false if the grid doesn't exist + */ +function template_show_week_grid($grid_name) +{ + global $context, $txt, $scripturl, $modSettings; + + // We might have no reason to proceed, if the variable isn't there. + if (!isset($context['calendar_grid_' . $grid_name])) + return false; + + // Handy pointer. + $calendar_data = &$context['calendar_grid_' . $grid_name]; + + // At the very least, we have one month. Possibly two, though. + $iteration = 1; + foreach ($calendar_data['months'] as $month_data) + { + // For our first iteration, we'll add a nice header! + if ($iteration == 1) + { + echo ' +
    +

    '; + + // Previous Week Link... + if (empty($calendar_data['previous_calendar']['disabled']) && !empty($calendar_data['show_next_prev'])) + echo ' + + « + '; + + // Next Week Link... + if (empty($calendar_data['next_calendar']['disabled']) && !empty($calendar_data['show_next_prev'])) + echo ' + + » + '; + + // "Week beginning " + if (!empty($calendar_data['week_title'])) + echo $calendar_data['week_title']; + + echo ' +

    +
    '; + + // Show the controls + template_calendar_top($calendar_data); + } + + // Our actual month... + echo ' +
    + + ', $txt['months_titles'][$month_data['current_month']], ' + +
    '; + + // The main table grid for $this week. + echo ' + + + '; + if (!empty($calendar_data['show_events'])) + echo ' + '; + + if (!empty($calendar_data['show_holidays'])) + echo ' + '; + if (!empty($calendar_data['show_birthdays'])) + echo ' + '; + echo ' + '; + + // Each day of the week. + foreach ($month_data['days'] as $day) + { + // How should we be highlighted or otherwise not...? + $classes = array('days'); + $classes[] = !empty($day['is_today']) ? 'calendar_today' : 'windowbg'; + + echo ' + + '; + + if (!empty($calendar_data['show_events'])) + { + echo ' + '; + } + + if (!empty($calendar_data['show_holidays'])) + { + echo ' + '; + } + + if (!empty($calendar_data['show_birthdays'])) + { + echo ' + '; + } + echo ' + '; + } + + // Increase iteration for loop counting. + ++$iteration; + + echo ' +
    ', $txt['calendar_day'], '', $txt['events'], '', $txt['calendar_prompt'], '', $txt['birthdays'], '
    '; + + // Should the day number be a link? + if (!empty($modSettings['cal_daysaslink']) && $context['can_post']) + echo ' + ', $txt['days'][$day['day_of_week']], ' - ', $day['day'], ''; + else + echo $txt['days'][$day['day_of_week']], ' - ', $day['day']; + + echo ' + '; + + // Show any events... + if (!empty($day['events'])) + { + // Sort events by start time (all day events will be listed first) + uasort( + $day['events'], + function($a, $b) + { + if ($a['start_timestamp'] == $b['start_timestamp']) + return 0; + + return ($a['start_timestamp'] < $b['start_timestamp']) ? -1 : 1; + } + ); + + foreach ($day['events'] as $event) + { + echo ' +
    '; + + $event_icons_needed = ($event['can_edit'] || $event['can_export']) ? true : false; + + echo $event['link'], '
    + '; + + if (!empty($event['start_time_local'])) + echo trim($event['start_time_local']), !empty($event['end_time_local']) ? ' – ' . trim($event['end_time_local']) : ''; + else + echo $txt['calendar_allday']; + + echo ' + '; + + if (!empty($event['location'])) + echo '
    + ' . $event['location'] . ''; + + if (!empty($event_icons_needed)) + { + echo ' '; + + // If they can edit the event, show a star they can click on.... + if (!empty($event['can_edit'])) + echo ' + + + '; + + // Can we export? Sweet. + if (!empty($event['can_export'])) + echo ' + + + '; + + echo ' +
    '; + } + + echo ' +
    '; + } + + if (!empty($context['can_post'])) + { + echo ' + +
    '; + } + } + else + { + if (!empty($context['can_post'])) + echo ' + '; + } + echo ' +
    '; + + // Show any holidays! + if (!empty($day['holidays'])) + echo implode('
    ', $day['holidays']); + + echo ' +
    '; + + // Show any birthdays... + if (!empty($day['birthdays'])) + { + foreach ($day['birthdays'] as $member) + echo ' + ', $member['name'], ' + ', isset($member['age']) ? ' (' . $member['age'] . ')' : '', ' + ', $member['is_last'] ? '' : '
    '; + } + echo ' +
    '; + } +} + +/** + * Calendar controls under the title + * + * Creates the view selector (list, month, week), the date selector (either a + * select menu or a date range chooser, depending on the circumstances), and the + * "Post Event" button. + * + * @param array $calendar_data The data for the calendar grid that this is for + */ +function template_calendar_top($calendar_data) +{ + global $context, $scripturl, $txt; + + echo ' +
    + + ', template_button_strip($context['calendar_buttons'], 'right'); + + echo ' +
    + '; + + if (!empty($calendar_data['end_date'])) + echo ' + ', strtolower($txt['to']), ' + '; + + echo ' + +
    +
    '; +} + +/** + * Template for posting a calendar event. + */ +function template_event_post() +{ + global $context, $txt, $scripturl, $modSettings; + + echo ' +
    '; + + if (!empty($context['event']['new'])) + echo ' + '; + + // Start the main table. + echo ' +
    +
    +

    + ', $context['page_title'], ' +

    +
    '; + + if (!empty($context['post_error']['messages'])) + echo ' +
    +
    +
    + ', $context['error_type'] == 'serious' ? '' . $txt['error_while_submitting'] . '' : '', ' +
    +
    + ', implode('
    ', $context['post_error']['messages']), ' +
    +
    +
    '; + + echo ' +
    +
    + ', $txt['calendar_event_title'], ' + +
    +
    + +
    +
    '; + + // If this is a new event let the user specify which board they want the linked post to be put into. + if ($context['event']['new'] && !empty($context['event']['categories'])) + { + echo ' +
    +
    + ', $txt['calendar_post_in'], ' + + +
    +
    '; + } + + // Note to theme writers: The JavaScript expects the input fields for the start and end dates & times to be contained in a wrapper element with the id "event_time_input" + echo ' +
    +
    + ', $txt['calendar_event_options'], ' +
    +
    + ', $txt['start'], ' + + +
    +
    + ', $txt['end'], ' + + +
    +
    +
    +
    + + +
    +
    + ', $txt['calendar_timezone'], ' + +
    +
    +
    + ', $txt['location'], ' + +
    +
    '; + + echo ' + '; + + // Delete button? + if (empty($context['event']['new'])) + echo ' + '; + + echo ' + + + +
    +
    +
    '; +} + +/** + * Displays a clock + */ +function template_bcd() +{ + global $context, $scripturl; + $alt = false; + + echo ' + + + + + '; + + foreach ($context['clockicons'] as $t => $v) + { + echo ' + '; + + $alt = !$alt; + } + echo ' + + + + +
    BCD Clock
    '; + + foreach ($v as $i) + echo ' +
    '; + + echo ' +
    + Are you hardcore? +
    + + '; +} + +/** + * Displays the hours, minutes and seconds for our clock + */ +function template_hms() +{ + global $context, $scripturl; + $alt = false; + + echo ' + + + + '; + + foreach ($context['clockicons'] as $t => $v) + { + echo ' + + + '; + + $alt = !$alt; + } + echo ' + + + +
    Binary Clock
    '; + + foreach ($v as $i) + echo ' + '; + + echo ' +
    + Too tough for you? +
    '; + + echo ' + '; +} + +/** + * Displays a binary clock + */ +function template_omfg() +{ + global $context; + $alt = false; + + echo ' + + + + '; + + foreach ($context['clockicons'] as $t => $v) + { + echo ' + + + '; + + $alt = !$alt; + } + + echo ' +
    OMFG Binary Clock
    '; + + foreach ($v as $i) + echo ' + '; + + echo ' +
    + '; +} + +/** + * Displays the time + */ +function template_thetime() +{ + global $context; + $alt = false; + + echo ' + + + + '; + + foreach ($context['clockicons'] as $v) + { + echo ' + + + '; + + $alt = !$alt; + } + + echo ' +
    The time you requested
    '; + + foreach ($v as $i) + echo ' + '; + + echo ' +
    '; +} + +?> \ No newline at end of file diff --git a/Display.template.php b/Display.template.php new file mode 100644 index 0000000..dc51fe4 --- /dev/null +++ b/Display.template.php @@ -0,0 +1,1011 @@ + + ', $txt['report_sent'], ' + '; + + // Let them know why their message became unapproved. + if ($context['becomesUnapproved']) + echo ' +
    + ', $txt['post_becomes_unapproved'], ' +
    '; + + // Show new topic info here? + echo '
    +
    +

    + ', $context['subject'], '', ($context['is_locked']) ? ' ' : '', ($context['is_sticky']) ? ' ' : '', ' +

    +
    '; + + // Show the page index... "Pages: [1]". + echo ' +
    + + ', template_button_strip($context['normal_buttons'], 'right'), ' + ', $context['menu_separator'], ' + '; + + // Next - Prev + echo ' + ', $context['previous_next'], ' +
    '; + + if (!empty($settings['display_who_viewing'])) + { + echo ' +

    '; + + // Show just numbers...? + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members']; + // Or show the actual people viewing the topic? + else + echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) || $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + + // Now show how many guests are here too. + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], ' +

    '; + } + + // Show the anchor for the top and for the first message. If the first message is new, say so. + echo ' + + ', $context['first_new_message'] ? '' : ''; + + // Is this topic also a poll? + if ($context['is_poll']) + { + echo ' +
    +
    +

    + ', $context['poll']['is_locked'] ? '' : '', ' ', $context['poll']['question'], ' +

    +
    +
    +
    '; + + // Are they not allowed to vote but allowed to view the options? + if ($context['poll']['show_results'] || !$context['allow_vote']) + { + echo ' +
    '; + + // Show each option with its corresponding percentage bar. + foreach ($context['poll']['options'] as $option) + { + echo ' +
    ', $option['option'], '
    +
    '; + + if ($context['allow_results_view']) + echo ' + ', $option['bar_ndt'], ' + ', $option['votes'], ' (', $option['percent'], '%)'; + + echo ' +
    '; + } + + echo ' +
    '; + + if ($context['allow_results_view']) + echo ' +

    ', $txt['poll_total_voters'], ': ', $context['poll']['total_votes'], '

    '; + } + // They are allowed to vote! Go to it! + else + { + echo ' +
    '; + + // Show a warning if they are allowed more than one option. + if ($context['poll']['allowed_warning']) + echo ' +

    ', $context['poll']['allowed_warning'], '

    '; + + echo ' +
      '; + + // Show each option with its button - a radio likely. + foreach ($context['poll']['options'] as $option) + echo ' +
    • ', $option['vote_button'], '
    • '; + + echo ' +
    +
    + + +
    +
    '; + } + + // Is the clock ticking? + if (!empty($context['poll']['expire_time'])) + echo ' +

    ', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ': ', $context['poll']['expire_time'], '

    '; + + echo ' +
    +
    +
    +
    '; + + template_button_strip($context['poll_buttons']); + + echo ' +
    + '; + } + + // Does this topic have some events linked to it? + if (!empty($context['linked_calendar_events'])) + { + echo ' +
    +

    ', $txt['calendar_linked_events'], '

    +
    +
    + +
    '; + } + // Mobile action - moderation buttons (top) + if (!empty($context['normal_buttons'])) + echo ' +
    + ', $txt['mobile_action'], ' + ', !empty($context['mod_buttons']) ? '' . $txt['mobile_moderation'] . '' : '', ' +
    '; + + echo ' + '; + + // Show the topic information - icon, subject, etc. + echo ' +
    +
    '; + + $context['ignoredMsgs'] = array(); + $context['removableMessageIDs'] = array(); + + // Get all the messages... + while ($message = $context['get_message']()) + template_single_post($message); + + echo ' +
    +
    '; + + // Show the page index... "Pages: [1]". But after all posts. + echo ' +
    + + ', template_button_strip($context['normal_buttons'], 'right'), ' + ', $context['menu_separator'], ' + '; + // Next - Prev + //echo '', $context['previous_next'], '' + ; + + // Mobile action - moderation buttons (bottom) + if (!empty($context['normal_buttons'])) + echo ' +
    + ', $txt['mobile_action'], ' + ', !empty($context['mod_buttons']) ? '' . $txt['mobile_moderation'] . '' : '', ' +
    '; + + echo ' +
    '; + + // Show the lower breadcrumbs. + theme_linktree(); + + // Moderation buttons + echo ' +
    + ', template_button_strip($context['mod_buttons'], 'bottom', array('id' => 'moderationbuttons_strip')), ' +
    '; + + // Show the jumpto box, or actually...let Javascript do it. + echo ' +
    '; + + // User action pop on mobile screen (or actually small screen), this uses responsive css does not check mobile device. + echo ' + '; + + // Show the moderation button & pop (if there is anything to show) + if (!empty($context['mod_buttons'])) + echo ' + '; + + echo ' + '; +} + +/** + * Template for displaying a single post. + * + * @param array $message An array of information about the message to display. Should have 'id' and 'member'. Can also have 'first_new', 'is_ignored' and 'css_class'. + */ +function template_single_post($message) +{ + global $context, $settings, $options, $txt, $scripturl, $modSettings; + + $ignoring = false; + + if ($message['can_remove']) + $context['removableMessageIDs'][] = $message['id']; + + // Are we ignoring this message? + if (!empty($message['is_ignored'])) + { + $ignoring = true; + $context['ignoredMsgs'][] = $message['id']; + } + + // Show the message anchor and a "new" anchor if this message is new. + echo ' +
    + ', $message['id'] != $context['first_message'] ? ' + ' . ($message['first_new'] ? '' : '') : '', ' +
    '; + + // Show information about the poster of this message. + echo ' +
    '; + + // Are there any custom fields above the member name? + if (!empty($message['custom_fields']['above_member'])) + { + echo ' +
    +
      '; + + foreach ($message['custom_fields']['above_member'] as $custom) + echo ' +
    • ', $custom['value'], '
    • '; + + echo ' +
    +
    '; + } + + echo ' +

    '; + + + // Custom fields BEFORE the username? + if (!empty($message['custom_fields']['before_member'])) + foreach ($message['custom_fields']['before_member'] as $custom) + echo ' + ', $custom['value'], ''; + + // Show a link to the member's profile. + echo ' + ', $message['member']['link']; + + // Custom fields AFTER the username? + if (!empty($message['custom_fields']['after_member'])) + foreach ($message['custom_fields']['after_member'] as $custom) + echo ' + ', $custom['value'], ''; + + // Begin display of user info + echo ' +

    + +
    +
    +
    '; + + // Some people don't want subject... The div is still required or quick edit breaks. + echo ' +
    + ', $message['link'], ' +
    '; +// Link with date and link to the message above post + echo ' + + +
    '; + + // Ignoring this user? Hide the post. + if ($ignoring) + echo ' +
    + ', $txt['ignoring_user'], ' + +
    '; + + // Show the post itself, finally! + echo ' +
    '; + + if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id']) + echo ' +
    + ', $txt['post_awaiting_approval'], ' +
    '; + echo ' + +
    '; + + // Assuming there are attachments... + if (!empty($message['attachment'])) + { + $last_approved_state = 1; + // Don't output the div unless we actually have something to show... + $div_output = false; + + foreach ($message['attachment'] as $attachment) + { + // Do we want this attachment to not be showed here? + if ($attachment['is_approved'] && !empty($modSettings['dont_show_attach_under_post']) && !empty($context['show_attach_under_post'][$attachment['id']])) + continue; + elseif (!$div_output) + { + $div_output = true; + + echo ' + '; + } + + echo ' +
    '; + + // What about likes? + if (!empty($modSettings['enable_likes'])) + { + echo ' +
      '; + + if (!empty($message['likes']['can_like'])) + { + echo ' + '; + } + + if (!empty($message['likes']['count'])) + { + $context['some_likes'] = true; + $count = $message['likes']['count']; + $base = 'likes_'; + + if ($message['likes']['you']) + { + $base = 'you_' . $base; + $count--; + } + + $base .= (isset($txt[$base . $count])) ? $count : 'n'; + + echo ' + '; + } + + echo ' +
    '; + } + + + echo ' +
    +
    '; + // Show "<< Last Edit: Time by Person >>" if this post was edited. But we need the div even if it wasn't modified! + // Because we insert into it through AJAX and we don't want to stop themers moving it around if they so wish so they can put it where they want it. + echo ' + '; + + if (!empty($modSettings['show_modify']) && !empty($message['modified']['name'])) + echo + $message['modified']['last_edit_text']; + + echo ''; + // Are there any custom profile fields for above the signature? + if (!empty($message['custom_fields']['above_signature'])) + { + echo ' +
    +
      '; + + foreach ($message['custom_fields']['above_signature'] as $custom) + echo ' +
    • ', $custom['value'], '
    • '; + + echo ' +
    +
    '; + } + + // Show the member's signature? + if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) + echo ' + '; + + // Are there any custom profile fields for below the signature? + if (!empty($message['custom_fields']['below_signature'])) + { + echo ' +
    +
      '; + + foreach ($message['custom_fields']['below_signature'] as $custom) + echo ' +
    • ', $custom['value'], '
    • '; + + echo ' +
    +
    '; + } + + echo ' +
    +
    +
    +
    +
    '; +} + +/** + * The template for displaying the quick reply box. + */ +function template_quickreply() +{ + global $context, $modSettings, $scripturl, $options, $txt; + + echo ' + +
    +
    +

    + ', $txt['quick_reply'], ' +

    +
    +
    +
    '; + + // Is the topic locked? + if ($context['is_locked']) + echo ' +

    ', $txt['quick_reply_warning'], '

    '; + + // Show a warning if the topic is old + if (!empty($context['oldTopicError'])) + echo ' +

    ', sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']), '

    '; + + // Does the post need approval? + if (!$context['can_reply_approved']) + echo ' +

    ', $txt['wait_for_approval'], '

    '; + + echo ' +
    + + + + + + + + + + '; + + // Guests just need more. + if ($context['user']['is_guest']) + { + echo ' +
    +
    + ', $txt['name'], ': +
    +
    + +
    '; + + if (empty($modSettings['guest_post_no_email'])) + { + echo ' +
    + ', $txt['email'], ': +
    +
    + +
    '; + } + + echo ' +
    '; + } + + echo ' + ', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'), ' + '; + + // Is visual verification enabled? + if ($context['require_verification']) + echo ' +
    + ', $txt['verification'], ': + ', template_control_verification($context['visual_verification_id'], 'all'), ' +
    '; + + // Finally, the submit buttons. + echo ' + + ', template_control_richedit_buttons($context['post_box_name']), ' + '; + echo ' +
    +
    +
    +
    +
    '; + + // Draft autosave available and the user has it enabled? + if (!empty($context['drafts_autosave'])) + echo ' + '; + + if ($context['show_spellchecking']) + echo ' +
    + +
    '; + + echo ' + '; +} + +?> diff --git a/Errors.template.php b/Errors.template.php new file mode 100644 index 0000000..005e97a --- /dev/null +++ b/Errors.template.php @@ -0,0 +1,380 @@ + + ', $context['error_title'], ' +
    +
    + ', $context['error_message'], ' +
    '; + else + { + echo ' +
    +
    +

    + ', $context['error_title'], ' +

    +
    +
    +
    + ', $context['error_message'], ' +
    +
    +
    '; + + // Show a back button + echo ' +
    + ', $txt['back'], ' +
    '; + } +} + +/** + * This template handles the error log in the admin center. + */ +function template_error_log() +{ + global $scripturl, $context, $txt; + + echo ' +
    +
    +

    + ', $txt['errorlog'], ' +

    +
    +
    +
    '; + + // No errors, so just show a message and be done with it. + if (empty($context['errors'])) + { + echo ' + ', $txt['errorlog_no_entries'], ' +
    +
    +
    '; + return; + } + + if ($context['has_filter']) + echo ' +
    + ', $txt['applying_filter'], ': ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], ' +
    '; + + echo ' +
    + + + ', ($context['has_filter'] ? '' . $txt['clear_filter'] . '' : ''), ' +
    + ', $txt['apply_filter_of_type'], ':'; + + $error_types = array(); + + foreach ($context['error_types'] as $type => $details) + $error_types[] = ($details['is_selected'] ? ' ' : '') . '' . ($details['error_type'] === 'critical' ? '' . $details['label'] . '' : $details['label']) . ''; + + echo ' + ', implode(' | ', $error_types), ' + + +
    + +
    + + +
    +
    '; + + // We have some errors, must be some mods installed :P + foreach ($context['errors'] as $error) + { + echo ' +
    +
    ', $error['id'], '
    +
    + + + +
    + ', $error['time'], ' +
    +
    +
    +
    +
    + + ', $error['member']['link'], ''; + + if (!empty($error['member']['ip'])) + echo ' +
    + + ', $error['member']['ip'], ''; + + if (!empty($error['member']['session'])) + echo ' +
    + ', $error['member']['session'], ''; + + echo ' +
    + + ', $error['url']['html'], ''; + + if (!empty($error['file'])) + echo ' +
    + ', $error['file']['file'], ' (', $txt['line'], ' ', $error['file']['line'], ')'; + + echo ' +
    + +
    +
    +
    + ', $txt['error_type'], ': ', $error['error_type']['type'] === 'critical' ? '' . $error['error_type']['name'] . '' : $error['error_type']['name'], '
    + + ', $error['message']['html'], ' +
    +
    '; + } + + echo ' +
    + +
    + + +
    +
    '; + + if ($context['sort_direction'] == 'down') + echo ' + '; + + echo ' + + + '; +} + +/** + * This template shows a snippet of code from a file and highlights which line caused the error. + */ +function template_show_file() +{ + global $context, $settings, $modSettings; + + echo ' + + + + ', $context['file_data']['file'], ' + ', template_css(), ' + + + '; + foreach ($context['file_data']['contents'] as $index => $line) + { + $line_num = $index + $context['file_data']['min']; + $is_target = $line_num == $context['file_data']['target']; + + echo ' + + + + '; + } + echo ' +
    ==>' : '">', $line_num, ':', $line, '
    + +'; +} + +/** + * This template handles showing attachment-related errors + */ +function template_attachment_errors() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    + ', $context['error_title'], ' +

    +
    +
    +
    +
    ', + $context['error_message'], ' +
    '; + + if (!empty($context['back_link'])) + echo ' + ', $txt['back'], ''; + + echo ' + + ', $txt['continue'], ' +
    +
    +
    '; +} + +/** + * This template shows a backtrace of the given error + */ +function template_show_backtrace() +{ + global $context, $settings, $modSettings, $txt, $scripturl; + + echo ' + + + + ', $txt['backtrace_title'], ''; + + template_css(); + + echo ' + + '; + + if (!empty($context['error_info'])) + { + echo ' +
    +

    + ', $txt['error'], ' +

    +
    +
    + + '; + + if (!empty($context['error_info']['error_type'])) + echo ' + + + + + + '; + + if (!empty($context['error_info']['message'])) + echo ' + + + + + + '; + + if (!empty($context['error_info']['file'])) + echo ' + + + + + + '; + + if (!empty($context['error_info']['line'])) + echo ' + + + + + + '; + + if (!empty($context['error_info']['url'])) + echo ' + + + + + + '; + + echo ' + +
    ', $txt['error_type'], '
    ', ucfirst($context['error_info']['error_type']), '
    ', $txt['error_message'], '
    ', $context['error_info']['message'], '
    ', $txt['error_file'], '
    ', $context['error_info']['file'], '
    ', $txt['error_line'], '
    ', $context['error_info']['line'], '
    ', $txt['error_url'], '
    ', $context['error_info']['url'], '
    +
    '; + } + + if (!empty($context['error_info']['backtrace'])) + { + echo ' +
    +

    + ', $txt['backtrace_title'], ' +

    +
    +
    +
      '; + + foreach ($context['error_info']['backtrace'] as $key => $value) + { + //Check for existing + if (!property_exists($value, 'file') || empty($value->file)) + $value->file = $txt['unknown']; + + if (!property_exists($value, 'line') || empty($value->line)) + $value->line = -1; + + echo ' +
    • ', sprintf($txt['backtrace_info'], $key, $value->function, $value->file, $value->line, base64_encode($value->file), $scripturl), '
    • '; + } + + echo ' +
    +
    '; + } + + echo ' + +'; +} + +?> \ No newline at end of file diff --git a/GenericControls.template.php b/GenericControls.template.php new file mode 100644 index 0000000..759f276 --- /dev/null +++ b/GenericControls.template.php @@ -0,0 +1,273 @@ +', $editor_context['value'], ' +
    + + '; +} + +/** + * This template shows the form buttons at the bottom of the editor + * + * @param string $editor_id The editor ID + */ +function template_control_richedit_buttons($editor_id) +{ + global $context, $settings, $txt, $modSettings; + + $editor_context = &$context['controls']['richedit'][$editor_id]; + + echo ' + + ', $context['shortcuts_text'], ' + + '; + + $tempTab = $context['tabindex']; + + if (!empty($context['drafts_pm_save'])) + $tempTab++; + elseif (!empty($context['drafts_save'])) + $tempTab++; + elseif ($editor_context['preview_type']) + $tempTab++; + elseif ($context['show_spellchecking']) + $tempTab++; + + $tempTab++; + $context['tabindex'] = $tempTab; + + foreach ($context['richedit_buttons'] as $name => $button) { + if ($name == 'spell_check') { + $button['onclick'] = 'oEditorHandle_' . $editor_id . '.spellCheckStart();'; + } + + if ($name == 'preview') { + $button['value'] = isset($editor_context['labels']['preview_button']) ? $editor_context['labels']['preview_button'] : $button['value']; + $button['onclick'] = $editor_context['preview_type'] == 2 ? '' : 'return submitThisOnce(this);'; + $button['show'] = $editor_context['preview_type']; + } + + if ($button['show']) { + echo ' + '; + } + } + + echo ' + + '; + + // Load in the PM autosaver if it's enabled + if (!empty($context['drafts_pm_save']) && !empty($context['drafts_autosave'])) + echo ' + + + + + '; + + // Start an instance of the auto saver if its enabled + if (!empty($context['drafts_save']) && !empty($context['drafts_autosave'])) + echo ' + + + + + '; +} + +/** + * This template displays a verification form + * + * @param int|string $verify_id The verification control ID + * @param string $display_type What type to display. Can be 'single' to only show one verification option or 'all' to show all of them + * @param bool $reset Whether to reset the internal tracking counter + * @return bool False if there's nothing else to show, true if $display_type is 'single', nothing otherwise + */ +function template_control_verification($verify_id, $display_type = 'all', $reset = false) +{ + global $context, $txt; + + $verify_context = &$context['controls']['verification'][$verify_id]; + + // Keep track of where we are. + if (empty($verify_context['tracking']) || $reset) + $verify_context['tracking'] = 0; + + // How many items are there to display in total. + $total_items = count($verify_context['questions']) + ($verify_context['show_visual'] || $verify_context['can_recaptcha'] ? 1 : 0); + + // If we've gone too far, stop. + if ($verify_context['tracking'] > $total_items) + return false; + + // Loop through each item to show them. + for ($i = 0; $i < $total_items; $i++) + { + // If we're after a single item only show it if we're in the right place. + if ($display_type == 'single' && $verify_context['tracking'] != $i) + continue; + + if ($display_type != 'single') + echo ' +
    '; + + // Display empty field, but only if we have one, and it's the first time. + if ($verify_context['empty_field'] && empty($i)) + echo ' +
    + ', $txt['visual_verification_hidden'], ': + +
    '; + + // Do the actual stuff + if ($i == 0 && ($verify_context['show_visual'] || $verify_context['can_recaptcha'])) + { + if ($verify_context['show_visual']) + { + if ($context['use_graphic_library']) + echo ' + ', $txt['visual_verification_description'], ''; + else + echo ' + ', $txt['visual_verification_description'], ' + ', $txt['visual_verification_description'], ' + ', $txt['visual_verification_description'], ' + ', $txt['visual_verification_description'], ' + ', $txt['visual_verification_description'], ' + ', $txt['visual_verification_description'], ''; + + echo ' +
    + ', $txt['visual_verification_sound'], ' / ', $txt['visual_verification_request_new'], '', $display_type != 'quick_reply' ? '
    ' : '', '
    + ', $txt['visual_verification_description'], ':', $display_type != 'quick_reply' ? '
    ' : '', ' + +
    '; + } + + if ($verify_context['can_recaptcha']) + { + $lang = (isset($txt['lang_recaptcha']) ? $txt['lang_recaptcha'] : $txt['lang_dictionary']); + echo ' +
    +
    + '; + } + } + else + { + // Where in the question array is this question? + $qIndex = $verify_context['show_visual'] || $verify_context['can_recaptcha'] ? $i - 1 : $i; + + if (isset($verify_context['questions'][$qIndex])) + echo ' +
    + ', $verify_context['questions'][$qIndex]['q'], ':
    + +
    '; + } + + if ($display_type != 'single') + echo ' +
    '; + + // If we were displaying just one and we did it, break. + if ($display_type == 'single' && $verify_context['tracking'] == $i) + break; + } + + // Assume we found something, always. + $verify_context['tracking']++; + + // Tell something displaying piecemeal to keep going. + if ($display_type == 'single') + return true; +} + +?> \ No newline at end of file diff --git a/GenericList.template.php b/GenericList.template.php new file mode 100644 index 0000000..7cd3b5b --- /dev/null +++ b/GenericList.template.php @@ -0,0 +1,187 @@ +'; + + // Show the title of the table (if any). + if (!empty($cur_list['title'])) + echo ' +
    +

    + ', $cur_list['title'], ' +

    +
    '; + + if (isset($cur_list['additional_rows']['after_title'])) + { + echo ' +
    '; + + template_additional_rows('after_title', $cur_list); + + echo ' +
    '; + } + + if (isset($cur_list['additional_rows']['top_of_list'])) + template_additional_rows('top_of_list', $cur_list); + + if ((!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) || isset($cur_list['additional_rows']['above_column_headers'])) + { + // Show the page index (if this list doesn't intend to show all items). + if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) + echo ' +
    + +
    '; + + if (isset($cur_list['additional_rows']['above_column_headers'])) + template_additional_rows('above_column_headers', $cur_list); + } + + echo ' + '; + + // Show the column headers. + $header_count = count($cur_list['headers']); + if (!($header_count < 2 && empty($cur_list['headers'][0]['label']))) + { + echo ' + + '; + + // Loop through each column and add a table header. + foreach ($cur_list['headers'] as $col_header) + echo ' + '; + + echo ' + + '; + } + + echo ' + '; + + // Show a nice message informing there are no items in this list. + if (empty($cur_list['rows']) && !empty($cur_list['no_items_label'])) + echo ' + + + '; + + // Show the list rows. + elseif (!empty($cur_list['rows'])) + { + foreach ($cur_list['rows'] as $id => $row) + { + echo ' + '; + + if (!empty($row['data'])) + foreach ($row['data'] as $row_id => $row_data) + echo ' + '; + + echo ' + '; + } + } + + echo ' + +
    + ', empty($col_header['href']) ? '' : '', empty($col_header['label']) ? '' : $col_header['label'], empty($col_header['href']) ? '' : (empty($col_header['sort_image']) ? '' : ' '), ' +
    + ', $cur_list['no_items_label'], ' +
    + ', $row_data['value'], ' +
    '; + + if ((!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) || isset($cur_list['additional_rows']['below_table_data'])) + { + echo ' +
    '; + + // Show the page index (if this list doesn't intend to show all items). + if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) + echo ' +
    + +
    '; + + + if (isset($cur_list['additional_rows']['below_table_data'])) + template_additional_rows('below_table_data', $cur_list); + echo ' +
    '; + } + + if (isset($cur_list['additional_rows']['bottom_of_list'])) + template_additional_rows('bottom_of_list', $cur_list); + + if (isset($cur_list['form'])) + { + foreach ($cur_list['form']['hidden_fields'] as $name => $value) + echo ' + '; + + if (isset($cur_list['form']['token'])) + echo ' + '; + + echo ' + '; + } + + if (isset($cur_list['javascript'])) + echo ' + '; +} + +/** + * This template displays additional rows above or below the list. + * + * @param string $row_position The position ('top', 'bottom', etc.) + * @param array $cur_list An array with the data for the current list + */ +function template_additional_rows($row_position, $cur_list) +{ + foreach ($cur_list['additional_rows'][$row_position] as $row) + echo ' +
    + ', $row['value'], ' +
    '; +} + +?> \ No newline at end of file diff --git a/GenericMenu.template.php b/GenericMenu.template.php new file mode 100644 index 0000000..42afcf9 --- /dev/null +++ b/GenericMenu.template.php @@ -0,0 +1,308 @@ + +
    + + ', sprintf($txt['mobile_generic_menu'], $menu_label), ' +
    + + + '; + + // This is the main table - we need it so we can keep the content to the right of it. + echo ' +
    '; + + // It's possible that some pages have their own tabs they wanna force... +// if (!empty($context['tabs'])) + template_generic_menu_tabs($menu_context); +} + +/** + * Part of the admin layer - used with generic_menu_dropdown_above to close the admin content div. + */ +function template_generic_menu_dropdown_below() +{ + echo ' +
    '; +} + +/** + * The template for displaying a menu + * + * @param array $menu_context An array of menu information + */ +function template_generic_menu(&$menu_context) +{ + global $context; + + echo ' +
    + +
    '; +} + +/** + * The code for displaying the menu + * + * @param array $menu_context An array of menu context data + */ +function template_generic_menu_tabs(&$menu_context) +{ + global $context, $settings, $scripturl, $txt; + + // Handy shortcut. + $tab_context = &$menu_context['tab_data']; + + if (!empty($tab_context['title'])) + { + echo ' +
    '; + + // The function is in Admin.template.php, but since this template is used elsewhere too better check if the function is available + if (function_exists('template_admin_quick_search')) + template_admin_quick_search(); + + echo ' +

    '; + + // Exactly how many tabs do we have? + if (!empty($context['tabs'])) + { + foreach ($context['tabs'] as $id => $tab) + { + // Can this not be accessed? + if (!empty($tab['disabled'])) + { + $tab_context['tabs'][$id]['disabled'] = true; + continue; + } + + // Did this not even exist - or do we not have a label? + if (!isset($tab_context['tabs'][$id])) + $tab_context['tabs'][$id] = array('label' => $tab['label']); + elseif (!isset($tab_context['tabs'][$id]['label'])) + $tab_context['tabs'][$id]['label'] = $tab['label']; + + // Has a custom URL defined in the main admin structure? + if (isset($tab['url']) && !isset($tab_context['tabs'][$id]['url'])) + $tab_context['tabs'][$id]['url'] = $tab['url']; + + // Any additional parameters for the url? + if (isset($tab['add_params']) && !isset($tab_context['tabs'][$id]['add_params'])) + $tab_context['tabs'][$id]['add_params'] = $tab['add_params']; + + // Has it been deemed selected? + if (!empty($tab['is_selected'])) + $tab_context['tabs'][$id]['is_selected'] = true; + + // Does it have its own help? + if (!empty($tab['help'])) + $tab_context['tabs'][$id]['help'] = $tab['help']; + + // Is this the last one? + if (!empty($tab['is_last']) && !isset($tab_context['override_last'])) + $tab_context['tabs'][$id]['is_last'] = true; + } + + // Find the selected tab + foreach ($tab_context['tabs'] as $sa => $tab) + { + if (!empty($tab['is_selected']) || (isset($menu_context['current_subsection']) && $menu_context['current_subsection'] == $sa)) + { + $selected_tab = $tab; + $tab_context['tabs'][$sa]['is_selected'] = true; + } + } + } + + // Show an icon and/or a help item? + if (!empty($selected_tab['icon_class']) || !empty($tab_context['icon_class']) || !empty($selected_tab['icon']) || !empty($tab_context['icon']) || !empty($selected_tab['help']) || !empty($tab_context['help'])) + { + if (!empty($selected_tab['icon_class']) || !empty($tab_context['icon_class'])) + echo ' + '; + elseif (!empty($selected_tab['icon']) || !empty($tab_context['icon'])) + echo ' + '; + + if (!empty($selected_tab['help']) || !empty($tab_context['help'])) + echo ' + '; + + echo $tab_context['title']; + } + else + echo ' + ', $tab_context['title']; + + echo ' +

    +
    '; + } + + // Shall we use the tabs? Yes, it's the only known way! + if (!empty($selected_tab['description']) || !empty($tab_context['description'])) + echo ' +

    + ', !empty($selected_tab['description']) ? $selected_tab['description'] : $tab_context['description'], ' +

    '; + + // Print out all the items in this tab (if any). + if (!empty($context['tabs'])) + { + // The admin tabs. + echo ' + +
    + + ', sprintf($txt['mobile_generic_menu'], $tab_context['title']), ' +
    +
    +
    + +
    + '; + } +} + +?> diff --git a/Help.template.php b/Help.template.php new file mode 100644 index 0000000..d9157bb --- /dev/null +++ b/Help.template.php @@ -0,0 +1,176 @@ + + + + + + ', $context['page_title'], ' + ', template_css(), ' + + + +
    + ', $context['help_text'], '
    +
    + ', $txt['close_window'], ' +
    + +'; +} + +/** + * The template for the popup for finding members + */ +function template_find_members() +{ + global $context, $settings, $scripturl, $modSettings, $txt; + + echo ' + + + ', $txt['find_members'], ' + + + ', template_css(), ' + + + + +
    +
    +
    +

    ', $txt['find_members'], '

    +
    +
    + ', $txt['find_username'], ':
    +
    + ', $txt['find_wildcards'], '
    '; + + // Only offer to search for buddies if we have some! + if (!empty($context['show_buddies'])) + echo ' + + +
    '; + + echo ' +
    + + +
    +
    +
    +
    +
    +
    +

    ', $txt['find_results'], '

    +
    '; + + if (empty($context['results'])) + echo ' +

    ', $txt['find_no_results'], '

    '; + else + { + echo ' + +
    + +
    '; + } + + echo ' +
    + + + +
    '; + + if (empty($context['results'])) + echo ' + '; + + echo ' + +'; +} + +/** + * The main help page + */ +function template_manual() +{ + global $context, $scripturl, $txt; + + echo ' +
    +

    ', $txt['manual_smf_user_help'], '

    +
    +
    +
    +

    ', sprintf($txt['manual_welcome'], $context['forum_name_html_safe']), '

    +

    ', $txt['manual_introduction'], '

    + +

    ', sprintf($txt['manual_docs_and_credits'], $context['wiki_url'], $scripturl . '?action=credits'), '

    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Likes.template.php b/Likes.template.php new file mode 100644 index 0000000..82657da --- /dev/null +++ b/Likes.template.php @@ -0,0 +1,102 @@ + + + + + + ', $context['page_title'], ' + ', template_css(), ' + + + +
    +
      '; + + foreach ($context['likers'] as $liker => $like_details) + echo ' +
    • + ', $like_details['profile']['avatar']['image'], ' + + +
    • '; + + echo ' +
    +
    + ', $txt['close_window'], ' +
    + +'; +} + +/** + * Display a like button and info about how many people liked something + */ +function template_like() +{ + global $context, $scripturl, $txt; + + echo ' +
      '; + + if (!empty($context['data']['can_like'])) + echo ' +
    • + ', $context['data']['already_liked'] ? $txt['unlike'] : $txt['like'], ' +
    • '; + + if (!empty($context['data']['count'])) + { + $context['some_likes'] = true; + $count = $context['data']['count']; + $base = 'likes_'; + + if ($context['data']['already_liked']) + { + $base = 'you_' . $base; + $count--; + } + + $base .= (isset($txt[$base . $count])) ? $count : 'n'; + + echo ' + '; + } + + echo ' +
    '; +} + +/** + * A generic template that outputs any data passed to it... + */ +function template_generic() +{ + global $context; + + echo $context['data']; +} + +?> \ No newline at end of file diff --git a/Login.template.php b/Login.template.php new file mode 100644 index 0000000..4484b9a --- /dev/null +++ b/Login.template.php @@ -0,0 +1,503 @@ + +
    +
    +

    + ', $txt['login'], ' +

    +
    +
    + '; + + if (!empty($context['can_register'])) + echo ' +
    + ', sprintf($txt['register_prompt'], $scripturl), ' +
    '; + + // It is a long story as to why we have this when we're clearly not going to use it. + if (!empty($context['from_ajax'])) + echo ' +
    + '; + + echo ' +
    +
    + '; +} + +/** + * TFA authentication form + */ +function template_login_tfa() +{ + global $context, $scripturl, $txt; + + echo ' + '; +} + +/** + * Tell a guest to get lost or login! + */ +function template_kick_guest() +{ + global $context, $settings, $scripturl, $modSettings, $txt; + + // This isn't that much... just like normal login but with a message at the top. + echo ' +
    + +
    '; + + // Do the focus thing... + echo ' + '; +} + +/** + * This is for maintenance mode. + */ +function template_maintenance() +{ + global $context, $settings, $txt, $modSettings; + + // Display the administrator's message at the top. + echo ' +
    + +
    '; +} + +/** + * This is for the security stuff - makes administrators login every so often. + */ +function template_admin_login() +{ + global $context, $settings, $scripturl, $txt, $modSettings; + + // Since this should redirect to whatever they were doing, send all the get data. + echo ' +
    + + +
    '; + + // Focus on the password box. + echo ' + '; +} + +/** + * Activate your account manually? + */ +function template_retry_activate() +{ + global $context, $txt, $scripturl; + + // Just ask them for their code so they can try it again... + echo ' +
    +
    +

    ', $context['page_title'], '

    +
    +
    +
    '; + + // You didn't even have an ID? + if (empty($context['member_id'])) + echo ' +
    ', $txt['invalid_activation_username'], ':
    +
    '; + + echo ' +
    ', $txt['invalid_activation_retry'], ':
    +
    +
    +

    +
    +
    '; +} + +/** + * The form for resending the activation code. + */ +function template_resend() +{ + global $context, $txt, $scripturl; + + // Just ask them for their code so they can try it again... + echo ' +
    +
    +

    ', $context['page_title'], '

    +
    +
    +
    +
    ', $txt['invalid_activation_username'], ':
    +
    +
    +

    ', $txt['invalid_activation_new'], '

    +
    +
    ', $txt['invalid_activation_new_email'], ':
    +
    +
    ', $txt['invalid_activation_password'], ':
    +
    +
    '; + + if ($context['can_activate']) + echo ' +

    ', $txt['invalid_activation_known'], '

    +
    +
    ', $txt['invalid_activation_retry'], ':
    +
    +
    '; + + echo ' +

    +
    +
    '; +} + +/** + * Confirm a logout. + */ +function template_logout() +{ + global $context, $settings, $scripturl, $modSettings, $txt; + + // This isn't that much... just like normal login but with a message at the top. + echo ' +
    +
    +
    +

    ', $txt['logout_confirm'], '

    +
    +
    +

    + ', $txt['logout_notice'], ' +

    + +

    + + +

    +
    +
    +
    '; +} + +?> diff --git a/ManageAttachments.template.php b/ManageAttachments.template.php new file mode 100644 index 0000000..7fbe89d --- /dev/null +++ b/ManageAttachments.template.php @@ -0,0 +1,277 @@ + + var fUpdateStatus = function () + { + document.getElementById("avatar_max_width_external").disabled = document.getElementById("avatar_download_external").checked; + document.getElementById("avatar_max_height_external").disabled = document.getElementById("avatar_download_external").checked; + document.getElementById("avatar_action_too_large").disabled = document.getElementById("avatar_download_external").checked; + } + addLoadEvent(fUpdateStatus); + '; +} + +/** + * The attachment maintenance page + */ +function template_maintenance() +{ + global $context, $settings, $scripturl, $txt, $modSettings; + + echo ' +
    +
    +

    ', $txt['attachment_stats'], '

    +
    +
    +
    +
    ', $txt['attachment_total'], ':
    +
    ', $context['num_attachments'], '
    +
    ', $txt['attachment_manager_total_avatars'], ':
    +
    ', $context['num_avatars'], '
    +
    ', $txt['attachmentdir_size'], ':
    +
    ', $context['attachment_total_size'], ' ', $txt['kilobyte'], '
    +
    ', $txt['attach_current_dir'], ':
    +
    ', $modSettings['attachmentUploadDir'][$modSettings['currentAttachmentUploadDir']], '
    +
    ', $txt['attachmentdir_size_current'], ':
    +
    ', $context['attachment_current_size'], ' ', $txt['kilobyte'], '
    +
    ', $txt['attachment_space'], ':
    +
    ', isset($context['attachment_space']) ? $context['attachment_space'] . ' ' . $txt['kilobyte'] : $txt['attachmentdir_size_not_set'], '
    +
    ', $txt['attachmentdir_files_current'], ':
    +
    ', $context['attachment_current_files'], '
    +
    ', $txt['attachment_files'], ':
    +
    ', isset($context['attachment_files']) ? $context['attachment_files'] : $txt['attachmentdir_files_not_set'], '
    +
    +
    +
    +

    ', $txt['attachment_integrity_check'], '

    +
    +
    +
    +

    ', $txt['attachment_integrity_check_desc'], '

    + +
    +
    +
    +

    ', $txt['attachment_pruning'], '

    +
    +
    +
    +
    +
    ', $txt['attachment_remove_old'], '
    +
    ', $txt['days_word'], '
    +
    ', $txt['attachment_pruning_message'], '
    +
    + + + + +
    +
    +
    +
    +
    ', $txt['attachment_remove_size'], '
    +
    ', $txt['kilobyte'], '
    +
    ', $txt['attachment_pruning_message'], '
    +
    + + + + +
    +
    +
    +
    +
    ', $txt['attachment_manager_avatars_older'], '
    +
    ', $txt['days_word'], '
    + + + + +
    +
    +
    +
    '; + + if (!empty($context['results'])) + echo ' +
    ', $context['results'], '
    '; + + echo ' +
    +

    ', $txt['attachment_transfer'], '

    +
    +
    +
    +

    ', $txt['attachment_transfer_desc'], '

    +
    +
    ', $txt['attachment_transfer_from'], '
    +
    + +
    +
    ', $txt['attachment_transfer_auto'], '
    +
    + +
    +
    ', $txt['attachment_transfer_to'], '
    +
    + +
    '; + + if (!empty($modSettings['attachmentDirFileLimit'])) + echo ' +
    ', $txt['attachment_transfer_empty'], '
    +
    '; + + echo ' +
    + + +
    +
    +
    + +
    '; +} + +/** + * The file repair page + */ +function template_attachment_repair() +{ + global $context, $txt, $scripturl; + + // If we've completed just let them know! + if ($context['completed']) + echo ' +
    +
    +

    ', $txt['repair_attachments_complete'], '

    +
    +
    + ', $txt['repair_attachments_complete_desc'], ' +
    +
    '; + + // What about if no errors were even found? + elseif (!$context['errors_found']) + echo ' +
    +
    +

    ', $txt['repair_attachments_complete'], '

    +
    +
    + ', $txt['repair_attachments_no_errors'], ' +
    +
    '; + + // Otherwise, I'm sad to say, we have a problem! + else + { + echo ' +
    +
    +
    +

    ', $txt['repair_attachments'], '

    +
    +
    +

    ', $txt['repair_attachments_error_desc'], '

    '; + + // Loop through each error reporting the status + foreach ($context['repair_errors'] as $error => $number) + if (!empty($number)) + echo ' + +
    '; + + echo ' +
    + + +
    +
    +
    '; + } +} + +/** + * The page that handles managing attachment paths. + */ +function template_attachment_paths() +{ + global $modSettings; + + if (!empty($modSettings['attachment_basedirectories'])) + template_show_list('base_paths'); + + template_show_list('attach_paths'); +} + +?> \ No newline at end of file diff --git a/ManageBans.template.php b/ManageBans.template.php new file mode 100644 index 0000000..29a9e8f --- /dev/null +++ b/ManageBans.template.php @@ -0,0 +1,338 @@ + +
    '; + + // If there were errors creating the ban, show them. + if (!empty($context['error_messages'])) + { + echo ' +
    + ', $txt['ban_errors_detected'], ' +
      '; + + foreach ($context['error_messages'] as $error) + echo ' +
    • ', $error, '
    • '; + + echo ' +
    +
    '; + } + + echo ' +
    +

    + ', $context['ban']['is_new'] ? $txt['ban_add_new'] : $txt['ban_edit'] . ' \'' . $context['ban']['name'] . '\'', ' +

    +
    '; + + if ($context['ban']['is_new']) + echo ' +
    ', $txt['ban_add_notes'], '
    '; + + echo ' +
    +
    +
    + ', $txt['ban_name'], ': +
    +
    + +
    '; + + if (isset($context['ban']['reason'])) + echo ' +
    +
    + ', $txt['ban_reason_desc'], ' +
    +
    + +
    '; + + if (isset($context['ban']['notes'])) + echo ' +
    +
    + ', $txt['ban_notes_desc'], ' +
    +
    + +
    '; + + echo ' +
    +
    + + ', $txt['ban_expiration'], ' + +
    + : ', $txt['ban_days'], '
    + +
    +
    + + ', $txt['ban_restriction'], ' + +
    +
    + (?)
    +
    +
    +
    +
    '; + + if (!empty($context['ban_suggestions'])) + { + echo ' +
    + + ', $txt['ban_triggers'], ' + +
    +
    + + +
    +
    + +
    '; + + if (empty($modSettings['disableHostnameLookup'])) + echo ' +
    + + +
    +
    + +
    '; + + echo ' +
    + + +
    +
    + +
    +
    + + : +
    +
    + +
    +
    '; + + if (!empty($context['ban_suggestions']['other_ips'])) + { + foreach ($context['ban_suggestions']['other_ips'] as $key => $ban_ips) + { + if (!empty($ban_ips)) + { + echo ' +
    ', $txt[$key], ':
    +
    '; + + $count = 0; + foreach ($ban_ips as $ip) + echo ' +
    + +
    +
    + +
    '; + + echo ' +
    '; + } + } + } + + echo ' +
    '; + } + + echo ' + + + ', isset($context['ban']['from_user']) ? ' + ' : '', ' + + +
    +
    '; + + if (!$context['ban']['is_new'] && empty($context['ban_suggestions'])) + { + echo ' +
    '; + template_show_list('ban_items'); + } + + echo ' + + '; +} + +/** + * Add or edit a ban trigger + */ +function template_ban_edit_trigger() +{ + global $context, $txt, $modSettings; + + echo ' +
    +
    +
    +

    + ', $context['ban_trigger']['is_new'] ? $txt['ban_add_trigger'] : $txt['ban_edit_trigger_title'], ' +

    +
    +
    +
    '; + if ($context['ban_trigger']['is_new']) + echo ' + + ', $txt['ban_triggers'], ' + '; + echo ' +
    '; + if ($context['ban_trigger']['is_new'] || $context['ban_trigger']['ip']['selected']) + echo ' +
    + + +
    +
    + +
    '; + + if (empty($modSettings['disableHostnameLookup']) && ($context['ban_trigger']['is_new'] || $context['ban_trigger']['hostname']['selected'])) + echo ' +
    + + +
    +
    + +
    '; + if ($context['ban_trigger']['is_new'] || $context['ban_trigger']['email']['selected']) + echo ' +
    + + +
    +
    + +
    '; + if ($context['ban_trigger']['is_new'] || $context['ban_trigger']['banneduser']['selected']) + echo ' +
    + + : +
    +
    + +
    '; + echo ' +
    +
    + +
    + + + + +
    +
    + '; +} + +?> \ No newline at end of file diff --git a/ManageBoards.template.php b/ManageBoards.template.php new file mode 100644 index 0000000..0c20333 --- /dev/null +++ b/ManageBoards.template.php @@ -0,0 +1,768 @@ + +
    +

    ', $txt['boards_edit'], '

    +
    +
    '; + + if (!empty($context['move_board'])) + echo ' +
    + ', $context['move_title'], ' [', $txt['mboards_cancel_moving'], ']', ' +
    '; + + // No categories so show a label. + if (empty($context['categories'])) + echo ' +
    + ', $txt['mboards_no_cats'], ' +
    '; + + // Loop through every category, listing the boards in each as we go. + foreach ($context['categories'] as $category) + { + // Link to modify the category. + echo ' + '; + + // Boards table header. + echo ' +
    +
      '; + + if (!empty($category['move_link'])) + echo ' +
    • '; + + $recycle_board = ' ' . $txt['recycle_board'] . ''; + $redirect_board = '' . $txt['redirect_board_desc'] . ''; + + // List through every board in the category, printing its name and link to modify the board. + foreach ($category['boards'] as $board) + { + echo ' + + ', $board['name'], '', !empty($modSettings['recycle_board']) && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board['id'] ? $recycle_board : '', $board['is_redirect'] ? $redirect_board : '', ' + + ', $context['can_manage_permissions'] ? '' . $txt['mboards_permissions'] . '' : '', ' + ', $txt['mboards_move'], ' + ', $txt['mboards_modify'], ' +
      + '; + + if (!empty($board['move_links'])) + { + echo ' +
    • '; + + foreach ($board['move_links'] as $link) + echo ' + '; + + echo ' +
    • '; + } + } + + // Button to add a new board. + echo ' +
    + + +
    '; + } + + echo ' +
    + '; +} + +/** + * Template for editing/adding a category on the forum. + */ +function template_modify_category() +{ + global $context, $scripturl, $txt; + + // Print table header. + echo ' +
    +
    + +
    +

    + ', isset($context['category']['is_new']) ? $txt['mboards_new_cat_name'] : $txt['cat_edit'], ' +

    +
    +
    +
    '; + + // If this isn't the only category, let the user choose where this category should be positioned down the board index. + if (count($context['category_order']) > 1) + { + echo ' +
    ', $txt['order'], ':
    +
    + +
    '; + } + + // Allow the user to edit the category name and/or choose whether you can collapse the category. + echo ' +
    + ', $txt['full_name'], ':
    + ', $txt['name_on_display'], ' +
    +
    + +
    +
    + ', $txt['mboards_description'], '
    + ', str_replace('{allowed_tags}', implode(', ', $context['description_allowed_tags']), $txt['mboards_cat_description_desc']), ' +
    +
    + +
    +
    + ', $txt['collapse_enable'], '
    + ', $txt['collapse_desc'], ' +
    +
    + +
    '; + + // Show any category settings added by mods using the 'integrate_edit_category' hook. + if (!empty($context['custom_category_settings']) && is_array($context['custom_category_settings'])) + { + foreach ($context['custom_category_settings'] as $catset_id => $catset) + { + if (!empty($catset['dt']) && !empty($catset['dd'])) + echo ' +
    + ', $catset['dt'], ' +
    + + ', $catset['dd'], ' + '; + } + } + + // Table footer. + echo ' +
    '; + + if (isset($context['category']['is_new'])) + echo ' + '; + else + echo ' + + '; + echo ' + + '; + + // If this category is empty we don't bother with the next confirmation screen. + if ($context['category']['is_empty']) + echo ' + '; + + echo ' +
    +
    +
    '; +} + +/** + * A template to confirm if a user wishes to delete a category - and whether they want to save the boards. + */ +function template_confirm_category_delete() +{ + global $context, $scripturl, $txt; + + // Print table header. + echo ' +
    +
    + +
    +

    ', $txt['mboards_delete_cat'], '

    +
    +
    +

    ', $txt['mboards_delete_cat_contains'], ':

    +
      '; + + foreach ($context['category']['children'] as $child) + echo ' +
    • ', $child, '
    • '; + + echo ' +
    +
    +
    +

    ', $txt['mboards_delete_what_do'], '

    +
    +
    +

    +
    + : + +

    + + + + + +
    +
    +
    '; +} + +/** + * Below is the template for adding/editing a board on the forum. + */ +function template_modify_board() +{ + global $context, $scripturl, $txt, $modSettings; + + // The main table header. + echo ' +
    +
    + +
    +

    + ', isset($context['board']['is_new']) ? $txt['mboards_new_board_name'] : $txt['boards_edit'], ' +

    +
    +
    +
    '; + + // Option for choosing the category the board lives in. + echo ' +
    + ', $txt['mboards_category'], ': +
    +
    + +
    '; + + // If this isn't the only board in this category let the user choose where the board is to live. + if ((isset($context['board']['is_new']) && count($context['board_order']) > 0) || count($context['board_order']) > 1) + { + echo ' +
    + ', $txt['order'], ': +
    +
    '; + + // The first select box gives the user the option to position it before, after or as a child of another board. + echo ' + '; + + // The second select box lists all the boards in the category. + echo ' + +
    '; + } + + // Options for board name and description. + echo ' +
    + ', $txt['full_name'], ':
    + ', $txt['name_on_display'], ' +
    +
    + +
    +
    + ', $txt['mboards_description'], ':
    + ', str_replace('{allowed_tags}', implode(', ', $context['description_allowed_tags']), $txt['mboards_description_desc']), ' +
    +
    + +
    +
    + ', $txt['permission_profile'], ':
    + ', $context['can_manage_permissions'] ? sprintf($txt['permission_profile_desc'], $scripturl . '?action=admin;area=permissions;sa=profiles;' . $context['session_var'] . '=' . $context['session_id']) : strip_tags($txt['permission_profile_desc']), ' +
    +
    + +
    +
    + ', $txt['mboards_groups'], ':
    + ', empty($modSettings['deny_boards_access']) ? $txt['mboards_groups_desc'] : $txt['boardsaccess_option_desc'], ''; + + echo ' +
    +
    '; + + if (!empty($modSettings['deny_boards_access'])) + echo ' + + + + + + + '; + + // List all the membergroups so the user can choose who may access this board. + foreach ($context['groups'] as $group) + if (empty($modSettings['deny_boards_access'])) + echo ' +
    '; + else + echo ' + + + + + + + '; + + if (empty($modSettings['deny_boards_access'])) + echo ' + + ', $txt['check_all'], ' + +

    + '; + else + echo ' + + + + + + + +
    ', $txt['permissions_option_on'], '', $txt['permissions_option_off'], '', $txt['permissions_option_deny'], '
    + + + + + + + +
    + + + + + + + + ', $txt['check_all'], ' +
    +
    '; + + // Options to choose moderators, specify as announcement board and choose whether to count posts here. + echo ' +
    + ', $txt['mboards_moderators'], ':
    + ', $txt['mboards_moderators_desc'], '
    +
    +
    + +
    +
    +
    + ', $txt['mboards_moderator_groups'], ':
    + ', $txt['mboards_moderator_groups_desc'], '
    +
    +
    + +
    +
    +
    + +
    '; + + if (empty($context['board']['is_recycle']) && empty($context['board']['topics'])) + { + echo ' +
    +
    + ', $txt['mboards_redirect'], ':
    + ', $txt['mboards_redirect_desc'], '
    +
    +
    + +
    +
    + +
    +
    +
    + ', $txt['mboards_redirect_url'], ':
    + ', $txt['mboards_redirect_url_desc'], '
    +
    +
    + +
    +
    +
    '; + + if ($context['board']['redirect']) + echo ' +
    +
    +
    + ', $txt['mboards_redirect_reset'], ':
    + ', $txt['mboards_redirect_reset_desc'], '
    +
    +
    + + (', sprintf($txt['mboards_current_redirects'], $context['board']['posts']), ') +
    +
    +
    '; + } + + echo ' +
    +
    +
    + ', $txt['mboards_count_posts'], ':
    + ', $txt['mboards_count_posts_desc'], '
    +
    +
    + +
    +
    +
    '; + + // Here the user can choose to force this board to use a theme other than the default theme for the forum. + echo ' +
    +
    +
    + ', $txt['mboards_theme'], ':
    + ', $txt['mboards_theme_desc'], '
    +
    +
    + +
    +
    +
    +
    +
    +
    + ', $txt['mboards_override_theme'], ':
    + ', $txt['mboards_override_theme_desc'], '
    +
    +
    + +
    +
    +
    '; + + // Show any board settings added by mods using the 'integrate_edit_board' hook. + if (!empty($context['custom_board_settings']) && is_array($context['custom_board_settings'])) + { + echo ' +
    +
    +
    '; + + foreach ($context['custom_board_settings'] as $cbs_id => $cbs) + { + if (!empty($cbs['dt']) && !empty($cbs['dd'])) + echo ' +
    + ', $cbs['dt'], ' +
    + + ', $cbs['dd'], ' + '; + } + + echo ' +
    +
    '; + } + + if (!empty($context['board']['is_recycle'])) + echo ' +
    ', $txt['mboards_recycle_disabled_delete'], '
    '; + + echo ' + + + '; + + // If this board has no children don't bother with the next confirmation screen. + if ($context['board']['no_children']) + echo ' + '; + + if (isset($context['board']['is_new'])) + echo ' + + '; + else + echo ' + '; + + if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) + echo ' + '; + echo ' +
    +
    +
    + + '; + + // Javascript for deciding what to show. + echo ' + '; +} + +/** + * A template used when a user is deleting a board with child boards in it - to see what they want to do with them. + */ +function template_confirm_board_delete() +{ + global $context, $scripturl, $txt; + + // Print table header. + echo ' +
    +
    + + +
    +

    ', $txt['mboards_delete_board'], '

    +
    +
    +

    ', $txt['mboards_delete_board_contains'], '

    +
      '; + + foreach ($context['children'] as $child) + echo ' +
    • ', $child['node']['name'], '
    • '; + + echo ' +
    +
    +
    +

    ', $txt['mboards_delete_what_do'], '

    +
    +
    +

    +
    + : + +

    + + + + + +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/ManageCalendar.template.php b/ManageCalendar.template.php new file mode 100644 index 0000000..8e8b340 --- /dev/null +++ b/ManageCalendar.template.php @@ -0,0 +1,86 @@ + +
    +

    ', $context['page_title'], '

    +
    +
    +
    +
    + ', $txt['holidays_title_label'], ': +
    +
    + +
    +
    + ', $txt['calendar_year'], ' +
    +
    + + + + + +
    +
    '; + + if ($context['is_new']) + echo ' + '; + else + echo ' + + + '; + echo ' + + +
    + '; +} + +?> \ No newline at end of file diff --git a/ManageLanguages.template.php b/ManageLanguages.template.php new file mode 100644 index 0000000..bca1d12 --- /dev/null +++ b/ManageLanguages.template.php @@ -0,0 +1,367 @@ + +

    + ', $txt['languages_download_complete'], ' +

    + +
    + ', $context['install_complete'], ' +
    '; + return; + } + + // An error? + if (!empty($context['error_message'])) + echo ' +
    + ', $context['error_message'], ' +
    '; + + // Provide something of an introduction... + echo ' +
    +
    +

    + ', $txt['languages_download'], ' +

    +
    +
    +

    + ', $txt['languages_download_note'], ' +

    +
    + ', $txt['languages_download_info'], ' +
    +
    '; + + // Show the main files. + template_show_list('lang_main_files_list'); + + // Do we want some FTP baby? + // If the files are not writable, we might! + if (!empty($context['still_not_writable'])) + { + if (!empty($context['package_ftp']['error'])) + echo ' +
    + ', $context['package_ftp']['error'], ' +
    '; + + echo ' +
    +

    + ', $txt['package_ftp_necessary'], ' +

    +
    +
    +

    ', $txt['package_ftp_why'], '

    +
    +
    ', $txt['package_ftp_server'], ': +
    +
    +
    + + +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    +
    +
    '; + } + + // Install? + echo ' +
    + + + +
    +
    '; +} + +/** + * Edit language entries. Note that this doesn't always work because of PHP's max_post_vars setting. + */ +function template_modify_language_entries() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +

    + ', $txt['edit_languages'], ' +

    +
    +
    + ', $txt['edit_language_entries_primary'], ' +
    '; + + // Not writable? Oops, show an error for ya. + if (!empty($context['lang_file_not_writable_message'])) + echo ' +
    + ', $context['lang_file_not_writable_message'], ' +
    '; + + // Show the language entries + echo ' +
    +
    + ', $context['primary_settings']['name'], ' +
    '; + + foreach ($context['primary_settings'] as $setting => $setting_info) + { + if ($setting != 'name') + echo ' +
    + + +
    +
    + +
    '; + } + + echo ' +
    +
    + + + + '; + + // Allow deleting entries. English can't be deleted though. + if ($context['lang_id'] != 'english') + echo ' + '; + + echo ' +
    +
    + +
    +
    +

    + ', $txt['edit_language_entries'], ' +

    +
    +
    +
    + ', sprintf($txt['edit_language_entries_desc'], $scripturl, $txt['themeadmin_edit_title']), ' +
    +
    +
    + ', $txt['edit_language_entries_file'], ': + + + + +
    +
    '; + + // Is it not writable? Show an error. + if (!empty($context['entries_not_writable_message'])) + echo ' +
    + ', $context['entries_not_writable_message'], ' +
    '; + + // Already have some file entries? + if (!empty($context['file_entries'])) + { + echo ' +
    '; + + $entry_num = 0; + foreach ($context['file_entries'] as $group => $entries) + { + echo ' +
    + + + ', $txt['languages_' . $group], ' + +
    '; + + foreach ($entries as $entry) + { + ++$entry_num; + + echo ' +
    + ', $entry['key'], isset($entry['subkey']) ? '[' . $entry['subkey'] . ']' : '', ' +
    +
    '; + + if ($entry['can_remove']) + echo ' + + + + + + + + + + + + '; + else + echo ' + + '; + + echo ' + + + +
    '; + } + + echo ' +
    '; + + if (!empty($context['can_add_lang_entry'][$group])) + { + echo ' + + '; + } + + echo ' +
    '; + } + + echo ' + +
    '; + } + + echo ' +
    '; +} + +/** + * Add a new language + * + */ +function template_add_language() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +

    + ', $txt['add_language'], ' +

    +
    +
    +
    + ', $txt['add_language_smf'], ' + + '; + + // Do we have some errors? Too bad. Display a little error box. + if (!empty($context['smf_error'])) + echo ' +
    +
    +

    ', $txt['add_language_error_' . $context['smf_error']], '

    +
    '; + + echo ' +
    + ', isBrowser('is_ie') ? ' ' : '', ' + +
    +
    '; + + // Had some results? + if (!empty($context['smf_languages']['rows'])) + { + echo ' +
    +

    ', $txt['add_language_found_title'], '

    +
    +
    ', $txt['add_language_smf_found'], '
    '; + + template_show_list('smf_languages'); + } + + echo ' +
    '; +} + +?> \ No newline at end of file diff --git a/ManageMail.template.php b/ManageMail.template.php new file mode 100644 index 0000000..af06f9f --- /dev/null +++ b/ManageMail.template.php @@ -0,0 +1,80 @@ + +
    +
    +

    ', $txt['mailqueue_stats'], '

    +
    +
    +
    +
    ', $txt['mailqueue_size'], '
    +
    ', $context['mail_queue_size'], '
    +
    ', $txt['mailqueue_oldest'], '
    +
    ', $context['oldest_mail'], '
    +
    +
    +
    '; + + template_show_list('mail_queue'); + + echo ' + '; +} + +/** + * Template for testing mail send. + */ + +function template_mailtest() +{ + global $context, $txt, $scripturl; + + // The results. + if (!empty($context['result'])) + { + if ($context['result'] == 'failure') + $result_txt = sprintf($txt['mailtest_result_failure'], $scripturl . '?action=admin;area=logs;sa=errorlog;desc'); + else + $result_txt = $txt['mailtest_result_success']; + + echo ' +
    ', $result_txt, '
    '; + } + + echo ' +
    +
    +

    ', $txt['mailtest_header'], '

    +
    +
    +
    +
    ', $txt['subject'], '
    +
    +
    + +
    +
    +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/ManageMaintenance.template.php b/ManageMaintenance.template.php new file mode 100644 index 0000000..09f7ebf --- /dev/null +++ b/ManageMaintenance.template.php @@ -0,0 +1,622 @@ + + ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' + '; + + echo ' +
    +
    +

    ', $txt['maintain_optimize'], '

    +
    +
    +
    +

    ', $txt['maintain_optimize_info'], '

    + + + +
    +
    '; + + // Show an option to convert the body column of the post table to MEDIUMTEXT or TEXT + if (isset($context['convert_to'])) + echo ' +
    +

    ', $txt[$context['convert_to'] . '_title'], '

    +
    +
    +
    +

    ', $txt['mediumtext_introduction'], '

    ', + $context['convert_to_suggest'] ? '

    ' . $txt['convert_to_suggest_text'] . '

    ' : '', ' + + + +
    +
    '; + + // We might want to convert entities if we're on UTF-8. + if ($context['convert_entities']) + echo ' +
    +

    ', $txt['entity_convert_title'], '

    +
    +
    +
    +

    ', $txt['entity_convert_introduction'], '

    + + + +
    +
    '; + + echo ' +
    '; +} + +/** + * Template for the routine maintenance tasks. + */ +function template_maintain_routine() +{ + global $context, $txt, $scripturl; + + // Starts off with general maintenance procedures. + echo ' +
    '; + + // If maintenance has finished tell the user. + if (!empty($context['maintenance_finished'])) + echo ' +
    + ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' +
    '; + + echo ' +
    +

    ', $txt['maintain_version'], '

    +
    +
    +
    +

    + ', $txt['maintain_version_info'], ' + + +

    +
    +
    +
    +

    ', $txt['maintain_errors'], '

    +
    +
    +
    +

    + ', $txt['maintain_errors_info'], ' + + + +

    +
    +
    +
    +

    ', $txt['maintain_recount'], '

    +
    +
    +
    +

    + ', $txt['maintain_recount_info'], ' + + + +

    +
    +
    +
    +

    ', $txt['maintain_rebuild_settings'], '

    +
    +
    +
    +

    + ', $txt['maintain_rebuild_settings_info'], ' + + +

    +
    +
    +
    +

    ', $txt['maintain_logs'], '

    +
    +
    +
    +

    + ', $txt['maintain_logs_info'], ' + + + +

    +
    +
    +
    +

    ', $txt['maintain_cache'], '

    +
    +
    +
    +

    + ', $txt['maintain_cache_info'], ' + + + +

    +
    +
    +
    '; +} + +/** + * Template for the member maintenance tasks. + */ +function template_maintain_members() +{ + global $context, $settings, $txt, $scripturl; + + echo ' + +
    '; + + // If maintenance has finished, tell the user. + if (!empty($context['maintenance_finished'])) + echo ' +
    + ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' +
    '; + + echo ' +
    +

    ', $txt['maintain_reattribute_posts'], '

    +
    +
    +
    +

    ', $txt['reattribute_guest_posts'], '

    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +

    + + +

    + + + +
    +
    +
    +

    + ', $txt['maintain_members'], ' +

    +
    +
    +
    +

    + ', $txt['maintain_members_since1'], ' + + ', $txt['maintain_members_since2'], ' + ', $txt['maintain_members_since3'], ' +

    +

    + + ', $txt['maintain_members_all'], ' +

    + + + + +
    +
    +
    +

    ', $txt['maintain_recountposts'], '

    +
    +
    +
    +

    ', $txt['maintain_recountposts_info'], '

    + + + +
    +
    +
    + + '; +} + +/** + * Template for the topic maintenance tasks. + */ +function template_maintain_topics() +{ + global $scripturl, $txt, $context, $settings, $modSettings; + + // If maintenance has finished tell the user. + if (!empty($context['maintenance_finished'])) + echo ' +
    + ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' +
    '; + + // Bit of javascript for showing which boards to prune in an otherwise hidden list. + echo ' + '; + + echo ' +
    +
    +

    ', $txt['maintain_old'], '

    +
    +
    +
    +
    '; + + // The otherwise hidden "choose which boards to prune". + echo ' +

    + ', $txt['maintain_old_since_days1'], '', $txt['maintain_old_since_days2'], ' +

    +

    +
    +
    +
    +

    +

    +
    +

    +

    + + ', $txt['maintain_old_all'], ' +

    + + + + +
    +
    +
    + +
    +

    ', $txt['maintain_old_drafts'], '

    +
    +
    +
    +

    + ', $txt['maintain_old_drafts_days'], ' ', $txt['days_word'], ' +

    + + + +
    +
    +
    +

    ', $txt['move_topics_maintenance'], '

    +
    +
    +
    +

    + + + + +

    +

    + ', $txt['move_topics_older_than'], ' + + ', $txt['manageposts_days'], ' (', $txt['move_zero_all'], ') +

    +

    +
    +
    +

    + + + +
    +
    +
    '; +} + +/** + * Simple template for showing results of our optimization... + */ +function template_optimize() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +

    ', $txt['maintain_optimize'], '

    +
    +
    +

    + ', $txt['database_numb_tables'], '
    + ', $txt['database_optimize_attempt'], '
    '; + + // List each table being optimized... + foreach ($context['optimized_tables'] as $table) + echo ' + ', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '
    '; + + // How did we go? + echo ' +
    + ', $context['num_tables_optimized'] == 0 ? $txt['database_already_optimized'] : $context['num_tables_optimized'] . ' ' . $txt['database_optimized']; + + echo ' +

    +

    ', $txt['maintain_return'], '

    +
    +
    '; +} + +/** + * Template for converting entities to UTF-8 characters + */ +function template_convert_entities() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +

    ', $txt['entity_convert_title'], '

    +
    +
    +

    ', $txt['entity_convert_introduction'], '

    +
    + +
    +
    +
    '; +} + +/** + * Template for converting posts to UTF-8. + */ +function template_convert_msgbody() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +

    ', $txt[$context['convert_to'] . '_title'], '

    +
    +
    +

    ', $txt['body_checking_introduction'], '

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

    ', $txt['exceeding_messages'], '

    +
      +
    • + ', implode('
    • ', $context['exceeding_messages']), ' +
    • +
    '; + + if (!empty($context['exceeding_messages_morethan'])) + echo ' +

    ', $context['exceeding_messages_morethan'], '

    '; + } + else + echo ' +

    ', $txt['convert_to_text'], '

    '; + + echo ' +
    +
    + + + +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/ManageMembergroups.template.php b/ManageMembergroups.template.php new file mode 100644 index 0000000..37a5400 --- /dev/null +++ b/ManageMembergroups.template.php @@ -0,0 +1,752 @@ +
    '; + + template_show_list('post_count_membergroups_list'); +} + +/** + * Add a new membergroup. + */ +function template_new_group() +{ + global $context, $scripturl, $txt, $modSettings; + + echo ' +
    +
    +

    ', $txt['membergroups_new_group'], '

    +
    +
    +
    +
    + +
    +
    + +
    '; + + if ($context['undefined_group']) + { + echo ' +
    + +
    +
    +
    + ', $txt['membergroups_edit_select_group_type'], ' +
    '; + + if ($context['allow_protected']) + echo ' +
    '; + + echo ' +
    +
    +
    +
    +
    '; + } + + if ($context['post_group'] || $context['undefined_group']) + echo ' +
    + ', $txt['membergroups_min_posts'], ': +
    +
    + +
    '; + + if (!$context['post_group'] || !empty($modSettings['permission_enable_postgroups'])) + { + echo ' +
    +
    + ', $txt['membergroups_can_edit_later'], ' +
    +
    +
    + ', $txt['membergroups_select_permission_type'], ' + + + +
    + + + +
    + + + +
    +
    '; + } + + echo ' +
    + ', $txt['membergroups_new_board'], ':', $context['post_group'] ? '
    + ' . $txt['membergroups_new_board_post_groups'] . '' : '', ' +
    +
    '; + + template_add_edit_group_boards_list(false); + + echo ' +
    +
    + +
    '; + + if ($context['undefined_group']) + echo ' + '; + + echo ' + + +
    '; +} + +/** + * Edit an existing membergroup. + */ +function template_edit_group() +{ + global $context, $scripturl, $txt, $modSettings; + + echo ' +
    +
    +

    ', $txt['membergroups_edit_group'], ' - ', $context['group']['name'], ' +

    +
    +
    +
    +
    + +
    +
    + +
    '; + + if ($context['group']['id'] != 3 && $context['group']['id'] != 4) + echo ' +
    + +
    +
    + +
    '; + + // Group type... + if ($context['group']['allow_post_group']) + { + echo ' +
    + +
    +
    +
    + ', $txt['membergroups_edit_select_group_type'], ' +
    '; + + if ($context['group']['allow_protected']) + echo ' +
    '; + + echo ' +
    +
    +
    +
    +
    '; + } + + if ($context['group']['id'] != 3 && $context['group']['id'] != 4) + echo ' +
    + +
    +
    + +
    +
    +
    + +
    +
    + +
    '; + + // Can they inherit permissions? + if ($context['group']['id'] > 1 && $context['group']['id'] != 3) + { + echo ' +
    + :
    + ', $txt['membergroups_edit_inherit_permissions_desc'], ' +
    +
    + + +
    '; + } + + if ($context['group']['allow_post_group']) + echo ' + +
    + +
    +
    + +
    '; + + echo ' +
    + +
    +
    + +
    +
    + +
    +
    + +
    '; + + // Do we have any possible icons to select from? + if (!empty($context['possible_icons'])) + { + echo ' +
    +
    + ', $txt['membergroups_icon_image_note'], ' + ', $txt['membergroups_icon_image_size'], ' +
    +
    + ', $txt['membergroups_images_url'], ' + + * +
    '; + } + + // No? Hide the entire control. + else + echo ' + '; + + echo ' +
    +
    + ', $txt['membergroups_max_messages_note'], ' +
    +
    + +
    '; + + // Force 2FA for this membergroup? + if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2) + echo ' +
    +
    + ', $txt['membergroups_tfa_force_note'], ' +
    +
    + +
    '; + + if (!empty($context['categories'])) + { + echo ' +
    + ', $txt['membergroups_new_board'], ':', $context['group']['is_post_group'] ? '
    + ' . $txt['membergroups_new_board_post_groups'] . '' : '', ' +
    +
    '; + + if (!empty($context['can_manage_boards'])) + echo $txt['membergroups_can_manage_access']; + + else + template_add_edit_group_boards_list(true, 'groupForm'); + + echo ' +
    '; + } + + echo ' +
    + ', $context['group']['allow_delete'] ? ' + ' : '', ' +
    + + +
    + '; + + if ($context['group']['allow_post_group']) + echo ' + '; +} + +/** + * The template for determining which boards a group has access to. + * + * @param bool $collapse Whether to collapse the list by default + */ +function template_add_edit_group_boards_list($collapse = true, $form_id = 'new_group') +{ + global $context, $txt, $modSettings; + + echo ' +
    + ', $txt['membergroups_new_board_desc'], ' +
      '; + + foreach ($context['categories'] as $category) + { + if (empty($modSettings['deny_boards_access'])) + echo ' +
    • + ', $category['name'], ' +
        '; + else + echo ' +
      • + ', $category['name'], ' + + ', $txt['all_boards_in_cat'], ': + + +
          '; + + foreach ($category['boards'] as $board) + { + if (empty($modSettings['deny_boards_access'])) + echo ' +
        • + +
        • '; + else + echo ' +
        • + ', $board['name'], ': + + + + + +
        • '; + } + + echo ' +
        +
      • '; + } + + echo ' +
      '; + + if (empty($modSettings['deny_boards_access'])) + echo ' +

      + + +
    '; + else + echo ' +
    + + ', $txt['all'], ': + + + + + + '; + + if ($collapse) + echo ' + + '; +} + +/** + * Template for viewing the members of a group. + */ +function template_group_members() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    ', $context['page_title'], '

    +
    +
    +
    +
    + ', $txt['name'], ': +
    +
    + ', $context['group']['name'], ' ', $context['group']['icons'], ' +
    '; + + // Any description to show? + if (!empty($context['group']['description'])) + echo ' +
    + ' . $txt['membergroups_members_description'] . ': +
    +
    + ', $context['group']['description'], ' +
    '; + + echo ' +
    + ', $txt['membergroups_members_top'], ': +
    +
    + ', $context['total_members'], ' +
    '; + + // Any group moderators to show? + if (!empty($context['group']['moderators'])) + { + $moderators = array(); + foreach ($context['group']['moderators'] as $moderator) + $moderators[] = '' . $moderator['name'] . ''; + + echo ' +
    + ', $txt['membergroups_members_group_moderators'], ': +
    +
    + ', implode(', ', $moderators), ' +
    '; + } + + echo ' +
    +
    +
    +
    +

    ', $txt['membergroups_members_group_members'], '

    +
    +
    +
    + +
    + + + + '; + + if ($context['can_send_email']) + echo ' + '; + + echo ' + + + '; + + if (!empty($context['group']['assignable'])) + echo ' + '; + + echo ' + + + '; + + if (empty($context['members'])) + echo ' + + + '; + + foreach ($context['members'] as $member) + { + echo ' + + '; + + if ($context['can_send_email']) + echo ' + '; + + echo ' + + + '; + + if (!empty($context['group']['assignable'])) + echo ' + '; + + echo ' + '; + } + + echo ' + +
    ', $txt['name'], $context['sort_by'] == 'name' ? ' ' : '', '', $txt['membergroups_members_last_active'], $context['sort_by'] == 'active' ? '' : '', '', $txt['date_registered'], $context['sort_by'] == 'registered' ? '' : '', ' + ', $txt['posts'], $context['sort_by'] == 'posts' ? ' ' : '', ' +
    ', $txt['membergroups_members_no_members'], '
    ', $member['name'], '', $member['last_online'], '', $member['registered'], '', $member['posts'], '
    '; + + if (!empty($context['group']['assignable'])) + echo ' +
    + +
    '; + + echo ' +
    + +
    +
    '; + + if (!empty($context['group']['assignable'])) + echo ' +
    +

    ', $txt['membergroups_members_add_title'], '

    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    '; + + echo ' + + +
    '; + + if (!empty($context['group']['assignable'])) + echo ' + '; +} + +/** + * Allow the moderator to enter a reason to each user being rejected. + */ +function template_group_request_reason() +{ + global $context, $txt, $scripturl; + + // Show a welcome message to the user. + echo ' +
    +
    +
    +

    ', $txt['mc_groups_reason_title'], '

    +
    +
    +
    '; + + // Loop through and print out a reason box for each... + foreach ($context['group_requests'] as $request) + echo ' +
    + ', sprintf($txt['mc_groupr_reason_desc'], $request['member_link'], $request['group_link']), ': +
    +
    + + +
    '; + + echo ' +
    + + + + +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/ManageMembers.template.php b/ManageMembers.template.php new file mode 100644 index 0000000..a9ebce0 --- /dev/null +++ b/ManageMembers.template.php @@ -0,0 +1,293 @@ + + +
    +

    + ', $txt['search_for'], ' + ', $txt['wild_cards_allowed'], ' +

    +
    +
    +
    +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + ', $txt['activation_status'], ' +    + +
    +
    +
    +
    +
    +

    ', $txt['member_part_of_these_membergroups'], '

    +
    + + + + + + + + + '; + + foreach ($context['membergroups'] as $membergroup) + echo ' + + + + + '; + + echo ' + + + + + + +
    ', $txt['membergroups'], '', $txt['primary'], '', $txt['additional'], '
    ', $membergroup['name'], ' + + + ', $membergroup['can_be_additional'] ? '' : '', ' +
    + ', $txt['check_all'], ' + + + + +
    + + + + + + + + '; + + foreach ($context['postgroups'] as $postgroup) + echo ' + + + + '; + + echo ' + + + + + +
    + ', $txt['membergroups_postgroups'], ' +
    + ', $postgroup['name'], ' + + +
    + ', $txt['check_all'], ' + + +
    +
    + + '; +} + +/** + * The admin member list. + */ +function template_admin_browse() +{ + global $context, $scripturl, $txt; + + template_show_list('approve_list'); + + // If we have lots of outstanding members try and make the admin's life easier. + if ($context['approve_list']['total_num_items'] > 20) + { + echo ' +
    +
    +
    +

    ', $txt['admin_browse_outstanding'], '

    +
    + + +
    +
    +
    + ', $txt['admin_browse_outstanding_days_1'], ': +
    +
    + ', $txt['admin_browse_outstanding_days_2'], '. +
    +
    + ', $txt['admin_browse_outstanding_perform'], ': +
    +
    + +
    +
    + + + + + + ', !empty($context['approve_list']['sort']['desc']) ? ' + ' : '', ' +
    + +
    '; + } +} + +?> \ No newline at end of file diff --git a/ManageNews.template.php b/ManageNews.template.php new file mode 100644 index 0000000..106c22e --- /dev/null +++ b/ManageNews.template.php @@ -0,0 +1,446 @@ +', $txt['admin_news_newsletter_' . $context['newsletter_sent']], ''; + + echo ' +
    +
    +

    ', $txt['admin_newsletters'], '

    +
    +
    + ', $txt['admin_news_select_recipients'], ' +
    +
    +
    +
    + ', $txt['admin_news_select_group'], ':
    + ', $txt['admin_news_select_group_desc'], ' +
    +
    '; + + foreach ($context['groups'] as $group) + echo ' + (', $group['member_count'], ')
    '; + + echo ' +
    + +
    +
    + +
    +
    +
    + ', $txt['admin_news_select_email'], ':
    + ', $txt['admin_news_select_email_desc'], ' +
    +
    + +
    +
    + ', $txt['admin_news_select_members'], ':
    + ', $txt['admin_news_select_members_desc'], ' +
    +
    + + +
    +
    +
    +
    +
    + ', $txt['admin_news_select_excluded_groups'], ':
    + ', $txt['admin_news_select_excluded_groups_desc'], ' +
    +
    '; + + foreach ($context['groups'] as $group) + echo ' + (', $group['member_count'], ')
    '; + + echo ' +
    +
    +
    +
    + ', $txt['admin_news_select_excluded_members'], ':
    + ', $txt['admin_news_select_excluded_members_desc'], ' +
    +
    + + +
    +
    +
    +
    +
    +
    + ', $txt['email_force'], ' +
    +
    + +
    +
    +
    +
    + + +
    +
    '; + + // This is some javascript for the simple/advanced toggling and member suggest + echo ' + + '; +} + +/** + * The form for composing a newsletter + */ +function template_email_members_compose() +{ + global $context, $txt, $scripturl; + + echo ' + +
    '; + + echo ' +
    +
    +

    + ', $txt['admin_newsletters'], ' +

    +
    +
    + ', sprintf($txt['email_variables'], $scripturl), ' +
    +
    + +
    +
    + ', $txt['subject'], ' +
    +
    + +
    +
    +
    '; + + // What about smileys? + if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) + echo ' +
    '; + + // Show BBC buttons, smileys and textbox. + echo ' + ', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'); + + echo ' +
      +
    • +
    • +
    • +
    + + ', template_control_richedit_buttons($context['post_box_name']), ' + +
    + + + '; + + foreach ($context['recipients'] as $key => $values) + echo ' + '; + + echo ' + '; + + echo ' + +
    '; +} + +/** + * The page shown while the newsletter is being sent + */ +function template_email_members_send() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +

    + ', $txt['admin_newsletters'], ' +

    +
    +
    +
    + ', $context['percentage_done'], '% ', $txt['email_done'], ' +
    +
    +
    + + + + + + + + + + '; + + // All the things we must remember! + foreach ($context['recipients'] as $key => $values) + echo ' + '; + + echo ' +
    +
    + + '; +} + +/** + * The settings page. + */ +function template_news_lists() +{ + global $context, $txt; + + if (!empty($context['saved_successful'])) + echo ' +
    ', $txt['settings_saved'], '
    '; + + template_show_list('news_lists'); +} + +?> \ No newline at end of file diff --git a/ManagePaid.template.php b/ManagePaid.template.php new file mode 100644 index 0000000..6d5273f --- /dev/null +++ b/ManagePaid.template.php @@ -0,0 +1,589 @@ +'; + + if (!empty($context['disable_groups'])) + echo ' +
    ', $txt['paid_mod_edit_note'], '
    '; + + echo ' +
    +

    ', $txt['paid_' . $context['action_type'] . '_subscription'], '

    +
    +
    +
    +
    + ', $txt['paid_mod_name'], ': +
    +
    + +
    +
    + ', $txt['paid_mod_desc'], ': +
    +
    + +
    +
    + : +
    +
    + +
    +
    + :
    ', $txt['paid_mod_active_desc'], ' +
    +
    + +
    +
    +
    +
    +
    + ', $txt['paid_mod_prim_group'], ':
    + ', $txt['paid_mod_prim_group_desc'], ' +
    +
    + +
    +
    + ', $txt['paid_mod_add_groups'], ':
    + ', $txt['paid_mod_add_groups_desc'], ' +
    +
    '; + + // Put a checkbox in for each group + foreach ($context['groups'] as $id => $name) + echo ' +
    '; + + echo ' +
    +
    + ', $txt['paid_mod_reminder'], ':
    + ', $txt['paid_mod_reminder_desc'], ' ', $txt['zero_to_disable'], ' +
    +
    + +
    +
    + ', $txt['paid_mod_email'], ':
    + ', $txt['paid_mod_email_desc'], ' +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    + ', $txt['paid_cost'], ' (', str_replace('%1.2f', '', $modSettings['paid_currency_symbol']), '): +
    +
    + +
    +
    + ', $txt['paid_mod_span'], ': +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    '; + + echo ' +
    + ', $txt['paid_mod_price_breakdown'], '
    + ', $txt['paid_mod_price_breakdown_desc'], ' +
    +
    +
    + ', $txt['paid_duration'], ' +
    +
    + ', $txt['paid_cost'], ' (', preg_replace('~%[df\.\d]+~', '', $modSettings['paid_currency_symbol']), ') +
    +
    + ', $txt['paid_per_day'], ': +
    +
    + +
    +
    + ', $txt['paid_per_week'], ': +
    +
    + +
    +
    + ', $txt['paid_per_month'], ': +
    +
    + +
    +
    + ', $txt['paid_per_year'], ': +
    +
    + +
    +
    +
    +
    + + + +
    + '; +} + +/** + * The page for deleting a subscription. + */ +function template_delete_subscription() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    ', $txt['paid_delete_subscription'], '

    +
    +
    +

    ', $txt['paid_mod_delete_warning'], '

    + + + +
    +
    '; +} + +/** + * Add or edit an existing subscriber. + */ +function template_modify_user_subscription() +{ + global $context, $scripturl, $txt; + + // Some quickly stolen javascript from Post, could do with being more efficient :) + echo ' + '; + + echo ' +
    +
    +

    + ', $txt['paid_' . $context['action_type'] . '_subscription'], ' - ', $context['current_subscription']['name'], ' + ', empty($context['sub']['username']) ? '' : ' (' . $txt['user'] . ': ' . $context['sub']['username'] . ')', ' +

    +
    +
    +
    '; + + // Do we need a username? + if ($context['action_type'] == 'add') + echo ' +
    + ', $txt['paid_username'], ':
    + ', $txt['one_username'], ' +
    +
    + +
    '; + + echo ' +
    + ', $txt['paid_status'], ': +
    +
    + +
    +
    +
    + ', $txt['start_date_and_time'], ' +   + ', (isset($txt['calendar_month']) ? $txt['calendar_month'] : $txt['calendar_month']), '  +   + ', (isset($txt['calendar_day']) ? $txt['calendar_day'] : $txt['calendar_day']), '  + + ', $txt['hour'], ': + ', $txt['minute'], ': +
    +
    + ', $txt['end_date_and_time'], ' +   + ', (isset($txt['calendar_month']) ? $txt['calendar_month'] : $txt['calendar_month']), '  +   + ', (isset($txt['calendar_day']) ? $txt['calendar_day'] : $txt['calendar_day']), '  + + ', $txt['hour'], ': + ', $txt['minute'], ': +
    + +
    + +
    + '; + + if (!empty($context['pending_payments'])) + { + echo ' +
    +

    ', $txt['pending_payments'], '

    +
    +
    + ', $txt['pending_payments_desc'], ' +
    +
    +

    ', $txt['pending_payments_value'], '

    +
    +
    + '; + } + + echo ' +
    '; +} + +/** + * Template for a user to edit/pick their subscriptions. + */ +function template_user_subscription() +{ + global $context, $txt, $scripturl, $modSettings; + + echo ' + '; +} + +/** + * The "choose payment" dialog. + */ +function template_choose_payment() +{ + global $context, $txt; + + echo ' + +
    '; +} + +/** + * The "thank you" bit... + */ +function template_paid_done() +{ + global $context, $txt, $scripturl; + + echo ' + '; +} + +?> \ No newline at end of file diff --git a/ManagePermissions.template.php b/ManagePermissions.template.php new file mode 100644 index 0000000..de9a1fc --- /dev/null +++ b/ManagePermissions.template.php @@ -0,0 +1,939 @@ + + ', sprintf($txt['permission_cannot_edit'], $scripturl . '?action=admin;area=permissions;sa=profiles'), ' + '; + + echo ' +
    +
    '; + + if (!empty($context['profile'])) + echo ' +
    +

    ', $txt['permissions_for_profile'], ': "', $context['profile']['name'], '"

    +
    '; + else + echo ' +
    +

    ', $txt['permissions_title'], '

    +
    '; + + echo ' + + + + + '; + + if (empty($modSettings['permission_enable_deny'])) + echo ' + '; + else + echo ' + + '; + + echo ' + + + + + '; + + foreach ($context['groups'] as $group) + { + echo ' + + + '; + + if (empty($modSettings['permission_enable_deny'])) + echo ' + '; + else + echo ' + + '; + + echo ' + + + '; + } + + echo ' + +
    ', $txt['membergroups_name'], '', $txt['membergroups_members_top'], '', $txt['membergroups_permissions'], '', $txt['permissions_allowed'], '', $txt['permissions_denied'], '', $context['can_modify'] ? $txt['permissions_modify'] : $txt['permissions_view'], ' + ', $context['can_modify'] ? '' : '', ' +
    + ', !empty($group['help']) ? ' ' : '' . $txt['help'] . '', '', $group['name'], ''; + + if (!empty($group['children'])) + echo ' +
    + ', $txt['permissions_includes_inherited'], ': "', implode('", "', $group['children']), '"'; + + echo ' +
    ', $group['can_search'] ? $group['link'] : $group['num_members'], '', $group['num_permissions']['allowed'], ' + ', $group['num_permissions']['allowed'], ' + + ', $group['num_permissions']['denied'], ' + + ', $group['allow_modify'] ? '' . ($context['can_modify'] ? $txt['permissions_modify'] : $txt['permissions_view']) . '' : '', ' + + ', $group['allow_modify'] && $context['can_modify'] ? '' : '', ' +
    +
    '; + + // Advanced stuff... + if ($context['can_modify']) + { + echo ' + +
    +
    + ', $txt['permissions_with_selection'], ' +
    +
    + + ', $txt['permissions_apply_pre_defined'], ': +
    +
    + +
    +
    + ', $txt['permissions_like_group'], ': +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    '; + + // Javascript for the advanced stuff. + echo ' + '; + + if (!empty($context['profile'])) + echo ' + '; + + echo ' + + '; + } + + echo ' +
    +
    '; +} + +/** + * THe page that shows which permissions profile applies to each board + */ +function template_by_board() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    ', $txt['permissions_boards'], '

    +
    +
    + ', $txt['permissions_boards_desc'], ' +
    + +
    +

    + ', $txt['board_name'], ' + ', $txt['permission_profile'], ''; + echo ' +

    +
    +
    '; + + foreach ($context['categories'] as $category) + { + echo ' +
    +

    ', $category['name'], '

    +
    '; + + if (!empty($category['boards'])) + echo ' + '; + } + + if ($context['edit_all']) + echo ' + '; + else + echo ' + ', $txt['permissions_board_all'], ''; + + echo ' + + +
    +
    '; +} + +/** + * Edit permission profiles (predefined). + */ +function template_edit_profiles() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +
    +

    ', $txt['permissions_profile_edit'], '

    +
    + + + + + + + + + + '; + + foreach ($context['profiles'] as $profile) + { + echo ' + + + + + + + '; + } + + echo ' + +
    ', $txt['permissions_profile_name'], '', $txt['permissions_profile_used_by'], '
    '; + + if (!empty($context['show_rename_boxes']) && $profile['can_edit']) + echo ' + '; + else + echo ' + ', $profile['name'], ''; + + echo ' + + ', !empty($profile['boards_text']) ? $profile['boards_text'] : $txt['permissions_profile_used_by_none'], ' +
    +
    + + '; + + if ($context['can_edit_something']) + echo ' + '; + + echo ' + +
    +
    +
    +
    +
    +

    ', $txt['permissions_profile_new'], '

    +
    +
    +
    +
    + ', $txt['permissions_profile_name'], ': +
    +
    + +
    +
    + ', $txt['permissions_profile_copy_from'], ': +
    +
    + +
    +
    + + + +
    +
    +
    '; +} + +/** + * Modify a group's permissions + */ +function template_modify_group() +{ + global $context, $scripturl, $txt, $modSettings; + + // Cannot be edited? + if (!$context['profile']['can_modify']) + echo ' +
    + ', sprintf($txt['permission_cannot_edit'], $scripturl . '?action=admin;area=permissions;sa=profiles'), ' +
    '; + else + echo ' + '; + + echo ' +
    '; + + if (!empty($modSettings['permission_enable_deny']) && $context['group']['id'] != -1) + echo ' +
    + ', $txt['permissions_option_desc'], ' +
    '; + + echo ' +
    +

    '; + + if ($context['permission_type'] == 'board') + echo ' + ', $txt['permissions_local_for'], ' "', $context['group']['name'], '" ', $txt['permissions_on'], ' "', $context['profile']['name'], '"'; + else + echo ' + ', $context['permission_type'] == 'membergroup' ? $txt['permissions_general'] : $txt['permissions_board'], ' - "', $context['group']['name'], '"'; + echo ' +

    +
    '; + + // Draw out the main bits. + template_modify_group_display($context['permission_type']); + + // If this is general permissions also show the default profile. + if ($context['permission_type'] == 'membergroup') + { + echo ' +
    +
    +

    ', $txt['permissions_board'], '

    +
    +
    + ', $txt['permissions_board_desc'], ' +
    '; + + template_modify_group_display('board'); + } + + if ($context['profile']['can_modify']) + echo ' +
    + +
    '; + + foreach ($context['hidden_perms'] as $hidden_perm) + echo ' + '; + + echo ' + + +
    '; +} + +/** + * The way of looking at permissions. + * + * @param string $type The permissions type + */ +function template_modify_group_display($type) +{ + global $context, $scripturl, $txt, $modSettings; + + $permission_type = &$context['permissions'][$type]; + $disable_field = $context['profile']['can_modify'] ? '' : 'disabled '; + + foreach ($permission_type['columns'] as $column) + { + echo ' + '; + + foreach ($column as $permissionGroup) + { + if (empty($permissionGroup['permissions'])) + continue; + + // Are we likely to have something in this group to display or is it all hidden? + $has_display_content = false; + if (!$permissionGroup['hidden']) + { + // Before we go any further check we are going to have some data to print otherwise we just have a silly heading. + foreach ($permissionGroup['permissions'] as $permission) + if (!$permission['hidden']) + $has_display_content = true; + + if ($has_display_content) + { + echo ' + + + ', $permissionGroup['name'], ''; + + if ($context['group']['id'] != -1) + echo ' + + '; + + echo ' + '; + } + } + + foreach ($permissionGroup['permissions'] as $permission) + { + if (!$permission['hidden'] && !$permissionGroup['hidden']) + { + echo ' + + + + + + + '; + } + } + } + + echo ' +
    ', $txt['permissions_option_own'], '', $txt['permissions_option_any'], '
    + ', $permission['show_help'] ? '' : '', ' + + ', $permission['name'], (!empty($permission['note']) ? '
    + ' . $permission['note'] . '' : ''), ' +
    '; + + if ($permission['has_own_any']) + { + // Guests can't do their own thing. + if ($context['group']['id'] != -1) + { + if (empty($modSettings['permission_enable_deny'])) + echo ' + '; + else + { + echo ' + '; + } + + echo ' + '; + } + + if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) + echo ' + '; + else + { + echo ' + '; + } + } + else + { + if ($context['group']['id'] != -1) + echo ' + '; + + if (empty($modSettings['permission_enable_deny']) || $context['group']['id'] == -1) + echo ' + '; + else + { + echo ' + '; + } + } + echo ' +
    '; + } + + echo ' +
    '; +} + +/** + * A form for displaying inline permissions, such as on a settings page. + */ +function template_inline_permissions() +{ + global $context, $txt, $modSettings; + + // This looks really weird, but it keeps things nested properly... + echo ' +
    + ', $txt['avatar_select_permission'], ''; + + if (empty($modSettings['permission_enable_deny'])) + echo ' +
      '; + else + echo ' +
      ', $txt['permissions_option_desc'], '
      +
      +
      + ', $txt['permissions_option_on'], ' + ', $txt['permissions_option_off'], ' + ', $txt['permissions_option_deny'], ' +
      +
      +
      '; + + foreach ($context['member_groups'] as $group) + { + if (!empty($modSettings['permission_enable_deny'])) + echo ' +
      '; + else + echo ' +
    • '; + + if (empty($modSettings['permission_enable_deny'])) + echo ' + '; + else + echo ' + + + '; + + if (!empty($modSettings['permission_enable_deny'])) + echo ' +
    • +
      + ', $group['name'], ' +
      '; + else + echo ' + ', $group['name'], ' + '; + } + + if (empty($modSettings['permission_enable_deny'])) + echo ' +
    • + + ', $txt['check_all'], ' +
    • +
    '; + else + echo ' + '; + + echo ' +
    + + + + '; +} + +/** + * Edit post moderation permissions. + */ +function template_postmod_permissions() +{ + global $context, $scripturl, $txt, $modSettings; + + echo ' +
    +
    +
    +

    ', $txt['permissions_post_moderation'], '

    +
    '; + + // First, we have the bit where we can enable or disable this bad boy. + echo ' +
    +
    +
    ', $txt['permissions_post_moderation_enable'], '
    +
    +
    +
    '; + + // If we're not active, there's a bunch of stuff we don't need to show. + if (!empty($modSettings['postmod_active'])) + { + // Got advanced permissions - if so warn! + if (!empty($modSettings['permission_enable_deny'])) + echo ' +
    ', $txt['permissions_post_moderation_deny_note'], '
    '; + + echo ' +
    +
      + ', $txt['permissions_post_moderation_legend'], ': +
    • ', $txt['permissions_post_moderation_allow'], '
    • +
    • ', $txt['permissions_post_moderation_moderate'], '
    • +
    • ', $txt['permissions_post_moderation_disallow'], '
    • +
    +

    +


    + ', $txt['permissions_post_moderation_select'], ': + + +

    +
    + + + + + + + '; + + if ($modSettings['attachmentEnable'] == 1) + echo ' + '; + + echo ' + + + + + + + + + + + + '; + + if ($modSettings['attachmentEnable'] == 1) + echo ' + + + '; + + echo ' + + + '; + + foreach ($context['profile_groups'] as $group) + { + echo ' + + + + + '; + + // Guests can't have "own" permissions + if ($group['id'] == '-1') + echo ' + '; + else + echo ' + + + '; + + echo ' + + + '; + + if ($modSettings['attachmentEnable'] == 1) + echo ' + + + '; + + echo ' + '; + } + + echo ' + +
    + ', $txt['permissions_post_moderation_new_topics'], ' + + ', $txt['permissions_post_moderation_replies_own'], ' + + ', $txt['permissions_post_moderation_replies_any'], ' + + ', $txt['permissions_post_moderation_attachments'], ' +
    + ', $txt['permissions_post_moderation_group'], ' +
    + ', $group['name'], ''; + + if (!empty($group['children'])) + echo ' +
    + ', $txt['permissions_includes_inherited'], ': "', implode('", "', $group['children']), '"'; + + echo ' +
    + + + + + + + + + + + + + + + + + + + + + + + +
    '; + } + + echo ' + + +
    +
    '; +} + +?> \ No newline at end of file diff --git a/ManageScheduledTasks.template.php b/ManageScheduledTasks.template.php new file mode 100644 index 0000000..3b7c371 --- /dev/null +++ b/ManageScheduledTasks.template.php @@ -0,0 +1,117 @@ + + ', $txt['scheduled_tasks_were_run'], ' + '; + + else + { + echo ' +
    +
    +
    + ', $txt['scheduled_tasks_were_run_errors'], ' +
    '; + + foreach ($context['scheduled_errors'] as $task => $errors) + echo ' +
    + ', isset($txt['scheduled_task_' . $task]) ? $txt['scheduled_task_' . $task] : $task, ' +
      +
    • ', implode('
    • ', $errors), '
    • +
    +
    '; + + echo ' +
    +
    '; + } + } + + template_show_list('scheduled_tasks'); +} + +/** + * A template for, you guessed it, editing a task! + */ +function template_edit_scheduled_tasks() +{ + global $context, $txt, $scripturl; + + // Starts off with general maintenance procedures. + echo ' +
    +
    +

    ', $txt['scheduled_task_edit'], '

    +
    +
    + ', sprintf($txt['scheduled_task_time_offset'], $context['server_time']), ' +
    +
    +
    +
    + ', $txt['scheduled_tasks_name'], ': +
    +
    + ', $context['task']['name'], '
    + ', $context['task']['desc'], ' +
    +
    + +
    +
    + ', $txt['scheduled_task_edit_repeat'], ' + + +
    +
    +
    + ', $txt['scheduled_task_edit_start_time_desc'], ' +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + + +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/ManageSearch.template.php b/ManageSearch.template.php new file mode 100644 index 0000000..70af2c6 --- /dev/null +++ b/ManageSearch.template.php @@ -0,0 +1,438 @@ + +
    +

    ', $txt['search_weights'], '

    +
    +
    +
    +
    + +
    +
    + + + + ', $context['relative_weights']['search_weight_frequency'], '% +
    +
    + + +
    +
    + + + + ', $context['relative_weights']['search_weight_age'], '% +
    +
    + + +
    +
    + + + + ', $context['relative_weights']['search_weight_length'], '% +
    +
    + + +
    +
    + + + + ', $context['relative_weights']['search_weight_subject'], '% +
    +
    + + +
    +
    + + + + ', $context['relative_weights']['search_weight_first_message'], '% +
    +
    + + +
    +
    + + + + ', $context['relative_weights']['search_weight_sticky'], '% +
    +
    + ', $txt['search_weights_total'], ' +
    +
    + + ', $context['relative_weights']['total'], ' + + 100% +
    +
    + + + +
    + '; +} + +/** + * Select the search method. + */ +function template_select_search_method() +{ + global $context, $scripturl, $txt, $modSettings; + + echo ' +
    +

    ', $txt['search_method'], '

    +
    + +
    +
    +

    ', $txt['search_method'], '

    +
    +
    +
    '; + + if (!empty($context['table_info'])) + echo ' +
    + ', $txt['search_method_messages_table_space'], ': +
    +
    + ', $context['table_info']['data_length'], ' +
    +
    + ', $txt['search_method_messages_index_space'], ': +
    +
    + ', $context['table_info']['index_length'], ' +
    '; + echo ' +
    + ', $context['double_index'] ? '
    + ' . $txt['search_double_index'] . '
    ' : '', ' +
    + ', $txt['search_index'], ' +
    +
    + + ', $txt['search_index_none'], ' +
    '; + + if ($context['supports_fulltext']) + { + echo ' +
    + + ', $txt['search_method_fulltext_index'], ' +
    +
    + '; + + if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext'])) + echo ' + ', $txt['search_index_label'], ': ', $txt['search_method_no_index_exists'], ' [', $txt['search_method_fulltext_create'], ']'; + + elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext'])) + echo ' + ', $txt['search_index_label'], ': ', $txt['search_method_fulltext_cannot_create']; + else + echo ' + ', $txt['search_index_label'], ': ', $txt['search_method_index_already_exists'], ' [', $txt['search_method_fulltext_remove'], ']
    + ', $txt['search_index_size'], ': ', $context['table_info']['fulltext_length']; + echo ' +
    +
    '; + } + + echo ' +
    + + ', $txt['search_index_custom'], ' +
    +
    + '; + + if ($context['custom_index']) + echo ' + ', $txt['search_index_label'], ': ', $txt['search_method_index_already_exists'], ' [', $txt['search_index_custom_remove'], ']
    + ', $txt['search_index_size'], ': ', $context['table_info']['custom_index_length']; + + elseif ($context['partial_custom_index']) + echo ' + ', $txt['search_index_label'], ': ', $txt['search_method_index_partial'], ' [', $txt['search_index_custom_remove'], '] [', $txt['search_index_custom_resume'], ']
    + ', $txt['search_index_size'], ': ', $context['table_info']['custom_index_length']; + else + echo ' + ', $txt['search_index_label'], ': ', $txt['search_method_no_index_exists'], ' [', $txt['search_index_create_custom'], ']'; + echo ' +
    +
    '; + + foreach ($context['search_apis'] as $api) + { + if (empty($api['label']) || $api['has_template']) + continue; + + echo ' +
    + + ', $api['label'], ' +
    '; + + if ($api['desc']) + echo ' +
    + ', $api['desc'], ' +
    '; + } + + echo ' +
    +
    +
    + ', $txt['search_method'], ' +
    + +
    +
    + + + +
    +
    '; +} + +/** + * Create a search index. + */ +function template_create_index() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    ', $txt['search_create_index'], '

    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    '; +} + +/** + * Display a progress page while creating a search index. + */ +function template_create_index_progress() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    ', $txt['search_create_index'], '

    +
    +
    +
    +

    ', $txt['search_create_index_not_ready'], '

    +
    + ', $context['percentage'], '% +
    +
    +
    +
    + +
    + + + + +
    + '; + +} + +/** + * Done creating a search index. + */ +function template_create_index_done() +{ + global $scripturl, $txt; + + echo ' +
    +

    ', $txt['search_create_index'], '

    +
    +
    +

    ', $txt['search_create_index_done'], '

    +

    + ', $txt['search_create_index_done_link'], ' +

    +
    '; +} + +/** + * Add or edit a search engine spider. + */ +function template_spider_edit() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    ', $context['page_title'], '

    +
    +
    + ', $txt['add_spider_desc'], ' +
    +
    +
    +
    +
    + ', $txt['spider_name_desc'], ' +
    +
    + +
    +
    +
    + ', $txt['spider_agent_desc'], ' +
    +
    + +
    +
    +
    + ', $txt['spider_ip_info_desc'], ' +
    +
    + +
    +
    +
    + + + +
    +
    '; +} + +/** + * Show... spider... logs... + */ +function template_show_spider_logs() +{ + global $context, $txt, $scripturl; + + // Standard fields. + template_show_list('spider_logs'); + + echo ' +
    +
    +

    ', $txt['spider_logs_delete'], '

    +
    +
    +

    + ', $txt['spider_logs_delete_older'], ' + + ', $txt['spider_logs_delete_day'], ' +

    + + + +
    +
    '; +} + +/** + * Show... spider... stats... + */ +function template_show_spider_stats() +{ + global $context, $txt, $scripturl; + + // Standard fields. + template_show_list('spider_stat_list'); + + echo ' +
    +
    +

    ', $txt['spider_logs_delete'], '

    +
    +
    +

    + ', sprintf($txt['spider_stats_delete_older'], ''), ' +

    + + + +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/ManageSmileys.template.php b/ManageSmileys.template.php new file mode 100644 index 0000000..d889643 --- /dev/null +++ b/ManageSmileys.template.php @@ -0,0 +1,488 @@ + +
    +

    + ', $context['current_set']['is_new'] ? $txt['smiley_set_new'] : $txt['smiley_set_modify_existing'], ' +

    +
    '; + + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) + { + echo ' +
    + ', $txt['smiley_set_import_info'], ' +
    '; + } + // If this is an existing set, and there are still un-added smileys - offer an import opportunity. + elseif (!empty($context['current_set']['can_import'])) + { + echo ' +
    + ', $context['smiley_set_unused_message'], ' +
    '; + } + + echo ' +
    +
    +
    + : +
    +
    + +
    +
    + : +
    +
    + ', $modSettings['smileys_url'], '/'; + + if (empty($context['smiley_set_dirs'])) + echo ' + '; + else + { + echo ' + '; + } + echo ' + /.. +
    +
    + : +
    +
    + +
    +
    + +
    + + + + '; +} + +/** + * Editing an individual smiley + */ +function template_modifysmiley() +{ + global $context, $scripturl, $txt, $modSettings; + + echo ' +
    +
    +

    ', $txt['smiley_modify_existing'], '

    +
    +
    +
    +
    + ', $txt['smiley_preview_using_set'], ': + +
    +
    + +
    +
    + : +
    '; + + if (empty($context['filenames'])) + { + echo ' +
    + +
    '; + } + else + { + foreach ($context['smiley_sets'] as $set => $smiley_set) + { + echo ' +
    + ', $smiley_set['name'], ' +
    + + + + '; + } + } + + echo ' +
    +
    +
    + : +
    +
    + +
    +
    + : +
    +
    + +
    +
    + : +
    +
    + +
    +
    + + +
    + + +
    '; +} + +/** + * Adding a new smiley. + */ +function template_addsmiley() +{ + global $context, $scripturl, $txt, $modSettings; + + echo ' +
    +
    +

    ', $txt['smileys_add_method'], '

    +
    +
    +
      +
    • + +
    • +
    • + +
    • +
    +
    +
    +
    +
    + : +
    +
    + +
    +
    + : +
    +
    '; + + if (empty($context['filenames'])) + echo ' + '; + else + { + echo ' + '; + } + + echo ' +
    +
    +
    + +
    +
    +

    ', $txt['smiley_new'], '

    +
    +
    +
    +
    + : +
    +
    + +
    +
    + : +
    +
    + +
    +
    + : +
    +
    + +
    +
    + +
    + +
    '; +} + +/** + * Ordering smileys. + */ +function template_setorder() +{ + global $context, $scripturl, $txt, $modSettings; + + foreach ($context['smileys'] as $location) + { + echo ' +
    +
    +

    ', $location['title'], '

    +
    +
    + ', $location['description'], ' +
    +
    + ', empty($context['move_smiley']) ? $txt['smileys_move_select_smiley'] : $txt['smileys_move_select_destination'], '...
    '; + + foreach ($location['rows'] as $row) + { + if (!empty($context['move_smiley'])) + echo ' + '; + + foreach ($row as $smiley) + { + if (empty($context['move_smiley'])) + echo ' + ', $smiley['description'], ''; + else + echo ' + ', $smiley['description'], ' + '; + } + + echo ' +
    '; + } + if (!empty($context['move_smiley'])) + echo ' + '; + echo ' +
    + +
    '; + } +} + +/** + * Editing Message Icons + */ +function template_editicons() +{ + template_show_list('message_icon_list'); +} + +/** + * Editing an individual message icon + */ +function template_editicon() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    + ', $context['new_icon'] ? $txt['icons_new_icon'] : $txt['icons_edit_icon'], ' +

    +
    +
    +
    '; + + if (!$context['new_icon']) + echo ' +
    + ', $txt['smiley_preview'], ': +
    +
    + ', $context['icon']['title'], ' +
    '; + + echo ' +
    + :
    ', sprintf($txt['icons_extension_must_be'], '.png'), ' +
    +
    + +
    +
    + : +
    +
    + +
    +
    + : +
    +
    + +
    +
    + : +
    +
    + +
    +
    '; + + if (!$context['new_icon']) + echo ' + '; + + echo ' + + +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Memberlist.template.php b/Memberlist.template.php new file mode 100644 index 0000000..002abb9 --- /dev/null +++ b/Memberlist.template.php @@ -0,0 +1,202 @@ + +
    + ', template_button_strip($context['memberlist_buttons'], 'right'), ' + +
    +
    +
    +

    + ', $txt['members_list'], ''; + + if (!isset($context['old_search'])) + echo ' + ', $context['letter_links'], ''; + echo ' +

    +
    '; + + echo ' +
    + + + '; + + // Display each of the column headers of the table. + foreach ($context['columns'] as $key => $column) + { + // @TODO maybe find something nicer? + if ($key == 'email_address' && !$context['can_send_email']) + continue; + + // This is a selected column, so underline it or some such. + if ($column['selected']) + echo ' + '; + + // This is just some column... show the link and be done with it. + else + echo ' + '; + } + + echo ' + + + '; + + // Assuming there are members loop through each one displaying their data. + if (!empty($context['members'])) + { + foreach ($context['members'] as $member) + { + echo ' + '; + /*On n'espionne pas les gens ! + * + * Mais il faut mettre quelque chose, car la colonne de titre est créée automatiquement et l'enlever fera buguer des mods + */ + echo ' + + '; + + if (!isset($context['disabled_fields']['website'])) + echo ' + '; + + // Group and date. + echo ' + + '; + + if (!isset($context['disabled_fields']['posts'])) + { + echo ' + '; + } + + // Show custom fields marked to be shown here + if (!empty($context['custom_profile_fields']['columns'])) + foreach ($context['custom_profile_fields']['columns'] as $key => $column) + echo ' + '; + + echo ' + '; + } + } + // No members? + else + echo ' + + + '; + + echo ' + +
    + ' . $column['label'] . ' + ', $column['link'], '
    + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' : $member['online']['label'], $context['can_send_pm'] ? '' : '', ' + + ', $member['link'], '', $member['website']['url'] != '' ? '' : '', '', empty($member['group']) ? $member['post_group'] : $member['group'], '', $member['registered_date'], ''; + + if (!empty($member['posts'])) + echo ' +
    +
    + ', $member['posts'], ' +
    '; + + echo ' +
    ', $member['options'][$key], '
    ', $txt['search_no_results'], '
    +
    +
    '; + + // Show the page numbers again. (makes 'em easier to find!) + echo ' +
    + '; + + // If it is displaying the result of a search show a "search again" link to edit their criteria. + if (isset($context['old_search'])) + echo ' + '; + echo ' +
    + '; + +} + +/** + * A page allowing people to search the member list. + */ +function template_search() +{ + global $context, $scripturl, $txt; + + // Start the submission form for the search! + echo ' +
    +
    +
    + ', template_button_strip($context['memberlist_buttons'], 'right'), ' +
    +
    +

    + ', $txt['mlist_search'], ' +

    +
    + +
    +
    '; +} + +?> diff --git a/MessageIndex.template.php b/MessageIndex.template.php new file mode 100644 index 0000000..1939644 --- /dev/null +++ b/MessageIndex.template.php @@ -0,0 +1,592 @@ + +
    +

    ', $context['name'], '

    '; + + if (isset($context['description']) && $context['description'] != '') + echo ' +

    ', $context['description'], '

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

    ', count($context['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $context['link_moderators']), '.

    '; + + if (!empty($settings['display_who_viewing'])) + { + echo ' +

    '; + + // Show just numbers...? + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members']; + // Or show the actual people viewing the topic? + else + echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) || $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + + // Now show how many guests are here too. + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], ' +

    '; + } + + echo ' +
    + '; + + if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) + { + + + // The child board TODO + echo ' +
    + +
    +
    + '; + // Like collapse icon, but don't collapse because I don't know how. TODO ! + echo' + + +

    ', $txt['sub_boards'], '

    +
    +
    +
    ', $txt['board_topics'], '
    ', $txt['posts'], '
    +
    ', $txt['last_post'], '
    + +
    '; + + foreach ($context['boards'] as $board) + { + echo ' +
    +
    + ', function_exists('template_bi_' . $board['type'] . '_icon') ? call_user_func('template_bi_' . $board['type'] . '_icon', $board) : template_bi_board_icon($board), ' +
    +
    + ', function_exists('template_bi_' . $board['type'] . '_info') ? call_user_func('template_bi_' . $board['type'] . '_info', $board) : template_bi_board_info($board), ' +
    '; + + // Show some basic information about the number of posts, etc. + echo ' +
    + ', function_exists('template_bi_' . $board['type'] . '_stats') ? call_user_func('template_bi_' . $board['type'] . '_stats', $board) : template_bi_board_stats($board), ' +
    '; + + // Show the last post if there is one. + echo ' +
    + ', function_exists('template_bi_' . $board['type'] . '_lastpost') ? call_user_func('template_bi_' . $board['type'] . '_lastpost', $board) : template_bi_board_lastpost($board), ' +
    '; + + // Won't somebody think of the children! + if (function_exists('template_bi_' . $board['type'] . '_children')) + call_user_func('template_bi_' . $board['type'] . '_children', $board); + else + template_bi_board_children($board); + + echo ' +
    '; + } + + echo ' +
    +
    +'; + } + + // Let them know why their message became unapproved. + if ($context['becomesUnapproved']) + echo ' +
    + ', $txt['post_becomes_unapproved'], ' +
    '; + + // If this person can approve items and we have some awaiting approval tell them. + if (!empty($context['unapproved_posts_message'])) + echo ' +
    + ', $context['unapproved_posts_message'], ' +
    '; + + if (!$context['no_topic_listing']) + { + echo ' +
    + ', template_button_strip($context['normal_buttons'], ), ' + ', $context['menu_separator'], ' + + '; + + // Mobile action buttons (top) + if (!empty($context['normal_buttons'])) + echo ' + '; + + echo ' +
    '; + + // If Quick Moderation is enabled start the form. + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) + echo ' +
    '; + + echo ' +
    '; + + echo ' +
    '; + + // Are there actually any topics to show? + if (!empty($context['topics'])) + { + echo ' +
    +
    ', $context['topics_headers']['subject'], ' / ', $context['topics_headers']['starter'], '
    +
    +
    ', $context['topics_headers']['replies'], '
    +
    ', $context['topics_headers']['views'], '
    +
    +
    ', $context['topics_headers']['last_post'], '
    '; + + // Show a "select all" box for quick moderation? + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
    + + +
    '; + + // If it's on in "image" mode, don't show anything but the column. + elseif (!empty($context['can_quick_mod'])) + echo ' +
    '; + } + + // No topics... just say, "sorry bub". + else + echo ' +

    ', $txt['topic_alert_none'], '

    '; + + echo ' +
    '; + + // Contain the topic list + echo ' +
    '; + + foreach ($context['topics'] as $topic) + { + echo ' +
    +
    + +
    + ', $topic['is_posted_in'] ? '' : '', ' + '; + // Now we handle the icons + if ($topic['is_watched']) + echo ' + '; + + if ($topic['is_locked']) + echo ' + '; + + if ($topic['is_sticky']) + echo ' + '; + + if ($topic['is_redirect']) + echo ' + '; + + if ($topic['is_poll']) + echo ' + '; + + echo '
    '; + // End icon about topic + + echo '
    +
    +
    '; + + + + echo ' +
    + ', $topic['new'] && $context['user']['is_logged'] ? '' . $txt['new'] . '' : '', ' +

    + ', $topic['first_post']['link'], (!$topic['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), ' +

    +
    +

    + ', $txt['started_by'], ' ', $topic['first_post']['member']['link'], ' +

    + ', !empty($topic['pages']) ? '' . $topic['pages'] . '' : '', ' +
    +
    +
    +
    ', $topic['replies'], '
    +
    ', $topic['views'], '
    +
    +
    +

    ', sprintf($txt['last_post_topic'], '' . $topic['last_post']['time'] . '', $topic['last_post']['member']['link']), '

    +
    '; + + // Show the quick moderation options? + if (!empty($context['can_quick_mod'])) + { + echo ' +
    '; + + if ($options['display_quick_mod'] == 1) + echo ' + + '; + else + { + // Check permissions on each and show only the ones they are allowed to use. + if ($topic['quick_mod']['remove']) + echo ''; + + if ($topic['quick_mod']['lock']) + echo ''; + + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) + echo '
    '; + + if ($topic['quick_mod']['sticky']) + echo ''; + + if ($topic['quick_mod']['move']) + echo ''; + } + echo ' +
    '; + } + echo ' +
    '; + } + echo ' +
    +
    + '; + + echo '
    '; + + function message_index_jump_to() + { + global $context, $settings, $txt, $modSettings; + // Sauter à... + echo '

    '; + if (!empty($context['jump_to'])) + echo ' + '; + } + message_index_jump_to(); + + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) + { + + // Action de modération et de manipulation des sujets en masse + echo ''; + + // Show a list of boards they can move the topic to. + if ($context['can_move']) + echo ' + '; + + echo ' + + '; + } + echo '
    '; + + echo ' +
    '; + + // Finish off the form - again. + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) + echo ' + +
    '; + + echo ' +
    + ', template_button_strip($context['normal_buttons'], ), ' + ', $context['menu_separator'], ' + '; + + // Mobile action buttons (bottom) + if (!empty($context['normal_buttons'])) + echo ' + '; + + echo ' +
    '; + } + + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) + echo ' + '; + + // Javascript for inline editing. + echo ' + '; + + template_topic_legend(); + + // Lets pop the... + echo ' + '; +} + +/** + * Outputs the board icon for a standard board. + * + * @param array $board Current board information. + */ +function template_bi_board_icon($board) +{ + global $context, $scripturl; + + echo ' + '; +} + +/** + * Outputs the board icon for a redirect. + * + * @param array $board Current board information. + */ +function template_bi_redirect_icon($board) +{ + global $context, $scripturl; + + echo ' + '; +} + +/** + * Outputs the board info for a standard board or redirect. + * + * @param array $board Current board information. + */ +function template_bi_board_info($board) +{ + global $context, $scripturl, $txt; + + echo ' + + ', $board['name'], ' + '; + + // Has it outstanding posts for approval? + if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) + echo ' + !'; + + echo ' +
    ', $board['description'], '
    '; + + // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) + if (!empty($board['moderators']) || !empty($board['moderator_groups'])) + echo ' +

    ', count($board['link_moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '

    '; +} + +/** + * Outputs the board stats for a standard board. + * + * @param array $board Current board information. + */ +function template_bi_board_stats($board) +{ + global $txt; + + echo ' +
    ', comma_format($board['topics']), '
    +
    ', comma_format($board['posts']), '
    + '; +} + +/** + * Outputs the board stats for a redirect. + * + * @param array $board Current board information. + */ +function template_bi_redirect_stats($board) +{ + global $txt; + + echo ' +

    + ', $txt['redirects'], ': ', comma_format($board['posts']), ' +

    '; +} + +/** + * Outputs the board lastposts for a standard board or a redirect. + * When on a mobile device, this may be hidden if no last post exists. + * + * @param array $board Current board information. + */ +function template_bi_board_lastpost($board) +{ + if (!empty($board['last_post']['id'])) + echo ' +

    ', $board['last_post']['last_post_message'], '

    '; +} + +/** + * Outputs the board children for a standard board. + * + * @param array $board Current board information. + */ +function template_bi_board_children($board) +{ + global $txt, $scripturl, $context; + + // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) + if (!empty($board['children'])) + { + // Sort the links into an array with new boards bold so it can be imploded. + $children = array(); + /* Each child in each board's children has: + id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ + foreach ($board['children'] as $child) + { + if (!$child['is_redirect']) + $child['link'] = '' . ($child['new'] ? '' . $txt['new'] . ' ' : '') . '' . $child['name'] . ''; + else + $child['link'] = '' . $child['name'] . ''; + + // Has it posts awaiting approval? + if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) + $child['link'] .= ' !'; + + $children[] = $child['new'] ? '' . $child['link'] . '' : '' . $child['link'] . ''; + } + + echo ' +
    +

    ', $txt['sub_boards'], '', implode(' ', $children), '

    +
    '; + } +} + +/** + * Shows a legend for topic icons. + */ +function template_topic_legend() +{ + global $context, $settings, $txt, $modSettings; + + echo ' +
    +
    + '; + + if (empty($context['no_topic_listing'])) + echo ' +

    ' . $txt['khbb_caption'] . '

    +
      ', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? ' +
    • ' . $txt['participation_caption'] . '
    • ' : '', ' + ' . ($modSettings['pollMode'] == '1' ? '
    • ' . $txt['poll'] . '
    • ' : '') . ' +
    • ' . $txt['moved_topic'] . '
    • +
    • ' . $txt['locked_topic'] . '
    • +
    • ' . $txt['sticky_topic'] . '
    • +
    • ' . $txt['watching_topic'] . '
    • +
    '; + + + + echo ' +
    +
    '; +} + +?> diff --git a/ModerationCenter.template.php b/ModerationCenter.template.php new file mode 100644 index 0000000..0b3dccc --- /dev/null +++ b/ModerationCenter.template.php @@ -0,0 +1,689 @@ +'; + + // Show all the blocks they want to see. + foreach ($context['mod_blocks'] as $block) + { + $block_function = 'template_' . $block; + + echo ' +
    ', function_exists($block_function) ? $block_function() : '', '
    '; + } + + echo ' + '; +} + +/** + * Show all the group requests the user can see. + */ +function template_group_requests_block() +{ + global $context, $txt, $scripturl; + + echo ' + +
    +
      '; + + foreach ($context['group_requests'] as $request) + echo ' +
    • + ', $request['group']['name'], ' ', $txt['mc_groupr_by'], ' ', $request['member']['link'], ' +
    • '; + + // Don't have any watched users right now? + if (empty($context['group_requests'])) + echo ' +
    • + ', $txt['mc_group_requests_none'], ' +
    • '; + + echo ' +
    +
    + + '; +} + +/** + * A list of watched users + */ +function template_watched_users() +{ + global $context, $txt, $scripturl; + + echo ' + +
    +
      '; + + foreach ($context['watched_users'] as $user) + echo ' +
    • + ', sprintf(!empty($user['last_login']) ? $txt['mc_seen'] : $txt['mc_seen_never'], $user['link'], $user['last_login']), ' +
    • '; + + // Don't have any watched users right now? + if (empty($context['watched_users'])) + echo ' +
    • + ', $txt['mc_watched_users_none'], ' +
    • '; + + echo ' +
    +
    + + '; +} + +/** + * A list of reported posts + */ +function template_reported_posts_block() +{ + global $context, $txt, $scripturl; + + echo ' + +
    +
      '; + + foreach ($context['reported_posts'] as $post) + echo ' +
    • + ', sprintf($txt['mc_post_report'], $post['report_link'], $post['author']['link']), ' +
    • '; + + // Don't have any watched users right now? + if (empty($context['reported_posts'])) + echo ' +
    • + ', $txt['mc_recent_reports_none'], ' +
    • '; + + echo ' +
    +
    + + '; +} + +/** + * A list of reported users + */ +function template_reported_users_block() +{ + global $context, $txt, $scripturl; + + echo ' + +
    +
      '; + + foreach ($context['reported_users'] as $user) + echo ' +
    • + ', $user['user']['link'], ' +
    • '; + + // Don't have any watched users right now? + if (empty($context['reported_users'])) + echo ' +
    • + ', $txt['mc_reported_users_none'], ' +
    • '; + + echo ' +
    +
    + + '; +} + +/** + * Little section for making... notes. + */ +function template_notes() +{ + global $context, $txt, $scripturl; + + // Let them know the action was a success. + if (!empty($context['report_post_action'])) + echo ' +
    + ', $txt['report_action_' . $context['report_post_action']], ' +
    '; + + echo ' +
    +
    +
    +

    ', $txt['mc_notes'], '

    +
    +
    '; + + if (!empty($context['notes'])) + { + echo ' +
      '; + + // Cycle through the notes. + foreach ($context['notes'] as $note) + echo ' +
    • + ', ($note['can_delete'] ? '' : ''), $note['time'], ' ', $note['author']['link'], ': ', $note['text'], ' +
    • '; + + echo ' +
    +
    + +
    '; + } + + echo ' +
    + +
    + + +
    + +
    +
    '; +} + +/** + * Show a list of all the unapproved posts + */ +function template_unapproved_posts() +{ + global $options, $context, $txt, $scripturl; + + // Just a big table of it all really... + echo ' +
    +
    +
    +

    ', $txt['mc_unapproved_posts'], '

    +
    '; + + // No posts? + if (empty($context['unapproved_items'])) + { + echo ' +
    +

    + ', $txt['mc_unapproved_' . $context['current_view'] . '_none_found'], ' +

    +
    '; + } + else + { + echo ' +
    '; + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
      +
    • + +
    • +
    '; + + echo ' + +
    '; + + } + + foreach ($context['unapproved_items'] as $item) + { + // The buttons + $quickbuttons = array( + 'approve' => array( + 'label' => $txt['approve'], + 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';approve='.$item['id'], + 'icon' => 'approve', + ), + 'delete' => array( + 'label' => $txt['remove'], + 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';delete='.$item['id'], + 'icon' => 'remove_button', + 'show' => $item['can_delete'] + ), + 'quickmod' => array( + 'class' => 'inline_mod_check', + 'content' => '', + 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 + ), + ); + echo ' +
    +
    #', $item['counter'], '
    +
    +
    + ', $item['category']['link'], ' / ', $item['board']['link'], ' / ', $item['link'], ' +
    + ', sprintf(str_replace('
    ', ' ', $txt['last_post_topic']), $item['time'], '' . $item['poster']['link'] . ''), '
    +
    +
    +
    ', $item['body'], '
    +
    + ', template_quickbuttons($quickbuttons, 'unapproved_posts'), ' +
    '; + } + + echo ' +
    '; + + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
    + + +
    '; + + if (!empty($context['unapproved_items'])) + echo ' + '; + + echo ' +
    + +
    +
    '; +} + +/** + * Callback function for showing a watched users post in the table. + * + * @param array $post An array of data about the post. + * @return string An array of HTML for showing the post info. + */ +function template_user_watch_post_callback($post) +{ + global $scripturl, $context, $txt, $delete_button; + + // We'll have a delete and a checkbox please bob. + // @todo Discuss this with the team and rewrite if required. + $quickbuttons = array( + 'delete' => array( + 'label' => $txt['remove_message'], + 'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], + 'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '"', + 'class' => 'you_sure', + 'icon' => 'remove_button', + 'show' => $post['can_delete'] + ), + 'quickmod' => array( + 'class' => 'inline_mod_check', + 'content' => '', + 'show' => $post['can_delete'] + ) + ); + + $output_html = ' +
    +
    + ' . $post['subject'] . ' ' . $txt['mc_reportedp_by'] . ' ' . $post['author_link'] . ' +
    +
    +
    +
    + ' . $txt['mc_watched_users_posted'] . ': ' . $post['poster_time'] . ' +
    +
    + ' . $post['body'] . ' +
    '; + + $output_html .= template_quickbuttons($quickbuttons, 'user_watch_post', 'return'); + + return $output_html; +} + +/** + * The moderation settings page. + */ +function template_moderation_settings() +{ + global $context, $txt, $scripturl; + + echo ' +
    '; + + echo ' +
    +
    ', $txt['mc_no_settings'], '
    +
    '; + + echo ' +
    '; +} + +/** + * Show a notice sent to a user. + */ +function template_show_notice() +{ + global $txt, $settings, $context, $modSettings; + + // We do all the HTML for this one! + echo ' + + + + ', $context['page_title'], ' + ', template_css(), ' + + +
    +

    ', $txt['show_notice'], '

    +
    +
    +

    ', $txt['show_notice_subject'], ': ', $context['notice_subject'], '

    +
    +
    +
    +
    + ', $txt['show_notice_text'], ': +
    +
    + ', $context['notice_body'], ' +
    +
    +
    + +'; + +} + +/** + * Add or edit a warning template. + */ +function template_warn_template() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +
    +

    ', $context['page_title'], '

    +
    +
    + ', $txt['mc_warning_template_desc'], ' +
    +
    + + +
    +
    + : +
    +
    + +
    +
    + :
    + ', $txt['mc_warning_template_body_desc'], ' +
    +
    + +
    +
    '; + + if ($context['template_data']['can_edit_personal']) + echo ' + + +

    ', $txt['mc_warning_template_personal_desc'], '

    '; + + echo ' + + +
    + + +
    +
    + + '; +} + +?> diff --git a/MoveTopic.template.php b/MoveTopic.template.php new file mode 100644 index 0000000..2abbbb1 --- /dev/null +++ b/MoveTopic.template.php @@ -0,0 +1,398 @@ + +
    +
    +

    ', $txt['move_topic'], '

    +
    +
    +
    +
    +
    + ', $txt['move_to'], ': +
    +
    + +
    '; + + // Disable the reason textarea when the postRedirect checkbox is unchecked... + echo ' +
    +
    + '; + + // Stick our "create a redirection topic" template in here... + template_redirect_options('move'); + + echo ' + +
    +
    '; + + if ($context['back_to_topic']) + echo ' + '; + + echo ' + + +
    + '; +} + +/** + * Redirection topic options + * + * @param string $type What type of topic this is for - currently 'merge' or 'move'. Used to display appropriate text strings... + */ +function template_redirect_options($type) +{ + global $txt, $context, $modSettings; + + echo ' + +
    +
    +
    + ', $txt[$type . '_why'], ' +
    +
    + +
    +
    + +
    +
    + +
    '; + + if (!empty($modSettings['allow_expire_redirect'])) + { + echo ' +
    + ', $txt['redirect_topic_expires'], ' +
    +
    + +
    '; + } + else + echo ' + '; + + echo ' +
    +
    '; +} + +/** + * Confirmation page shown when finished merging topics. + */ +function template_merge_done() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +

    ', $txt['merge'], '

    +
    +
    +

    ', $txt['merge_successful'], '

    +
    + +
    +
    +
    '; +} + +/** + * Merge topic page. + */ +function template_merge() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +

    ', $txt['merge'], '

    +
    +
    + ', $txt['merge_desc'], ' +
    +
    +
    +
    + ', $txt['topic_to_merge'], ': +
    +
    + ', $context['origin_subject'], ' +
    +
    +
    +
    +
    +

    ', $txt['target_topic'], '

    +
    +
    +

    '; + + if (isset($context['merge_categories'])) + { + echo ' +
    + ', $txt['target_below'], ' (', $txt['board'], ': + ) + + +
    '; + } + else + echo $txt['target_below']; + + echo '

    +
    +
    '; + + // Don't show this if there aren't any topics... + if (!empty($context['topics'])) + { + echo ' +
    + +
    +
    +
      '; + + foreach ($context['topics'] as $topic) + echo ' +
    • + + ', $topic['subject'], ' ', $txt['started_by'], ' ', $topic['poster']['link'], ' +
    • '; + + echo ' +
    +
    +
    + +
    '; + } + // Just a nice "There aren't any topics" message + else + echo ' +
    ', $txt['topic_alert_none'], '
    '; + + echo ' +
    +
    +

    ', $txt['target_id'], '

    +
    +
    +
    +
    + ', $txt['merge_to_topic_id'], ': +
    +
    + + + + +
    +
    + +
    +
    +
    '; +} + +/** + * Extra options related to merging topics. + */ +function template_merge_extra_options() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +
    +

    ', $txt['merge_topic_list'], '

    +
    + + + + + + + + + + + '; + + foreach ($context['topics'] as $topic) + echo ' + + + + + + + '; + echo ' + +
    ', $txt['merge_check'], '', $txt['subject'], '', $txt['started_by'], '', $txt['last_post'], '' . $txt['merge_include_notifications'] . '
    + + + ' . $topic['subject'] . ' + + ', $topic['started']['link'], '
    + ', $topic['started']['time'], ' +
    + ' . $topic['updated']['link'] . '
    + ', $topic['updated']['time'], ' +
    + +
    +
    +
    +
    + ', $txt['merge_select_subject'], ' + +
    +
    + +
    '; + + // Show an option to create a redirection topic as well... + template_redirect_options('merge'); + + if (!empty($context['boards']) && count($context['boards']) > 1) + { + echo ' +
    + ', $txt['merge_select_target_board'], ' +
      '; + + foreach ($context['boards'] as $board) + echo ' +
    • + ' . $board['name'] . ' +
    • '; + echo ' +
    +
    '; + } + if (!empty($context['polls'])) + { + echo ' +
    + ' . $txt['merge_select_poll'] . ' +
      '; + + foreach ($context['polls'] as $poll) + echo ' +
    • + ' . $poll['question'] . ' (' . $txt['topic'] . ': ' . $poll['topic']['subject'] . ') +
    • '; + echo ' +
    • + (' . $txt['merge_no_poll'] . ') +
    • +
    +
    '; + } + + echo ' +
    + + + +
    +
    +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Notify.template.php b/Notify.template.php new file mode 100644 index 0000000..0735168 --- /dev/null +++ b/Notify.template.php @@ -0,0 +1,98 @@ + +

    + + ', $txt['notify'], ' +

    + +
    +

    ', $txt['notify_topic_prompt'], '

    +

    + ', $txt['yes'], ' - ', $txt['no'], ' +

    +
    '; +} + +/** + * Board notification bar. + */ +function template_notify_board() +{ + global $context, $txt, $scripturl; + + echo ' +
    +

    + + ', $txt['notify'], ' +

    +
    +
    +

    ', $txt['notify_board_prompt'], '

    +

    + ', $txt['yes'], ' - ', $txt['no'], ' +

    +
    '; +} + +/** + * + */ +function template_notify_announcements() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    +

    + + ', $txt['notify'], ' +

    +
    +
    +

    ', $txt['notify_announcements_prompt'], '

    +

    + ', $txt['yes'], ' - ', $txt['no'], ' +

    +
    '; +} + +/** + * Displays a message indicating the user's notification preferences were successfully changed + */ +function template_notify_pref_changed() +{ + global $context, $settings, $options, $txt, $scripturl; + + echo ' +
    +

    + + ', $txt['notify'], ' +

    +
    +
    +

    ', $context['notify_success_msg'], '

    +
    '; +} + +?> \ No newline at end of file diff --git a/Packages.template.php b/Packages.template.php new file mode 100644 index 0000000..3eb129f --- /dev/null +++ b/Packages.template.php @@ -0,0 +1,1868 @@ + +

    ', $txt[($context['uninstalling'] ? 'uninstall' : ('install_' . $context['extract_type']))], '

    + +
    '; + + if ($context['is_installed']) + echo ' + ', $txt['package_installed_warning1'], '
    +
    + ', $txt['package_installed_warning2'], '
    +
    '; + + echo $txt['package_installed_warning3'], ' +
    +
    '; + + if (!empty($context['package_blacklist_found'])) + echo ' +
    ', $txt['package_validation_blacklist_found'], ' +
    '; + + // Do errors exist in the install? If so light them up like a christmas tree. + if ($context['has_failure']) + echo ' +
    + ', sprintf($txt['package_will_fail_title'], $txt['package_' . ($context['uninstalling'] ? 'uninstall' : 'install')]), '
    + ', sprintf($txt['package_will_fail_warning'], $txt['package_' . ($context['uninstalling'] ? 'uninstall' : 'install')]), + !empty($context['failure_details']) ? '

    ' . $context['failure_details'] . '' : '', ' +
    '; + + // Validation info? + if (!empty($context['validation_tests'])) + { + echo ' +
    +

    ', $txt['package_validaiton_results'], '

    +
    +
    + '; + + foreach ($context['validation_tests'] as $id_server => $result) + { + echo ' + + + + '; + } + + echo ' +
    ', $context['package_servers'][$id_server]['name'], '', $txt[isset($result[$context['package_sha256_hash']]) ? $result[$context['package_sha256_hash']] : 'package_validation_status_unknown'], '
    +
    +
    '; + } + + // Display the package readme if one exists + if (isset($context['package_readme'])) + { + echo ' +
    +

    ', $txt['package_' . ($context['uninstalling'] ? 'un' : '') . 'install_readme'], '

    +
    +
    + ', $context['package_readme'], ' + ', $txt['package_available_readme_language'], ' + + +
    +
    '; + } + + // Did they specify a license to display? + if (isset($context['package_license'])) + { + echo ' +
    +

    ', $txt['package_install_license'], '

    +
    +
    + ', $context['package_license'], ' + ', $txt['package_available_license_language'], ' + + +
    +
    '; + } + + echo ' +
    +
    +

    + ', $context['uninstalling'] ? $txt['package_uninstall_actions'] : $txt['package_install_actions'], ' "', $context['package_name'], '" +

    +
    '; + + // Are there data changes to be removed? + if ($context['uninstalling'] && !empty($context['database_changes'])) + { + // This is really a special case so we're adding style inline + echo ' +
    + +
    + ', $txt['package_db_uninstall_actions'], ': +
      '; + + foreach ($context['database_changes'] as $change) + echo ' +
    • ', $change, '
    • '; + + echo ' +
    +
    +
    '; + } + + echo ' +
    '; + + if (empty($context['actions']) && empty($context['database_changes'])) + echo ' +
    +
    + ', $txt['corrupt_compatible'], ' +
    +
    '; + else + { + echo ' + ', $txt['perform_actions'], ' + +
    + + + + + + + + + + + '; + + $i = 1; + $j = 1; + $action_num = 1; + $js_operations = array(); + foreach ($context['actions'] as $packageaction) + { + // Did we pass or fail? Need to now for later on. + $js_operations[$action_num] = isset($packageaction['failed']) ? $packageaction['failed'] : 0; + + echo ' + + + + + + + '; + + // Is there water on the knee? Operation! + if (isset($packageaction['operations'])) + { + echo ' + + + '; + + // Increase it. + $action_num++; + } + } + echo ' + +
    ', $txt['package_install_type'], '', $txt['package_install_action'], '', $txt['package_install_desc'], '
    ', isset($packageaction['operations']) ? '' : '', '', $i++, '.', $packageaction['type'], '', $packageaction['action'], '', $packageaction['description'], '
    + '; + + // Show the operations. + $operation_num = 1; + foreach ($packageaction['operations'] as $operation) + { + // Determine the position text. + $operation_text = $operation['position'] == 'replace' ? 'operation_replace' : ($operation['position'] == 'before' ? 'operation_after' : 'operation_before'); + + echo ' + + + + + + + '; + } + + echo ' +
    + + + + ', $operation_num++, '.', $txt[$operation_text], '', $operation['action'], '', $operation['description'], !empty($operation['ignore_failure']) ? ' (' . $txt['operation_ignore'] . ')' : '', '
    +
    '; + + // What if we have custom themes we can install into? List them too! + if (!empty($context['theme_actions'])) + { + echo ' +
    +
    +

    + ', $context['uninstalling'] ? $txt['package_other_themes_uninstall'] : $txt['package_other_themes'], ' +

    +
    +
    +
    + ', $txt['package_other_themes_desc'], ' +
    + '; + + // Loop through each theme and display it's name, and then it's details. + foreach ($context['theme_actions'] as $id => $theme) + { + // Pass? + $js_operations[$action_num] = !empty($theme['has_failure']); + + echo ' + + + + '; + + foreach ($theme['actions'] as $action) + { + echo ' + + + + + + '; + + // Is there water on the knee? Operation! + if (isset($action['operations'])) + { + echo ' + + + '; + + // Increase it. + $action_num++; + } + } + } + + echo ' +
    '; + + if (!empty($context['themes_locked'])) + echo ' + '; + echo ' + + + ', $theme['name'], ' +
    ', isset($packageaction['operations']) ? + '' : '', ' + + ', $action['type'], '', $action['action'], '', $action['description'], '
    + '; + + $operation_num = 1; + foreach ($action['operations'] as $operation) + { + // Determine the position text. + $operation_text = $operation['position'] == 'replace' ? 'operation_replace' : ($operation['position'] == 'before' ? 'operation_after' : 'operation_before'); + + echo ' + + + + + + + '; + } + + echo ' +
    + + + + ', $operation_num++, '.', $txt[$operation_text], '', $operation['action'], '', $operation['description'], !empty($operation['ignore_failure']) ? ' (' . $txt['operation_ignore'] . ')' : '', '
    +
    +
    '; + } + } + + // Are we effectively ready to install? + if (!$context['ftp_needed'] && (!empty($context['actions']) || !empty($context['database_changes']))) + echo ' +
    + +
    '; + + // If we need ftp information then demand it! + elseif ($context['ftp_needed']) + echo ' +
    +

    ', $txt['package_ftp_necessary'], '

    +
    +
    + ', template_control_chmod(), ' +
    '; + + echo ' + + ', (isset($context['form_sequence_number']) && !$context['ftp_needed']) ? ' + ' : '', ' +
    '; + + // Toggle options. + echo ' + '; +} + +/** + * Extract package contents + */ +function template_extract_package() +{ + global $context, $txt, $scripturl; + + echo ' +
    +

    '; + + if (empty($context['redirect_url'])) + echo $context['uninstalling'] ? $txt['uninstall'] : $txt['extracting']; + else + echo $txt['package_installed_redirecting']; + + echo '

    +
    +
    '; + + // If we are going to redirect we have a slightly different agenda. + if (!empty($context['redirect_url'])) + echo ' + ', $context['redirect_text'], '

    + ', $txt['package_installed_redirect_go_now'], ' | ', $txt['package_installed_redirect_cancel'], ' + '; + + elseif ($context['uninstalling']) + echo ' + ', $txt['package_uninstall_done'] .'
    + ', '', $txt['package_keep'], '', '', $txt['package_delete2'], ''; + + elseif ($context['install_finished']) + { + if ($context['extract_type'] == 'avatar') + echo ' + ', $txt['avatars_extracted']; + + elseif ($context['extract_type'] == 'language') + echo ' + ', $txt['language_extracted']; + + else + echo ' + ', $txt['package_installed_done']; + } + else + echo ' + ', $txt['corrupt_compatible']; + + echo ' +
    '; + + // Show the "restore permissions" screen? + if (function_exists('template_show_list') && !empty($context['restore_file_permissions']['rows'])) + { + echo '
    '; + template_show_list('restore_file_permissions'); + } +} + +/** + * List files in a package + */ +function template_list() +{ + global $context, $txt, $scripturl; + + echo ' +
    +

    ', $txt['list_file'], '

    +
    +
    +

    ', $txt['files_archive'], ' ', $context['filename'], ':

    +
    +
    +
      '; + + foreach ($context['files'] as $fileinfo) + echo ' +
    1. ', $fileinfo['filename'], ' (', $fileinfo['size'], ' ', $txt['package_bytes'], ')
    2. '; + + echo ' +
    +
    + [ ', $txt['back'], ' ] +
    '; +} + +/** + * Examine a single file within a package + */ +function template_examine() +{ + global $context, $txt, $scripturl; + + echo ' +
    +

    ', $txt['package_examine_file'], '

    +
    +
    +

    ', $txt['package_file_contents'], ' ', $context['filename'], ':

    +
    +
    +
    ', $context['filedata'], '
    + [ ', $txt['list_files'], ' ] +
    '; +} + +/** + * List all packages + */ +function template_browse() +{ + global $context, $txt, $scripturl, $modSettings; + + echo ' +
    +
    +
    +

    + ', $txt['packages_adding_title'], ' +

    +
    +
    + ', $txt['packages_adding'], ' +
    + + + '; + + if (empty($modSettings['disable_smf_js'])) + echo ' + '; + + // This sets the announcements and current versions themselves ;). + echo ' + '; + + echo ' +
    '; + + if ($context['available_packages'] == 0) + echo ' +
    ', $txt['no_packages'], '
    '; + else + { + foreach ($context['modification_types'] as $type) + if (!empty($context['packages_lists_' . $type]['rows'])) + template_show_list('packages_lists_' . $type); + + echo ' +
    '; + } + + // The advanced (emulation) box, collapsed by default + echo ' +
    +
    + +
    +

    + ', $txt['package_emulate_desc'], ' +

    +
    +
    + ', $txt['package_emulate'], ':
    + + ', $txt['package_emulate_revert'], ' + +
    +
    + + +
    +
    +
    + +
    +
    +
    + + + +
    + '; +} + +/** + * List package servers + */ +function template_servers() +{ + global $context, $txt, $scripturl; + + if (!empty($context['package_ftp']['error'])) + echo ' +
    +
    ', $context['package_ftp']['error'], '
    +
    '; + + echo ' +
    +
    +

    ', $txt['package_upload_title'], '

    +
    +
    +
    +
    +
    + ', $txt['package_upload_select'], ': +
    +
    + +
    +
    + + +
    +
    + +
    '; + + if ($context['package_download_broken']) + { + echo ' +
    +

    ', $txt['package_ftp_necessary'], '

    +
    +
    +

    + ', $txt['package_ftp_why_download'], ' +

    +
    +
    +
    + +
    +
    + + + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    '; + } + + echo ' +
    +
    + ' . $txt['package_servers'] . ' + +
    +
    + ' . $txt['add_server'] . ' +
    +
    +
    + ' . $txt['server_name'] . ': +
    +
    + +
    +
    + ' . $txt['serverurl'] . ': +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    + ', $txt['package_download_by_url'], ' +
    +
    +
    + ' . $txt['serverurl'] . ': +
    +
    + +
    +
    + ', $txt['package_download_filename'], ': +
    +
    +
    + ', $txt['package_download_filename_info'], ' +
    +
    + +
    +
    +
    +
    +
    '; +} + +/** + * Confirm package operation + */ +function template_package_confirm() +{ + global $context, $txt; + + echo ' +
    +

    ', $context['page_title'], '

    +
    + '; +} + +/** + * List packages. + */ +function template_package_list() +{ + global $context, $txt, $smcFunc; + + echo ' +
    +

    ', $context['page_title'], '

    +
    +
    '; + + // No packages, as yet. + if (empty($context['package_list'])) + echo ' +
      +
    • ', $txt['no_packages'], '
    • +
    '; + + // List out the packages... + else + { + echo ' +
      '; + + foreach ($context['package_list'] as $i => $packageSection) + { + echo ' +
    • + ', $packageSection['title'], ''; + + if (!empty($packageSection['text'])) + echo ' +
      +

      ', $packageSection['text'], '

      +
      '; + + echo ' + <', $context['list_type'], ' id="package_section_', $i, '" class="packages">'; + + foreach ($packageSection['items'] as $id => $package) + { + echo ' +
    • '; + + // Textual message. Could be empty just for a blank line... + if ($package['is_text']) + echo ' + ', empty($package['name']) ? ' ' : $package['name']; + + // This is supposed to be a rule.. + elseif ($package['is_line']) + echo ' +
      '; + + // A remote link. + elseif ($package['is_remote']) + echo ' + ', $package['link'], ''; + + // A title? + elseif ($package['is_heading'] || $package['is_title']) + echo ' + ', $package['name'], ''; + + // Otherwise, it's a package. + else + { + // 1. Some mod [ Download ]. + echo ' + ', $package['can_install'] || !empty($package['can_emulate_install']) ? '' . $package['name'] . ' [ ' . $txt['download'] . ' ]' : $package['name'], ' +
        '; + + // Show the mod type? + if ($package['type'] != '') + echo ' +
      • + ', $txt['package_type'], ':  ', $smcFunc['ucwords']($smcFunc['strtolower']($package['type'])), ' +
      • '; + + // Show the version number? + if ($package['version'] != '') + echo ' +
      • + ', $txt['mod_version'], ':  ', $package['version'], ' +
      • '; + + // How 'bout the author? + if (!empty($package['author']) && $package['author']['name'] != '' && isset($package['author']['link'])) + echo ' +
      • + ', $txt['mod_author'], ':  ', $package['author']['link'], ' +
      • '; + + // The homepage... + if ($package['author']['website']['link'] != '') + echo ' +
      • + ', $txt['author_website'], ':  ', $package['author']['website']['link'], ' +
      • '; + + // Description: bleh bleh! + // Location of file: http://someplace/. + echo ' +
      • + ', $txt['file_location'], ':  ', $package['href'], ' +
      • +
      • +
        + ', $txt['package_description'], ':  ', $package['description'], ' +
        +
      • +
      '; + } + + echo ' +
    • '; + } + echo ' + + '; + } + echo ' +
    '; + } + + echo ' +
    '; + + // Now go through and turn off all the sections. + if (!empty($context['package_list'])) + { + $section_count = count($context['package_list']); + + echo ' + '; + } +} + +/** + * Confirmation page showing a package was uploaded/downloaded successfully. + */ +function template_downloaded() +{ + global $context, $txt, $scripturl; + + echo ' +
    +

    ', $context['page_title'], '

    +
    +
    +

    + ', (empty($context['package_server']) ? $txt['package_uploaded_successfully'] : $txt['package_downloaded_successfully']), ' +

    +
      +
    • + ', $context['package']['name'], ' + ', $context['package']['list_files']['link'], ' + ', $context['package']['install']['link'], ' +
    • +
    +

    +

    [ ', $txt['back'], ' ]

    +
    '; +} + +/** + * Installation options - FTP info and backup settings + */ +function template_install_options() +{ + global $context, $txt, $scripturl; + + if (!empty($context['saved_successful'])) + echo ' +
    ', $txt['settings_saved'], '
    '; + + echo ' +
    +

    ', $txt['package_install_options'], '

    +
    +
    + ', $txt['package_install_options_ftp_why'], ' +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + +
    +
    '; +} + +/** + * CHMOD control form + * + * @return bool False if nothing to do. + */ +function template_control_chmod() +{ + global $context, $txt; + + // Nothing to do? Brilliant! + if (empty($context['package_ftp'])) + return false; + + if (empty($context['package_ftp']['form_elements_only'])) + { + echo ' + ', sprintf($txt['package_ftp_why'], 'document.getElementById(\'need_writable_list\').style.display = \'\'; return false;'), '
    +
    + ', $txt['package_ftp_why_file_list'], ' +
      '; + + if (!empty($context['notwritable_files'])) + foreach ($context['notwritable_files'] as $file) + echo ' +
    • ', $file, '
    • '; + + echo ' +
    '; + + if (!$context['server']['is_windows']) + echo ' +
    + ', $txt['package_chmod_linux'], '
    + # chmod a+w ', implode(' ', $context['notwritable_files']), ''; + + echo ' +
    '; + } + + echo ' +
    +
    + ', !empty($context['package_ftp']['error']) ? $context['package_ftp']['error'] : '', ' +
    +
    '; + + if (!empty($context['package_ftp']['destination'])) + echo ' +
    '; + + echo ' +
    +
    +
    + +
    +
    + + + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    '; + + if (empty($context['package_ftp']['form_elements_only'])) + echo ' +
    + + +
    '; + + if (!empty($context['package_ftp']['destination'])) + echo ' + +
    '; + + // Hide the details of the list. + if (empty($context['package_ftp']['form_elements_only'])) + echo ' + '; + + // Quick generate the test button. + echo ' + '; + + // Make sure the button gets generated last. + $context['insert_after_template'] .= ' + '; +} + +/** + * Wrapper for the above template function showing that FTP is required + */ +function template_ftp_required() +{ + global $txt; + + echo ' +
    + + ', $txt['package_ftp_necessary'], ' + +
    + ', template_control_chmod(), ' +
    +
    '; +} + +/** + * View operation details. + */ +function template_view_operations() +{ + global $context, $txt, $settings, $modSettings; + + echo ' + + + + ', $txt['operation_title'], ' + ', template_css(); + + template_javascript(); + + echo ' + + +
    +
    + ', $context['operations']['search'], ' +
    +
    + ', $context['operations']['replace'], ' +
    +
    + +'; +} + +/** + * The file permissions page. + */ +function template_file_permissions() +{ + global $txt, $scripturl, $context; + + // This will handle expanding the selection. + echo ' + '; + + echo ' +
    +
    + ', $txt['package_file_perms_warning'], ': +
    +
      + ', $txt['package_file_perms_warning_desc'], ' +
    +
    +
    +
    + +
    +
    +

    + ', $txt['package_file_perms'], '', $txt['package_file_perms_new_status'], ' +

    +
    + + + + + + + + + + + + + '; + + foreach ($context['file_tree'] as $name => $dir) + { + echo ' + + + + + + + + + '; + + if (!empty($dir['contents'])) + template_permission_show_contents($name, $dir['contents'], 1); + } + + echo ' + +
    ', $txt['package_file_perms_name'], '', $txt['package_file_perms_status'], '', $txt['package_file_perms_status_read'], '', $txt['package_file_perms_status_write'], '', $txt['package_file_perms_status_execute'], '', $txt['package_file_perms_status_custom'], '', $txt['package_file_perms_status_no_change'], '
    + '; + + if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) + echo ' + '; + + echo ' + ', $name, ' + + + ', ($dir['perms']['chmod'] ? $txt['package_file_perms_writable'] : $txt['package_file_perms_not_writable']), ' + ', ($dir['perms']['perms'] ? ' (' . $txt['package_file_perms_chmod'] . ': ' . substr(sprintf('%o', $dir['perms']['perms']), -4) . ')' : ''), ' + + + + + + + + + + +
    +
    +
    +

    ', $txt['package_file_perms_change'], '

    +
    +
    +
    +
    +
    + + +
    +
    + ', $txt['package_file_perms_custom'], ': (?) +
    +
    + + + +
    +
    + ', $txt['package_file_perms_predefined_note'], ' +
    +
    +
    '; + + // Likely to need FTP? + if (empty($context['ftp_connected'])) + echo ' +

    + ', $txt['package_file_perms_ftp_details'], ': +

    + ', template_control_chmod(), ' +
    ', $txt['package_file_perms_ftp_retain'], '
    '; + + echo ' + + + +
    '; + + // Any looks fors we've already done? + foreach ($context['look_for'] as $path) + echo ' + '; + + echo ' +
    +
    '; +} + +/** + * Shows permissions for items within a directory (called from template_file_permissions) + * + * @param string $ident A unique ID - typically the directory name + * @param array $contents An array of items within the directory + * @param int $level How far to go inside the directory + * @param bool $has_more Whether there are more files to display besides what's in $contents + */ +function template_permission_show_contents($ident, $contents, $level, $has_more = false) +{ + global $txt, $scripturl, $context; + $js_ident = preg_replace('~[^A-Za-z0-9_\-=:]~', ':-:', $ident); + + // Have we actually done something? + $drawn_div = false; + + foreach ($contents as $name => $dir) + { + if (isset($dir['perms'])) + { + if (!$drawn_div) + { + $drawn_div = true; + echo ' + + '; + } + + $cur_ident = preg_replace('~[^A-Za-z0-9_\-=:]~', ':-:', $ident . '/' . $name); + + echo ' + + ' . str_repeat(' ', $level * 5), ' + ', (!empty($dir['type']) && $dir['type'] == 'dir_recursive') || !empty($dir['list_contents']) ? '' : ''; + + if (!empty($dir['type']) && ($dir['type'] == 'dir' || $dir['type'] == 'dir_recursive')) + echo ' + '; + + echo ' + ', $name, ' + ', (!empty($dir['type']) && $dir['type'] == 'dir_recursive') || !empty($dir['list_contents']) ? '' : '', ' + + + ', ($dir['perms']['chmod'] ? $txt['package_file_perms_writable'] : $txt['package_file_perms_not_writable']), ' + ', ($dir['perms']['perms'] ? ' (' . $txt['package_file_perms_chmod'] . ': ' . substr(sprintf('%o', $dir['perms']['perms']), -4) . ')' : ''), ' + + + + + + + + '; + + if (!empty($dir['contents'])) + template_permission_show_contents($ident . '/' . $name, $dir['contents'], $level + 1, !empty($dir['more_files'])); + } + } + + // We have more files to show? + if ($has_more) + echo ' + + ' . str_repeat(' ', $level * 5), ' + ', $txt['package_file_perms_more_files'], ' + + + '; + + if ($drawn_div) + { + // Hide anything too far down the tree. + $isFound = false; + foreach ($context['look_for'] as $tree) + if (substr($tree, 0, strlen($ident)) == $ident) + $isFound = true; + + if ($level > 1 && !$isFound) + echo ' + '; + } +} + +/** + * A progress page showing what permissions changes are being applied + */ +function template_action_permissions() +{ + global $txt, $scripturl, $context; + + $countDown = 3; + + echo ' +
    +
    +

    ', $txt['package_file_perms_applying'], '

    +
    '; + + if (!empty($context['skip_ftp'])) + echo ' +
    + ', $txt['package_file_perms_skipping_ftp'], ' +
    '; + + // How many have we done? + $remaining_items = count($context['method'] == 'individual' ? $context['to_process'] : $context['directory_list']); + $progress_message = sprintf($context['method'] == 'individual' ? $txt['package_file_perms_items_done'] : $txt['package_file_perms_dirs_done'], $context['total_items'] - $remaining_items, $context['total_items']); + $progress_percent = round(($context['total_items'] - $remaining_items) / $context['total_items'] * 100, 1); + + echo ' +
    +
    + ', $progress_message, '
    +
    + ', $progress_percent, '% +
    +
    +
    '; + + // Second progress bar for a specific directory? + if ($context['method'] != 'individual' && !empty($context['total_files'])) + { + $file_progress_message = sprintf($txt['package_file_perms_files_done'], $context['file_offset'], $context['total_files']); + $file_progress_percent = round($context['file_offset'] / $context['total_files'] * 100, 1); + + echo ' +
    +
    + ', $file_progress_message, '
    +
    + ', $file_progress_percent, '% +
    +
    +
    '; + } + + echo ' +
    '; + + // Put out the right hidden data. + if ($context['method'] == 'individual') + echo ' + + + '; + else + echo ' + + + + + '; + + // Are we not using FTP for whatever reason. + if (!empty($context['skip_ftp'])) + echo ' + '; + + // Retain state. + foreach ($context['back_look_data'] as $path) + echo ' + '; + + echo ' + + +
    + +
    +
    +
    '; + + // Just the countdown stuff + echo ' + '; +} + +?> \ No newline at end of file diff --git a/PersonalMessage.template.php b/PersonalMessage.template.php new file mode 100644 index 0000000..976b277 --- /dev/null +++ b/PersonalMessage.template.php @@ -0,0 +1,2013 @@ +'; + + // Show the capacity bar, if available. + if (!empty($context['limit_bar'])) + echo ' +
    +
    +

    + ', $txt['pm_capacity'], ': + + + + ', $context['limit_bar']['text'], ' +

    +
    '; + + // Message sent? Show a small indication. + if (isset($context['pm_sent'])) + echo ' +
    + ', $txt['pm_sent'], ' +
    '; +} + +/** + * Just the end of the index bar, nothing special. + */ +function template_pm_below() +{ + echo ' + '; +} + +/** + * Displays a popup with information about your personal messages + */ +function template_pm_popup() +{ + global $context, $txt, $scripturl; + + // Unlike almost every other template, this is designed to be included into the HTML directly via $().load() + echo ' +
    +
    + ', $context['can_send_pm'] ? '' . $txt['pm_new_short'] . '' : '', ' + ', $context['can_draft'] ? ' | ' . $txt['pm_drafts_short'] . '' : '', ' + ', $txt['pm_settings_short'], ' +
    + +
    +
    '; + + if (empty($context['unread_pms'])) + echo ' +
    ', $txt['pm_no_unread'], '
    '; + else + { + foreach ($context['unread_pms'] as $id_pm => $pm_details) + echo ' +
    +
    + ', !empty($pm_details['member']) ? $pm_details['member']['avatar']['image'] : '', ' +
    +
    +
    ', $pm_details['pm_link'], '
    +
    + ', $pm_details['replied_to_you'] ? '' : '', + !empty($pm_details['member']) ? $pm_details['member']['link'] : $pm_details['member_from'], ' - ', $pm_details['time'], ' +
    +
    +
    '; + } + + echo ' +
    '; +} + +/** + * Shows a particular folder (eg inbox or outbox), all the PMs in it, etc. + */ +function template_folder() +{ + global $context, $scripturl, $txt; + + // The every helpful javascript! + echo ' + '; + + echo ' +
    '; + + // If we are not in single display mode show the subjects on the top! + if ($context['display_mode'] != 1) + { + template_subject_list(); + + echo ' +

    '; + } + + // Got some messages to display? + if ($context['get_pmessage']('message', true)) + { + // Show a few buttons if we are in conversation mode and outputting the first message. + if ($context['display_mode'] == 2) + { + // This bit uses info set in template_subject_list, so it's wrapped + // in an if just in case a mod or custom theme breaks it. + if (!empty($context['current_pm_subject'])) + { + echo ' +
    +
    +

    + ', $txt['conversation'], ' +

    +
    +
    +
    ', $context['current_pm_subject'], '
    +

    ', $txt['started_by'], ' ', $context['current_pm_author'], ', ', $context['current_pm_time'], '

    '; + } + else + { + echo ' +
    '; + } + + // Show the conversation buttons. + template_button_strip($context['conversation_buttons'], 'right'); + + echo ' +
    '; + } + + while ($message = $context['get_pmessage']('message')) + template_single_pm($message); + + if (empty($context['display_mode'])) + echo ' +
    + +
    + +
    +
    '; + + // Show a few buttons if we are in conversation mode and outputting the first message. + elseif ($context['display_mode'] == 2 && isset($context['conversation_buttons'])) + { + echo ' +
    '; + + template_button_strip($context['conversation_buttons'], 'right'); + + echo ' +
    '; + } + + echo ' +
    '; + } + + // Individual messages = buttom list! + if ($context['display_mode'] == 1) + { + template_subject_list(); + echo '
    '; + } + + echo ' + + '; +} + +/** + * Template for displaying a single personal message. + * + * @param array $message An array of information about the message to display. + */ +function template_single_pm($message) +{ + global $context, $scripturl, $txt, $settings, $options, $modSettings; + + echo ' +
    +
    +
    '; + + // Are there any custom fields above the member name? + if (!empty($message['custom_fields']['above_member'])) + { + echo ' +
    +
      '; + + foreach ($message['custom_fields']['above_member'] as $custom) + echo ' +
    • ', $custom['value'], '
    • '; + + echo ' +
    +
    '; + } + + echo ' +

    '; + + // Show online and offline buttons? + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) + echo ' + '; + + // Custom fields BEFORE the username? + if (!empty($message['custom_fields']['before_member'])) + foreach ($message['custom_fields']['before_member'] as $custom) + echo ' + ', $custom['value'], ''; + + // Show a link to the member's profile. + echo ' + ', $message['member']['link']; + + // Custom fields AFTER the username? + if (!empty($message['custom_fields']['after_member'])) + foreach ($message['custom_fields']['after_member'] as $custom) + echo ' + ', $custom['value'], ''; + + echo ' +

    '; + + echo ' + +
    +
    +
    +
    +
    ', $message['subject'], '
    +
    + +
    +
    +
    + ', $message['body'], ' +
    +
    +
    '; + + // Add an extra line at the bottom if we have labels enabled. + if ($context['folder'] != 'sent' && !empty($context['currently_using_labels']) && $context['display_mode'] != 2) + { + echo ' +
    '; + + // Add the label drop down box. + if (!empty($context['currently_using_labels'])) + { + echo ' + + '; + } + echo ' +
    '; + } + + // Message options + template_quickbuttons($message['quickbuttons'], 'pm'); + + echo ' +
    + +
    '; + + // Are there any custom profile fields for above the signature? + if (!empty($message['custom_fields']['above_signature'])) + { + echo ' +
    +
      '; + + foreach ($message['custom_fields']['above_signature'] as $custom) + echo ' +
    • ', $custom['value'], '
    • '; + + echo ' +
    +
    '; + } + + // Show the member's signature? + if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) + echo ' +
    + ', $message['member']['signature'], ' +
    '; + + // Are there any custom profile fields for below the signature? + if (!empty($message['custom_fields']['below_signature'])) + { + echo ' +
    +
      '; + + foreach ($message['custom_fields']['below_signature'] as $custom) + echo ' +
    • ', $custom['value'], '
    • '; + + echo ' +
    +
    '; + } + + echo ' +
    +
    +
    +
    '; +} + +/** + * Just list all the personal message subjects - to make templates easier. + */ +function template_subject_list() +{ + global $context, $settings, $txt, $scripturl; + + echo ' +
    +
    +

    + ', $context['folder'] == 'sent' ? $txt['sent_items'] : $context['current_label'], ' +

    +
    + + + + + + + + + + + '; + + if (!$context['show_delete']) + echo ' + + + '; + + while ($message = $context['get_pmessage']('subject')) + { + // Used for giving extra info in conversation view + if ($context['current_pm'] == $message['id']) + { + $context['current_pm_subject'] = $message['subject']; + $context['current_pm_time'] = $message['time']; + $context['current_pm_author'] = $message['member']['link']; + } + + echo ' + + + + + + + '; + } + + echo ' + +
    + + + ', $txt['date'], $context['sort_by'] == 'date' ? ' ' : '', ' + + ', $txt['subject'], $context['sort_by'] == 'subject' ? ' ' : '', ' + + ', ($context['from_or_to'] == 'from' ? $txt['from'] : $txt['pm_to']), $context['sort_by'] == 'name' ? ' ' : '', ' + + +
    ', $txt['pm_alert_none'], '
    + + ', $message['is_replied_to'] ? '' : '', ' + ', $message['time'], ' + ', ($context['display_mode'] != 0 && $context['current_pm'] == $message['id'] ? '*' : ''), '', $message['subject'], $message['is_unread'] ? ' ' . $txt['new'] . '' : '', ' + ', ($context['from_or_to'] == 'from' ? $message['member']['link'] : (empty($message['recipients']['to']) ? '' : implode(', ', $message['recipients']['to']))), ' ', $message['time'], ' + + ', ($context['from_or_to'] == 'from' ? $message['member']['link'] : (empty($message['recipients']['to']) ? '' : implode(', ', $message['recipients']['to']))), ' + + +
    +
    + +
     '; + + if ($context['show_delete']) + { + if (!empty($context['currently_using_labels']) && $context['folder'] != 'sent') + { + echo ' + + '; + } + + echo ' + '; + } + + echo ' +
    +
    '; +} + +/** + * The form for the PM search feature + */ +function template_search() +{ + global $context, $scripturl, $txt; + + if (!empty($context['search_errors'])) + echo ' +
    + ', implode('
    ', $context['search_errors']['messages']), ' +
    '; + + echo ' +
    +
    +
    +

    ', $txt['pm_search_title'], '

    +
    + '; + + // Do we have some labels setup? If so offer to search by them! + if ($context['currently_using_labels']) + { + echo ' +
    +
    + +
    +
      '; + + foreach ($context['search_labels'] as $label) + echo ' +
    • + +
    • '; + + echo ' +
    +
    +
    +
    + + + +
    +
    +
    '; + + // Some javascript for the advanced toggling + echo ' + '; + } + + echo ' +
    '; +} + +/** + * Displays results from a PM search + */ +function template_search_results() +{ + global $context, $txt; + + echo ' +
    +
    +

    ', $txt['pm_search_results'], '

    +
    +
    + ', sprintf($txt['pm_search_results_info'], $context['num_results'], sentence_list($context['search_in'])), ' +
    +
    + +
    '; + + // Complete results? + if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) + echo ' + + + + + + + + + '; + + // Print each message out... + foreach ($context['personal_messages'] as $message) + { + // Are we showing it all? + if (!empty($context['search_params']['show_complete'])) + template_single_pm($message); + + // Otherwise just a simple list! + // @todo No context at all of the search? + else + echo ' + + + + + '; + } + + // Finish off the page... + if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) + echo ' + +
    ', $txt['date'], '', $txt['subject'], '', $txt['from'], '
    ', $message['time'], '', $message['link'], '', $message['member']['link'], '
    '; + + // No results? + if (empty($context['personal_messages'])) + echo ' +
    +

    ', $txt['pm_search_none_found'], '

    +
    '; + + echo ' +
    + +
    '; + +} + +/** + * The form for sending a new PM + */ +function template_send() +{ + global $context, $options, $scripturl, $modSettings, $txt; + + // Show which messages were sent successfully and which failed. + if (!empty($context['send_log'])) + { + echo ' +
    +
    +

    ', $txt['pm_send_report'], '

    +
    +
    '; + + if (!empty($context['send_log']['sent'])) + foreach ($context['send_log']['sent'] as $log_entry) + echo ' + ', $log_entry, '
    '; + + if (!empty($context['send_log']['failed'])) + foreach ($context['send_log']['failed'] as $log_entry) + echo ' + ', $log_entry, '
    '; + + echo ' +
    +
    '; + } + + // Show the preview of the personal message. + echo ' + '; + + // Main message editing box. + echo ' +
    +
    +
    +

    + ', $txt['new_message'], ' +

    +
    +
    '; + + // If there were errors for sending the PM, show them. + echo ' +
    +
    +
    + ', $txt['error_while_submitting'], ' +
    +
    + ', empty($context['post_error']['messages']) ? '' : implode('
    ', $context['post_error']['messages']), ' +
    +
    +
    '; + + if (!empty($modSettings['drafts_pm_enabled'])) + echo ' + '; + + echo ' +
    '; + + // To and bcc. Include a button to search for members. + echo ' +
    + ', $txt['pm_to'], ': +
    '; + + // Autosuggest will be added by the JavaScript later on. + echo ' +
    + '; + + // A link to add BCC, only visible with JavaScript enabled. + echo ' + '; + + // A div that'll contain the items found by the autosuggest. + echo ' +
    '; + + echo ' +
    '; + + // This BCC row will be hidden by default if JavaScript is enabled. + echo ' +
    + ', $txt['pm_bcc'], ': +
    +
    + +
    +
    '; + + // The subject of the PM. + echo ' +
    + ', $txt['subject'], ': +
    +
    + +
    +
    '; + + // Show BBC buttons, smileys and textbox. + echo ' + ', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'); + + // If the admin enabled the pm drafts feature, show a draft selection box + if (!empty($context['drafts_pm_save']) && !empty($context['drafts']) && !empty($options['drafts_show_saved_enabled'])) + { + echo ' +
    +

    + ', $txt['drafts_show'], ' +

    +
    +
    +
    +
    ', $txt['subject'], '
    +
    ', $txt['draft_saved_on'], '
    '; + + foreach ($context['drafts'] as $draft) + echo ' +
    ', $draft['link'], '
    +
    ', $draft['poster_time'], '
    '; + echo ' +
    +
    '; + } + + // Require an image to be typed to save spamming? + if ($context['require_verification']) + echo ' +
    + ', $txt['pm_visual_verification_label'], ': + ', template_control_verification($context['visual_verification_id'], 'all'), ' +
    '; + + // Send, Preview, spellcheck buttons. + echo ' + + ', template_control_richedit_buttons($context['post_box_name']), ' + + + + + + + +
    +
    +
    '; + + echo ' + '; + + // Show the message you're replying to. + if ($context['reply']) + echo ' +

    +
    +
    +

    ', $txt['subject'], ': ', $context['quoted_message']['subject'], '

    +
    +
    +
    + ', $txt['on'], ': ', $context['quoted_message']['time'], ' + ', $txt['from'], ': ', $context['quoted_message']['member']['name'], ' +
    +
    + ', $context['quoted_message']['body'], ' +
    +
    '; + + echo ' + '; +} + +/** + * This template asks the user whether they wish to empty out their folder/messages. + */ +function template_ask_delete() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    + ', ($context['delete_all'] ? $txt['delete_message'] : $txt['delete_all']), ' +

    +
    +
    +

    ', $txt['delete_all_confirm'], '

    +
    + ', $txt['yes'], ' - ', $txt['no'], ' +
    '; +} + +/** + * This template asks the user what messages they want to prune. + */ +function template_prune() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    ', $txt['pm_prune'], '

    +
    +
    +
    +

    ', $txt['pm_prune_desc1'], ' ', $txt['pm_prune_desc2'], '

    + + +
    +
    +
    +
    +

    ', $txt['pm_remove_all'], '

    + + +
    +
    '; +} + +/** + * Here we allow the user to setup labels, remove labels and change rules for labels (i.e, do quite a bit) + */ +function template_labels() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +
    +

    ', $txt['pm_manage_labels'], '

    +
    +
    + ', $txt['pm_labels_desc'], ' +
    + + + + + + + + '; + if (count($context['labels']) < 2) + echo ' + + + '; + else + { + foreach ($context['labels'] as $label) + { + if ($label['id'] == -1) + continue; + + echo ' + + + + '; + } + } + echo ' + +
    + ', $txt['pm_label_name'], ' + '; + + if (count($context['labels']) > 2) + echo ' + '; + + echo ' +
    ', $txt['pm_labels_no_exist'], '
    + +
    '; + + if (!count($context['labels']) < 2) + echo ' +
    + + +
    '; + + echo ' + +
    +
    +
    +
    +

    ', $txt['pm_label_add_new'], '

    +
    +
    +
    +
    + : +
    +
    + +
    +
    + +
    + +
    +
    '; +} + +/** + * Template for reporting a personal message. + */ +function template_report_message() +{ + global $context, $txt, $scripturl; + + echo ' +
    + +
    + ', $txt['pm_report_desc'], ' +
    +
    +
    +

    ', $txt['pm_report_title'], '

    +
    +
    +
    '; + + // If there is more than one admin on the forum, allow the user to choose the one they want to direct to. + // @todo Why? + if ($context['admin_count'] > 1) + { + echo ' +
    + ', $txt['pm_report_admins'], ': +
    +
    + +
    '; + } + + echo ' +
    + ', $txt['pm_report_reason'], ': +
    +
    + +
    +
    +
    + +
    +
    + +
    '; +} + +/** + * Little template just to say "Yep, it's been submitted" + */ +function template_report_message_complete() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +

    ', $txt['pm_report_title'], '

    +
    +
    +

    ', $txt['pm_report_done'], '

    + ', $txt['pm_report_return'], ' +
    '; +} + +/** + * Manage rules. + */ +function template_rules() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +
    +

    ', $txt['pm_manage_rules'], '

    +
    +
    + ', $txt['pm_manage_rules_desc'], ' +
    + + + + + + + + '; + + if (empty($context['rules'])) + echo ' + + + '; + + foreach ($context['rules'] as $rule) + echo ' + + + + '; + + echo ' + +
    + ', $txt['pm_rule_title'], ' + '; + + if (!empty($context['rules'])) + echo ' + '; + + echo ' +
    + ', $txt['pm_rules_none'], ' +
    + ', $rule['name'], ' + + +
    +
    + ', $txt['pm_add_rule'], ''; + + if (!empty($context['rules'])) + echo ' + [', $txt['pm_apply_rules'], ']'; + + if (!empty($context['rules'])) + echo ' + + '; + + echo ' +
    +
    '; + +} + +/** + * Template for adding/editing a rule. + */ +function template_add_rule() +{ + global $context, $txt, $scripturl; + + echo ' + '; + + echo ' +
    +
    +
    +

    ', $context['rid'] == 0 ? $txt['pm_add_rule'] : $txt['pm_edit_rule'], '

    +
    +
    +
    +
    + ', $txt['pm_rule_name'], ':
    + ', $txt['pm_rule_name_desc'], ' +
    +
    + +
    +
    +
    + ', $txt['pm_rule_criteria'], ''; + + // Add a dummy criteria to allow expansion for none js users. + $context['rule']['criteria'][] = array('t' => '', 'v' => ''); + + // For each criteria print it out. + $isFirst = true; + foreach ($context['rule']['criteria'] as $k => $criteria) + { + if (!$isFirst && $criteria['t'] == '') + echo '
    '; + + elseif (!$isFirst) + echo '
    '; + + echo ' + + + + + + + '; + + // If this is the dummy we add a means to hide for non js users. + if ($isFirst) + $isFirst = false; + + elseif ($criteria['t'] == '') + echo '
    '; + } + + echo ' +
    + +

    + ', $txt['pm_rule_logic'], ': + +
    +
    + ', $txt['pm_rule_actions'], ''; + + // As with criteria - add a dummy action for "expansion". + $context['rule']['actions'][] = array('t' => '', 'v' => ''); + + // Print each action. + $isFirst = true; + foreach ($context['rule']['actions'] as $k => $action) + { + if (!$isFirst && $action['t'] == '') + echo '
    '; + elseif (!$isFirst) + echo '
    '; + + echo ' + + + + '; + + if ($isFirst) + $isFirst = false; + + elseif ($action['t'] == '') + echo '
    '; + } + + echo ' +
    + +
    +
    +
    +

    ', $txt['pm_rule_description'], '

    +
    +
    +
    ', $txt['pm_rule_js_disabled'], '
    +
    +
    + + +
    +
    +
    '; + + // Now setup all the bits! + echo ' + '; +} + +/** + * Template for showing all of a user's PM drafts. + */ +function template_showPMDrafts() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    + ', $txt['drafts_show'], ' +

    +
    +

    + ', $txt['drafts_show_desc'], ' +

    '; + + // No drafts? Just show an informative message. + if (empty($context['drafts'])) + echo ' +
    + ', $txt['draft_none'], ' +
    '; + else + { + echo ' +
    + +
    '; + + // 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['subject'], ' +
    +
    +
    ', $txt['pm_to'], ': ', implode(', ', $draft['recipients']['to']), '
    '; + + if(!empty($draft['recipients']['bcc'])) + echo' +
    ', $txt['pm_bcc'], ': ', implode(', ', $draft['recipients']['bcc']), '
    '; + + echo ' +
    +
    + ', $txt['draft_saved_on'], ': ', sprintf($txt['draft_days_ago'], $draft['age']), (!empty($draft['remaining']) ? ', ' . sprintf($txt['draft_retain'], $draft['remaining']) : ''), ' +
    +
    +
    + ', $draft['body'], ' +
    '; + + // Draft buttons + template_quickbuttons($draft['quickbuttons'], 'pm_drafts'); + + echo ' +
    '; + } + + // Show page numbers. + echo ' +
    + +
    '; + } +} + +?> diff --git a/Poll.template.php b/Poll.template.php new file mode 100644 index 0000000..f97d629 --- /dev/null +++ b/Poll.template.php @@ -0,0 +1,163 @@ + + var pollOptionNum = 0; + var pollOptionId = ', $context['last_choice_id'], '; + + function addPollOption() + { + if (pollOptionNum == 0) + { + for (var i = 0; i < document.forms.postmodify.elements.length; i++) + if (document.forms.postmodify.elements[i].id.substr(0, 8) == "options-") + pollOptionNum++; + } + pollOptionNum++ + pollOptionId++ + + setOuterHTML(document.getElementById("pollMoreOptions"), \'
    :

    '; + + if (!empty($context['poll_error']['messages'])) + echo ' +

    +
    +
    + ', $context['is_edit'] ? $txt['error_while_editing_poll'] : $txt['error_while_adding_poll'], ': +
    +
    + ', empty($context['poll_error']['messages']) ? '' : implode('
    ', $context['poll_error']['messages']), ' +
    +
    +
    '; + + // Start the main poll form. + echo ' +
    +
    +
    +
    +

    ', $context['page_title'], '

    +
    '; + + echo ' +
    +
    + +
    + ', $txt['poll_question'], ': +
    +
    ', $txt['poll_question'], ':
    +
    '; + + foreach ($context['choices'] as $choice) + { + echo ' +
    + : +
    +
    + '; + + // Does this option have a vote count yet, or is it new? + if ($choice['votes'] != -1) + echo ' (', $choice['votes'], ' ', $txt['votes'], ')'; + + echo ' +
    '; + } + + echo ' +

    +
    + (', $txt['poll_add_option'], ') +
    +
    + ', $txt['poll_options'], ': +
    '; + + if ($context['can_moderate_poll']) + { + echo ' +
    + +
    +
    + +
    +
    +
    + ', $txt['poll_run_limit'], ' +
    +
    + ', $txt['days_word'], ' +
    +
    + +
    +
    + +
    '; + + if ($context['poll']['guest_vote_allowed']) + echo ' +
    + +
    +
    + +
    '; + } + + echo ' +
    + ', $txt['poll_results_visibility'], ': +
    +
    +
    +
    + +
    +
    +
    '; + + // If this is an edit, we can allow them to reset the vote counts. + if ($context['is_edit']) + echo ' +
    + ', $txt['reset_votes'], ' + ' . $txt['reset_votes_check'] . ' +
    '; + echo ' + +
    +
    + + +
    +
    +
    + '; +} + +?> diff --git a/Post.template.php b/Post.template.php new file mode 100644 index 0000000..e0c9a30 --- /dev/null +++ b/Post.template.php @@ -0,0 +1,1231 @@ +'; + + // When using Go Back due to fatal_error, allow the form to be re-submitted with changes. + if (isBrowser('is_firefox')) + echo ' + window.addEventListener("pageshow", reActivate, false);'; + + // Start with message icons - and any missing from this theme. + echo ' + var icon_urls = {'; + + foreach ($context['icons'] as $icon) + echo ' + \'', $icon['value'], '\': \'', $icon['url'], '\'', $icon['is_last'] ? '' : ','; + + echo ' + };'; + + // If this is a poll - use some javascript to ensure the user doesn't create a poll with illegal option combinations. + if ($context['make_poll']) + echo ' + var pollOptionNum = 0, pollTabIndex; + var pollOptionId = ', $context['last_choice_id'], '; + function addPollOption() + { + if (pollOptionNum == 0) + { + for (var i = 0, n = document.forms.postmodify.elements.length; i < n; i++) + if (document.forms.postmodify.elements[i].id.substr(0, 8) == \'options-\') + { + pollOptionNum++; + pollTabIndex = document.forms.postmodify.elements[i].tabIndex; + } + } + pollOptionNum++ + pollOptionId++ + + setOuterHTML(document.getElementById(\'pollMoreOptions\'), ', JavaScriptEscape('
    :

    '), '); + }'; + + // If we are making a calendar event we want to ensure we show the current days in a month etc... this is done here. + if ($context['make_event']) + echo ' + var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];'; + + // End of the javascript, start the form and display the link tree. + echo ' + +
    '; + + // If the user wants to see how their message looks - the preview section is where it's at! + echo ' + +
    '; + + if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) + echo ' + '; + + // Start the main table. + echo ' +
    +
    +

    ', $context['page_title'], '

    +
    +
    +
    ', isset($context['current_topic']) ? ' + ' : ''; + + // If an error occurred, explain what happened. + echo ' + '; + + // If this won't be approved let them know! + if (!$context['becomes_approved']) + echo ' +
    + ', $txt['wait_for_approval'], ' + +
    '; + + // If it's locked, show a message to warn the replier. + if (!empty($context['locked'])) + echo ' +
    + ', $txt['topic_locked_no_reply'], ' +
    '; + + if (!empty($modSettings['drafts_post_enabled'])) + echo ' + '; + + // The post header... important stuff + template_post_header(); + + // Are you posting a calendar event? + if ($context['make_event']) + { + // Note to theme writers: The JavaScripts expect the input fields for the start and end dates & times to be contained in a wrapper element with the id "event_time_input" + echo ' +
    +
    +
    + ', $txt['calendar_event_options'], ' + +
    +
    + ', $txt['calendar_event_title'], ' + +
    +
    +
    +
    +
    + ', $txt['start'], ' + + +
    +
    + ', $txt['end'], ' + + +
    +
    +
    +
    + + +
    +
    + ', $txt['calendar_timezone'], ' + +
    +
    +
    +
    +
    + ', $txt['location'], ' + +
    +
    +
    +
    '; + } + + // If this is a poll then display all the poll options! + if ($context['make_poll']) + { + echo ' +
    +
    +
    + ', $txt['poll_question'], ' +
    +
    ', $txt['poll_question'], '
    +
    + +
    '; + + // Loop through all the choices and print them out. + foreach ($context['choices'] as $choice) + echo ' +
    + : +
    +
    + +
    '; + + echo ' +

    +
    + (', $txt['poll_add_option'], ') +
    +
    + ', $txt['poll_options'], ' +
    +
    + +
    +
    + +
    +
    +
    + ', $txt['poll_run_limit'], ' +
    +
    + ', $txt['days_word'], ' +
    +
    + +
    +
    + +
    '; + + if ($context['poll_options']['guest_vote_enabled']) + echo ' +
    + +
    +
    + +
    '; + + echo ' +
    + ', $txt['poll_results_visibility'], ': +
    +
    +
    +
    + +
    +
    +
    +
    '; + } + + // Show the actual posting area... + echo ' + ', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'); + + // If we're editing and displaying edit details, show a box where they can say why + if (isset($context['editing']) && $modSettings['show_modify']) + echo ' +
    +
    + ', $txt['reason_for_edit'], ': +
    +
    + +
    +
    '; + + // If this message has been edited in the past - display when it was. + if (isset($context['last_modified'])) + echo ' +
    + ', $context['last_modified_text'], ' +
    '; + + // If the admin has enabled the hiding of the additional options - show a link and image for it. + if (!empty($modSettings['additional_options_collapsable'])) + echo ' +
    + ', $context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], ' +
    '; + + echo ' +
    '; + + // Display the checkboxes for all the standard options - if they are available to the user! + echo ' +
    +
      + ', $context['can_notify'] ? '
    • ' : '', ' + ', $context['can_lock'] ? '
    • ' : '', ' +
    • + ', $context['can_sticky'] ? '
    • ' : '', ' +
    • ', ' + ', $context['can_move'] ? '
    • ' : '', ' + ', $context['can_announce'] && $context['is_first_post'] ? '
    • ' : '', ' + ', $context['show_approval'] ? '
    • ' : '', ' +
    +
    '; + + // If this post already has attachments on it - give information about them. + if (!empty($context['current_attachments'])) + { + echo ' +
    +
    + ', $txt['attachments'], ': +
    +
    + + ', $txt['uncheck_unwatchd_attach'], ': +
    '; + + foreach ($context['current_attachments'] as $attachment) + echo ' +
    + +
    '; + + echo ' +
    '; + + if (!empty($context['files_in_session_warning'])) + echo ' +
    ', $context['files_in_session_warning'], '
    '; + } + + // Is the user allowed to post any additional ones? If so give them the boxes to do it! + if ($context['can_post_attachment']) + { + // Print dropzone UI. + echo ' +
    +
    + ', $txt['attachments'], ': +
    +
    +
    + +
    +
    +
    + + + + +
    +
    + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    '; + + echo ' +
    +
    +
    + +
    +
    +
    +
    + (', $txt['clean_attach'], ')'; + + if (!empty($modSettings['attachmentSizeLimit'])) + echo ' + '; + + echo ' +
    +
    +
    '; + + // Add any template changes for an alternative upload system here. + call_integration_hook('integrate_upload_template'); + + echo ' +
    '; + + // Show some useful information such as allowed extensions, maximum size and amount of attachments allowed. + if (!empty($modSettings['attachmentCheckExtensions'])) + echo ' + ', $txt['allowed_types'], ': ', $context['allowed_extensions'], '
    '; + + if (!empty($context['attachment_restrictions'])) + echo ' + ', $txt['attach_restrictions'], ' ', implode(', ', $context['attachment_restrictions']), '
    '; + + if ($context['num_allowed_attachments'] <= count($context['current_attachments'])) + echo ' + ', $txt['attach_limit_nag'], '
    '; + + if (!$context['can_post_attachment_unapproved']) + echo ' + ', $txt['attachment_requires_approval'], '', '
    '; + + echo ' +
    +
    '; + } + + echo ' +
    '; + + // If the admin enabled the drafts feature, show a draft selection box + if (!empty($modSettings['drafts_post_enabled']) && !empty($context['drafts']) && !empty($modSettings['drafts_show_saved_enabled']) && !empty($options['drafts_show_saved_enabled'])) + { + echo ' +
    +

    + ', $txt['drafts_show'], ' +

    +
    +
    +
    +
    ', $txt['subject'], '
    +
    ', $txt['draft_saved_on'], '
    '; + + foreach ($context['drafts'] as $draft) + echo ' +
    ', $draft['link'], '
    +
    ', $draft['poster_time'], '
    '; + echo ' +
    +
    '; + } + + // Is visual verification enabled? + if ($context['require_verification']) + echo ' +
    + + ', $txt['verification'], ': + + ', template_control_verification($context['visual_verification_id'], 'all'), ' +
    '; + + // Finally, the submit buttons. + echo ' + + ', template_control_richedit_buttons($context['post_box_name']); + + // Option to delete an event if user is editing one. + if ($context['make_event'] && !$context['event']['new']) + echo ' + '; + + echo ' + +
    +
    +
    +
    '; + + // Assuming this isn't a new topic pass across the last message id. + if (isset($context['topic_last_message'])) + echo ' + '; + + echo ' + + + +
    '; + + echo ' + '; + + // If the user is replying to a topic show the previous posts. + if (isset($context['previous_posts']) && count($context['previous_posts']) > 0) + { + echo ' +
    +
    +
    +

    ', $txt['topic_summary'], '

    +
    + '; + + $ignored_posts = array(); + foreach ($context['previous_posts'] as $post) + { + $ignoring = false; + if (!empty($post['is_ignored'])) + $ignored_posts[] = $ignoring = $post['id']; + + echo ' +
    +
    +
    +
    + ', $txt['posted_by'], ' ', $post['poster'], ' +
    +  - ', $post['time'], ' +
    '; + + if ($ignoring) + echo ' +
    + ', $txt['ignoring_user'], ' + +
    '; + + echo ' +
    ', $post['message'], '
    '; + + if ($context['can_quote']) + echo ' + '; + + echo ' +
    +
    '; + } + + echo ' +
    +
    + '; + } +} + +/** + * The template for the spellchecker. + */ +function template_spellcheck() +{ + global $context, $settings, $txt, $modSettings; + + // The style information that makes the spellchecker look... like the forum hopefully! + echo ' + + + + ', $txt['spell_check'], ' + + + + + + + + +
    +
     
    + + + + + +
    + ', $txt['spellcheck_change_to'], '
    + +
    + ', $txt['spellcheck_suggest'], '
    + +
    +
    + + + + +
    +
    + +'; +} + +/** + * The template for the AJAX quote feature + */ +function template_quotefast() +{ + global $context, $settings, $txt, $modSettings; + + echo ' + + + + ', $txt['retrieving_quote'], ' + + + + ', $txt['retrieving_quote'], ' + + + +'; +} + +/** + * The form for sending out an announcement + */ +function template_announce() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +
    +
    +

    ', $txt['announce_title'], '

    +
    +
    + ', $txt['announce_desc'], ' +
    +
    +

    + ', $txt['announce_this_topic'], ' ', $context['topic_subject'], ' +

    +
      '; + + foreach ($context['groups'] as $group) + echo ' +
    • + (', $group['member_count'], ') +
    • '; + + echo ' +
    • + +
    • +
    +
    +
    + + + + + +
    +
    +
    +
    +
    +
    '; +} + +/** + * The confirmation/progress page, displayed after the admin has clicked the button to send the announcement. + */ +function template_announcement_send() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +
    +

    + ', $txt['announce_sending'], ' ', $context['topic_subject'], ' +

    +
    + ', $context['percentage_done'], '% ', $txt['announce_done'], ' +
    +
    +
    +
    + + + + + + + +
    +
    +
    +
    +
    +
    + '; +} + +/** + * Prints the input fields in the form's header (subject, message icon, guest name & email, etc.) + * + * Mod authors can use the 'integrate_post_end' hook to modify or add to these (see Post.php). + * + * Theme authors can customize the output in a couple different ways: + * 1. Change specific values in the $context['posting_fields'] array. + * 2. Add an 'html' element to the 'label' and/or 'input' elements of the field they want to + * change. This should contain the literal HTML string to be printed. + * + * See the documentation in Post.php for more info on the $context['posting_fields'] array. + */ +function template_post_header() +{ + global $context, $txt; + + // Sanity check: submitting the form won't work without at least a subject field + if (empty($context['posting_fields']['subject']) || !is_array($context['posting_fields']['subject'])) + { + $context['posting_fields']['subject'] = array( + 'label' => array('html' => ''), + 'input' => array('html' => '') + ); + } + + // THEME AUTHORS: Above this line is a great place to make customizations to the posting_fields array + + // Start printing the header + echo ' +
    '; + + foreach ($context['posting_fields'] as $pfid => $pf) + { + // We need both a label and an input + if (empty($pf['label']) || empty($pf['input'])) + continue; + + // The labels are pretty simple... + echo ' +
    '; + + // Any leading HTML before the label + if (!empty($pf['label']['before'])) + echo ' + ', $pf['label']['before']; + + if (!empty($pf['label']['html'])) + echo $pf['label']['html']; + else + echo ' + ', $pf['label']['text'], ''; + + // Any trailing HTML after the label + if (!empty($pf['label']['after'])) + echo ' + ', $pf['label']['after']; + + echo ' +
    '; + + // Here's where the fun begins... + echo ' +
    '; + + // Any leading HTML before the main input + if (!empty($pf['input']['before'])) + echo ' + ', $pf['input']['before']; + + // If there is a literal HTML string already defined, just print it. + if (!empty($pf['input']['html'])) + { + echo $pf['input']['html']; + } + // Simple text inputs and checkboxes + elseif (in_array($pf['input']['type'], array('text', 'password', 'color', 'date', 'datetime-local', 'email', 'month', 'number', 'range', 'tel', 'time', 'url', 'week', 'checkbox'))) + { + echo ' + $value) + { + if (is_bool($value)) + echo $value ? ' ' . $attribute : ''; + else + echo ' ', $attribute, '="', $value, '"'; + } + } + + echo ' tabindex="', $context['tabindex']++, '">'; + } + // textarea + elseif ($pf['input']['type'] === 'textarea') + { + echo ' + $value) + { + if ($attribute === 'value') + continue; + elseif (is_bool($value)) + echo $value ? ' ' . $attribute : ''; + else + echo ' ', $attribute, '="', $value, '"'; + } + } + + echo ' tabindex="', $context['tabindex']++, '">', !empty($pf['input']['attributes']['value']) ? $pf['input']['attributes']['value'] : '', ''; + } + // Select menus are more complicated + elseif ($pf['input']['type'] === 'select' && is_array($pf['input']['options'])) + { + // The select element itself + echo ' + $value) + { + if (is_bool($value)) + echo $value ? ' ' . $attribute : ''; + else + echo ' ', $attribute, '="', $value, '"'; + } + } + + echo ' tabindex="', $context['tabindex']++, '">'; + + // The options + foreach ($pf['input']['options'] as $optlabel => $option) + { + // An option containing options is an optgroup + if (!empty($option['options']) && is_array($option['options'])) + { + echo ' + $value) + { + if ($attribute === 'options') + continue; + elseif (is_bool($value)) + echo $value ? ' ' . $attribute : ''; + else + echo ' ', $attribute, '="', $value, '"'; + } + } + + echo '>'; + + foreach ($option['options'] as $grouped_optlabel => $grouped_option) + { + echo ' + $value) + { + if (is_bool($value)) + echo $value ? ' ' . $attribute : ''; + else + echo ' ', $attribute, '="', $value, '"'; + } + + echo '>', $grouped_option['label'], ''; + + } + + echo ' + '; + } + // Simple option + else + { + echo ' + $value) + { + if (is_bool($value)) + echo $value ? ' ' . $attribute : ''; + else + echo ' ', $attribute, '="', $value, '"'; + } + + echo '>', $optlabel, ''; + } + } + + // Close the select element + echo ' + '; + } + // Radio_select makes a div with some radio buttons in it + elseif ($pf['input']['type'] === 'radio_select' && is_array($pf['input']['options'])) + { + echo ' + $value) + { + if ($attribute === 'name') + continue; + elseif (is_bool($value)) + echo $value ? ' ' . $attribute : ''; + else + echo ' ', $attribute, '="', $value, '"'; + } + } + + echo '>'; + + foreach ($pf['input']['options'] as $optlabel => $option) + { + echo ' + '; + } + + echo ' +
    '; + } + + // Any trailing HTML after the main input + if (!empty($pf['input']['after'])) + echo ' + ', $pf['input']['after']; + + echo ' + '; + } + + echo ' + '; +} + +?> diff --git a/Printpage.template.php b/Printpage.template.php new file mode 100644 index 0000000..a96b1de --- /dev/null +++ b/Printpage.template.php @@ -0,0 +1,238 @@ + + + + + + + ', $txt['print_page'], ' - ', $context['topic_subject'], ' + + + '; + + template_print_options(); + + echo ' +

    ', $context['forum_name_html_safe'], '

    +

    ', $context['category_name'], ' => ', (!empty($context['parent_boards']) ? implode(' => ', $context['parent_boards']) . ' => ' : ''), $context['board_name'], ' => ', $txt['topic_started'], ': ', $context['poster_name'], ' ', $txt['search_on'], ' ', $context['post_time'], '

    +
    '; +} + +/** + * The main page. This shows the relevant info in a printer-friendly format + */ +function template_main() +{ + global $context, $options, $txt, $scripturl, $topic; + + if (!empty($context['poll'])) + { + echo ' +
    ', $txt['poll'], ' +
    ', $txt['poll_question'], ': ', $context['poll']['question'], ''; + + $options = 1; + foreach ($context['poll']['options'] as $option) + echo ' +
    ', $txt['option'], ' ', $options++, ': ', $option['option'], ' + ', $context['allow_poll_view'] ? $txt['votes'] . ': ' . $option['votes'] . '' : '', ' +
    '; + + echo ' +
    '; + } + + foreach ($context['posts'] as $post) + { + echo ' +
    + ', $txt['title'], ': ', $post['subject'], '
    + ', $txt['post_by'], ': ', $post['member'], ' ', $txt['search_on'], ' ', $post['time'], ' +
    +
    + ', $post['body']; + + // Show attachment images + if (isset($_GET['images']) && !empty($context['printattach'][$post['id_msg']])) + { + echo ' +
    '; + + foreach ($context['printattach'][$post['id_msg']] as $attach) + echo ' + '; + } + + echo ' +
    '; + } +} + +/** + * The footer. + */ +function template_print_below() +{ + echo ' +
    '; + + template_print_options(); + + echo ' + + +'; +} + +/** + * Displays the print page options + */ +function template_print_options() +{ + global $scripturl, $topic, $txt; + + $url_text = $scripturl . '?action=printpage;topic=' . $topic . '.0'; + $url_images = $url_text . ';images'; + + echo ' + '; +} + +?> \ No newline at end of file diff --git a/Profile.template.php b/Profile.template.php new file mode 100644 index 0000000..bf520d3 --- /dev/null +++ b/Profile.template.php @@ -0,0 +1,3508 @@ + + disableAutoComplete(); + '; + + // 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 any HTML needed below the profile (closing off divs/tables, etc.) + */ +function template_profile_below() +{ +} + +/** + * Template for showing off the spiffy popup of the menu + */ +function template_profile_popup() +{ + global $context, $scripturl; + + // Unlike almost every other template, this is designed to be included into the HTML directly via $().load() + + echo ' + + + '; +} + +/** + * The "popup" showing the user's alerts + */ +function template_alerts_popup() +{ + global $context, $txt, $scripturl; + + // Unlike almost every other template, this is designed to be included into the HTML directly via $().load() + echo ' + +
    '; + + if (empty($context['unread_alerts'])) + template_alerts_all_read(); + + else + { + foreach ($context['unread_alerts'] as $id_alert => $details) + { + echo ' + <', !$details['show_links'] ? 'a href="' . $scripturl . '?action=profile;area=showalerts;alert=' . $id_alert . '" onclick="this.classList.add(\'alert_read\')"' : 'div', ' class="unread_notify"> +
    + ', empty($details['sender']['avatar']['image']) ? '' : $details['sender']['avatar']['image'] . ' + ', $details['icon'], ' +
    +
    + ', $details['text'], ' - ', $details['time'], ' +
    + '; + } + } + + echo ' +
    + '; +} + +/** + * A simple template to say "You don't have any unread alerts". + */ +function template_alerts_all_read() +{ + global $txt; + + echo '
    ', $txt['alerts_no_unread'], '
    '; +} + +/** + * This template displays a user's details without any option to edit them. + */ +function template_summary() +{ + global $context, $settings, $scripturl, $modSettings, $txt; + + // Display the basic information about the user + echo ' +
    +
    '; + + // Are there any custom profile fields for above the name? + if (!empty($context['print_custom_fields']['above_member'])) + { + $fields = ''; + foreach ($context['print_custom_fields']['above_member'] as $field) + if (!empty($field['output_html'])) + $fields .= ' +
  • ' . $field['output_html'] . '
  • '; + + if (!empty($fields)) + echo ' +
    +
      ', $fields, ' +
    +
    '; + } + + echo ' +
    +

    '; + + if (!empty($context['print_custom_fields']['before_member'])) + foreach ($context['print_custom_fields']['before_member'] as $field) + if (!empty($field['output_html'])) + echo ' + ', $field['output_html'], ''; + + echo ' + ', $context['member']['name']; + + if (!empty($context['print_custom_fields']['after_member'])) + foreach ($context['print_custom_fields']['after_member'] as $field) + if (!empty($field['output_html'])) + echo ' + ', $field['output_html'], ''; + + echo ' + ', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), ' +

    +
    + ', $context['member']['avatar']['image']; + + // Are there any custom profile fields for below the avatar? + if (!empty($context['print_custom_fields']['below_avatar'])) + { + $fields = ''; + foreach ($context['print_custom_fields']['below_avatar'] as $field) + if (!empty($field['output_html'])) + $fields .= ' +
  • ' . $field['output_html'] . '
  • '; + + if (!empty($fields)) + echo ' +
    +
      ', $fields, ' +
    +
    '; + } + + echo ' +
      '; + + // Email is only visible if it's your profile or you have the moderate_forum permission + if ($context['member']['show_email']) + echo ' +
    • '; + + // 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'] ? '' : $txt['www']), '
    • '; + + // Are there any custom profile fields as icons? + if (!empty($context['print_custom_fields']['icons'])) + { + foreach ($context['print_custom_fields']['icons'] as $field) + if (!empty($field['output_html'])) + echo ' +
    • ', $field['output_html'], '
    • '; + } + + echo ' +
    + '; + + // 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 ' +
    '; + + if (!$context['user']['is_owner'] && $context['can_send_pm']) + echo ' + ', $txt['profile_sendpm_short'], ''; + + echo ' + ', $txt['showPosts'], ''; + + if ($context['user']['is_owner'] && !empty($modSettings['drafts_post_enabled'])) + echo ' + ', $txt['drafts_show'], ''; + + echo ' + ', $txt['statPanel'], ''; + + // Are there any custom profile fields for bottom? + if (!empty($context['print_custom_fields']['bottom_poster'])) + { + $fields = ''; + foreach ($context['print_custom_fields']['bottom_poster'] as $field) + if (!empty($field['output_html'])) + $fields .= ' +
  • ' . $field['output_html'] . '
  • '; + + if (!empty($fields)) + echo ' +
    +
      ', $fields, ' +
    +
    '; + } + + 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['member']['show_email']) + 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'], '
    '; + + echo ' +
    ', $txt['age'], ':
    +
    ', $context['member']['age'] . ($context['member']['today_is_birthday'] ? '   ' : ''), '
    '; + + echo ' +
    '; + + // Any custom fields for standard placement? + if (!empty($context['print_custom_fields']['standard'])) + { + $fields = array(); + + foreach ($context['print_custom_fields']['standard'] as $field) + if (!empty($field['output_html'])) + $fields[] = $field; + + if (count($fields) > 0) + { + echo ' +
    '; + + foreach ($fields as $field) + echo ' +
    ', $field['name'], ':
    +
    ', $field['output_html'], '
    '; + + 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'], '
    '; + + if ($context['member']['show_last_login']) + echo ' +
    ', $txt['lastLoggedIn'], ':
    +
    ', $context['member']['last_login'], (!empty($context['member']['is_hidden']) ? ' (' . $txt['hidden'] . ')' : ''), '
    '; + + echo ' +
    '; + + // Are there any custom profile fields for above the signature? + if (!empty($context['print_custom_fields']['above_signature'])) + { + $fields = ''; + foreach ($context['print_custom_fields']['above_signature'] as $field) + if (!empty($field['output_html'])) + $fields .= ' +
  • ' . $field['output_html'] . '
  • '; + + if (!empty($fields)) + echo ' +
    +
      ', $fields, ' +
    +
    '; + } + + // Show the users signature. + if ($context['signature_enabled'] && !empty($context['member']['signature'])) + echo ' +
    +
    ', $txt['signature'], ':
    + ', $context['member']['signature'], ' +
    '; + + // Are there any custom profile fields for below the signature? + if (!empty($context['print_custom_fields']['below_signature'])) + { + $fields = ''; + foreach ($context['print_custom_fields']['below_signature'] as $field) + if (!empty($field['output_html'])) + $fields .= ' +
  • ' . $field['output_html'] . '
  • '; + + if (!empty($fields)) + echo ' +
    +
      ', $fields, ' +
    +
    '; + } + + echo ' +
    +
    '; +} + +/** + * Template for showing all the posts of the user, in chronological order. + */ +function template_showPosts() +{ + global $context, $scripturl, $txt; + + echo ' +
    +

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

    +
    ', !empty($context['page_index']) ? ' +
    + +
    +
    ' : ''; + + // 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. OK ? + foreach ($context['posts'] as $post) + { + echo ' +
    +
    +
    +
    #', $post['counter'], '
    +
    + ', $post['board']['name'], ' / ', $post['subject'], ' +
    +
    +
    ', $post['time'], '
    +
    '; + + if (!$post['approved']) + echo ' +
    + ', $txt['post_awaiting_approval'], ' +
    '; + + // affiche les messages mais uniquement si on passe dessus (collapse) + echo ' +
    + ', $txt['khbb_collapse_recent_post'], ' +
    + ', $post['body'], ' +
    +
    + '; + + + + // Post options + template_quickbuttons($post['quickbuttons'], 'profile_showposts'); + + echo ' +
    '; + } + } + else + template_show_list('attachments'); + + + // No posts? Just end 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 alerts + */ +function template_showAlerts() +{ + global $context, $txt, $scripturl; + + // Do we have an update message? + if (!empty($context['update_message'])) + echo ' +
    + ', $context['update_message'], ' +
    '; + + echo ' +
    +

    + ', $txt['alerts'], !$context['user']['is_owner'] ? ' - ' . $context['member']['name'] : '', ' +

    +
    '; + + if (empty($context['alerts'])) + echo ' +
    + ', $txt['alerts_none'], ' +
    '; + + else + { + // Start the form if checkboxes are in use + if ($context['showCheckboxes']) + echo ' +
    '; + + echo ' +
    '; + + foreach ($context['alerts'] as $id => $alert) + { + echo ' +
    '; + echo ' +
    ', $alert['text'], ' - ', $alert['time'], '
    '; + // Alert options + template_quickbuttons($alert['quickbuttons'], 'profile_alerts'); + echo '
    '; + } + + echo ' +
    +
    + +
    '; + + if ($context['showCheckboxes']) + echo ' + ', $txt['check_all'], ': + + + + '; + + echo ' + ', $txt['alert_purge'], ' +
    +
    '; + + if ($context['showCheckboxes']) + echo ' +
    '; + } +} + +/** + * Template for showing all of a user's drafts + */ +function template_showDrafts() +{ + global $context, $scripturl, $txt; + + echo ' +
    +

    + ', $txt['drafts'], !$context['user']['is_owner'] ? ' - ' . $context['member']['name'] : '', ' +

    +
    ', !empty($context['page_index']) ? ' +
    + +
    ' : ''; + + // 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. OK + foreach ($context['drafts'] as $draft) + { + echo ' +
    +
    +
    +
    #', $draft['counter'], ' +
    +
    + ', $draft['board']['name'], ' / ', $draft['topic']['link'], '    '; + + if (!empty($draft['sticky'])) + echo ' + '; + + if (!empty($draft['locked'])) + echo ' + '; + + echo '
    +
    + ', $txt['draft_saved_on'], ': ', $draft['time'], ' +
    '; + // Draft buttons + template_quickbuttons($draft['quickbuttons'], 'profile_drafts'); + echo ' +
    +
    +
    + ', $draft['body'], ' +
    + +
    '; + } + } + + // Show page numbers. + echo ' +
    + +
    '; +} + +/** + * Template for showing and managing the buddy list. + */ +function template_editBuddies() +{ + global $context, $scripturl, $txt; + + if (!empty($context['saved_successful'])) + echo ' +
    ', $context['user']['is_owner'] ? $txt['profile_updated_own'] : sprintf($txt['profile_updated_else'], $context['member']['name']), '
    '; + + elseif (!empty($context['saved_failed'])) + echo ' +
    ', $context['saved_failed'], '
    '; + + echo ' +
    +
    +

    + ', $txt['editBuddies'], ' +

    +
    + + + + '; + // + + if ($context['can_moderate_forum']) + echo ' + '; + + if (!empty($context['custom_pf'])) + foreach ($context['custom_pf'] as $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. + else + { + foreach ($context['buddies'] as $buddy) + { + echo ' + + '; + /* + ';*/ + + if ($buddy['show_email']) + echo ' + '; + + // Show the custom profile fields for this user. + if (!empty($context['custom_pf'])) + foreach ($context['custom_pf'] as $key => $column) + echo ' + '; + + echo ' + + '; + } + } + + echo ' + +
    ', $txt['name'], '', $txt['status'], '', $txt['email'], '', $column['label'], '', $txt['remove'], '
    + ', $txt['no_buddies'], ' +
    + + + + ', $buddy['options'][$key], ' + +
    +
    '; + + // 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, $scripturl, $txt; + + if (!empty($context['saved_successful'])) + echo ' +
    ', $context['user']['is_owner'] ? $txt['profile_updated_own'] : sprintf($txt['profile_updated_else'], $context['member']['name']), '
    '; + + elseif (!empty($context['saved_failed'])) + echo ' +
    ', $context['saved_failed'], '
    '; + + echo ' +
    +
    +

    + ', $txt['editIgnoreList'], ' +

    +
    + + + + '; + //'; + + if ($context['can_moderate_forum']) + 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. + foreach ($context['ignore_list'] as $member) + { + echo ' + + '; + /*';*/ + + if ($context['can_moderate_forum']) + echo ' + '; + echo ' + + '; + } + + echo ' + +
    ', $txt['name'], '', $txt['status'], '', $txt['email'], '', $txt['ignore_remove'], '
    + ', $txt['no_ignore'], ' +
    + + + + + +
    +
    '; + + // 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, $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['error_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, $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'); + + // 3rd party integrations may have added additional tracking. + if (!empty($context['additional_track_lists'])) + { + foreach ($context['additional_track_lists'] as $list) + { + echo '
    '; + + template_show_list($list); + } + } +} + +/** + * This template shows an admin which permissions a user have and which group(s) give them each permission. + */ +function template_showPermissions() +{ + global $context, $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, $txt; + + // First, show a few text statistics such as post/topic count. + echo ' +
    +
    +
    '; + + foreach ($context['text_stats'] as $key => $stat) + { + echo ' +
    ', $txt['statPanel_' . $key], '
    '; + + if (!empty($stat['url'])) + echo ' +
    ', $stat['text'], '
    '; + else + echo ' +
    ', $stat['text'], '
    '; + } + + echo ' +
    +
    '; + + // 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 ' +
    +
    +
    +

    + ', $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, $scripturl, $txt, $modSettings; + + // The main header! + // because some browsers ignore autocomplete=off and fill username in display name and/ or email field, fake them out. + $url = !empty($context['profile_custom_submit_url']) ? $context['profile_custom_submit_url'] : $scripturl . '?action=profile;area=' . $context['menu_item_selected'] . ';u=' . $context['id_member']; + $url = $context['require_password'] && !empty($modSettings['force_ssl']) ? strtr($url, array('http://' => 'https://')) : $url; + + 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', 'color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'number', 'time', 'url'))) + { + if ($field['type'] == 'int' || $field['type'] == 'float') + $type = 'number'; + else + $type = $field['type']; + $step = $field['type'] == 'float' ? ' step="0.1"' : ''; + + 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 ' + + + +
    +
    '; + + // Any final spellchecking stuff? + if (!empty($context['show_spellchecking'])) + echo ' +
    '; +} + +/** + * Personal Message settings. + */ +function template_profile_pm_settings() +{ + global $context, $modSettings, $txt; + + echo ' +
    + +
    +
    + +
    +
    + +
    +
    + + +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    + + +
    '; + +} + +/** + * Template for showing theme settings. Note: template_options() actually adds the theme specific options. + */ +function template_profile_theme_settings() +{ + global $context, $modSettings; + + $skeys = array_keys($context['theme_options']); + $first_option_key = array_shift($skeys); + $titled_section = false; + + foreach ($context['theme_options'] as $i => $setting) + { + // Just spit out separators and move on + if (empty($setting) || !is_array($setting)) + { + // Avoid double separators and empty titled sections + $empty_section = true; + for ($j=$i+1; $j < count($context['theme_options']); $j++) + { + // Found another separator, so we're done + if (!is_array($context['theme_options'][$j])) + break; + + // Once we know there's something to show in this section, we can stop + if (!isset($context['theme_options'][$j]['enabled']) || !empty($context['theme_options'][$j]['enabled'])) + { + $empty_section = false; + break; + } + } + if ($empty_section) + { + if ($i === $first_option_key) + $first_option_key = array_shift($skeys); + + continue; + } + + // Insert a separator (unless this is the first item in the list) + if ($i !== $first_option_key) + echo ' +
    +
    +
    '; + + // Should we give a name to this section? + if (is_string($setting) && !empty($setting)) + { + $titled_section = true; + echo ' +
    ' . $setting . '
    +
    '; + } + else + $titled_section = false; + + continue; + } + + // Is this disabled? + if (isset($setting['enabled']) && $setting['enabled'] === false) + { + if ($i === $first_option_key) + $first_option_key = array_shift($skeys); + + continue; + } + + // Some of these may not be set... Set to defaults here + $opts = array('calendar_start_day', 'topics_per_page', 'messages_per_page', 'display_quick_mod'); + if (in_array($setting['id'], $opts) && !isset($context['member']['options'][$setting['id']])) + $context['member']['options'][$setting['id']] = 0; + + if (!isset($setting['type']) || $setting['type'] == 'bool') + $setting['type'] = 'checkbox'; + + elseif ($setting['type'] == 'int' || $setting['type'] == 'integer') + $setting['type'] = 'number'; + + elseif ($setting['type'] == 'string') + $setting['type'] = 'text'; + + if (isset($setting['options'])) + $setting['type'] = 'list'; + + echo ' +
    + '; + + if (isset($setting['description'])) + echo ' +
    + ', $setting['description'], ''; + echo ' +
    +
    '; + + // Display checkbox options + if ($setting['type'] == 'checkbox') + echo ' + + '; + + // How about selection lists, we all love them + elseif ($setting['type'] == 'list') + { + echo ' + '; + } + // A textbox it is then + else + { + if (isset($setting['type']) && $setting['type'] == 'number') + { + $min = isset($setting['min']) ? ' min="' . $setting['min'] . '"' : ' min="0"'; + $max = isset($setting['max']) ? ' max="' . $setting['max'] . '"' : ''; + $step = isset($setting['step']) ? ' step="' . $setting['step'] . '"' : ''; + + echo ' + '; + } + + // end of this defintion + echo ' +
    '; + } +} + +/** + * The template for configuring alerts + */ +function template_alert_configuration() +{ + global $context, $txt, $scripturl, $modSettings; + + echo ' +
    +

    + ', $txt['alert_prefs'], ' +

    +
    +

    + ', (empty($context['description']) ? $txt['alert_prefs_desc'] : $context['description']), ' +

    +
    +
    +

    + ', $txt['notification_general'], ' +

    +
    +
    +
    +
    + ', $context['id_member'] == 0 ? ' +
    + ' . $txt['notify_announcements_desc'] . '' : '', ' +
    +
    + + +
    '; + + if (!empty($modSettings['enable_ajax_alerts'])) + echo ' +
    + +
    +
    + +
    '; + + echo ' +
    +
    +
    +

    + ', $txt['notify_what_how'], ' +

    +
    + '; + + foreach ($context['alert_types'] as $alert_group => $alerts) + { + echo ' + + + + + + '; + + if (isset($context['alert_group_options'][$alert_group])) + { + foreach ($context['alert_group_options'][$alert_group] as $opts) + { + if ($opts[0] == 'hide') + continue; + + echo ' + + + '; + } + } + + foreach ($alerts as $alert_id => $alert_details) + { + echo ' + + '; + + foreach ($context['alert_bits'] as $type => $bitmask) + { + echo ' + '; + } + + echo ' + '; + } + } + + echo ' +
    ', $txt['alert_group_' . $alert_group], '', $txt['receive_alert'], '', $txt['receive_mail'], '
    '; + + $label = $txt['alert_opt_' . $opts[1]]; + $label_pos = isset($opts['label']) ? $opts['label'] : ''; + if ($label_pos == 'before') + echo ' + '; + + $this_value = isset($context['alert_prefs'][$opts[1]]) ? $context['alert_prefs'][$opts[1]] : 0; + switch ($opts[0]) + { + case 'check': + echo ' + '; + break; + + case 'select': + echo ' + '; + break; + } + + if ($label_pos == 'after') + echo ' + '; + + echo ' +
    + ', $txt['alert_' . $alert_id], isset($alert_details['help']) ? '' : '', ' + '; + + $this_value = isset($context['alert_prefs'][$alert_id]) ? $context['alert_prefs'][$alert_id] : 0; + switch ($alert_details[$type]) + { + case 'always': + echo ' + '; + break; + case 'yes': + echo ' + '; + break; + case 'never': + echo ' + '; + break; + } + echo ' +
    +
    +
    + + ', !empty($context['token_check']) ? ' + ' : '', ' + + +
    +
    +
    '; +} + +/** + * Template for showing which topics you're subscribed to + */ +function template_alert_notifications_topics() +{ + global $txt; + + // The main containing header. + echo ' +
    +

    + ', $txt['watched_topics'], ' +

    +
    +

    ', $txt['watched_topics_desc'], '

    +
    '; + + template_show_list('topic_notification_list'); +} + +/** + * Template for showing which boards you're subscribed to + */ +function template_alert_notifications_boards() +{ + global $txt; + + echo ' +
    +

    + ', $txt['watched_boards'], ' +

    +
    +

    ', $txt['watched_boards_desc'], '

    +
    '; + + template_show_list('board_notification_list'); +} + +/** + * Template for choosing group membership. + */ +function template_groupMembership() +{ + global $context, $scripturl, $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'], '. +
    '; + + echo ' +
    '; + + // Requesting membership to a group? + if (!empty($context['group_request'])) + { + echo ' +
    +
    +

    ', $txt['request_group_membership'], '

    +
    +
    + ', $txt['request_group_membership_desc'], ': + +
    + + +
    +
    +
    '; + } + else + { + echo ' +
    +

    ', $txt['current_membergroups'], '

    +
    '; + + foreach ($context['groups']['member'] as $group) + { + echo ' +
    '; + + if ($context['can_edit_primary']) + echo ' + '; + + echo ' + '; + + // 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 ' +
    +

    ', $txt['available_groups'], '

    +
    '; + + foreach ($context['groups']['available'] as $group) + { + echo ' +
    + ', (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 ' + '; + } + + echo ' +
    '; + + if (!empty($context['token_check'])) + echo ' + '; + + echo ' + + +
    '; +} + +/** + * Template for managing ignored boards + */ +function template_ignoreboards() +{ + global $context, $txt, $scripturl; + + // The main containing header. + echo ' +
    +
    +

    + ', $txt['profile'], ' +

    +
    +

    ', $txt['ignoreboards_info'], '

    +
    +
    +
      '; + + foreach ($context['categories'] as $category) + { + echo ' +
    • + ', $category['name'], ' +
        '; + + $cat_boards = array_values($category['boards']); + foreach ($cat_boards as $key => $board) + { + echo ' +
      • + '; + + // Nest child boards inside another list. + $curr_child_level = $board['child_level']; + $next_child_level = $cat_boards[$key + 1]['child_level'] ?? 0; + + if ($next_child_level > $curr_child_level) + { + echo ' +
          '; + } + else + { + // Close child board lists until we reach a common level + // with the next board. + while ($next_child_level < $curr_child_level--) + { + echo ' + +
        '; + } + + echo ' +
      • '; + } + } + + echo ' +
      +
    • '; + } + + echo ' +
    +
    '; + + // Show the standard "Save Settings" profile button. + template_profile_save(); + + echo ' +
    +
    +
    '; +} + +/** + * Simply loads some theme variables common to several warning templates. + */ +function template_load_warning_variables() +{ + global $modSettings, $context; + + // Setup the warning mode + $context['warning_mode'] = array( + 0 => 'none', + $modSettings['warning_watch'] => 'watched', + $modSettings['warning_moderate'] => 'moderated', + $modSettings['warning_mute'] => 'muted', + ); + + // Work out the starting warning. + $context['current_warning_mode'] = $context['warning_mode'][0]; + foreach ($context['warning_mode'] as $limit => $warning) + if ($context['member']['warning'] >= $limit) + $context['current_warning_mode'] = $warning; +} + +/** + * Template for viewing a user's warnings + */ +function template_viewWarning() +{ + global $context, $txt; + + 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'); +} + +/** + * Template for issuing warnings + */ +function template_issueWarning() +{ + global $context, $scripturl, $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 ' +
    +
    + 0% 100% +
    + ', $txt['profile_warning_impact'], ': ', $context['member']['warning'], '% (', $context['level_effects'][$context['current_level']], ') +
    +
    '; + + 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'); + + echo ' + '; +} + +/** + * Template to show for deleting a user's account - now with added delete post capability! + */ +function template_deleteAccount() +{ + global $context, $scripturl, $txt; + + // 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 ' +
    +
    + + '; + + if ($context['show_perma_delete']) + echo ' +
    + '; + + echo ' +
    '; + } + + 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, $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 ' +
    '; + + if (!empty($context['token_check'])) + echo ' + '; + + echo ' + + + + +
    '; +} + +/** + * Small template for showing an error message upon a save problem in the profile. + */ +function template_error_message() +{ + global $context, $modSettings, $txt; + + echo ' +
    '; + + if (!empty($context['post_errors'])) + { + echo ' + ', !empty($context['custom_error_title']) ? $context['custom_error_title'] : $txt['profile_errors_occurred'], ': +
      '; + + // Cycle through each error and display an error message. + foreach ($context['post_errors'] as $error) + { + $text_key_error = $error == 'password_short' ? + sprintf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) : + (isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : ''); + + echo ' +
    • ', isset($txt['profile_error_' . $error]) ? $text_key_error : $error, '
    • '; + } + + echo ' +
    '; + } + + 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 'no birthday'; +} + +/** + * Show the signature editing box? + */ +function template_profile_signature_modify() +{ + global $txt, $context; + + 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'], ''; + + // Some javascript used to count how many characters have been used so far in the signature. + echo ' + +
    '; +} + +/** + * Template for selecting an avatar + */ +function template_profile_avatar_select() +{ + global $context, $txt, $modSettings, $scripturl; + + // Start with the upper menu + echo ' +
    + + + '; + + if (empty($modSettings['gravatarEnabled']) || empty($modSettings['gravatarOverride'])) + echo ' + +
    '; + + if (!empty($context['member']['avatar']['allow_server_stored'])) + echo ' + +
    '; + + if (!empty($context['member']['avatar']['allow_external'])) + echo ' + +
    '; + + if (!empty($context['member']['avatar']['allow_upload'])) + echo ' + +
    '; + + if (!empty($context['member']['avatar']['allow_gravatar'])) + echo ' + + + '; + + echo ' +
    +
    '; + + // 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 ' +
    +
    + +
    +
    + +
    +
    + +
    + +
    '; + } + + // 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 ' +
    + ', $context['member']['avatar']['choice'] == 'external' ? '
    ' : '', ' +
    ', $txt['avatar_by_url'], '
    ', !empty($modSettings['avatar_action_too_large']) && $modSettings['avatar_action_too_large'] == 'option_download_and_resize' ? template_max_size('external') : '', ' +
    +
    '; + + // 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']['choice'] == 'upload' ? '
    ' : '', ' + ', template_max_size('upload'), ' + ', (!empty($context['member']['avatar']['id_attach']) ? '
    ' : ''), ' +
    '; + + // if the user is able to use Gravatar avatars show then the image preview + if (!empty($context['member']['avatar']['allow_gravatar'])) + { + echo ' +
    + ', $context['member']['avatar']['choice'] == 'gravatar' ? '
    ' : ''; + + if (empty($modSettings['gravatarAllowExtraEmail'])) + echo ' +
    ', $txt['gravatar_noAlternateEmail'], '
    '; + else + { + // Depending on other stuff, the stored value here might have some odd things in it from other areas. + if ($context['member']['avatar']['external'] == $context['member']['email']) + $textbox_value = ''; + else + $textbox_value = $context['member']['avatar']['external']; + + echo ' +
    ', $txt['gravatar_alternateEmail'], '
    + '; + } + echo ' +
    '; + } + + echo ' + +
    '; +} + +/** + * This is just a really little helper to avoid duplicating code unnecessarily + * + * @param string $type The type of avatar + */ +function template_max_size($type) +{ + global $modSettings, $txt; + + $w = !empty($modSettings['avatar_max_width_' . $type]) ? comma_format($modSettings['avatar_max_width_' . $type]) : 0; + $h = !empty($modSettings['avatar_max_height_' . $type]) ? comma_format($modSettings['avatar_max_height_' . $type]) : 0; + + $suffix = (!empty($w) ? 'w' : '') . (!empty($h) ? 'h' : ''); + if (empty($suffix)) + return; + + echo ' +
    ', sprintf($txt['avatar_max_size_' . $suffix], $w, $h), '
    '; +} + +/** + * Select the time format! + */ +function template_profile_timeformat_modify() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    + + + + +
    +
    + + +
    '; +} + +/** + * Template for picking a 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 ' +
    + +
    +
    + + :) +
    '; +} + +/** + * Template for setting up and managing Two-Factor Authentication. + */ +function template_tfasetup() +{ + global $txt, $context, $scripturl, $modSettings; + + echo ' +
    +

    ', $txt['tfa_title'], '

    +
    +
    +
    '; + + if (!empty($context['tfa_backup'])) + echo ' +
    + ', $txt['tfa_backup_used_desc'], ' +
    '; + + elseif ($modSettings['tfa_mode'] == 2) + echo ' +
    + ', $txt['tfa_forced_desc'], ' +
    '; + + echo ' +
    + ', $txt['tfa_desc'], ' +
    +
    +
    +
    + ', $txt['tfa_step1'], '
    '; + + if (!empty($context['tfa_pass_error'])) + echo ' +
    + ', $txt['tfa_pass_invalid'], ' +
    '; + + echo ' + +
    +
    + ', $txt['tfa_step2'], ' +
    ', $txt['tfa_step2_desc'], '
    +
    ', $context['tfa_secret'], '
    +
    +
    + ', $txt['tfa_step3'], '
    '; + + if (!empty($context['tfa_error'])) + echo ' +
    + ', $txt['tfa_code_invalid'], ' +
    '; + + echo ' + + +
    + + +
    +
    +
    +
    + +
    '; + + if (!empty($context['from_ajax'])) + echo ' +
    + '; + + echo ' +
    +
    '; +} + +/** + * Template for disabling two-factor authentication. + */ +function template_tfadisable() +{ + global $txt, $context, $scripturl; + + echo ' +
    +

    ', $txt['tfadisable'], '

    +
    +
    +
    '; + + if ($context['user']['is_owner']) + echo ' +
    + ', $txt['current_password'], '
    + +
    '; + else + echo ' +
    + ', sprintf($txt['tfa_disable_for_user'], $context['user']['name']), ' +
    '; + + echo ' + + + + +
    +
    '; +} + +/** + * Template for setting up 2FA backup code + */ +function template_tfasetup_backup() +{ + global $context, $txt; + + echo ' +
    +

    ', $txt['tfa_backup_title'], '

    +
    +
    +
    +
    ', $txt['tfa_backup_desc'], '
    +
    ', $context['tfa_backup'], '
    +
    +
    '; +} + +/** + * Simple template for showing the 2FA area when editing a profile. + */ +function template_profile_tfa() +{ + global $context, $txt, $scripturl, $modSettings; + + echo ' +
    + ', $txt['tfa_profile_label'], '
    +
    ', $txt['tfa_profile_desc'], '
    +
    +
    '; + + if (!$context['tfa_enabled'] && $context['user']['is_owner']) + echo ' + ', $txt['tfa_profile_enable'], ''; + + elseif (!$context['tfa_enabled']) + echo ' + ', $txt['tfa_profile_disabled']; + + else + echo ' + ', sprintf($txt['tfa_profile_enabled'], (!empty($modSettings['force_ssl']) ? strtr($scripturl, array('http://' => 'https://')) : $scripturl) . '?action=profile;u=' . $context['id_member'] . ';area=tfadisable'); + + echo ' +
    '; +} + +/** + * Template for initiating and retrieving profile data exports + */ +function template_export_profile_data() +{ + global $context, $scripturl, $txt; + + $default_settings = array('included' => array(), 'format' => ''); + $dltoken = ''; + + // The main containing header. + echo ' +
    +

    + ', $txt['export_profile_data'], ' +

    +
    +
    ', $context['export_profile_data_desc'], '
    '; + + if (!empty($context['completed_exports'])) + { + echo ' +
    +

    ', $txt['completed_exports'], '

    +
    +
    '; + + foreach ($context['completed_exports'] as $basehash_ext => $parts) + { + echo ' +
    '; + + if (!empty($context['outdated_exports'][$basehash_ext])) + { + echo ' +
    +

    ', $txt['export_outdated_warning'], '

    +
      '; + + foreach ($context['outdated_exports'][$basehash_ext] as $datatype) + echo ' +
    • ', $txt[$datatype], '
    • '; + + echo ' +
    +
    '; + } + + echo ' +

    ', sprintf($txt['export_file_desc'], $parts[1]['included_desc'], $context['export_formats'][$parts[1]['format']]['description']), '

    '; + + if (count($parts) > 10) + echo ' +
    + ', sprintf($txt['export_file_count'], count($parts)), ''; + + echo ' +
      '; + + foreach ($parts as $part => $file) + { + $dltoken = $file['dltoken']; + if (empty($default_settings['included'])) + $default_settings['included'] = $file['included']; + if (empty($default_settings['format'])) + $default_settings['format'] = $file['format']; + + echo ' +
    • + ', $file['dlbasename'], ' (', $file['size'], ', ', $file['mtime'], ') +
    • '; + } + + echo ' +
    '; + + if (count($parts) > 10) + echo ' +
    '; + + echo ' +
    + + + + +
    +
    '; + } + + echo ' +
    '; + } + + if (!empty($context['active_exports'])) + { + echo ' +
    +

    ', $txt['active_exports'], '

    +
    +
    '; + + foreach ($context['active_exports'] as $file) + { + $dltoken = $file['dltoken']; + if (empty($default_settings['included'])) + $default_settings['included'] = $file['included']; + if (empty($default_settings['format'])) + $default_settings['format'] = $file['format']; + + echo ' +
    1 ? ' class="descbox"' : '', '> +

    ', sprintf($txt['export_file_desc'], $file['included_desc'], $context['export_formats'][$file['format']]['description']), '

    +
    + + + +
    +
    '; + } + + echo ' +
    '; + } + + echo ' +
    +

    ', $txt['export_settings'], '

    +
    +
    +
    +
    '; + + foreach ($context['export_datatypes'] as $datatype => $datatype_settings) + { + if (!empty($datatype_settings['label'])) + echo ' +
    + +
    +
    + +
    '; + } + + echo ' +
    +
    +
    + ', $txt['export_format'], ' +
    +
    + +
    +
    +
    '; + + // At least one active or completed export exists. + if (!empty($dltoken)) + { + echo ' + +
    + + + +
    '; + } + // No existing exports. + else + { + echo ' + '; + } + + echo ' + + +
    +
    +
    '; +} + +?> diff --git a/Recent.template.php b/Recent.template.php new file mode 100644 index 0000000..f419ec7 --- /dev/null +++ b/Recent.template.php @@ -0,0 +1,443 @@ + +
    +
    +

    + ', $txt['recent_posts'], ' +

    +
    '; + + if (!empty($context['page_index'])) + echo ' +
    + +
    '; + + if (empty($context['posts'])) + echo ' +
    ', $txt['no_messages'], '
    '; + + foreach ($context['posts'] as $post) + { + echo ' +
    +
    +
    +
    #', $post['counter'], '
    +
    ', $post['board']['link'], ' / ', $post['link'], '
    +
    + ', $txt['last_poster'], ' ', $post['poster']['link'], ' - ', $post['time'], ' +
    '; + // affiche des derniers messages ; rendre cela fermé (collapse). Todo : à améliorer + echo ' +
    + ', $txt['khbb_collapse_recent_post'], ' +
    ', $post['message'], '
    +
    + '; + + echo ' +
    '; + } + + echo ' +
    +
    + +
    +
    '; +} + +/** + * Template for showing unread posts + */ +function template_unread() +{ + global $context, $txt, $scripturl, $modSettings, $board_info; + + // User action pop on mobile screen (or actually small screen), this uses responsive css does not check mobile device. + if (!empty($context['recent_buttons'])) + echo ' + '; + + echo ' +
    +
    +

    + ', (!empty($board_info['name']) ? $board_info['name'] . ' - ' : '') . $context['page_title'], ' +

    +
    '; + + if ($context['showCheckboxes']) + echo ' +
    + + + '; + + if (!empty($context['topics'])) + { + echo ' +
    + ', $context['menu_separator'], ' + + ', !empty($context['recent_buttons']) ? template_button_strip($context['recent_buttons'], 'right') : ''; + + // Mobile action (top) + if (!empty($context['recent_buttons'])) + echo ' + '; + + echo ' +
    '; + + echo ' +
    +
    +
    + + + '; + + // Show a "select all" box for quick moderation? + if ($context['showCheckboxes']) + echo ' +
    + +
    '; + + echo ' +
    +
    '; + + foreach ($context['topics'] as $topic) + { + echo ' +
    +
    + + ', $topic['is_posted_in'] ? '' : '', ' +
    +
    '; + + // Now we handle the icons + echo ' +
    '; + + if ($topic['is_locked']) + echo ' + '; + + if ($topic['is_sticky']) + echo ' + '; + + if ($topic['is_poll']) + echo ' + '; + + echo ' +
    '; + + echo ' +
    + ' . $txt['new'] . ' + ', $topic['is_sticky'] ? '' : '', '', $topic['first_post']['link'], '', $topic['is_sticky'] ? '' : '', ' +
    +

    + ', $topic['first_post']['started_by'], ' +

    + ', !empty($topic['pages']) ? '' . $topic['pages'] . '' : '', ' +
    +
    +

    + ', $topic['replies'], ' ', $txt['replies'], ' +
    + ', $topic['views'], ' ', $txt['views'], ' +

    +
    +
    + ', sprintf($txt['last_post_topic'], '' . $topic['last_post']['time'] . '', $topic['last_post']['member']['link']), ' +
    '; + + if ($context['showCheckboxes']) + echo ' +
    + +
    '; + + echo ' +
    '; + } + + if (empty($context['topics'])) + echo ' +
    '; + + echo ' +
    +
    '; + + echo ' +
    + ', !empty($context['recent_buttons']) ? template_button_strip($context['recent_buttons'], 'right') : '', ' + ', $context['menu_separator'], ' + '; + + // Mobile action (bottom) + if (!empty($context['recent_buttons'])) + echo ' + '; + + echo ' +
    '; + } + else + echo ' +
    +

    + ', $context['showing_all_topics'] ? $txt['topic_alert_none'] : sprintf($txt['unread_topics_visit_none'], $scripturl), ' +

    +
    '; + + if ($context['showCheckboxes']) + echo ' +
    '; + + echo ' +
    '; + + if (empty($context['no_topic_listing'])) + template_topic_legend(); + message_index_jump_to(); +} + +/** + * Template for showing unread replies (eg new replies to topics you've posted in) + */ +function template_replies() +{ + global $context, $txt, $scripturl, $modSettings, $board_info; + + // User action pop on mobile screen (or actually small screen), this uses responsive css does not check mobile device. + if (!empty($context['recent_buttons'])) + echo ' + '; + + echo ' +
    +
    +

    + ', (!empty($board_info['name']) ? $board_info['name'] . ' - ' : '') . $context['page_title'], ' +

    +
    '; + + if ($context['showCheckboxes']) + echo ' +
    + + + '; + + if (!empty($context['topics'])) + { + echo ' +
    + ', $context['menu_separator'], ' + + ', !empty($context['recent_buttons']) ? template_button_strip($context['recent_buttons'], 'right') : ''; + + // Mobile action (top) + if (!empty($context['recent_buttons'])) + echo ' + '; + + echo ' +
    '; + + echo ' +
    +
    +
    + + + '; + + // Show a "select all" box for quick moderation? + if ($context['showCheckboxes']) + echo ' +
    + +
    '; + + echo ' +
    +
    '; + + foreach ($context['topics'] as $topic) + { + echo ' +
    +
    + + ', $topic['is_posted_in'] ? '' : '', ' +
    +
    '; + + // Now we handle the icons + echo ' +
    '; + + if ($topic['is_locked']) + echo ' + '; + + if ($topic['is_sticky']) + echo ' + '; + + if ($topic['is_poll']) + echo ' + '; + + echo ' +
    '; + + echo ' +
    + ' . $txt['new'] . ' + ', $topic['is_sticky'] ? '' : '', '', $topic['first_post']['link'], '', $topic['is_sticky'] ? '' : '', ' +
    +

    + ', $topic['first_post']['started_by'], ' +

    + ', !empty($topic['pages']) ? '' . $topic['pages'] . '' : '', ' +
    +
    +

    + ', $topic['replies'], ' ', $txt['replies'], ' +
    + ', $topic['views'], ' ', $txt['views'], ' +

    +
    +
    + ', sprintf($txt['last_post_topic'], '' . $topic['last_post']['time'] . '', $topic['last_post']['member']['link']), ' +
    '; + + if ($context['showCheckboxes']) + echo ' +
    + +
    '; + + echo ' +
    '; + } + + echo ' +
    +
    +
    + ', !empty($context['recent_buttons']) ? template_button_strip($context['recent_buttons'], 'right') : '', ' + ', $context['menu_separator'], ' + '; + + // Mobile action (bottom) + if (!empty($context['recent_buttons'])) + echo ' + '; + + echo ' +
    '; + } + else + echo ' +
    +

    + ', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['updated_topics_visit_none'], ' +

    +
    '; + + if ($context['showCheckboxes']) + echo ' +
    '; + + echo ' +
    '; + + if (empty($context['no_topic_listing'])) + template_topic_legend(); + message_index_jump_to(); +} + +?> diff --git a/Register.template.php b/Register.template.php new file mode 100644 index 0000000..f109b56 --- /dev/null +++ b/Register.template.php @@ -0,0 +1,791 @@ +'; + + if (!empty($context['agreement'])) + echo ' +
    +
    +

    ', $txt['registration_agreement'], '

    +
    +
    +
    ', $context['agreement'], '
    +
    +
    '; + + if (!empty($context['privacy_policy'])) + echo ' +
    +

    ', $txt['privacy_policy'], '

    +
    +
    +
    ', $context['privacy_policy'], '
    +
    '; + + echo ' +
    '; + + // Age restriction in effect? + if ($context['show_coppa']) + echo ' +
    +
    + '; + else + echo ' + '; + + echo ' + + + +
    + '; +} + +/** + * Before registering - get their information. + */ +function template_registration_form() +{ + global $context, $scripturl, $txt, $modSettings; + + echo ' + '; + + // Any errors? + if (!empty($context['registration_errors'])) + { + echo ' +
    + ', $txt['registration_errors_occurred'], ' +
      '; + + // Cycle through each error and display an error message. + foreach ($context['registration_errors'] as $error) + echo ' +
    • ', $error, '
    • '; + + echo ' +
    +
    '; + } + + echo ' +
    +
    +
    +

    ', $txt['registration_form'], '

    +
    +
    +

    ', $txt['required_info'], '

    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + +
    +
    '; + + // If there is any field marked as required, show it here! + if (!empty($context['custom_fields_required']) && !empty($context['custom_fields'])) + { + echo ' +
    '; + + foreach ($context['custom_fields'] as $field) + if ($field['show_reg'] > 1) + echo ' +
    + ', $field['name'], ': + ', $field['desc'], ' +
    +
    ', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), '
    '; + + echo ' +
    '; + } + + echo ' +
    +
    +
    '; + + // If we have either of these, show the extra group. + if (!empty($context['profile_fields']) || !empty($context['custom_fields'])) + echo ' +
    +

    ', $txt['additional_information'], '

    +
    +
    +
    +
    '; + + if (!empty($context['profile_fields'])) + { + // Any fields we particularly want? + foreach ($context['profile_fields'] as $key => $field) + { + if ($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', 'url'))) + 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 ' +
    '; + } + } + } + + // Are there any custom fields? + if (!empty($context['custom_fields'])) + { + foreach ($context['custom_fields'] as $field) + if ($field['show_reg'] < 2) + echo ' +
    + ', $field['name'], ': + ', $field['desc'], ' +
    +
    ', $field['input_html'], '
    '; + } + + // If we have either of these, close the list like a proper gent. + if (!empty($context['profile_fields']) || !empty($context['custom_fields'])) + echo ' +
    +
    +
    '; + + if ($context['visual_verification']) + echo ' +
    +

    ', $txt['verification'], '

    +
    +
    +
    + ', template_control_verification($context['visual_verification_id'], 'all'), ' +
    +
    '; + + echo ' +
    '; + + // Age restriction in effect? + if (empty($context['agree']) && $context['show_coppa']) + echo ' +
    +
    + '; + else + echo ' + '; + + echo ' +
    + + + +
    + '; +} + +/** + * After registration... all done ;). + */ +function template_after() +{ + global $context; + + // Not much to see here, just a quick... "you're now registered!" or what have you. + echo ' +
    +
    +

    ', $context['title'], '

    +
    +
    +

    ', $context['description'], '

    +
    +
    '; +} + +/** + * Template for giving instructions about COPPA activation. + */ +function template_coppa() +{ + global $context, $txt, $scripturl; + + // Formulate a nice complicated message! + echo ' +
    +

    ', $context['page_title'], '

    +
    +
    +

    ', $context['coppa']['body'], '

    +

    + ', $txt['coppa_form_link_popup'], ' | ', $txt['coppa_form_link_download'], ' +

    +

    ', $context['coppa']['many_options'] ? $txt['coppa_send_to_two_options'] : $txt['coppa_send_to_one_option'], '

    '; + + // Can they send by post? + if (!empty($context['coppa']['post'])) + echo ' +

    1) ', $txt['coppa_send_by_post'], '

    +
    + ', $context['coppa']['post'], ' +
    '; + + // Can they send by fax?? + if (!empty($context['coppa']['fax'])) + echo ' +

    ', !empty($context['coppa']['post']) ? '2' : '1', ') ', $txt['coppa_send_by_fax'], '

    +
    + ', $context['coppa']['fax'], ' +
    '; + + // Offer an alternative Phone Number? + if ($context['coppa']['phone']) + echo ' +

    ', $context['coppa']['phone'], '

    '; + + echo ' +
    '; +} + +/** + * An easily printable form for giving permission to access the forum for a minor. + */ +function template_coppa_form() +{ + global $context, $txt; + + // Show the form (As best we can) + echo ' + + + + + + + + + + + + + +
    ', $context['forum_contacts'], '
    + ', $txt['coppa_form_address'], ': ', $context['ul'], '
    + ', $context['ul'], '
    + ', $context['ul'], '
    + ', $context['ul'], ' +
    + ', $txt['coppa_form_date'], ': ', $context['ul'], ' +

    +
    + ', $context['coppa_body'], ' +
    +
    '; +} + +/** + * Show a window containing the spoken verification code. + */ +function template_verification_sound() +{ + global $context, $settings, $txt, $modSettings; + + echo ' + + + + ', $txt['visual_verification_sound'], ' + + ', template_css(), ' + + + +
    '; + + if (isBrowser('is_ie') || isBrowser('is_ie11')) + echo ' + + + + '; + else + echo ' + '; + + echo ' +
    + ', $txt['visual_verification_sound_again'], '
    + ', $txt['visual_verification_sound_direct'], '

    + ', $txt['visual_verification_sound_close'], '
    +
    + +'; +} + +/** + * The template for the form allowing an admin to register a user from the admin center. + */ +function template_admin_register() +{ + global $context, $scripturl, $txt, $modSettings; + + echo ' +
    +
    +
    +

    ', $txt['admin_browse_register_new'], '

    +
    +
    '; + + if (!empty($context['registration_done'])) + echo ' +
    + ', $context['registration_done'], ' +
    '; + + echo ' +
    +
    + + ', $txt['admin_register_username_desc'], ' +
    +
    + +
    +
    + + ', $txt['admin_register_email_desc'], ' +
    +
    + +
    +
    + + ', $txt['admin_register_password_desc'], ' +
    +
    + +
    '; + + if (!empty($context['member_groups'])) + { + echo ' +
    + + ', $txt['admin_register_group_desc'], ' +
    +
    + +
    '; + } + + // If there is any field marked as required, show it here! + if (!empty($context['custom_fields_required']) && !empty($context['custom_fields'])) + foreach ($context['custom_fields'] as $field) + if ($field['show_reg'] > 1) + echo ' +
    + ', $field['name'], ': + ', $field['desc'], ' +
    +
    + ', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), ' +
    '; + + echo ' +
    + + ', $txt['admin_register_email_detail_desc'], ' +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + + + +
    +
    +
    +
    +
    '; +} + +/** + * Form for editing the agreement shown for people registering to the forum. + */ +function template_edit_agreement() +{ + global $context, $scripturl, $txt; + + if (!empty($context['saved_successful'])) + echo ' +
    ', $txt['settings_saved'], '
    '; + + elseif (!empty($context['could_not_save'])) + echo ' +
    ', $txt['admin_agreement_not_saved'], '
    '; + + // Warning for if the file isn't writable. + if (!empty($context['warning'])) + echo ' +
    ', $context['warning'], '
    '; + + // Just a big box to edit the text file ;) + echo ' +
    +
    +

    ', $txt['registration_agreement'], '

    +
    +
    '; + + // Is there more than one language to choose from? + if (count($context['editable_agreements']) > 1) + { + echo ' +
    +

    ', $txt['language_configuration'], '

    +
    +
    +
    + ', $txt['admin_agreement_select_language'], ': + +
    + + + + +
    +
    +
    '; + } + + // Show the actual agreement in an oversized text box. + echo ' +
    + +
    + ', $context['agreement_info'], ' +
    +
    + + + + + + +
    +
    '; +} + +/** + * Template for editing reserved words. + */ +function template_edit_reserved_words() +{ + global $context, $scripturl, $txt; + + if (!empty($context['saved_successful'])) + echo ' +
    ', $txt['settings_saved'], '
    '; + + echo ' +
    +
    +

    ', $txt['admin_reserved_set'], '

    +
    +
    +

    ', $txt['admin_reserved_line'], '

    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + + + +
    +
    +
    '; +} + +// Form for editing the privacy policy shown to people registering to the forum. +function template_edit_privacy_policy() +{ + global $context, $settings, $options, $scripturl, $txt; + + if (!empty($context['saved_successful'])) + echo ' +
    ', $txt['settings_saved'], '
    '; + + // Just a big box to edit the text file ;). + echo ' +
    +

    ', $txt['privacy_policy'], '

    +
    +
    '; + + // Is there more than one language to choose from? + if (count($context['editable_policies']) > 1) + { + echo ' +
    +
    + ', $txt['admin_agreement_select_language'], ': + +
    + + + +
    +
    +
    '; + } + + echo ' +
    '; + + // Show the actual policy in an oversized text box. + echo ' + +
    ', $context['privacy_policy_info'], '
    +
    + + + + + + +
    +
    +
    '; +} + +?> diff --git a/Reminder.template.php b/Reminder.template.php new file mode 100644 index 0000000..4a56e03 --- /dev/null +++ b/Reminder.template.php @@ -0,0 +1,205 @@ + +
    + + + +
    '; +} + +/** + * The page to pick an option - secret question/answer (if set) or email + */ +function template_reminder_pick() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    + +
    '; +} + +/** + * Just a simple "We sent you an email. Click the link in it to continue." message + */ +function template_sent() +{ + global $context; + + echo ' +
    + '; +} + +/** + * Template for setting the new password + */ +function template_set_password() +{ + global $context, $txt, $scripturl, $modSettings; + + echo ' +
    +
    + + + + + +
    + '; +} + +/** + * The page that asks a user to answer their secret question + */ +function template_ask() +{ + global $context, $txt, $scripturl, $modSettings; + + echo ' +
    +
    + +
    + '; + +} + +?> \ No newline at end of file diff --git a/ReportToMod.template.php b/ReportToMod.template.php new file mode 100644 index 0000000..ddb1b32 --- /dev/null +++ b/ReportToMod.template.php @@ -0,0 +1,97 @@ + +
    +

    + ', $txt['preview'], ' +

    +
    +
    +
    + ', empty($context['preview_message']) ? '
    ' : $context['preview_message'], ' +
    +
    +
    '; + + echo ' +
    +
    + +
    +

    ', $context['page_title'], '

    +
    +
    '; + + if (!empty($context['post_errors'])) + { + echo ' +
    +
      '; + + foreach ($context['post_errors'] as $key => $error) + echo ' +
    • ', $error, '
    • '; + + echo ' +
    '; + } + else + echo ' + '; + + echo ' +

    ', $context['notice'], '

    +
    +
    + : +
    +
    + +
    +
    + + + +
    + +
    '; +} + +?> \ No newline at end of file diff --git a/ReportedContent.template.php b/ReportedContent.template.php new file mode 100644 index 0000000..96c4072 --- /dev/null +++ b/ReportedContent.template.php @@ -0,0 +1,573 @@ + + ', $txt['report_action_' . $context['report_post_action']], ' +
    '; + + echo ' +
    +
    +

    + ', $context['view_closed'] ? $txt['mc_reportedp_closed'] : $txt['mc_reportedp_active'], ' +

    +
    +
    '; + + if (!empty($context['reports']) && !$context['view_closed'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
      +
    • + +
    • +
    '; + + echo ' + +
    '; + + foreach ($context['reports'] as $report) + { + echo ' +
    +
    + ', !empty($report['topic']['board_name']) ? '' . $report['topic']['board_name'] . '' : '??', ' / ', $report['subject'], ' ', $txt['mc_reportedp_by'], ' ', $report['author']['link'], ' +
    +
    + ', $txt['mc_reportedp_last_reported'], ': ', $report['last_updated'], ' - '; + + // Prepare the comments... + $comments = array(); + foreach ($report['comments'] as $comment) + $comments[$comment['member']['id']] = $comment['member']['link']; + + echo ' + ', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), ' +
    +
    + ', $report['body'], ' +
    '; + + // Reported post options + template_quickbuttons($report['quickbuttons'], 'reported_posts'); + + echo ' +
    '; + } + + // Were none found? + if (empty($context['reports'])) + echo ' +
    +

    ', $txt['mc_reportedp_none_found'], '

    +
    '; + + echo ' +
    + '; + + if (!empty($context['reports']) && !$context['view_closed'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
    + + +
    '; + + echo ' +
    + +
    '; +} + +/** + * A block to show the current top reported posts. + */ +function template_reported_posts_block() +{ + global $context, $txt, $scripturl; + + echo ' + +
    +
    +
      '; + + foreach ($context['reported_posts'] as $report) + echo ' +
    • + ', $report['subject'], ' ', $txt['mc_reportedp_by'], ' ', $report['author']['link'], ' +
    • '; + + // Don't have any watched users right now? + if (empty($context['reported_posts'])) + echo ' +
    • + ', $txt['mc_recent_reports_none'], ' +
    • '; + + echo ' +
    +
    +
    + + '; +} + +/** + * Handles viewing details of and managing a specific report + */ +function template_viewmodreport() +{ + global $context, $scripturl, $txt; + + // Let them know the action was a success. + if (!empty($context['report_post_action'])) + echo ' +
    + ', $txt['report_action_' . $context['report_post_action']], ' +
    '; + + echo ' +
    +
    +
    +

    + ', sprintf($txt['mc_viewmodreport'], $context['report']['message_link'], $context['report']['author']['link']), ' +

    +
    +
    +

    + + ', sprintf($txt['mc_modreport_summary'], $context['report']['num_reports'], $context['report']['last_updated']), ' + '; + + $report_buttons = array( + 'ignore' => array( + 'text' => !$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', + 'url' => $scripturl.'?action=moderate;area=reportedposts;sa=handle;ignore='.(int) !$context['report']['ignore'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], + 'class' => !$context['report']['ignore'] ? ' you_sure' : '', + 'custom' => !$context['report']['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', + 'icon' => 'ignore' + ), + 'close' => array( + 'text' => $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', + 'url' => $scripturl.'?action=moderate;area=reportedposts;sa=handle;closed='.(int) !$context['report']['closed'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], + 'icon' => 'close' + ) + ); + + // Report buttons + template_button_strip($report_buttons, 'right'); + + echo ' +

    +
    +
    + ', $context['report']['body'], ' +
    +
    +
    +

    ', $txt['mc_modreport_whoreported_title'], '

    +
    '; + + foreach ($context['report']['comments'] as $comment) + echo ' +
    +

    + ', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), ' +

    +

    ', $comment['message'], '

    +
    '; + + echo ' +
    +
    +

    ', $txt['mc_modreport_mod_comments'], '

    +
    +
    '; + + if (empty($context['report']['mod_comments'])) + echo ' +
    +

    ', $txt['mc_modreport_no_mod_comment'], '

    +
    '; + + foreach ($context['report']['mod_comments'] as $comment) + { + echo ' +
    +

    + ', $comment['member']['link'], ': (', $comment['time'], ')', ($comment['can_edit'] ? '' . $txt['mc_reportedp_comment_edit'] . '' . $txt['mc_reportedp_comment_delete'] . '' : ''), ' +

    +
    '; + + echo ' +
    +

    ', $comment['message'], '

    +
    '; + } + + echo ' +
    +

    + + ', $txt['mc_reportedp_new_comment'], ' + +

    +
    + +
    + + +
    +
    +
    '; + + template_show_list('moderation_actions_list'); + + echo ' + +
    +
    '; +} + +/** + * Template for editing a mod comment. + */ +function template_edit_comment() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +
    +
    +

    ', $txt['mc_modreport_edit_mod_comment'], '

    +
    +
    + +
    + +
    +
    +
    + + +
    +
    '; +} + +/** + * A block to show the current top reported member profiles. + */ +function template_reported_members_block() +{ + global $context, $txt, $scripturl; + + echo ' + +
    +
    +
      '; + + foreach ($context['reported_members'] as $report) + echo ' +
    • + ', $report['user_name'], ' +
    • '; + + // Don't have any reported members right now? + if (empty($context['reported_members'])) + echo ' +
    • + ', $txt['mc_recent_reports_none'], ' +
    • '; + + echo ' +
    +
    +
    + + '; +} + +/** + * Lists all reported members + */ +function template_reported_members() +{ + global $context, $txt, $scripturl, $options; + + // Let them know the action was a success. + if (!empty($context['report_post_action']) && !empty($txt['report_action_' . $context['report_post_action']])) + echo ' +
    + ', $txt['report_action_' . $context['report_post_action']], ' +
    '; + + echo ' +
    +
    +

    + ', $context['view_closed'] ? $txt['mc_reportedp_closed'] : $txt['mc_reportedp_active'], ' +

    +
    +
    '; + + if (!empty($context['reports']) && !$context['view_closed'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) + echo ' +
      +
    • + +
    • +
    '; + + echo ' + +
    '; + + foreach ($context['reports'] as $report) + { + echo ' +
    +
    + ', $report['user']['name'], ' +
    +
    + ', $txt['mc_reportedp_last_reported'], ': ', $report['last_updated'], ' - '; + + // Prepare the comments... + $comments = array(); + foreach ($report['comments'] as $comment) + $comments[$comment['member']['id']] = $comment['member']['link']; + + echo ' + ', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), ' +
    +
    + ', template_quickbuttons($report['quickbuttons'], 'reported_members'), ' +
    '; + } + + // Were none found? + if (empty($context['reports'])) + echo ' +
    +

    ', $txt['mc_reportedp_none_found'], '

    +
    '; + + echo ' +
    + +
    + ', (!$context['view_closed'] && !empty($context['reports'])) ? '' : '', ' +
    +
    + +
    '; +} + +/** + * Template for viewing and managing a specific report about a user's profile + */ +function template_viewmemberreport() +{ + global $context, $scripturl, $txt; + + // Let them know the action was a success. + if (!empty($context['report_post_action'])) + echo ' +
    + ', $txt['report_action_' . $context['report_post_action']], ' +
    '; + + echo ' +
    +
    +
    +

    + ', sprintf($txt['mc_viewmemberreport'], $context['report']['user']['link']), ' +

    +
    +
    +

    + + ', sprintf($txt['mc_memberreport_summary'], $context['report']['num_reports'], $context['report']['last_updated']), ' + '; + + $report_buttons = array( + 'ignore' => array( + 'text' => !$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', + 'url' => $scripturl.'?action=moderate;area=reportedmembers;sa=handle;ignore='.(int)!$context['report']['ignore'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], + 'class' => !$context['report']['ignore'] ? ' you_sure' : '', + 'custom' => !$context['report']['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', + 'icon' => 'ignore' + ), + 'close' => array( + 'text' => $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', + 'url' => $scripturl.'?action=moderate;area=reportedmembers;sa=handle;closed='.(int)!$context['report']['closed'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], + 'icon' => 'close' + ) + ); + + // Report buttons + template_button_strip($report_buttons, 'right'); + + echo ' +

    +
    +
    +
    +

    ', $txt['mc_memberreport_whoreported_title'], '

    +
    '; + + foreach ($context['report']['comments'] as $comment) + echo ' +
    +

    + ', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), ' +

    +

    ', $comment['message'], '

    +
    '; + + echo ' +
    +
    +

    ', $txt['mc_modreport_mod_comments'], '

    +
    +
    '; + + if (empty($context['report']['mod_comments'])) + echo ' +
    +

    ', $txt['mc_modreport_no_mod_comment'], '

    +
    '; + + foreach ($context['report']['mod_comments'] as $comment) + { + echo ' +
    +

    ', $comment['member']['link'], ': (', $comment['time'], ')', ($comment['can_edit'] ? '' . $txt['mc_reportedp_comment_edit'] . ' ' . $txt['mc_reportedp_comment_delete'] . '' : ''), '

    +
    '; + + echo ' +
    +

    ', $comment['message'], '

    +
    '; + } + + echo ' +
    +

    + + ', $txt['mc_reportedp_new_comment'], ' + +

    +
    + +
    + + +
    +
    +
    '; + + template_show_list('moderation_actions_list'); + + echo ' + +
    +
    '; +} + +?> diff --git a/Reports.template.php b/Reports.template.php new file mode 100644 index 0000000..3902985 --- /dev/null +++ b/Reports.template.php @@ -0,0 +1,237 @@ + +
    +

    ', $txt['generate_reports_type'], '

    +
    +
    +
    '; + + // Go through each type of report they can run. + foreach ($context['report_types'] as $type) + { + if (isset($type['description'])) + echo ' +
    ', $type['description'], '
    '; + + echo ' +
    + + +
    '; + } + echo ' +
    + + +
    + '; +} + +/** + * This is the standard template for showing reports. + */ +function template_main() +{ + global $context, $txt; + + echo ' +
    +

    ', $txt['results'], '

    +
    +
    '; + + if (!empty($context['report_buttons'])) + template_button_strip($context['report_buttons'], 'right'); + + echo ' +
    '; + + // Go through each table! + foreach ($context['tables'] as $table) + { + echo ' + '; + + if (!empty($table['title'])) + echo ' + + + + + + '; + + // Now do each row! + $row_number = 0; + foreach ($table['data'] as $row) + { + if ($row_number == 0 && !empty($table['shading']['top'])) + echo ' + '; + else + echo ' + '; + + // Now do each column. + $column_number = 0; + + foreach ($row as $data) + { + // If this is a special separator, skip over! + if (!empty($data['separator']) && $column_number == 0) + { + echo ' + '; + break; + } + + // Shaded? + if ($column_number == 0 && !empty($table['shading']['left'])) + echo ' + '; + else + echo ' + '; + + $column_number++; + } + + echo ' + '; + + $row_number++; + } + echo ' + +
    ', $table['title'], '
    + ', $data['v'], ': + + ', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), ' + + ', $data['v'], ' +
    '; + } +} + +/** + * Header of the print page! + */ +function template_print_above() +{ + global $context, $settings, $modSettings; + + echo ' + + + + ', $context['page_title'], ' + + + '; +} + +/** + * The main print page + */ +function template_print() +{ + global $context; + + // Go through each table! + foreach ($context['tables'] as $table) + { + echo ' +
    + '; + + if (!empty($table['title'])) + echo ' + + + '; + + // Now do each row! + $row_number = 0; + foreach ($table['data'] as $row) + { + if ($row_number == 0 && !empty($table['shading']['top'])) + echo ' + '; + else + echo ' + '; + + // Now do each column!! + $column_number = 0; + foreach ($row as $data) + { + // If this is a special separator, skip over! + if (!empty($data['separator']) && $column_number == 0) + { + echo ' + '; + break; + } + + // Shaded? + if ($column_number == 0 && !empty($table['shading']['left'])) + echo ' + '; + else + echo ' + '; + + $column_number++; + } + + echo ' + '; + + $row_number++; + } + echo ' +
    + ', $table['title'], ' +
    + ', $data['v'], ': + + ', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), ' + + ', $data['v'], ' +
    +
    +
    '; + } +} + +/** + * Footer of the print page. + */ +function template_print_below() +{ + echo ' + + +'; +} + +?> \ No newline at end of file diff --git a/Search.template.php b/Search.template.php new file mode 100644 index 0000000..20d581f --- /dev/null +++ b/Search.template.php @@ -0,0 +1,474 @@ + +
    '; + + if (!empty($context['search_errors'])) + echo ' +
    + ', implode('
    ', $context['search_errors']['messages']), ' +
    '; + + if (!empty($context['search_ignored'])) + echo ' +
    + ', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), ' +
    '; + + echo ' +
    +

    + ', $txt['set_parameters'], ' +

    +
    + '; + + if (empty($context['search_params']['topic'])) + { + echo ' +
    +
    + + +
    +
    + + + +
    +
    +
    '; + + echo ' + '; + } + + echo ' +
    + '; +} + +/** + * The search results page. + */ +function template_results() +{ + global $context, $options, $txt, $scripturl, $message; + + if (isset($context['did_you_mean']) || empty($context['topics']) || !empty($context['search_ignored'])) + { + echo ' +
    +
    +

    + ', $txt['search_adjust_query'], ' +

    +
    +
    '; + + // Did they make any typos or mistakes, perhaps? + if (isset($context['did_you_mean'])) + echo ' +

    + ', $txt['search_did_you_mean'], ' ', $context['did_you_mean'], '. +

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

    + ', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), ' +

    '; + + echo ' +
    + ', $txt['search_for'], ': + + + + + + + + + '; + + if (!empty($context['search_params']['brd'])) + foreach ($context['search_params']['brd'] as $board_id) + echo ' + '; + + echo ' +
    +
    +
    '; + } + + if ($context['compact']) + { + echo ' + '; + + echo ' +
    +

    + ', $txt['mlist_search_results'], ': ', $context['search_params']['search'], ' +

    + '; + + // Was anything even found? + if (!empty($context['topics'])) + { + echo ' +
    + ', $txt['search_order'], ' + +
    +
    +
    + +
    '; + } + else + { + echo ' + +
    ', $txt['search_no_results'], '
    '; + } + + // While we have results to show ... + while ($topic = $context['get_topics']()) + { + echo ' +
    '; + + foreach ($topic['matches'] as $message) + { + echo ' +
    +
    #', $message['counter'], '
    +
    +
    +
    ', $topic['board']['link'], ' / ', $message['subject_highlighted'], '
    + ', sprintf(str_replace('
    ', ' ', $txt['last_post_topic']), $message['time'], '' . $message['member']['link'] . ''), '
    +
    +
    +
    '; + + if ($message['body_highlighted'] != '') + echo ' +
    ', $message['body_highlighted'], '
    '; + } + + echo ' +
    '; + } + } + else + { + echo ' +
    +

    + ', $txt['mlist_search_results'], ': ', $context['search_params']['search'], ' +

    + '; + + // Was anything even found? + if (!empty($context['topics'])) + { + echo ' +
    + ', $txt['search_order'], ' + +
    +
    +
    + +
    '; + } + else + { + echo ' + +
    ', $txt['search_no_results'], '
    '; + } + + while ($topic = $context['get_topics']()) + { + foreach ($topic['matches'] as $message) + { + echo ' +
    +
    #', $message['counter'], '
    +
    +
    + ', $topic['board']['link'], ' / ', $message['subject_highlighted'], ' +
    + ', sprintf(str_replace('
    ', ' ', $txt['last_post_topic']), $message['time'], '' . $message['member']['link'] . ''), '
    +
    +
    ', $message['body_highlighted'], '
    '; + + echo ' +
    +
    '; + } + } + } + + echo ' +
    '; + + if (!empty($context['topics'])) + echo ' + '; + + // Show a jump to box for easy navigation. + echo ' + + +
    '; +} + +?> diff --git a/Settings.template.php b/Settings.template.php new file mode 100644 index 0000000..3e4c193 --- /dev/null +++ b/Settings.template.php @@ -0,0 +1,240 @@ + 'show_children', + 'label' => $txt['show_children'], + 'default' => true, + ), + array( + 'id' => 'topics_per_page', + 'label' => $txt['topics_per_page'], + 'options' => array( + 0 => $txt['per_page_default'], + 5 => 5, + 10 => 10, + 25 => 25, + 50 => 50, + ), + 'default' => true, + 'enabled' => empty($modSettings['disableCustomPerPage']), + ), + array( + 'id' => 'messages_per_page', + 'label' => $txt['messages_per_page'], + 'options' => array( + 0 => $txt['per_page_default'], + 5 => 5, + 10 => 10, + 25 => 25, + 50 => 50, + ), + 'default' => true, + 'enabled' => empty($modSettings['disableCustomPerPage']), + ), + array( + 'id' => 'view_newest_first', + 'label' => $txt['recent_posts_at_top'], + 'default' => true, + ), + array( + 'id' => 'show_no_avatars', + 'label' => $txt['show_no_avatars'], + 'default' => true, + ), + array( + 'id' => 'show_no_signatures', + 'label' => $txt['show_no_signatures'], + 'default' => true, + ), + array( + 'id' => 'posts_apply_ignore_list', + 'label' => $txt['posts_apply_ignore_list'], + 'default' => false, + 'enabled' => !empty($modSettings['enable_buddylist']) + ), + $txt['theme_opt_posting'], + array( + 'id' => 'return_to_post', + 'label' => $txt['return_to_post'], + 'default' => true, + ), + array( + 'id' => 'no_new_reply_warning', + 'label' => $txt['no_new_reply_warning'], + 'default' => true, + ), + array( + 'id' => 'auto_notify', + 'label' => $txt['auto_notify'], + 'default' => true, + ), + array( + 'id' => 'wysiwyg_default', + 'label' => $txt['wysiwyg_default'], + 'default' => false, + 'enabled' => empty($modSettings['disable_wysiwyg']), + ), + array( + 'id' => 'drafts_autosave_enabled', + 'label' => $txt['drafts_autosave_enabled'], + 'default' => true, + 'enabled' => !empty($modSettings['drafts_autosave_enabled']) && (!empty($modSettings['drafts_post_enabled']) || !empty($modSettings['drafts_pm_enabled'])), + ), + array( + 'id' => 'drafts_show_saved_enabled', + 'label' => $txt['drafts_show_saved_enabled'], + 'default' => true, + 'enabled' => !empty($modSettings['drafts_show_saved_enabled']) && (!empty($modSettings['drafts_post_enabled']) || !empty($modSettings['drafts_pm_enabled'])), + ), + $txt['theme_opt_moderation'], + array( + 'id' => 'display_quick_mod', + 'label' => $txt['display_quick_mod'], + 'options' => array( + 0 => $txt['display_quick_mod_none'], + 1 => $txt['display_quick_mod_check'], + 2 => $txt['display_quick_mod_image'], + ), + 'default' => true, + ), + $txt['theme_opt_personal_messages'], + array( + 'id' => 'popup_messages', + 'label' => $txt['popup_messages'], + 'default' => true, + ), + array( + 'id' => 'view_newest_pm_first', + 'label' => $txt['recent_pms_at_top'], + 'default' => true, + ), + array( + 'id' => 'pm_remove_inbox_label', + 'label' => $txt['pm_remove_inbox_label'], + 'default' => true, + ), + $txt['theme_opt_calendar'], + array( + 'id' => 'calendar_default_view', + 'label' => $txt['calendar_default_view'], + 'options' => array( + 'viewlist' => $txt['calendar_viewlist'], + 'viewmonth' => $txt['calendar_viewmonth'], + 'viewweek' => $txt['calendar_viewweek'] + ), + 'default' => true, + 'enabled' => !empty($modSettings['cal_enabled']), + ), + array( + 'id' => 'calendar_start_day', + 'label' => $txt['calendar_start_day'], + 'options' => array( + 0 => $txt['days'][0], + 1 => $txt['days'][1], + 6 => $txt['days'][6], + ), + 'default' => true, + 'enabled' => !empty($modSettings['cal_enabled']), + ), + ); +} + +/** + * This pseudo-template defines all the available theme settings (but not their actual values) + */ +function template_settings() +{ + global $context, $txt; + + $context['theme_settings'] = array( + array( + 'id' => 'header_logo_url', + 'label' => $txt['header_logo_url'], + 'description' => $txt['header_logo_url_desc'], + 'type' => 'text', + ), + array( + 'id' => 'site_slogan', + 'label' => $txt['site_slogan'], + 'description' => $txt['site_slogan_desc'], + 'type' => 'text', + ), + array( + 'id' => 'og_image', + 'label' => $txt['og_image'], + 'description' => $txt['og_image_desc'], + 'type' => 'url', + ), + '', + array( + 'id' => 'smiley_sets_default', + 'label' => $txt['smileys_default_set_for_theme'], + 'options' => $context['smiley_sets'], + 'type' => 'text', + ), + '', + array( + 'id' => 'enable_news', + 'label' => $txt['enable_random_news'], + ), + array( + 'id' => 'show_newsfader', + 'label' => $txt['news_fader'], + ), + array( + 'id' => 'newsfader_time', + 'label' => $txt['admin_fader_delay'], + 'type' => 'number', + ), + '', + array( + 'id' => 'number_recent_posts', + 'label' => $txt['number_recent_posts'], + 'description' => $txt['zero_to_disable'], + 'type' => 'number', + ), + array( + 'id' => 'show_stats_index', + 'label' => $txt['show_stats_index'], + ), + array( + 'id' => 'show_latest_member', + 'label' => $txt['latest_members'], + ), + array( + 'id' => 'show_group_key', + 'label' => $txt['show_group_key'], + ), + array( + 'id' => 'display_who_viewing', + 'label' => $txt['who_display_viewing'], + 'options' => array( + 0 => $txt['who_display_viewing_off'], + 1 => $txt['who_display_viewing_numbers'], + 2 => $txt['who_display_viewing_names'], + ), + 'type' => 'list', + ), + ); +} + +?> \ No newline at end of file diff --git a/SplitTopics.template.php b/SplitTopics.template.php new file mode 100644 index 0000000..e98346b --- /dev/null +++ b/SplitTopics.template.php @@ -0,0 +1,221 @@ + +
    + +
    +

    ', $txt['split'], '

    +
    +
    +

    + : + +

    +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    +
    +
    + + +
    +
    +
    + '; +} + +/** + * A simple confirmation that things were split as expected, with links to the current board and the old and new topics. + */ +function template_main() +{ + global $context, $txt, $scripturl; + + echo ' +
    +
    +

    ', $txt['split'], '

    +
    +
    +

    ', $txt['split_successful'], '

    + +
    +
    '; +} + +/** + * The form for selecting which posts to split. + */ +function template_select() +{ + global $context, $txt, $scripturl, $options; + + echo ' +
    +
    +
    +
    +

    ', $txt['split'], ' - ', $txt['select_split_posts'], '

    +
    +
    + ', $txt['please_select_split'], ' +
    +
    + +
    +
      '; + + foreach ($context['not_selected']['messages'] as $message) + echo ' +
    • +
      + + ', sprintf($txt['post_by_member'], $message['subject'], $message['poster']), ' + ', $message['time'], ' +
      +
      ', $message['body'], '
      +
    • '; + + echo ' +
    +
    +
    +
    +

    + ', $txt['split_selected_posts'], ' (', $txt['split_reset_selection'], ') +

    +
    +
    + ', $txt['split_selected_posts_desc'], ' +
    +
    + +
    +
      '; + + if (!empty($context['selected']['messages'])) + foreach ($context['selected']['messages'] as $message) + echo ' +
    • +
      + + ', sprintf($txt['post_by_member'], $message['subject'], $message['poster']), ' + ', $message['time'], ' +
      +
      ', $message['body'], '
      +
    • '; + + echo ' +
    +
    +
    +
    + + + + +
    +
    +
    + '; +} + +?> \ No newline at end of file diff --git a/Stats.template.php b/Stats.template.php new file mode 100644 index 0000000..c9b23f2 --- /dev/null +++ b/Stats.template.php @@ -0,0 +1,264 @@ + +
    +

    ', $context['page_title'], '

    +
    +
    +
    +

    + ', $txt['general_stats'], ' +

    +
    +
    +
    ', $txt['total_members'], ':
    +
    ', $context['show_member_list'] ? '' . $context['num_members'] . '' : $context['num_members'], '
    +
    ', $txt['total_posts'], ':
    +
    ', $context['num_posts'], '
    +
    ', $txt['total_topics'], ':
    +
    ', $context['num_topics'], '
    +
    ', $txt['total_cats'], ':
    +
    ', $context['num_categories'], '
    +
    ', $txt['users_online'], ':
    +
    ', $context['users_online'], '
    +
    ', $txt['most_online'], ':
    +
    ', $context['most_members_online']['number'], ' - ', $context['most_members_online']['date'], '
    +
    ', $txt['users_online_today'], ':
    +
    ', $context['online_today'], '
    '; + + if (!empty($modSettings['hitStats'])) + echo ' +
    ', $txt['num_hits'], ':
    +
    ', $context['num_hits'], '
    '; + + echo ' +
    +
    +
    ', $txt['average_members'], ':
    +
    ', $context['average_members'], '
    +
    ', $txt['average_posts'], ':
    +
    ', $context['average_posts'], '
    +
    ', $txt['average_topics'], ':
    +
    ', $context['average_topics'], '
    +
    ', $txt['total_boards'], ':
    +
    ', $context['num_boards'], '
    +
    ', $txt['latest_member'], ':
    +
    ', $context['common_stats']['latest_member']['link'], '
    +
    ', $txt['average_online'], ':
    +
    ', $context['average_online'], '
    '; + + if (!empty($context['gender'])) + { + echo ' +
    ', $txt['gender_stats'], ':
    +
    '; + + foreach ($context['gender'] as $g => $n) + echo tokenTxtReplace($g), ': ', $n, '
    '; + + echo ' +
    '; + } + + if (!empty($modSettings['hitStats'])) + echo ' +
    ', $txt['average_hits'], ':
    +
    ', $context['average_hits'], '
    '; + + echo ' +
    '; + + foreach ($context['stats_blocks'] as $name => $block) + { + echo ' +
    +
    +

    + ', $txt['top_' . $name], ' +

    +
    +
    '; + + foreach ($block as $item) + { + echo ' +
    + ', $item['link'], ' +
    +
    '; + + if (!empty($item['percent'])) + echo ' +
    '; + else + echo ' +
    '; + + echo ' + ', $item['num'], ' +
    '; + } + + echo ' +
    +
    '; + } + + echo ' +
    +
    +
    +

    + ', $txt['forum_history'], ' +

    +
    '; + + if (!empty($context['yearly'])) + { + echo ' + + + + + + + + '; + + if (!empty($modSettings['hitStats'])) + echo ' + '; + + echo ' + + + '; + + foreach ($context['yearly'] as $id => $year) + { + echo ' + + + + + + '; + + if (!empty($modSettings['hitStats'])) + echo ' + '; + + echo ' + '; + + foreach ($year['months'] as $month) + { + echo ' + + + + + + '; + + if (!empty($modSettings['hitStats'])) + echo ' + '; + + echo ' + '; + + if ($month['expanded']) + { + foreach ($month['days'] as $day) + { + echo ' + + + + + + '; + + if (!empty($modSettings['hitStats'])) + echo ' + '; + + echo ' + '; + } + } + } + } + + echo ' + +
    ', $txt['yearly_summary'], '', $txt['stats_new_topics'], '', $txt['stats_new_posts'], '', $txt['stats_new_members'], '', $txt['most_online'], '', $txt['page_views'], '
    + * ', $year['year'], ' + ', $year['new_topics'], '', $year['new_posts'], '', $year['new_members'], '', $year['most_members_online'], '', $year['hits'], '
    + ', $month['month'], ' ', $month['year'], ' + ', $month['new_topics'], '', $month['new_posts'], '', $month['new_members'], '', $month['most_members_online'], '', $month['hits'], '
    ', $day['year'], '-', $day['month'], '-', $day['day'], '', $day['new_topics'], '', $day['new_posts'], '', $day['new_members'], '', $day['most_members_online'], '', $day['hits'], '
    + + '; + } +} + +?> \ No newline at end of file diff --git a/Themes.template.php b/Themes.template.php new file mode 100644 index 0000000..71a1ff9 --- /dev/null +++ b/Themes.template.php @@ -0,0 +1,1183 @@ + +

    + + ', $txt['themeadmin_install_title'], ' +

    + +
    + ', $txt['themeadmin_explain'], ' +
    '; + + echo ' +
    +
    +

    ', + $txt['settings'], ' +

    +
    +
    +
    +
    + +
    +
    + + +
    +
    + : +
    +
    +
    '; + + foreach ($context['themes'] as $theme) + echo ' +
    '; + + echo ' +
    + + +
    +
    + +
    +
    + + ', $txt['theme_select'], ' +
    +
    + : +
    +
    + + ', $txt['theme_select'], ' +
    +
    + + + +
    +
    '; + + // Link to simplemachines.org for latest themes and info! + echo ' +
    +

    + ', $txt['theme_adding_title'], ' +

    +
    +
    + ', $txt['theme_adding'], ' +
    '; + + // All the install options. + echo ' +
    +
    +

    + ', $txt['theme_install'], ' +

    +
    +
    '; + + if ($context['can_create_new']) + { + // From a file. + echo ' +
    + ', $txt['theme_install_file'], ' +
    + + + + +
    +
    '; + + // Copied from the default. + echo ' +
    + ', $txt['theme_install_new'], ' +
    + + + + +
    +
    '; + } + + // From a dir. + echo ' +
    + ', $txt['theme_install_dir'], ' +
    + + + + +
    +
    '; + + echo ' +
    +
    '; + + echo ' + '; +} + +/** + * This lists all themes + */ +function template_list_themes() +{ + global $context, $scripturl, $txt; + + // Show a nice confirmation message. + if (isset($_GET['done'])) + echo ' +
    + ', $txt['theme_confirmed_' . $_GET['done']], ' +
    '; + + echo ' +
    +

    ', $txt['themeadmin_list_heading'], '

    +
    +
    + ', $txt['themeadmin_list_tip'], ' +
    +
    +
    +

    ', $txt['theme_settings'], '

    +
    +
    '; + + // Show each theme.... with X for delete, an enable/disable link and a link to their own settings page. + foreach ($context['themes'] as $theme) + { + echo ' +
    +

    + + ', $theme['name'] . (!empty($theme['version']) ? ' (' . $theme['version'] . ')' : ''), ' + + + ', (!empty($theme['enable']) || $theme['id'] == 1 ? '' : ''), ''; + + // You *cannot* disable/enable/delete the default theme. It's important! + if ($theme['id'] != 1) + { + // Enable/Disable. + echo ' + '; + + // Deleting. + echo ' + '; + } + + echo ' + +

    +
    +
    +
    +
    ', $txt['themeadmin_list_theme_dir'], ':
    + ', $theme['theme_dir'], $theme['valid_path'] ? '' : ' ' . $txt['themeadmin_list_invalid'], ' +
    ', $txt['themeadmin_list_theme_url'], ':
    +
    ', $theme['theme_url'], '
    +
    ', $txt['themeadmin_list_images_url'], ':
    +
    ', $theme['images_url'], '
    +
    +
    '; + } + + echo ' +
    +

    ', $txt['themeadmin_list_reset'], '

    +
    +
    +
    +
    + : +
    +
    + +
    +
    + : +
    +
    + +
    +
    + + + +
    +
    '; +} + +/** + * This lets you reset themes + */ +function template_reset_list() +{ + global $context, $scripturl, $txt; + + echo ' +
    +

    ', $txt['themeadmin_reset_title'], '

    +
    +
    + ', $txt['themeadmin_reset_tip'], ' +
    +
    '; + + // Show each theme.... with X for delete and a link to settings. + foreach ($context['themes'] as $theme) + { + echo ' +
    +

    ', $theme['name'], '

    +
    +
    + +
    '; + } + + echo ' +
    '; +} + +/** + * This displays the form for setting theme options + */ +function template_set_options() +{ + global $context, $scripturl, $txt; + + echo ' +
    + +
    +

    + ', $context['theme_options_reset'] ? $txt['themeadmin_reset_options_title'] : $txt['theme_options_title'], ' - ', $context['theme_settings']['name'], ' +

    +
    +
    + ', $context['theme_options_reset'] ? $txt['themeadmin_reset_options_info'] : $txt['theme_options_defaults'], ' +
    +
    +
    '; + + $skeys = array_keys($context['options']); + $first_option_key = array_shift($skeys); + $titled_section = false; + + foreach ($context['options'] as $i => $setting) + { + // Just spit out separators and move on + if (empty($setting) || !is_array($setting)) + { + // Insert a separator (unless this is the first item in the list) + if ($i !== $first_option_key) + echo ' +
    +
    +
    '; + + // Should we give a name to this section? + if (is_string($setting) && !empty($setting)) + { + $titled_section = true; + echo ' +
    ' . $setting . '
    +
    '; + } + else + $titled_section = false; + + continue; + } + + echo ' +
    '; + + // Show the change option box? + if ($context['theme_options_reset']) + echo ' + + + '; + + echo ' + '; + + if (isset($setting['description'])) + echo ' +
    + ', $setting['description'], ''; + echo ' +
    '; + + // Display checkbox options + if ($setting['type'] == 'checkbox') + echo ' +
    + + '; + + // How about selection lists, we all love them + elseif ($setting['type'] == 'list') + { + echo ' +
    + '; + } + // A textbox it is then + else + { + echo ' +
    '; + + if (isset($setting['type']) && $setting['type'] == 'number') + { + $min = isset($setting['min']) ? ' min="' . $setting['min'] . '"' : ' min="0"'; + $max = isset($setting['max']) ? ' max="' . $setting['max'] . '"' : ''; + $step = isset($setting['step']) ? ' step="' . $setting['step'] . '"' : ''; + + echo ' + '; + } + + // End of this defintion, close open dds + echo ' +
    '; + } + + // Close the option page up + echo ' +
    + + + +
    +
    '; +} + +/** + * The page for setting and managing theme settings. + */ +function template_set_settings() +{ + global $context, $settings, $scripturl, $txt; + + echo ' +
    +
    +
    +

    + ', $txt['theme_settings'], ' - ', $context['theme_settings']['name'], ' +

    +
    +
    '; + + // @todo Why can't I edit the default theme popup. + if ($context['theme_settings']['theme_id'] != 1) + echo ' +
    +

    + ', $txt['theme_edit'], ' +

    +
    + '; + + echo ' +
    +

    + ', $txt['theme_url_config'], ' +

    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    '; + + // Do we allow theme variants? + if (!empty($context['theme_variants'])) + { + echo ' +
    +

    + ', $txt['theme_variants'], ' +

    +
    +
    +
    + : +
    +
    + +
    +
    + : +
    +
    + + +
    +
    + '; + } + + echo ' +
    +

    + ', $txt['theme_options'], ' +

    +
    +
    '; + + $skeys = array_keys($context['settings']); + $first_setting_key = array_shift($skeys); + $titled_section = false; + + foreach ($context['settings'] as $i => $setting) + { + // Is this a separator? + if (empty($setting) || !is_array($setting)) + { + // We don't need a separator before the first list element + if ($i !== $first_setting_key) + echo ' +
    +
    +
    '; + + // Add a fake heading? + if (is_string($setting) && !empty($setting)) + { + $titled_section = true; + echo ' +
    ' . $setting . '
    +
    '; + } + else + $titled_section = false; + + continue; + } + + echo ' +
    + :'; + + if (isset($setting['description'])) + echo '
    + ', $setting['description'], ''; + + echo ' +
    '; + + // A checkbox? + if ($setting['type'] == 'checkbox') + echo ' +
    + + +
    '; + + // A list with options? + elseif ($setting['type'] == 'list') + { + echo ' +
    + +
    '; + } + // A Textarea? + elseif ($setting['type'] == 'textarea') + { + echo ' +
    + +
    '; + } + // A regular input box, then? + else + { + echo ' +
    '; + + if (isset($setting['type']) && $setting['type'] == 'number') + { + $min = isset($setting['min']) ? ' min="' . $setting['min'] . '"' : ' min="0"'; + $max = isset($setting['max']) ? ' max="' . $setting['max'] . '"' : ''; + $step = isset($setting['step']) ? ' step="' . $setting['step'] . '"' : ''; + + echo ' + +
    '; + } + } + + echo ' +
    + + + +
    +
    +
    '; + + if (!empty($context['theme_variants'])) + { + echo ' + '; + } +} + +/** + * This template allows for the selection of different themes ;) + */ +function template_pick() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    '; + + // Just go through each theme and show its information - thumbnail, etc. + foreach ($context['available_themes'] as $theme) + { + echo ' +
    +

    + ', $theme['name'], ' +

    +
    +
    +
    +
    + + + +
    +

    ', $theme['description'], '

    '; + + if (!empty($theme['variants'])) + { + echo ' + : + '; + } + + echo ' +
    +

    + ', $theme['num_users'], ' ', ($theme['num_users'] == 1 ? $txt['theme_user'] : $txt['theme_users']), ' +

    +
    + +
    +
    '; + } + + echo ' + + + +
    +
    '; +} + +/** + * Okay, that theme was installed/updated successfully! + */ +function template_installed() +{ + global $context, $scripturl, $txt; + + // The aftermath. + echo ' +
    +

    ', $context['page_title'], '

    +
    +
    '; + + // Oops! there was an error :( + if (!empty($context['error_message'])) + echo ' +

    + ', $context['error_message'], ' +

    '; + + // Not much to show except a link back... + else + echo ' +

    + ', $context['installed_theme']['name'], ' ', $txt['theme_' . (isset($context['installed_theme']['updated']) ? 'updated' : 'installed') . '_message'], ' +

    +

    + ', $txt['back'], ' +

    '; + + echo ' +
    '; +} + +/** + * The page for editing themes. + */ +function template_edit_list() +{ + global $context, $scripturl, $txt; + + echo ' +
    +
    +

    ', $txt['themeadmin_edit_title'], '

    +
    +
    '; + + foreach ($context['themes'] as $theme) + { + echo ' +
    + + ', $theme['name'], '', !empty($theme['version']) ? ' + (' . $theme['version'] . ')' : '', ' + + +
    '; + } + + echo ' +
    +
    '; +} + +/** + * The page allowing you to copy a template from one theme to another. + */ +function template_copy_template() +{ + global $context, $scripturl, $txt; + + echo ' +
    +

    ', $txt['themeadmin_edit_filename'], '

    +
    +
    + ', $txt['themeadmin_edit_copy_warning'], ' +
    +
    +
      '; + + foreach ($context['available_templates'] as $template) + { + echo ' +
    • + ', $template['filename'], $template['already_exists'] ? ' (' . $txt['themeadmin_edit_exists'] . ')' : '', ' + '; + + if ($template['can_copy']) + echo ' + ', $txt['themeadmin_edit_do_copy'], ''; + else + echo $txt['themeadmin_edit_no_copy']; + + echo ' + +
    • '; + } + + echo ' +
    +
    '; +} + +/** + * This lets you browse a list of files in a theme so you can choose which one to edit. + */ +function template_edit_browse() +{ + global $context, $txt; + + if (!empty($context['browse_title'])) + echo ' +
    +

    ', $context['browse_title'], '

    +
    '; + + echo ' + + + + + + + + + '; + + foreach ($context['theme_files'] as $file) + { + echo ' + + + + + '; + } + + echo ' + +
    ', $txt['themeadmin_edit_filename'], '', $txt['themeadmin_edit_modified'], '', $txt['themeadmin_edit_size'], '
    '; + + if ($file['is_editable']) + echo ' + ', $file['filename'], ''; + + elseif ($file['is_directory']) + echo ' + ', $file['filename'], ''; + + else + echo $file['filename']; + + echo ' + ', !empty($file['last_modified']) ? $file['last_modified'] : '', '', $file['size'], '
    '; +} + +/** + * Wanna edit the stylesheet? + */ +function template_edit_style() +{ + global $context, $settings, $scripturl, $txt; + + if ($context['session_error']) + echo ' +
    + ', $txt['error_session_timeout'], ' +
    '; + + // From now on no one can complain that editing css is difficult. If you disagree, go to www.w3schools.com. + echo ' + + '; + + // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) + echo ' +
    +
    +

    ', $txt['theme_edit'], ' - ', $context['edit_filename'], '

    +
    +
    '; + + if (!$context['allow_save']) + echo ' + ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '
    '; + + echo ' + +
    +
    + + +
    +
    + + '; + + // Hopefully it exists. + if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) + echo ' + '; + + echo ' +
    '; +} + +/** + * This edits the template... + */ +function template_edit_template() +{ + global $context, $scripturl, $txt; + + if ($context['session_error']) + echo ' +
    + ', $txt['error_session_timeout'], ' +
    '; + + if (isset($context['parse_error'])) + echo ' +
    + ', $txt['themeadmin_edit_error'], ' +
    ', $context['parse_error'], '
    +
    '; + + // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) + echo ' +
    +
    +

    ', $txt['theme_edit'], ' - ', $context['edit_filename'], '

    +
    +
    '; + + if (!$context['allow_save']) + echo ' + ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '
    '; + + foreach ($context['file_parts'] as $part) + echo ' + :
    +
    + +
    '; + + echo ' +
    + + + '; + + // Hopefully it exists. + if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) + echo ' + '; + + echo ' +
    +
    +
    '; +} + +/** + * This allows you to edit a file + */ +function template_edit_file() +{ + global $context, $scripturl, $txt; + + if ($context['session_error']) + echo ' +
    + ', $txt['error_session_timeout'], ' +
    '; + + // Is this file writeable? + if (!$context['allow_save']) + echo ' +
    + ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], ' +
    '; + + // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) + echo ' +
    +
    +

    ', $txt['theme_edit'], ' - ', $context['edit_filename'], '

    +
    +
    +
    + + + '; + + // Hopefully it exists. + if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) + echo ' + '; + + echo ' +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Who.template.php b/Who.template.php new file mode 100644 index 0000000..8a179a1 --- /dev/null +++ b/Who.template.php @@ -0,0 +1,258 @@ + +
    +
    +

    ', $txt['who_title'], '

    +
    +
    +
    + +
    + ', $txt['who_show'], ' + + +
    +
    + + + + + + + + + '; + + foreach ($context['members'] as $member) + { + echo ' + + + + + '; + } + + // No members? + if (empty($context['members'])) + echo ' + + + '; + + echo ' + +
    ', $txt['who_user'], $context['sort_by'] == 'user' ? '' : '', '', $txt['who_time'], $context['sort_by'] == 'time' ? '' : '', '', $txt['who_action'], '
    '; + + // Guests can't be messaged. + if (!$member['is_guest']) + echo ' + + ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' : $member['online']['label'], $context['can_send_pm'] ? '' : '', ' + '; + + echo ' + + ', $member['is_guest'] ? $member['name'] : '' . $member['name'] . '', ' + '; + + if (!empty($member['ip'])) + echo ' + (' . str_replace(':', ':​', $member['ip']) . ')'; + + echo ' + ', $member['time'], ''; + + if (is_array($member['action'])) + { + $tag = !empty($member['action']['tag']) ? $member['action']['tag'] : 'span'; + + echo ' + <', $tag, !empty($member['action']['class']) ? ' class="' . $member['action']['class'] . '"' : '', '> + ', $txt[$member['action']['label']], (!empty($member['action']['error_message']) ? $member['action']['error_message'] : ''), ' + '; + } + else + echo $member['action']; + + echo ' +
    + ', $txt['who_no_online_' . ($context['show_by'] == 'guests' || $context['show_by'] == 'spiders' ? $context['show_by'] : 'members')], ' +
    +
    + +
    + ', $txt['who_show'], ' + + +
    +
    +
    +
    + '; +} + +/** + * This displays a nice credits page + */ +function template_credits() +{ + global $context, $txt; + + // The most important part - the credits :P. + echo ' +
    +
    +

    ', $txt['credits'], '

    +
    '; + + foreach ($context['credits'] as $section) + { + if (isset($section['pretext'])) + echo ' +
    +

    ', $section['pretext'], '

    +
    '; + + if (isset($section['title'])) + echo ' +
    +

    ', $section['title'], '

    +
    '; + + echo ' +
    +
    '; + + foreach ($section['groups'] as $group) + { + echo ' +
    + ', isset($group['title']) ? '' . $group['title'] . '' : '', ' +
    +
    '; + + $names = sentence_list($group['members']); + echo sprintf($txt['credits_list'], $names); + + echo ' +
    '; + } + + echo ' +
    '; + + if (isset($section['posttext'])) + echo ' +

    ', $section['posttext'], '

    '; + + echo ' +
    '; + } + + // Other software and graphics + if (!empty($context['credits_software_graphics'])) + { + echo ' +
    +

    ', $txt['credits_software_graphics'], '

    +
    +
    '; + + if (!empty($context['credits_software_graphics']['graphics'])) + echo ' +
    +
    ', $txt['credits_graphics'], '
    +
    ', implode('
    ', $context['credits_software_graphics']['graphics']), '
    +
    '; + + if (!empty($context['credits_software_graphics']['software'])) + echo ' +
    +
    ', $txt['credits_software'], '
    +
    ', implode('
    ', $context['credits_software_graphics']['software']), '
    +
    '; + + if (!empty($context['credits_software_graphics']['fonts'])) + echo ' +
    +
    ', $txt['credits_fonts'], '
    +
    ', implode('
    ', $context['credits_software_graphics']['fonts']), '
    +
    '; + echo ' +
    '; + } + + // How about Modifications, we all love em + if (!empty($context['credits_modifications']) || !empty($context['copyrights']['mods'])) + { + echo ' +
    +

    ', $txt['credits_modifications'], '

    +
    +
    +
      '; + + // Display the credits. + if (!empty($context['credits_modifications'])) + echo ' +
    • ', implode('
    • ', $context['credits_modifications']), '
    • '; + + // Legacy. + if (!empty($context['copyrights']['mods'])) + echo ' +
    • ', implode('
    • ', $context['copyrights']['mods']), '
    • '; + + echo ' +
    +
    '; + } + + // SMF itself + echo ' +
    +

    ', $txt['credits_forum'], ' ', $txt['credits_copyright'], '

    +
    +
    + ', $context['copyrights']['smf'], ' +
    +
    '; +} + +?> \ No newline at end of file diff --git a/Xml.template.php b/Xml.template.php new file mode 100644 index 0000000..e32de41 --- /dev/null +++ b/Xml.template.php @@ -0,0 +1,474 @@ + + + ', cleanXml($context['message']), ' +'; +} + +/** + * This defines the XML for the AJAX quote feature + */ +function template_quotefast() +{ + global $context; + + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> + + ', cleanXml($context['quote']['xml']), ' +'; +} + +/** + * This defines the XML for the inline edit feature + */ +function template_modifyfast() +{ + global $context; + + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> + + + + +'; + +} + +/** + * The XML for handling things when you're done editing a post inline + */ +function template_modifydone() +{ + global $context, $txt; + + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> + + '; + if (empty($context['message']['errors'])) + { + // Build our string of info about when and why it was modified + $modified = empty($context['message']['modified']['time']) ? '' : sprintf($txt['last_edit_by'], $context['message']['modified']['time'], $context['message']['modified']['name']); + $modified .= empty($context['message']['modified']['reason']) ? '' : ' ' . sprintf($txt['last_edit_reason'], $context['message']['modified']['reason']); + + echo ' + + + + '; + } + else + echo ' + ', $context['message']['errors']), ']]>'; + echo ' + +'; +} + +/** + * This handles things when editing a topic's subject from the messageindex. + */ +function template_modifytopicdone() +{ + global $context, $txt; + + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> + + '; + if (empty($context['message']['errors'])) + { + // Build our string of info about when and why it was modified + $modified = empty($context['message']['modified']['time']) ? '' : sprintf($txt['last_edit_by'], $context['message']['modified']['time'], $context['message']['modified']['name']); + $modified .= empty($context['message']['modified']['reason']) ? '' : sprintf($txt['last_edit_reason'], $context['message']['modified']['reason']); + + echo ' + ' . $modified . ''), ']]>'; + + if (!empty($context['message']['subject'])) + echo ' + '; + } + else + echo ' + ', $context['message']['errors'])), ']]>'; + echo ' + +'; +} + +/** + * The massive XML for previewing posts. + */ +function template_post() +{ + global $context; + + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> + + + + + + '; + + if (!empty($context['post_error'])) + foreach ($context['post_error'] as $message) + echo ' + '; + + echo ' + + + + + ', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? ' + ' : '', ' + + ', isset($context['topic_last_message']) ? $context['topic_last_message'] : '0', ''; + + if (!empty($context['previous_posts'])) + { + echo ' + '; + + foreach ($context['previous_posts'] as $post) + echo ' + + + + + ', $post['is_ignored'] ? '1' : '0', ' + '; + + echo ' + '; + } + + echo ' +'; +} + +/** + * All the XML for previewing a PM + */ +function template_pm() +{ + global $context, $txt; + + // @todo something could be removed...otherwise it can be merged again with template_post + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> + + + + + + '; + + if (!empty($context['post_error']['messages'])) + foreach ($context['post_error']['messages'] as $message) + echo ' + '; + + echo ' + + + + ', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? ' + ' : '', ' + '; + + echo ' +'; +} + +/** + * The XML for previewing a warning + */ +function template_warning() +{ + global $context; + + // @todo something could be removed...otherwise it can be merged again with template_post + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> + + + + + + '; + + if (!empty($context['post_error']['messages'])) + foreach ($context['post_error']['messages'] as $message) + echo ' + '; + + echo ' + '; + + echo ' +'; +} + +/** + * The XML for hiding/showing stats sections via AJAX + */ +function template_stats() +{ + global $context, $modSettings; + + if (empty($context['yearly'])) + return; + + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> +'; + foreach ($context['yearly'] as $year) + foreach ($year['months'] as $month) + { + echo ' + '; + + foreach ($month['days'] as $day) + echo ' + '; + + echo ' + '; + } + + echo ' +'; +} + +/** + * The XML for selecting items to split + */ +function template_split() +{ + global $context; + + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> + + + '; + foreach ($context['changes'] as $change) + { + if ($change['type'] == 'remove') + echo ' + '; + else + echo ' + + + + + + '; + } + echo ' +'; +} + +/** + * This is just to hold off some errors if people are stupid. + */ +if (!function_exists('template_button_strip')) +{ + function template_button_strip($button_strip, $direction = 'top', $strip_options = array()) + { + } + + function template_menu() + { + } + + function theme_linktree() + { + } +} + +/** + * XML for search results + */ +function template_results() +{ + global $context, $txt; + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> +'; + + if (empty($context['topics'])) + echo ' + ', $txt['search_no_results'], ''; + else + { + echo ' + '; + + while ($topic = $context['get_topics']()) + { + echo ' + + ', $topic['id'], ' + ', $topic['relevance'], ' + + ', $topic['board']['id'], ' + ', cleanXml($topic['board']['name']), ' + ', $topic['board']['href'], ' + + + ', $topic['category']['id'], ' + ', cleanXml($topic['category']['name']), ' + ', $topic['category']['href'], ' + + '; + + foreach ($topic['matches'] as $message) + { + echo ' + + ', $message['id'], ' + + + + ', $message['timestamp'], ' + ', $message['start'], ' + + + ', $message['member']['id'], ' + ', cleanXml($message['member']['name']), ' + ', $message['member']['href'], ' + + '; + } + echo ' + + '; + } + + echo ' + '; + } + + echo ' +'; +} + +/** + * The XML for the Jump To box + */ +function template_jump_to() +{ + global $context; + + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> +'; + + foreach ($context['jump_to'] as $category) + { + echo ' + '; + + foreach ($category['boards'] as $board) + echo ' + '; + } + echo ' +'; +} + +/** + * The XML for displaying a column of message icons and selecting one via AJAX + */ +function template_message_icons() +{ + global $context; + + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> +'; + + foreach ($context['icons'] as $icon) + echo ' + '; + + echo ' +'; +} + +/** + * The XML for instantly showing whether a username is valid on the registration page + */ +function template_check_username() +{ + global $context; + + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> + + ', cleanXml($context['checked_username']), ' +'; +} + +/** + * This prints XML in its most generic form. + */ +function template_generic_xml() +{ + global $context; + + echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '>'; + + // Show the data. + template_generic_xml_recursive($context['xml_data'], 'smf', '', -1); +} + +/** + * Recursive function for displaying generic XML data. + * + * @param array $xml_data An array of XML data + * @param string $parent_ident The parent tag + * @param string $child_ident The child tag + * @param int $level How many levels to indent the code + */ +function template_generic_xml_recursive($xml_data, $parent_ident, $child_ident, $level) +{ + // This is simply for neat indentation. + $level++; + + echo "\n" . str_repeat("\t", $level), '<', $parent_ident, '>'; + + foreach ($xml_data as $key => $data) + { + // A group? + if (is_array($data) && isset($data['identifier'])) + template_generic_xml_recursive($data['children'], $key, $data['identifier'], $level); + // An item... + elseif (is_array($data) && isset($data['value'])) + { + echo "\n", str_repeat("\t", $level), '<', $child_ident; + + if (!empty($data['attributes'])) + foreach ($data['attributes'] as $k => $v) + echo ' ' . $k . '="' . $v . '"'; + echo '>'; + } + } + + echo "\n", str_repeat("\t", $level), ''; +} + +?> \ No newline at end of file diff --git a/css/admin.css b/css/admin.css new file mode 100644 index 0000000..5f1694b --- /dev/null +++ b/css/admin.css @@ -0,0 +1,650 @@ +/* Start with most common */ +.action_admin .generic_list { + overflow: auto; +} +#admin_content .windowbg { + /*margin: 0 0 10px 0;*/ + box-shadow: none; + padding: 1em; +} +#admin_content tr.windowbg td { + padding: .3em 1em; +} +#admin_content .windowbg form p { + display: flex; + justify-content: space-between; +} +#admin_content .button:not(.floatnone) { + float: right; +} +.action_admin .table_grid td { + border: 1px solid #ddd; + border-top: 0; +} +.action_admin .generic_list .flow_auto { + padding: 4px 2px; +} +.windowbg.nopadding { + margin: 0 !important; + padding: 0; +} +.windowbg ol { + margin-top: 0; + margin-bottom: 0; +} +a.help span { + margin-right: 2px; +} +.table_caption, tr.table_caption td { + color: #000; + font-size: 10px; + font-weight: bold; +} +.additional_row div.floatleft { + padding: 0 10px; +} +fieldset { + padding: 6px; +} +fieldset dl { + margin: 0; +} +legend { + font-weight: bold; + color: #000; +} + +/* Styles for the admin home screen. +------------------------------------------------------- */ +/* Admin quick search bar, and results page. */ +.admin_search { + padding: 5px; + font-size: 0.9em; + float: right; + display: flex; + justify-content: space-between; + align-items: center; +} +.admin_search input, .admin_search select, .admin_search .button { + border-radius: 4px; + margin: 0 0 0 2px; +} +.admin_search input[type="search"] { + min-width: 0; + flex: 1 1 auto; +} + +/* The welcome thingy. */ +#welcome { + border: 1px solid #ddd; + border-top: none; + border-radius: 0 0 7px 7px; + font-size: 0.9em; + padding: 12px 9px 8px 9px; +} +#welcome a { + font-weight: bold; +} +#welcome img { + vertical-align: middle; +} +.search_results { + margin: 0 -6px; +} +.search_results li { + margin: 0; + padding: 5px 0; + overflow: auto; + line-height: 1.7em; + border-bottom: double #ccc; +} +.search_results li:last-child { + border: none; +} +.search_results li a strong { + color: #346; +} +.search_results li p { + padding: 0 20px; + line-height: 1.7em; +} + +/* Cleaned this up a bit for less clutter. +/* Admin and moderation could generally do with a clean up everywhere. +/* Live news from smorg and support information. */ +#live_news, #support_info { + width: 70%; +} +#support_info { + width: 30%; + padding-left: 6px; +} +#admin_main_section { + overflow: auto; +} +#admin_main_section .windowbg { + padding: 6px 0; + border-radius: 0; + height: 12em; + overflow: auto; +} +#smfAnnouncements dt { + padding: 4px 6px 2px 6px; + border-top: 1px solid #bf6900; +} +#smfAnnouncements dt a { + color: #bf6900; + font-weight: bold; + display: block; +} +#smfAnnouncements dd { + margin: 0; + padding: 6px 12px; + border-top: double #ddd; +} + +fieldset.admin_group legend { + background: #eaf1f4; + border: 1px solid #cacdd3; + padding: 1px 5px; + border-radius: 3px; +} +fieldset.admin_group a { + display: inline-block; + width: 100px; + font-size: 85%; + text-align: center; + vertical-align: top; +} +fieldset.admin_group .inactive { + opacity: 0.4; +} + +/* The update warning. */ +#update_section { + margin: 6px 0; +} + +/* The icons. */ +.large_admin_menu_icon_file { + margin: 0 auto; + display: block; + width: 32px; + height: 32px; +} +.large_admin_menu_icon::before { + background: url(../images/icons/admin_sprite.png) no-repeat -5px -47px; + margin: 0 auto; + display: block; + content: ''; + width: 32px; + height: 32px; +} +.large_admin_menu_icon.attachment::before { + background-position: -5px -5px; +} +.large_admin_menu_icon.ban::before { + background-position: -47px -5px; +} +.large_admin_menu_icon.boards::before { + background-position: -89px -5px; +} +.large_admin_menu_icon.calendar::before { + background-position: -131px -5px; +} +.large_admin_menu_icon.current_theme::before { + background-position: -173px -5px; +} +.large_admin_menu_icon.default::before { + background-position: -5px -47px; +} +.large_admin_menu_icon.engines::before { + background-position: -47px -47px; +} +.large_admin_menu_icon.exit::before { + background-position: -89px -47px; +} +.large_admin_menu_icon.features::before { + background-position: -131px -47px; +} +.large_admin_menu_icon.languages::before { + background-position: -173px -47px; +} +.large_admin_menu_icon.logs::before { + background-position: -5px -89px; +} +.large_admin_menu_icon.mail::before { + background-position: -47px -89px; +} +.large_admin_menu_icon.maintain::before { + background-position: -89px -89px; +} +.large_admin_menu_icon.membergroups::before { + background-position: -131px -89px; +} +.large_admin_menu_icon.members::before { + background-position: -173px -89px; +} +.large_admin_menu_icon.modifications::before { + background-position: -5px -131px; +} +.large_admin_menu_icon.news::before { + background-position: -47px -131px; +} +.large_admin_menu_icon.packages::before { + background-position: -89px -131px; +} +.large_admin_menu_icon.paid::before { + background-position: -131px -131px; +} +.large_admin_menu_icon.permissions::before { + background-position: -173px -131px; +} +.large_admin_menu_icon.posts::before { + background-position: -5px -173px; +} +.large_admin_menu_icon.regcenter::before { + background-position: -47px -173px; +} +.large_admin_menu_icon.reports::before { + background-position: -89px -173px; +} +.large_admin_menu_icon.scheduled::before { + background-position: -131px -173px; +} +.large_admin_menu_icon.search::before { + background-position: -173px -173px; +} +.large_admin_menu_icon.security::before { + background-position: -215px -5px; +} +.large_admin_menu_icon.server::before { + background-position: -215px -47px; +} +.large_admin_menu_icon.smiley::before { + background-position: -215px -89px; +} +.large_admin_menu_icon.support::before { + background-position: -215px -131px; +} +.large_admin_menu_icon.themes::before { + background-position: -215px -173px; +} +.large_admin_menu_icon.warning::before { + background-position: -5px -215px; +} + +/* Styles for the support and credits page. +/* Hey, people might actually want to put their names on it now! +/* Only a couple of trivial markup hacks that wont break any mods or themes. +/* The older I get, the more devious I get. :D +/* Nobody ever themes admin anyway. That's why it looked like crap. */ +#support_credits_list dl { + padding: 0 6px; +} +#support_credits_list dt { + float: left; + padding: 6px 0.8em 0 0; + text-indent: -4px; +} +#support_credits_list dd { + padding: 6px 0; +} + +/* Styles for the package manager. */ +#package_list .tborder { + margin: .25em 0 .25em 26px; +} +#package_list ol, #package_list ol li { + list-style: decimal; + margin-left: 50px; + border: none; +} +#package_list li { + border: 1px solid #cacdd3; + padding: 0.2em; + margin: 1px; +} +.package_section { + border: 1px solid #cacdd3; +} +span.package_server { + padding: 0 3em; +} +pre.file_content { + overflow: auto; + width: 100%; + padding-bottom: 1em; +} +#view_package table { + border-collapse: collapse; +} +#view_package td[colspan="5"] { + border: none; + font-size: 0.9em; + padding: 0; +} + +/* Styles for the file permissions section. */ +.file_permissions { + font-size: 0.8em; + white-space: nowrap; +} +.perms_status { + display: block; + width: 35%; + text-align: center; +} +.perm_read { + background-color: #d1f7bf; + width: 8%; +} +.perm_writable { + background-color: #ffbbbb; + width: 8%; +} +.perm_execute { + background-color: #fdd7af; + width: 8%; +} +.perm_custom { + background-color: #c2c6c0; + width: 8%; +} +.perm_no_change { + background-color: #eee; + width: 8%; +} + +/* Styles for the BBC permissions */ +.list_bbc { + width: 33%; +} + +/* Styles for the manage boards section. */ +#manage_boards { + overflow: auto; +} +.roundframe .windowbg { + border: 0; + padding: 0; + background: none; +} +#manage_boards li.windowbg { + padding: 8px 0; + margin: 0; + border-radius: 0; + border: 1px solid #ddd; + border-bottom: none; +} +#manage_boards li.windowbg:first-child { + border-top: none; +} +#manage_boards li.windowbg:last-child { + border-bottom: 1px solid #ddd; +} +#manage_boards li.windowbg:hover { + background: #d0e7f8; +} +#manage_boards li .floatleft { + font-weight: bold; + padding: 0 6px; +} +#manage_boards li#recycle_board { + background-color: #dee; +} +#manage_boards li.redirect_board, #manage_boards li.redirect_board:hover { + background-color: #eed; +} +.move_links { + padding: 0 13px 0 0; +} +#manage_boards .button { + margin: 0 8px 0 0; +} +#manage_boards dl { + padding: 8px 6px 0 6px; +} + +#manage_boards dl textarea, #manage_boards dl table { + margin: 0 0 8px 0; +} +#manage_boards span.post_group, #manage_boards span.regular_members { + border-bottom: 1px dotted #000; + cursor: help; +} +.select_all_box { + display: none; +} + +/* Styles for the manage members section. */ +.msearch_details { + display: block; + width: 49%; +} +dl.right dt { + padding-right: 10px; +} + +/* Styles for the manage membergroups section. */ +.denyboards_layout .board:hover { + background: #e3e9ec; +} +.all_boards_in_cat { + margin-left: 2.5em; +} + +/* Styles for the question and answers */ +fieldset.qa_fieldset { + clear: both; + display: none; +} + +/* Styles for the manage search section. */ +span.search_weight { + width: 40px; + padding: 0 0.5em; + text-align: right; +} +.search_settings { + width: 47%; +} + +/* Styles for the manage bans section. */ +.ban_restriction { + margin: 0.2em 0 0.2em 2.2em; +} +.ban_settings { + width: 46%; +} +#manage_bans dl { + margin-bottom: 1em; +} +#manage_bans fieldset dl.settings { + margin-bottom: 0; +} +#manage_bans textarea { + min-height: 4em; + height: 5em; +} + +/* Styles for the manage subscriptions section. */ +#fixed_area { + width: 97%; +} + +/* Styles for the manage permissions section. */ +.perm_name, .perm_profile, .perm_board { + display: block; + width: 40%; +} +.perm_boards { + padding: 0; + margin: 0 0 0.6em 0; +} +.perm_boards li { + list-style-type: none; + border: 1px solid #cacdd3; + border-top: 0; + padding: 0.2em; +} +.perm_boards li:first-child { + border-top: 1px solid #cacdd3; +} +.perm_groups { + background-color: #fff; +} +.perms { + width: 20px; + display: inline-block; + text-align: center; +} + +/* Styles for the themes section. */ +ul.theme_options { + padding: 0; + margin: 0; +} +ul.theme_options li { + list-style: none; + padding: 0.4em; +} +.is_directory { + padding-left: 18px; +} +.is_directory span { + margin: -2px 3px 0 0; +} +.edit_file { + width: 100%; + font-family: monospace; + margin: 1ex 0; + white-space: pre; +} + +dl.themes_list { + margin: 0; +} +dl.themes_list dt { + margin-bottom: 3px; + width: 40%; +} +dl.themes_list dd { + width: 59%; + font-style: italic; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} + +/* Generic boxes/textboxes requires to be full-width */ +#agreement, #reserved { + display: block; + width: 100%; +} +#modcenter { + display: flex; + width: 100%; + flex-direction: column; +} + +#modcenter .half_content { + width: 100%; +} +#modcenter .half_content .windowbg { + padding: 1em; +} +#modcenter .half_content .windowbg ul { + list-style: initial; +} +#modcenter .half_content .windowbg ul { + margin-left: 1em; +} +/* Styles for the moderation center. */ +/* Moderation Notes */ +ul.moderation_notes { + margin: 0; + padding: 0; + list-style: none; + overflow: auto; + height: 10.2em; +} +ul.moderation_notes li { + padding: 0.2em; + border-bottom: 1px solid #ccc; +} +.notes { + margin-top: 0.4em; +} +.post_note { + width: calc(100% - 17ex); +} +.post_note input { + width: 100%; +} + +/* Styles for the Report generation */ +#report_buttons { + min-height: 2.4em; + padding: 3px 0; +} +.report_results th { + border-left: 1px solid #ddd; + border-right: 1px solid #ddd; +} + +#support_credits .sub_bar { + padding: 6px 0px 5px 0px; +} +#taskpad .button, #admin_form_wrapper { + margin: 5px 0 5px 0; +} +h3.config_hd { + background: url(../images/icons/config_hd.png) no-repeat 12px; + padding: 8px 0 8px 45px; +} +.full_width { + width: 100%; +} + +#versions .table_grid { + margin: 0; +} +#Sources .half_table, #Default .half_table, #Languages .half_table { + padding-left: 20px; +} + +.windowbg.highlight2 { + background: #d0e7f8; +} + +/* Css edit page */ +#css_preview_box { + margin-bottom: 2ex; + border: 1px solid #777; + width: 100%; + height: 400px; +} + +/* Smileys and Message icons section */ +.move_smileys img { + padding: 2px; + border: 2px solid transparent; + border-radius: 2px; + vertical-align: middle; +} + +.move_smileys a:hover img { + border-color: #71a0c8; +} + +.move_smileys .selected_item { + border-color: #ffb42d; +} + +/* Progress bars */ + +.progress_bar { + margin: 20px auto; + max-width: 750px; +} diff --git a/css/calendar.css b/css/calendar.css new file mode 100644 index 0000000..63d1148 --- /dev/null +++ b/css/calendar.css @@ -0,0 +1,351 @@ +/* Styles for the calendar section. +------------------------------------------------- */ +#calendar { + overflow: hidden; +} +#calendar .windowbg { + box-shadow: none; + border-radius: 0; + box-sizing: content-box; + margin: 0; +} +/* Used to indicate the current day in the grid. */ +#main_grid .calendar_today span.day_text, +#month_grid .calendar_today, +.calendar_week tr.days_wrapper td.calendar_today:first-child { + font-weight: bold; +} +.calendar_today, +td.days:hover { + background: #fff; +} +#month_grid { + width: 214px; + float: left; + text-align: center; + overflow: hidden; + margin-right: 10px; +} +#month_grid h3 a { + padding: 0 6px 0 6px; +} +#month_grid table { + width: 100%; + margin-bottom: 12px; + border-collapse: collapse; + background: #f0f4f7; + border: 1px solid #ddd; +} +#main_grid { + overflow: auto; +} +#main_grid table { + width: 99.9%; + border-collapse: collapse; + background: #f0f4f7; + margin: 1px 0 0 0; + border: 1px solid #ddd; + overflow: auto; +} +#main_grid .cat_bar { + border-radius: 5px 5px 0 0; +} +#month_grid th:first-child { + background: #e7eaef; +} +#month_grid th.days { + background: #e7eaef; + font-size: smaller; +} +#month_grid th.days, +#month_grid td.weeks { + padding: 2px; + text-align: center; +} +#month_grid td.weeks { + font-size: large; + background: #e7eaef; + width: 5%; +} +#month_grid td.weeks a:hover { + text-decoration: underline; +} +#month_grid h3.catbg, +#main_grid h3.catbg { + padding: 8px 6px 4px 6px; +} +#main_grid h3.catbg span { + display: block; + font-size: 1.5em; + margin: -3px 4px 0 4px; +} +#main_grid th:first-child { + background: #e7eaef; +} +#main_grid th.days { + width: 14%; + padding: 5px 10px; + text-align: left; + background: #e7eaef; +} +#main_grid td.weeks { + text-align: center; + font-weight: bold; + font-size: 1.8em; + background: #e7eaef; + padding: 5px; +} +#main_grid td.weeks a:hover { + text-decoration: none; +} +/* Main Highlighting */ +#main_grid td.disabled, +#month_grid td.disabled { + background: #eee; + border: 1px solid #ddd; +} +#main_grid td.events, +#month_grid td.events { + background: rgba(30, 245, 20, 0.1); +} +#main_grid td.holidays, +#month_grid td.holidays { + background: rgba(23, 110, 245, 0.1); +} +#main_grid td.birthdays, +#month_grid td.birthdays { + background: rgba(102, 0, 255, 0.1); +} +/* Special Case Highlighting */ +#main_grid td.events:hover, +#month_grid td.events:hover, +#month_grid td.calendar_today.events { + background: rgba(30, 245, 20, 0.2); +} +#main_grid td.holidays:hover, +#month_grid td.holidays:hover, +#month_grid td.calendar_today.holidays { + background: rgba(23, 110, 245, 0.2); +} +#main_grid td.birthdays:hover, +#month_grid td.birthdays:hover, +#month_grid td.calendar_today.birthdays { + background: rgba(153, 51, 255, 0.2); +} +#main_grid td.days, +#month_grid td.days { + vertical-align: top; + text-align: left; + border-right: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} +#main_grid td.days { + padding: 5px; +} +#month_grid td.days { + padding: 0; + width: 12.5%; + text-align: center; +} +#month_grid td.days a { + display: block; + padding: 5px; +} +#month_grid td.days a:hover { + text-decoration: none; + background: rgba(97, 135, 166, 0.2); +} +#main_grid tbody tr:nth-child(2) td.days, +#month_grid tbody tr:nth-child(2) { + border-top: 1px solid #ddd; +} +#main_grid tbody tr.days_wrapper > td:nth-child(2), +#month_grid tr.days_wrapper > td:nth-child(2) { + border-left: 1px solid #ddd; +} +#main_grid tr.days_wrapper:nth-child(2) > td.weeks { + border-top: 1px solid #ddd; +} +#main_grid table:last-child td.weeks { + border-bottom: 1px solid #ddd; +} +#main_grid tr:not(.days_wrapper) th, +#main_grid tr:not(.days_wrapper) td { + min-height: 30px; +} +#calendar_range, +#calendar_navigation { + padding: 5px 0; + text-align: center; + max-width: 50%; + margin: auto; +} +#main_grid .act_day { + font-size: 12pt; +} +#main_grid .active_post_event > a { + color: #999; +} +div.week_month_title { + font-weight: bold; + font-size: xx-large; + margin: 0.8em 0 0.4em 0.15em; + line-height: 1.2em; +} +div.week_month_title a { + color: #555; +} +td.week_post { + vertical-align: middle !important; +} +div.week_add_event { + /* text-align: center; */ +} +div.week_add_event > a { + /* font-size: x-large; */ + color: #999; +} +div.week_add_event > a:hover { + color: #555; +} +span.hidelink { + font-style: italic; +} +#view_button { + margin-top: -2px; + margin-left: inherit; +} +#main_grid .buttonrow, +#main_grid .buttonlist { + margin: 5px 0; + padding: 0 +} +#main_grid td.days, +.calendar_week td.days { + height: 100px; + padding: 10px; +} +.modify_event:hover { + text-decoration: none; +} +.modify_event_links { + float: right; +} +.event_wrapper:not(:last-child) { + margin-bottom: 5px; + padding-bottom: 5px; + border-bottom: 1px solid #ddd; +} +.event_time, .event_location { + color: #777; +} +.post_event_link { + vertical-align: middle; + height: 18px; + display: inline-block; +} +.active_post_event { + margin-top: 1em; +} + +/* Break long words in calendar table cells to avoid layout problems */ +#main_grid td.days { + -webkit-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + word-wrap: break-word; /* IE fallback */ + overflow-wrap: break-word; +} + +/* At less than 1024px wide, #main_grid needs all the space it can get */ +@media (max-width: 1023px) { + #month_grid { + display: none; + } +} + +/* Small screens get the calendar in a vertical list */ +@media (max-width: 665px) { + #main_grid table { + border: none; + background: none; + } + #main_grid tr { + margin-bottom: 1em; + } + #main_grid tr:first-of-type { + display: none; + } + #main_grid tr:not(:first-of-type) { + display: block; + } + #main_grid td { + display: block; + } + + #main_grid .calendar_table .days { + margin-top: 0; + height: auto; + } + #main_grid .calendar_table .days:not(.disabled) { + min-height: 45px; + } + #main_grid .calendar_table .weeks a::before { + content: attr(title); + font-size: 0.65em; + margin: 0 0.5em; + vertical-align: top; + } + #main_grid .calendar_table .weeks { + margin-top: 0; + } + + #main_grid .calendar_week tr { + border: 1px solid #ddd !important; + } + #main_grid .calendar_week td { + margin: 0; + height: auto; + border: none !important; + } + #main_grid .calendar_week .event_col::before, + #main_grid .calendar_week .holiday_col::before, + #main_grid .calendar_week .birthday_col::before { + content: attr(data-css-prefix); + } + #main_grid .calendar_week .holiday_col:empty { + display: none; + } + #main_grid .calendar_week .birthday_col:empty { + display: none; + } + div.week_add_event { + display: inline-block; + } + div.week_add_event > a { + font-size: 1em; + text-decoration: underline; + } +} + +@media (max-width: 639px) { + .calendar_top { + padding: 12px 8px; + } + #calendar_range, + #calendar_navigation { + max-width: none; + } +} +@media (max-width: 539px) { + #calendar_range { + clear: both; + padding: 10px 0 0; + } +} +@media (max-width: 479px) { + #calendar_navigation { + clear: both; + padding: 10px 0 0; + } +} \ No newline at end of file diff --git a/css/calendar.rtl.css b/css/calendar.rtl.css new file mode 100644 index 0000000..2622398 --- /dev/null +++ b/css/calendar.rtl.css @@ -0,0 +1,23 @@ +/* Styles for the calendar section. +------------------------------------------------- */ +#main_grid .cat_bar { + margin: 0 0 0 2px; +} +#month_grid { + float: right; + margin: 0 0 0 1%; +} +#main_grid table.weeklist td.windowbg { + border-left: 2px solid #fff; + border-bottom: 2px solid #fff; +} +#main_grid img.calendar_icon { + float: right; + margin: 0 0 0 4px; +} +#main_grid table.weeklist td.weekdays { + text-align: left; + vertical-align: middle; + border-right: 2px solid #fff; + border-bottom: 2px solid #fff; +} \ No newline at end of file diff --git a/css/index.css b/css/index.css new file mode 100644 index 0000000..d7f9dce --- /dev/null +++ b/css/index.css @@ -0,0 +1,4905 @@ +/* You can find detailed information at https://wiki.simplemachines.org/smf/Curve2_CSS */ + +.test { + background : bisque ; + display : block ; +} + +/* Variables */ +html { + --bgcolor: #9890bd; + --dark-color: #2d1040; /* Pour les textes entre autre */ + --color1: #6359db; + --color2: #6639af; + --color3: #9073ff; + --color4: #483D8B; /* Liens */ + --color5: #a6006c; /* liens cassés et erreurs */ + --neutral-color: #ddd; /* Gris */ + --neutral-light-color: #ffffff; /* Blanc */ + --neutral-mid-color: #787392; /* Contraste OK sur blanc mais attire moins l'œil ; gris */ + --khanat-color: #100873; + --khaganat-color: #8530bf ; + --colortest: bisque ; +} + +/* Index */ + +html { + scroll-padding-top: 3rem; + height:100%; +} +body { + background: var(--bgcolor); + font-size: 100%; + font-family: "Luciole","Ubuntu","Cantarell","Segoe UI","Roboto","Oxygen","Fira Sans","Droid Sans","Helvetica Neue","Helvetica","Arial",sans-serif; + color: var(--dark-color); + position: relative; + height: 100%; + background: url("../images/curve2.png") repeat-y fixed left bottom,url("../images/curve.png") repeat-y fixed right bottom var(--bgcolor); + +} +::selection { + text-shadow: none; + background: #99d4ff; + color: rgba(0, 0, 0, 0.6); +} + +/* General reset */ +* { + box-sizing: border-box; + padding: 0; + margin: 0; +} +ul, ol { + list-style: none; +} +ul.normallist { + list-style-type: disc; + padding: 0 0 0 15px; +} +table { + empty-cells: show; +} +abbr { + border-bottom: 0.1em dotted; +} +input, select, textarea { + color: var(--dark-color); + font: 83.33%/150% ; + background: var(--neutral-light-color); + outline: none; + border: 1px solid #bbb; + vertical-align: middle; + border-radius: 3px; + box-shadow: 1px 2px 1px rgba(160, 187, 221, 0.2) inset; + padding: 0.3em 0.4em; +} +input:hover, textarea:hover, select:hover, button:hover, +input:focus, textarea:focus, select:focus, button:focus { + outline: none; + border-color: var(--color1); +} +textarea:hover { + background: #fbfbfb; +} + +input, button, select { + padding: 0 0.4em; + height: 2em; + line-height: 2em; +} +select { + padding: 0.22em 0.2em; /* selects don't apply line-height */ +} + +/* This is about links */ +a, a:visited, a:link { + color: var(--color4); + text-decoration: none; + border-bottom-style: dotted; + border-bottom-width: 1px; +} +/* Only for Accessibility */ +.link_access { + background-color: var(--neutral-light-color); +} +.link_access:not(:focus):not(:active) { + clip: rect(0 0 0 0); /* Old compatibility*/ + clip-path: inset(50%); + height: 1px; + overflow: hidden; + position: absolute; + white-space: nowrap; + width: 1px; + +} +.link_access:focus { + border-radius:5px; + padding:0.5em; + display: inline-block; +} + +/*a:hover { + text-decoration: underline; + cursor: pointer; +} + +a:link { + color: #483D8B; + text-decoration: underline dotted; +}*/ + +a:hover, +a:focus, +a:link:hover, +a:link:focus, +a:visited:hover, +a:visited:focus, +a:link:active, +a:visited:active { + /*text-decoration: underline;*/ + border-bottom-style: solid; + cursor: pointer; +} + +/* Selects with more than one line */ +select[size] { + height: auto; +} +input[type="file"] { + padding: 2px; + height: auto; +} +/* Remove default mozilla dotted borders */ +input[type="submit"]::-moz-focus-inner, button::-moz-focus-inner { + border: 0; +} +/* Prevent inputs and images overflowing */ +img, input, select, textarea { + max-width: 100%; +} + +/* Use a consistent monospace font everywhere */ +.monospace, .bbc_code, .phpcode, pre { + font-family: "DejaVu Sans Mono", Menlo, Monaco, Consolas, monospace; +} + +.sceditor-container textarea, .sceditor-container textarea:focus { + box-shadow: none; +} +#quick_edit_body_container textarea, +.move_topic textarea, +dd textarea { + width: 100%; + min-height: 100px; +} +/* Apply the font only to these elements */ +input, button, select { + font-size: 0.75rem; +} +/* Number inputs don't support size nor width, so add some common ones here and set a default... */ +input[type="number"] { + padding-right: 0; /* Removes weird white space after arrows in some browsers */ + width: calc(4ch + 15px + 0.8em); +} +input[type="number"][size="2"], input[type="number"][size="1"] { + width: calc(2ch + 15px + 0.8em); +} +input[type="number"][size="3"] { + width: calc(3ch + 15px + 0.8em); +} +input[type="number"][size="5"] { + width: calc(5ch + 15px + 0.8em); +} +input[type="number"][size="6"] { + width: calc(6ch + 15px + 0.8em); +} +select option { + padding: 0 4px; +} +/* Fieldsets are used to group elements */ +fieldset { + padding: 18px; + margin: 0 0 6px 0; + border: 1px solid var(--neutral-color); + border-radius: 3px; +} +fieldset legend { + font-weight: bold; + color: #555; + box-shadow: none; + border: none; +} +summary { + margin: 5px 0; +} + +/* Define strong as bold, and em as italics */ +/* Note: in some particular places, strong has been redefined as font-weight: 600; */ +/* This gives a better effect for those areas, and will default to bold for fonts which do not support numerical font-weight */ +strong, .strong { + font-weight: bold; + color: #444; +} +.cat_bar strong { + color: var(--neutral-light-color); +} +em, .em { + font-style: italic; +} +/* Default color on these tags */ +h1, h2, h3, h4, h5, h6 { + font-size: 1em; + color: #444; + font-weight: inherit; +} +/* All input elements that are checkboxes or radio buttons shouldn't have a border around them */ +input[type="checkbox"], input[type="radio"] { + border: none; + background: none; + vertical-align: middle; + box-shadow: none; + margin: 0 3px; +} +.moderationbuttons_mobile_check { + display: none; +} +/* Give disabled input elements a different style */ +input[disabled], textarea[disabled], select[disabled], .button.disabled, .button[disabled]:hover, .button[disabled]:focus { + background: #eee; + color: #999; + border-color: #b6b6b6; + opacity: 0.8; + cursor: default; +} +/* Standard horizontal rule.. ([hr], etc.) */ +hr { + border: none; + margin: 12px 0; + height: 2px; + background: var(--neutral-light-color); + box-shadow: 0 1px 0 #bbb inset; +} + +/* Help popups require a different styling of the body element. */ +/* Deprecated? */ +body#help_popup { + padding: 12px; +} + +#likes li { + clear: both; + padding: 1px 0; + display: flex; + align-items: center; +} +#likes .avatar { + height: 5em; + width: 5em; + margin: 0 10px 0 0; +} +#likes li .like_profile { + flex: 1 0 auto; +} +#likes li .like_time { + padding: 4px 0; +} +#likes .description { + font-style: italic; + opacity: 0.4; + font-size: 0.9em; + display: block; +} + +/* The "new" button */ +.new_posts, a.new_posts { + display: inline-block; + position: relative; + top: -2px; + padding: 0 4px; + background: var(--color4); + color: var(--neutral-light-color); + border-radius: 2px; + opacity: 0.8; + border-bottom: none; + margin-right: .3em; +} +a.new_posts:visited { + color: var(--neutral-light-color); +} +.new_posts:hover, .new_posts:focus { + text-decoration: none; + border-bottom: none; + opacity: 1; +} + +/* Common classes to easy styling. +------------------------------------------------------- */ +.floatright { + float: right; +} +.floatleft { + float: left; +} +.floatnone { + float: none; +} +.flow_auto { + overflow: auto; +} +.flow_hidden { + overflow: hidden; +} +.clear { + clear: both; +} +.clear_left { + clear: left; +} +.clear_right { + clear: right; +} + +/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */ +.smalltext, tr.smalltext th { + font-size: 0.9em; +} +.largetext { + font-size: 1.4em; +} +h2.largetext { + font-size: large; +} +.xlargetext { + font-size: x-large; +} +.centertext, .centercol { + margin: 0 auto; + text-align: center; +} +.righttext { + margin-left: auto; + margin-right: 0; + text-align: right; +} +.lefttext { + margin-left: 0; + margin-right: auto; + text-align: left; +} +.justifytext { + text-align: justify; +} +.double_height { + line-height: 2em; +} +/* some common padding styles */ +.padding { + padding: 8px; +} +.main_section, .lower_padding { + padding-bottom: 6px; +} +.half_content { + width: 50%; + display: inline-block; + vertical-align: top; +} +.half_content:nth-of-type(odd) { + margin-right: -0.25em; + padding-right: 0.3%; +} +.half_content:nth-of-type(even) { + margin-left: -0.2em; + padding-left: 0.3%; +} + +/* Blockquote stylings */ +blockquote { + margin: 0.6em 0; + padding: 6px 10px; + border: 1px solid #d6dfe2; + border-left: 2px solid #aaa; + border-right: 2px solid #aaa; +} +blockquote cite { + display: block; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + font-size: 0.9em; + margin-bottom: 3px; +} +blockquote cite::before { + color: #aaa; + font-size: 22px; + font-style: normal; + content: "\275D"; + margin-right: 3px; + vertical-align: middle; +} +.bbc_standard_quote { + background-color: #e0e6f6; +} +.bbc_alternate_quote { + background-color: #ebf4f8; +} + +/* A code block - maybe PHP ;). */ +.bbc_code { + display: block; + font-size: 0.78rem; + background: #f3f3f3; + border: 1px solid #dfdfdf; + border-top: 2px solid #bbb; + border-bottom: 3px solid #aaa; + border-radius: 2px; + margin: 1px 0 6px 0; + padding: 3px 12px; + overflow: auto; + white-space: nowrap; + max-height: 25em; +} +/* The "Quote:" and "Code:" header parts... */ +.codeheader, .quoteheader { + color: #666; + font-size: 0.9em; + padding: 0 2px; +} +/* For links to change the code stuff... */ +.codeoperation { + font-weight: normal; +} +/* Expand code bbc */ +.expand_code { + max-height: none; +} +/* Styling for BBC tags */ +.bbc_link { + border-bottom: 1px solid #a8b6cf; +} +.bbc_link:hover, .bbc_link:focus { + text-decoration: none; + border-bottom: none; + border-bottom: 1px solid #346; +} +.bbc_size { + line-height: 1.4em; +} +.bbc_color a { + color: inherit; +} +.bbc_table { + font: inherit; + color: inherit; +} +.bbc_table td { + font: inherit; + color: inherit; + vertical-align: top; +} +.bbc_list { + text-align: left; + padding: 0 0 0 35px; + list-style-type: inherit; +} +.bbc_float { + margin-bottom: 1em; + /* default max-width to use if none was specified in the BBC */ + max-width: 45%; +} +.bbc_float.floatleft { + margin-right: 1em; + clear: left; +} +.bbc_float.floatright { + margin-left: 1em; + clear: right; +} +.bbc_img { + object-fit: contain; +} +.postarea .bbc_img.resized:hover, .postarea .bbc_img.resized:focus { + cursor: pointer; +} +.bbc_img.original_size { + height: auto !important; + width: auto !important; + max-height: none; + max-width: 100%; +} +/* No image should have a border when linked. */ +a img { + border: 0; +} + +/* Those collapse and expand icons are wonderful. */ +.toggle_up::before, .toggle_down::before { + width: 17px; + height: 17px; + display: inline-block; + background: #f7f7f7 url(../images/icons/toggle.png) no-repeat 0 0 / 17px; + overflow: hidden; + content: ""; + vertical-align: middle; + margin: 0 5px 0 5px; + transition: background-color 0.25s; + clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); +} +.toggle_down::before { + background-position: 0 -17px; +} + +.toggle_up:hover:before, .toggle_down:hover:before, +.toggle_up:focus:before, .toggle_down:focus:before { + background-color: #bfd4e7; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) inset; + transition: background-color 0.25s; +} + +/* Generally, those [?] icons. This makes your cursor a help icon. */ +.help { + cursor: help; + opacity: 0.9; +} +.help:hover, .help:focus { + opacity: 1; +} + +/* Highlighted text - such as search results. */ +.highlight { + font-weight: bold; + color: var(--khaganat-color) !important; + font-size: 1.1em; + background-color: inherit; +} + +/* the page navigation area */ +.pagesection { + padding: 0 0.5em; + overflow: hidden; + clear: both; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + width: 100%; + align-items: center; + background: var(--neutral-light-color); +} +.khbb_head_subject { + flex-direction: column; + align-items: left !important; +} +.khbb_head_subject .display_title { + /*padding: 0.5em; + margin: 0 auto;*/ +} + +.pages::after, .jump_to::after, .code::after, +strong[id^='child_list_']::after { + content: ": "; +} +.pages { + font-size: 0.9em; + margin-left: 7px; +} +/*#main_content_section .pagesection { + margin: 4px 0 0 0; +}*/ +.pagelinks .button { + padding: 0 5px; +} + +.nav_page { + padding: 0 1px; +} +.expand_pages { + font-weight: bold; + cursor: pointer; +} +.current_page { + padding: 0 4px 0 2px; + font-weight: bold; +} +.current_page::before, .codeoperation::before { + content: "["; +} +.current_page::after, .codeoperation::after { + content: "]"; +} + +/* Posts and personal messages displayed throughout the forum. */ +.post { + overflow: auto; + line-height: 1.4em; + height: 100%; +} +.post .inner { + padding: 0.5em; +} + +#preview_body { + padding: 0.5em; +} +/* Post in special pages */ +#admin_content .windowbg, #admin_content .windowbg .quickbuttons_profile_showposts { + padding: 0 0em 1em 1em; +} + +/* Calendar colors for birthdays, events and holidays */ +.birthday { + color: var(--khaganat-color) ; +} + +.event { + color: #078907; +} + +.holiday > span { + color: #025dff; +} +/* Events that are currently selected on the calendar. Won't see it much, probably. */ +.sel_event { + font-weight: bold; +} + +.warn_moderate { + color: #ffa500; +} + +.warn_watch, .success { + color: green; +} + +a.moderation_link, a.moderation_link:visited { + font-weight: bold; + padding: 0px 8px; + background: #f59e00; +} +/* AJAX notification bar +------------------------------------------------------- */ +#ajax_in_progress { + background: var(--neutral-light-color); + border-bottom: 4px solid #f96f00; + color: #f96f00; + text-align: center; + font-size: 1.6em; + padding: 8px; + width: 100%; + line-height: 25px; + position: fixed; + top: 0; + left: 0; +} + +#ajax_in_progress a { + color: orange; + font-size: 0.9em; + float: right; + margin-right: 20px; +} + +/* Lists with settings use these a lot. +------------------------------------------------------- */ +dl.settings { + clear: right; + overflow: auto; + margin: 0 0 10px 0; + padding: 5px; +} +dl.settings dt { + width: 56%; + float: left; + margin: 0 0 10px 0; + clear: both; +} +dl.settings dt.windowbg { + width: 98%; + float: left; + margin: 0 0 3px 0; + padding: 0 0 5px 0; + clear: both; +} +dl.settings dd { + width: 42%; + float: right; + margin: 0 0 3px 0; +} +dl.settings img { + margin: 0 10px 0 0; + vertical-align: middle; +} + +/* a general table class */ +table.table_grid { + border-collapse: collapse; + margin: 0; + width: 100%; +} +table.table_grid td { + padding: 3px; +} +/* Some predefined widths (mostly for tables) */ +.table_grid.half_content, .half_table { + width: 50%; +} +.equal_table { + width: 33%; +} +.quarter_table { + width: 25%; +} +.small_table { + width: 10%; +} +.table_icon { + width: 5%; +} + +.title_bar th, .windowbg th { + padding: 4px 8px; + text-align: left; +} +.title_bar .sort_down, .title_bar .sort_up { + margin: -3px 0 0 2px; +} + +/* GenericList */ +.additional_row { + padding: 6px 0 6px 0; +} +.additional_row::after { + content: ""; + display: block; + clear: both; +} +img.sort, .sort { + margin-bottom: -4px; + margin-left: 4px; +} + +/* table_grid styles for Profile > Show Permissions. */ +#permissions table.table_grid td { + padding: 5px 10px; + cursor: default; +} + +.postbg { + border-left: 1px solid #7f7f7f; + border-right: 1px solid #7f7f7f; +} + +/* Styles used by the auto suggest control. +------------------------------------------------------- */ +.auto_suggest_div { + position: absolute; + visibility: hidden; + border-radius: 3px; + outline: none !important; + border: 1px solid #bbb; + z-index: 100; +} +.auto_suggest_item { + background: var(--neutral-color); + padding: 1px 4px; +} +.auto_suggest_item_hover { + background: #888; + cursor: pointer; + color: #eee; + padding: 1px 4px; +} + +/* Styles for the standard dropdown menus. +------------------------------------------------------- */ +.dropmenu, #top_info { + position: relative; +} + +.dropmenu > .subsections > a::before { + content:'☰'; + position: absolute; + transform: translate(-50%, -50%); + top: 50%; + padding-right: 1.3em; +} +/* Level 1 button background. */ +.dropmenu > li, #top_info > li { + display: inline-block; +} +/* Disable default focus outlines */ +.dropmenu a { + outline: 0; +} +/* For cases where we want to spotlight something specific to an item, e.g. an amount */ +.amt { + margin-left: 3px; + padding: 3px 6px 0px 6px; + color: var(--neutral-light-color); + background: var(--color1); + clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); + +} +.dropmenu li .active .amt, #top_info li .active .amt { + background: rgba(0, 0, 0, 0.2); + color: inherit; +} +#top_info .top_menu.visible { + display: block; +} +/* Needed for new PM notifications. */ +.dropmenu li strong { + color: #333; +} + +.dropmenu li a, #top_info > li > a { + display: block; + border-bottom: none; + padding-left: 1.3em; +} +/* Level 1 active button. */ +.dropmenu a.active, #top_info a.active { + font-weight: bold; + background: var(--color2) ; +} +/* Level 1 hover effects. */ +.dropmenu > li:hover > a, +.dropmenu > li:focus > a, +.dropmenu > li > a:focus, +#top_info > li:hover > a, +#top_info > li:focus > a, +#top_info > li > a:focus, +#top_info > li > a.open { + background: var(--khaganat-color); + cursor: pointer; + color: var(--neutral-light-color); + border: none; +} +/* Level 1 active button. */ +.dropmenu li a.active:hover, +.dropmenu li a.active:focus, +.dropmenu li:hover a.active, +.dropmenu li:focus a.active { + background: var(--khaganat-color); + font-weight: bold; +} + +a.mobile_user_menu, +a[class^="mobile_generic_menu_"] { + display: none; +} + + +#main_menu { + margin: 0 0 4px 0; +} + +/* User information. */ +#profileview { + padding: 1em; +} +#profile_menu_top::after { + content: " \25BC"; +} +.profile_user_info, .profile_user_avatar { + display: inline-block; + margin: 0 9px; + vertical-align: middle; +} +.profile_user_avatar img.avatar { + max-width: 100px; +} +.profile_username { + font-size: 150%; + display: block; +} +.profile_user_links ol { + margin-left: 10px; + clear: both; + column-count: 2; +} +.profile_user_links li { + font-size: .8rem; + line-height: 2em; + padding-left: 24px; + text-indent: -24px; + -webkit-hyphens: auto; + hyphens: auto; +} +/* Fixes bug with border-box on scrollable js */ +.scrollable, +.scrollable *, +#profile_menu { + box-sizing: content-box; +} +.top_menu.scrollable { + max-height: 30em; +} +.pm_unread, .alerts_unread { + margin-top: 5px; + border-top: 1px solid var(--neutral-color); +} +.unread_notify { + border-bottom: 1px solid var(--neutral-color); +} +.no_unread { + margin-top: 5px; + text-align: center; +} +.unread_notify:hover, +.unread_notify:focus { + background: #eee; + text-decoration: none; + border-bottom: none; +} +.unread_notify:last-child { + border-bottom: none; +} +.unread_notify { + display: flex; + align-items: center; + padding: 6px 5px; + line-height: 20px; +} +.unread_notify.alert_read { + opacity: 0.5; + outline: none; + filter: grayscale(1); +} +.unread_notify strong { + font-weight: 600; +} +.unread_notify .avatar { + width: 40px; + height: 40px; + object-fit: scale-down; + margin: 4px 4px 4px 0; + display: inline-block; + color: transparent; /* For broken images */ + vertical-align: bottom; +} +.unread_notify_image { + position: relative; + width: 44px; + margin-right: 4px; + text-align: center; +} +.unread_notify_image span.alert_icon { + display: block; + line-height: 1em; +} +.unread_notify_image .avatar + .alert_icon { + width: auto; + position: absolute; + right: 0; + top: 0; +} +.unread_notify .details { + display: inline-block; + vertical-align: top; + max-width: calc(100% - 48px); +} +#pm_menu .subject { + font-weight: bold; +} +/* Levels 2 and 3 submenu wrapper. */ +generic_menu .dropmenu .subsections ul li a { + background:bisque; +} +.dropmenu li ul, .top_menu { + z-index: 90; + position: absolute; + display: none; + min-width: 18.2em; + font-weight: normal; + background: var(--neutral-light-color); +} +.dropmenu li li:hover, +.dropmenu li li:focus, +.dropmenu li li:hover > a, +.dropmenu li li:focus > a, +.dropmenu li li a:focus, +.dropmenu li li a:hover, +.dropmenu li:hover li a:hover, +.dropmenu li:focus li a:focus { + background: var(--khaganat-color); + color: var(--neutral-light-color); +} + +/* Level 2 link background. */ +.dropmenu li li { + margin: 0; + padding: 0; + font-size: 1em; + position: relative; +} +/* fuck to work on focus */ +.dropmenu li li a { + padding: 0 9px; + border: none; + line-height: 2.2em; +} +/* Necessary to allow highlighting of 1st level while hovering over submenu. */ + +.dropmenu li:hover li a, +.dropmenu li:focus li a { + background: none; + color: var(--dark-color); +} + +.dropmenu li li a > img { + vertical-align: middle; +} +/* The profile/pm menus are declared off .dropmenu li ul for consistency but have other characteristics. */ +.top_menu { + min-width: 25em; +} +.top_menu .login { + width: 100%; +} +.top_menu .login dt { + text-align: left; + width: 55%; +} +.top_menu .login dd { + width: 43%; +} +.top_menu .login input { + width: 90%; +} +/* Note: The next declarations are for keyboard access with js disabled. */ +.dropmenu ul a:focus, .dropmenu ul ul a:focus { + margin-left: 9990px; + border: none; + width: 17em; +} +.dropmenu ul ul a:focus { + margin-left: 19950px; +} +/* Cancel those for hover and/or js access. */ +.dropmenu ul li:hover a:focus, .dropmenu ul li a:focus { + margin-left: 0; + width: auto; +} +/* Level 3 submenu wrapper positioning. */ +.dropmenu li ul ul { + margin: -3em 10em 10em 18em; +} +/* Level 3 maintains font-size the same as Level 2. */ +.dropmenu li li li a { + font-size: 1em; +} +/* Levels 2 and 3 hover effects. */ +.dropmenu li li:hover, +.dropmenu li li:focus { + border: none; +} + +/* Reposition Level 2 submenu as visible on hover. */ +.dropmenu ul { + display: block; + border: solid 1px var(--khaganat-color); + box-shadow: 0px 0px 5px 1px var(--neutral-light-color); + border-radius: 0 0.5em; +} +/* Hiding Level 3 submenu off hover. */ +.dropmenu li:hover ul ul, .dropmenu li ul ul, .dropmenu li:hover ul ul ul, .dropmenu li ul ul ul { + left: -9999px; +} +/* Reposition as visible on hover. */ +.dropmenu li li:hover ul, .dropmenu li li ul { + left: 0; +} +.dropmenu li li.subsections > a::after { + position: absolute; + padding: 5px 0; + right: 10px; + font: 83.33%/150% ; + content: "\25ba"; +} +/* Highlighting of current section */ +.dropmenu li li a.chosen { + font-weight: bold; +} + +/* The extra menu rows for admin sections, etc. */ +#adm_submenus { + margin: 0 0 6px 0; + overflow: hidden; +} + +/* Styles for the standard button lists. TODO +------------------------------------------------------- */ +.buttonlist, .buttonrow, .pagelinks { + z-index: 100; + padding: 5px 0 5px 0; +} +.sceditor-button { + border-bottom: none; +} + +.button, button { + display: inline-block; + color: var(--dark-color); + font-size: 0.7rem; + line-height: 2em; + text-transform: uppercase; + cursor: pointer; + min-height: calc(2em + 2em * (0.9 - 0.85)); /* "input" font size minus ".button" font size */ + border: 1px solid; + border-color: var(--bgcolor); + border-radius: 3px; + box-shadow: 1px 1px 1px rgba(221, 221, 221, 0.57) inset; + box-sizing: border-box; + vertical-align: middle; + background: var(--neutral-color); + outline: none; + padding: 0 0.4em; +} + +a.button, a.button:hover, .button:focus { + border-bottom: none; +} + +html[lang="el-GR"] .button, +html[lang="el-GR"] .quickbuttons > li > a, +html[lang="el-GR"] .inline_mod_check { + text-transform: capitalize; +} +.pagesection .button { + color: var(--color4); +} + +/* the active one */ +.button.active { + background: var(--khaganat-color); + color: var(--neutral-light-color); + font-weight: bold; + border-bottom: none; + +} +.button.active:hover, .button.active:focus { + background: var(--khaganat-color); + box-shadow: none; + border-bottom: none; +} +.cat_bar .button { + box-shadow: none; +} +/* In a .buttonrow, the buttons are joined together */ +.buttonrow { + margin: 0 5px; +} +.buttonrow .button { + display: table-cell; + border-radius: 0; +} +.buttonrow .button:first-child { + border-radius: 3px 0 0 3px; +} +.buttonrow .button:last-child { + border-radius: 0 3px 3px 0; +} +/* in a titlebg, the buttonlist is of small height */ +.titlebg .buttonlist { + margin: 0; + padding: 0; +} + +/* Styles for the general looks of the theme. +------------------------------------------------------- */ + +/* Box-shadow only on this one. */ +#wrapper { + clear: both; +} + +/* Set maximum width limit for content */ +#top_section .inner_wrap, #wrapper, #footer .inner_wrap, #footer { + max-width: 1200px; + margin: 0 auto; + width: 90%; +} + +/* The framing graphics */ +/* The top bar. */ +#top_section { + border-bottom: 1px solid #bbb; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16); + background: var(--neutral-light-color); + clear: both; +} +#top_section::after { + content: ""; + display: block; + clear: both; +} +#top_info { + padding: 5px 0; + line-height: 1.3em; + max-width: 100%; +} +#pm_menu, #alerts_menu, #profile_menu { + left: 0; + right: 0; + padding-right: 10px; +} +#profile_menu_top > img.avatar { + height: 18px; + width: 18px; + margin: 2px 5px 0 0; + float: left; +} +#pm_menu_top .main_icons, +#alerts_menu_top .main_icons { + display: none; +} +.notice { + font-weight: bold; +} + +#search_form { + padding: 5px 0; +} +#languages_form { + display: flex; +} +/* The logo and slogan. */ +#header { + background-color: rgba(255,255,255,0.5); + position: relative; + display: flex; + align-items: center; + flex-wrap: wrap; + justify-content: center; + flex-direction: column; + min-height: 8em; +} +#header::after { + content: ""; + display: block; + clear: both; +} +/* The main title. */ +h1.forumtitle { + font-size: 1.8em; + font-weight: normal; +} +h1.forumtitle a { + color: white; + text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); + border-bottom: none; + border-bottom-style: inherit !important; + /*display: flex; + justify-content: center; + * Pour slogan ? mais j'ai enlevé le code de la fonction.*/ +} +h1.forumtitle a:hover { + border-bottom: none; +} + +h1.forumtitle a img { + padding: .5em; + padding-bottom: 0; + max-height: 6em; + width: auto; + height: auto; +} + +/* Slogan */ +#siteslogan, img#smflogo { + padding-right: 2px; + font-size: 1.4em; +} +/* Tweak the SMF logo */ +img#smflogo { + margin: 16px 0 0 0; +} +/* Even guests need to be aligned */ +.welcome { + padding: 0 10px; + line-height: 2.5em; +} +/* +/* The user info, news, etc.*/ +#upper_section { + padding: 2px 2px 0 2px; +} +#inner_section { + padding: 12px 10px 2px 10px; + border-radius: 6px 6px 0 0; +} +#inner_section::after { + content: ""; + display: block; + clear: both; +} +/* The upper_section, float the two each way */ +#inner_wrap { + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1px solid #bbb; + margin-bottom: 12px; +} +.user { + padding: 0 4px 8px 4px; + font-size: 0.9em; + white-space: nowrap; +} +.user:only-child { + width: 100%; + display: flex; + justify-content: space-between; +} +.user time, +.user .unread_links, +.user .unread_links li { + display: inline-block; +} +.user:not(:last-child) time:not(:last-child)::after, +.user .unread_links li:not(:last-child)::after { + content: " • "; + margin: 0 1ch; +} +ul li.greeting { + font-weight: bold; +} + +time { + margin: 0.5em 1em 0 1em; + float: inline-start; +} +/* The login form. */ +#guest_form { + overflow: hidden; + font-size: 0.9em; + margin-left: -2px; +} +.login fieldset { + display: flex; + flex-direction: column; +} +.login fieldset label { + padding: .5em 0; + display: flex; + justify-content: end; +} +.login fieldset input, .login fieldset select { + width: 50%; + margin-left: 1em; +} +.login .khbb_register { +font-size: large; +} +/* News section on header */ +#header .news { + padding: 0 0.5em; + display: flex; + align-items: baseline; + max-width: 50%; + background-color: var(--neutral-light-color) ; + box-shadow: 0px 0px 5px 1px var(--neutral-light-color); + border-radius: 0 0.5em; +} + + .news p { + display: inline; +} + +/* News section on other place (like menu) */ +#inner_wrap .news { + padding: 0 0 8px 1ch; + font-size: 0.9em; + display: flex; + align-items: baseline; + max-width: 50%; +} +#inner_wrap .news h2 { + line-height: initial; +} +#inner_wrap .news h2, +#inner_wrap .news p { + display: inline; + padding-left: 1ch; +} + +/* The navigation list (i.e. linktree) + * Sur un poste, affiche en haut où on est (quel forum etc)*/ +.navigate_section { + width: 100%; + /* modif de https://www.simplemachines.org/community/index.php?topic=580159.0 */ + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin-bottom: .2em; +} +/* Hide title forum from linktree */ +.navigate_section li:first-child { + display: none; +} + +#main_content_section .navigate_section { + margin: 0px; + padding: 0; +} + +/*We don't want the p tag to have a margin*/ +.navigate_section p { + margin: 0; +} + +/*Flex it up */ +.navigate_section ul { + padding: 0px; + margin: 0px; +} + +.navigate_section ul li .dividers { + display: none; +} +/*Forming the arrows*/ +.navigate_section ul li { + background-color: var(--color1); + box-sizing: border-box; + display: inline-flex; + max-height: 2em; + padding: .5em 1em .5em 1.5em; + position: relative; + text-decoration: none; + border-bottom: none; + transition-timing-function: ease-in; + transition: 0.5s; + line-height: 1.1em; + float: none; +} + +.navigate_section ul li:before { + border-top: 1em solid transparent; + border-bottom: 1em solid transparent; + border-left: 1em solid var(--bgcolor); + content: ""; + position: absolute; + top: 0; + right: -1.25em; + z-index: 1; +} +.navigate_section ul li:after { + border-top: 1em solid transparent; + border-bottom: 1em solid transparent; + border-left: 1em solid var(--color1); + content: ""; + position: absolute; + top: 0; + right: -1em; + transition-timing-function: ease-in; + transition: 0.5s; + z-index: 1; +} + +/* Colors */ +.navigate_section strong { + color: var(--color1); +} +.navigate_section ul li a { + color: var(--neutral-light-color); +} +.navigate_section ul li:hover { + background-color: var(--color2); +} +.navigate_section ul li:hover:after { + border-left-color: var(--color2); +} +.navigate_section ul li:last-child { + background-color: var(--color2); +} + +.navigate_section ul li:last-child::after { + border-left-color: var(--color2); +} + + + +/* The content section */ +#content_section { + margin: 0 auto; + clear: both; + position:relative; +} +#main_content_section { + padding: 0px; + position: relative; +} +#main_content_section::after { + content: ""; + display: block; + clear: both; +} +/* The footer with copyright links etc. */ +.footer2 { + padding: 10px 0; + background: var(--color2); +} +#footer ul { + display: flex; + justify-content: space-between; +} +#footer li, #footer p, #footer a { + font-size: 0.9em; + color: var(--neutral-light-color); +} +#footer li.copyright { + display: block; + font-family: Verdana, sans-serif; /* Copyright must be Verdana! */ +} +#footerfix { + flex: 1 0 auto; +} + +/* The posting icons */ +#postbuttons_upper ul li a span { + line-height: 19px; + padding: 0 0 0 6px; +} +.mark_read { + margin: 3px 0; + display: flex; + align-items: center; + justify-content: end; +} +/* Stupid but I can't edit the class in html. This and the flex resolve probem with infocenter*/ +.mark_read > .floatright { + float: none; +} +.mark_read .buttonlist { + margin: 0; + padding: 0; +} + +/* the small stats */ +#index_common_stats { + margin: -4px 8px 6px 8px; + padding: 4px 0 0 0; + font-size: 0.9em; + border-top: 1px solid var(--neutral-color); +} + +.fix_rtl_names { + display: inline-block; +} + +/* The quick buttons */ + +.quickbuttons { + clear: right; + text-align: right; + display:flex; +} +.quickbuttons > li { +} + +.quickbuttons li:hover, .quickbuttons li a:hover, .quickbuttons li a:focus { + background: var(--khaganat-color); + color: var(--neutral-light-color); +} + +#recent .quickbuttons { + margin: 0; +} + +.quickbuttons > li > a, .quickbuttons > li > a:hover, .quickbuttons > li > a:focus { + border-bottom: none; +} +/* Citer tout un message, c'est mal. Citez avec discernement et effort ! Donc on supprime.*/ +.quickbuttons > li:first-child { + background-color: lime; + display: none; +} + +.quickbuttons > li > a, .inline_mod_check { + display: block; + height: auto; + padding: .3em .1em 0em .1em;; + color: var(--dark-color); + font-size: 0.7rem; + text-transform: uppercase; + cursor: pointer; + /* min-height: calc(2em + 2em * (0.9 - 0.85)); "input" font size minus ".button" font size */ + border: 1px solid; + border-color: var(--neutral-color) #bbb #aaa var(--neutral-color); + border-radius: 3px; + box-shadow: 1px 1px 1px rgba(221, 221, 221, 0.57) inset; + box-sizing: border-box; + vertical-align: middle; +} +.quickbuttons > li:first-child > a { + border-radius: 4px 0 0 4px; +} +.quickbuttons > li:last-child > a, .inline_mod_check:last-child { + border-radius: 0 4px 4px 0; +} +.quickbuttons > li:only-child > a, .inline_mod_check:only-child { + border-radius: 4px; + margin: 2px; + height: 23px; +} +.inline_mod_check input { + position: relative; + top: -1px; + height: auto; +} +.moderationbuttons_check:focus { + box-shadow: 0 0 4px #499dd8; +} +.quick_edit, .post_options { + position: relative; +} +/* Drop part of QuickButtons */ +.post_options ul { + display: none; + position: absolute; + top: 100%; + right: -1px; + z-index: 90; + padding: 6px; + background: var(--neutral-light-color); + font-weight: normal; + text-align: left; + border: solid 1px #999; + border-left: solid 1px #aaa; + border-top: solid 1px #bbb; + border-radius: 4px 0 4px 4px; + box-shadow: 2px 3px 3px rgba(0, 0, 0, 0.2); +} +.post_options:hover ul { + display: block; +} +.post_options ul a { + display: block; + width: 12em; + padding: 0 6px; + line-height: 2.2em; + /*text-decoration: none;*/ + border: 1px solid transparent; + border-radius: 3px; +} +.post_options ul a:hover, .post_options ul a:focus { + border-color: #c4cbd3; +} +/* Note: The next declarations are for keyboard access with js disabled. */ +.quickbuttons ul li a:focus { + margin: 0 -9910px 0 9910px; +} +/* Cancel for hover and/or js access. */ +.quickbuttons ul li:hover a:focus, .quickbuttons ul li a:focus { + margin: 0; +} +/* Fixes for quickbuttons + Fix for quote on reply box */ +#post_modify { + border-radius: 4px; +} + +/* The jump to box */ +#display_jump_to { + padding: 5px 0; + margin: 4px 0; + font-size: 1em; +} +#topic_icons #message_index_jump_to { + padding: 0; +} + +/* The category separator string is 29 dashes */ +#display_jump_to_select, +#message_index_jump_to_select, +#search_jump_to_select, +#quick_mod_jump_to_select { + width: 29ch; +} + +.quickModifyMargin { + margin: 10px 0 5px 0; + padding-bottom: 5px; +} + +/* Styles for edit event section +---------------------------------------------------- */ +#post_event .roundframe { + padding: 12px 12%; + overflow: auto; +} +#post_event fieldset { + padding: 6px; + clear: both; +} +#post_event span.label { + margin: 0 0.5em 0 2px; + min-width: 60px; + display: inline-block; +} + +.event_options { + line-height: 25px; + display: flex; + flex-flow: row wrap; +} +.event_options div { + min-height: 25px; + margin-bottom: 5px; + flex: 1 0 auto; +} +.event_options_left { + box-sizing: border-box; + width: 55%; + min-width: 238px; +} +.event_options_right { + box-sizing: border-box; + width: 45%; + min-width: 270px; +} +.event_options_left div, +.event_options_right div { + white-space: nowrap; +} + +#post_event #event_main input { + margin: 0; +} +#event_time_input { + clear: left; +} +#event_time_input > div { + display: flex; +} +#event_time_input input.date_input { + width: 40%; + margin: 2px 0.5ch 0; + flex: 1 1 auto; +} +#event_time_input input.time_input { + width: 13ch; + margin: 2px 0.5ch 0; + flex: 0 1 auto; +} +#post_event input[type="checkbox"] { + height: auto; +} +#post_event input[type="text"][disabled] { + color: transparent; +} +#post_event select, #event_options input[type="text"], #tz { + max-width: calc(100% - 75px); +} +#post_event select, #evtitle, #event_location { + width: calc(100% - 75px); +} +#post_event input[type="checkbox"] + select { + max-width: calc(100% - 95px); +} + +/* Styles for the recent messages section. +---------------------------------------------------- */ + +#readbuttons_top .pagelinks, #readbuttons .pagelinks { + padding-bottom: 12px; + width: 60%; +} +#readbuttons .pagelinks { + padding-top: 12px; +} +#recent { + clear: both; +} +/* test sur la prévisualisation des messages, attention aux effets de bords */ +#recent .windowbg { + padding: 0.5em; + margin-top: 0.2em; + border-radius: 3px; + display: flex; + flex-direction: column; +} +.recent_title { + display: flex; + flex-direction: row; + align-items: baseline; + justify-content: space-between; + padding: 0.5em 1em 0 0; +} +#unread .recent_title { + justify-content: flex-start; +} + +#recent .windowbg div { + /*width: 100%;*/ +} +#recent .windowbg .topic_details { + +} +/* Styles for the move topic section. */ +.move_topic { + width: 710px; + margin: auto; + text-align: left; +} +div.move_topic fieldset { + margin-top: 1ex; + padding: 6px; +} +/* Styles for the report topic/user section. */ +#report_form dl.settings dt { + width: 20%; +} +#report_form dl.settings dd { + width: 79%; +} +#report_comment { + width: 70%; +} +/* Styles for the split topic section. */ +div#selected, div#not_selected { + width: 49%; +} +ul.split_messages li a.split_icon { + padding: 0 6px; + opacity: 0.8; +} +ul.split_messages li a.split_icon:hover { + opacity: 1; +} +.split_messages, .message_header { + margin-bottom: 8px; +} +/* Styles for the merge topic section. */ +ul.merge_topics li { + list-style-type: none; +} +dl.merge_topic dt { + width: 25%; +} +dl.merge_topic dd { + width: 74%; +} +fieldset.merge_options { + clear: both; +} +.custom_subject { + margin: 6px 0; +} + +/* Styles for the login areas. +------------------------------------------------------- */ +.login { + width: 540px; + max-width: 100%; + margin: 0 auto; +} +.popup_content .login { + width: 100%; +} +.login dl { + overflow: auto; + clear: right; +} +.login dt, .login dd { + margin: 0 0 5px 0; + width: 44%; + padding: 1px; +} +.login dt { + float: left; + clear: both; + text-align: right; + font-weight: bold; +} +.login dd { + width: 54%; + float: right; + text-align: left; +} +.login p { + text-align: center; +} + +.login input[type="submit"] { + margin: 1em 0 0 1em; +} +.login p:not(:last-of-type) input[type="submit"] { + margin-bottom: 1em; +} + +/* Additional register fields */ +#registration fieldset { + border: none; + padding: 0; + margin: 0; +} +#registration .roundframe { + border-top: none; + padding: 1em; +} +dl.register_form { + margin: 0; + clear: right; +} +dl.register_form dt { + font-weight: normal; + float: left; + clear: both; + width: 50%; + margin: 6px 0 0 0; +} +dl.register_form dt span { + display: block; +} +dl.register_form dd { + float: left; + width: 49%; + margin: 6px 0 0 0; +} +#confirm_buttons { + text-align: center; + padding: 12px 0; +} +.coppa_contact { + padding: 4px; + width: 32ex; + background: var(--neutral-light-color); + color: #222; + margin-left: 5ex; + border: 1px solid #222; +} +.valid_input { + background: #f5fff0; +} +.invalid_input { + background: var(--neutral-light-color)0f0; +} + +/* Styles for maintenance mode. +------------------------------------------------------- */ +#maintenance_mode img.floatleft { + margin-right: 12px; +} + +/* Custom profile fields like to play with us some times. */ +#admin_content .custom_field { + margin-bottom: 15px; +} +#admin_login .centertext { + padding: 12px; +} +#admin_login .centertext .error { + padding: 0 0 12px 0; +} +#admin_login .centertext a.help img, .custom_field a img { + vertical-align: middle; +} + +tr.windowbg td, tr.bg td, .table_grid tr td { + padding: 4px 8px; + text-align: left; +} +#credits p { + font-style: italic; +} + +.errorfile_table { + background: var(--neutral-light-color); + border-collapse: collapse; +} +.errorfile_table .file_line { + text-align: right; + padding-right: 6px; +} +.errorfile_table td.current { + font-weight: bold; + border-top: 1px solid rgba(0, 0, 0, 0.2); + border-bottom: 1px solid rgba(0, 0, 0, 0.2); + border-width: 1px 0 1px 1px; + background: rgba(245, 141, 15, 0.2); +} + +.generic_menu { + +} +.generic_menu > ul > li > a { + background-color: var(--color3); + color: var(--neutral-light-color); + display: block; + padding: 1em 0.8em 1em 1.5em; +} + + +/* Some lovely generic icons. +------------------------------------------------- */ +.main_icons::before { + content: ""; + width: 16px; + height: 16px; + display: inline-block; + background: url(../images/icons/main_icons_sprite.png) no-repeat -5px -5px / 260px auto; + vertical-align: middle; +} +.main_icons.alerts::before { + background: url(../images/icons/alerts.png); + background-size: 16px; +} +.main_icons.profile::before { + background: url(../images/icons/profile.png); + background-size: 16px; +} + +/* Small fix for topics */ +.quickbuttons .main_icons::before, .button .main_icons::before { + margin: -3px 3px 0 1px; +} + +.main_icons.gender_None::before { + background: none; +} + +.main_icons.gender_0::before { + display: none; +} + +/* This is a small fix for dropmenu icons */ +.dropmenu .main_icons::before, #profile_menu .main_icons::before, .dropmenu img { + /*margin: -3px 8px 0 0;*/ + vertical-align: middle; +} + +/* Top row */ +.main_icons.help::before { + background-position: -5px -5px; +} +.main_icons.search::before, .main_icons.engines::before { + background-position: -31px -5px; +} +.main_icons.quick_edit_button::before, .main_icons.modify_button::before { + background-position: -57px -5px; +} +.main_icons.check::before { + background-position: -83px -5px; +} +.main_icons.invalid::before { + background-position: -109px -5px; +} +.main_icons.gender_2::before { + background-position: -135px -5px; +} +.main_icons.watch::before { + background-position: -239px -5px; +} +/* 2nd row */ +.main_icons.move::before, .main_icons.next_page::before { + background-position: -5px -31px; +} +.main_icons.general::before, .main_icons.boards::before, .main_icons.topics_views::before { + background-position: -31px -31px; +} +.main_icons.gender_1::before { + background-position: -57px -31px; +} +.main_icons.features::before { + background-position: -83px -31px; +} +.main_icons.posters::before { + background-position: -109px -31px; +} +.main_icons.replies::before, .main_icons.topics_replies::before { + background-position: -135px -31px; +} +.main_icons.history::before, .main_icons.time_online::before, .main_icons.scheduled::before { + background-position: -161px -31px; +} +.main_icons.views::before { + background-position: -187px -31px; +} +.main_icons.last_post::before { + background-position: -213px -31px; +} +.main_icons.starters::before, .main_icons.people::before, .main_icons.membergroups::before, .main_icons.mlist::before { + background-position: -239px -31px; +} +/* 3rd Street Saints */ +.main_icons.poll::before { + background-position: -5px -57px; +} +.main_icons.previous_page::before { + background-position: -31px -57px; +} +.main_icons.inbox::before { + background-position: -57px -57px; +} +.main_icons.www::before { + background-position: -83px -57px; +} +.main_icons.exit::before, .main_icons.logout::before { + background-position: -109px -57px; +} +.main_icons.switch::before { + background-position: -135px -57px; +} +.main_icons.replied::before, .main_icons.send::before { + background-position: -161px -57px; +} +.main_icons.im_on::before { + background-position: -187px -57px; +} +.main_icons.im_off::before { + background-position: -213px -57px; +} +.main_icons.split_desel::before { + background-position: -239px -57px; +} +/* 4th Row */ +.main_icons.split_sel::before { + background-position: -5px -83px; +} +.main_icons.mail::before { + background-position: -31px -83px; +} +.main_icons.warning_mute::before { + background-position: -57px -83px; +} +.main_icons.warn_button::before, +.main_icons.warning_moderate::before { + background-position: -83px -83px; +} +.main_icons.mail_new::before { + background-position: -109px -83px; +} +.main_icons.drafts::before, +.main_icons.reply_button::before, +.main_icons.reply_all_button::before { + background-position: -135px -83px; +} +.main_icons.warning_watch::before { + background-position: -161px -83px; +} +.main_icons.calendar_export::before { + background-position: -187px -83px; +} +.main_icons.calendar::before { + background-position: -213px -83px; +} +.main_icons.calendar_modify::before { + background-position: -239px -83px; +} +/* 5th Row */ +.main_icons.plus::before { + background-position: -5px -109px; +} +.main_icons.warning::before, .main_icons.moderate::before { + background-position: -31px -109px; +} +.main_icons.themes::before { + background-position: -57px -109px; +} +.main_icons.support::before { + background-position: -83px -109px; +} +.main_icons.liked_users::before, .main_icons.liked_messages::before, .main_icons.like::before { + background-position: -109px -109px; +} +.main_icons.unlike::before { + background-position: -135px -109px; +} +.main_icons.current_theme::before { + background-position: -161px -109px; +} +.main_icons.stats::before { + background-position: -187px -109px; +} +.main_icons.right_arrow::before { + background-position: -213px -109px; +} +.main_icons.left_arrow::before { + background-position: -239px -109px; +} +/* 6th Row */ +.main_icons.smiley::before { + background-position: -5px -135px; +} +.main_icons.server::before { + background-position: -31px -135px; +} +.main_icons.ban::before, .main_icons.ignore::before { + background-position: -57px -135px; +} + +.main_icons.boards::before { + background-position: -83px -135px; +} +.main_icons.regcenter::before { + background-position: -109px -135px; +} +.main_icons.posts::before { + background-position: -135px -135px; +} +.main_icons.sort_down::before { + background: none; + content: "⮃"; +} +.main_icons.change_menu2::before, .main_icons.sent::before { + background-position: -187px -135px; +} +.main_icons.post_moderation_moderate::before { + background-position: -213px -135px; +} +.main_icons.sort_up::before { + background-position: -239px -135px; +} +/* 7th Row */ +.main_icons.post_moderation_deny::before { + background-position: -5px -161px; +} +.main_icons.post_moderation_attach::before { + background-position: -31px -161px; +} +.main_icons.post_moderation_allow::before { + background-position: -57px -161px; +} +.main_icons.personal_message::before { + background-position: -83px -161px; +} +.main_icons.permissions::before, .main_icons.login::before { + background-position: -109px -161px; +} +.main_icons.paid::before { + background-position: -135px -161px; +} +.main_icons.packages::before { + background-position: -161px -161px; +} +.main_icons.filter::before { + background-position: -187px -161px; + margin: 0 5px 0 0; +} +.main_icons.change_menu::before { + background-position: -213px -161px; +} +.main_icons.package_ops::before { + background-position: -239px -161px; +} +/* 8th Row */ +.main_icons.reports::before { + background-position: -5px -187px; +} +.main_icons.news::before { + background-position: -31px -187px; +} +.main_icons.delete::before, .main_icons.hide_popup::before, .main_icons.prune::before, .main_icons.remove_button::before { + background-position: -57px -187px; +} +.main_icons.modifications::before { + background-position: -83px -187px; +} +.main_icons.maintain::before, .main_icons.admin::before { + background-position: -109px -187px; +} +.main_icons.administration::before, .main_icons.home::before { + background-position: -135px -187px; +} +.main_icons.frenemy::before { + background-position: -161px -187px; +} +.main_icons.attachment::before { + background-position: -187px -187px; +} +.main_icons.lock::before, .main_icons.security::before { + background-position: -213px -187px; +} +.main_icons.error::before, .main_icons.disable::before { + background-position: -239px -187px; +} +/* 9th Row */ +.main_icons.languages::before, +.main_icons.recent_posts::before { + background-position: -5px -213px; +} +.main_icons.members_request::before { + background-position: -31px -213px; +} +.main_icons.members_delete::before { + background-position: -57px -213px; +} +.main_icons.members::before { + background-position: -83px -213px; +} +.main_icons.members_watched::before { + background-position: -109px -213px; +} +.main_icons.sticky::before { + background-position: -135px -213px; +} +.main_icons.corefeatures::before, .main_icons.settings::before, .main_icons.manrules::before, .main_icons.manlabels::before { + background-position: -161px -213px; +} +.main_icons.calendar::before { + background-position: -187px -213px; +} +.main_icons.logs::before { + background-position: -213px -213px; +} +.main_icons.valid::before { + background-position: -239px -213px; +} +/* 10th Row */ +.main_icons.approve::before, .main_icons.enable::before, +.main_icons.approve_button::before, +.main_icons.read_button::before { + background-position: -5px -239px; +} +.main_icons.close::before { + background-position: -31px -239px; +} +.main_icons.details::before { + background-position: -57px -239px; +} +.main_icons.merge::before { + background-position: -83px -239px; +} +.main_icons.folder::before { + background-position: -109px -239px; +} +.main_icons.restore_button::before { + background-position: -135px -239px; +} +.main_icons.split_button::before { + background-position: -161px -239px; +} +.main_icons.unapprove_button::before, +.main_icons.unread_button::before { + background-position: -187px -239px; +} +.main_icons.quote::before, .main_icons.quote_selected::before { + background-position: -213px -239px; +} +.main_icons.notify_button::before { + background-position: -239px -239px; +} + +.main_icons.select_above::before { + background-position: -161px -5px; +} +.main_icons.select_here::before { + background-position: -187px -5px; +} +.main_icons.select_below::before { + background-position: -213px -5px; +} +/* Styles for (fatal) errors. +------------------------------------------------- */ + +#fatal_error { + width: 80%; + margin: 0 auto 10px auto; +} +.errorbox::before, .noticebox::before, .infobox::before { + width: 16px; + height: 16px; + background: url(../images/icons/main_icons_sprite.png) no-repeat -57px -83px; + left: 10px; + content: ""; + position: absolute; + top: 50%; + margin-top: -8px; +} +.errorbox, .noticebox, .infobox { + padding: 7px 10px 7px 35px; + margin-bottom: 12px; + position: relative; +} +.errorbox { + background-color: #fee; + border-top: 2px solid #c34; + border-bottom: 2px solid #c34; +} +.errorbox h2 { + padding: 0; + margin: 0; + font-size: 1.1em; + text-decoration: underline; +} +.errorbox p { + margin: 12px 0 0 0; +} +.errorbox p.alert { + padding: 0; + margin: 0 4px 0 0; + float: left; + width: 12px; + font-size: 1.5em; +} +.errorbox span { + text-decoration: underline; +} + +/* Styles for info boxes +------------------------------------------------- */ + +.noticebox::before { + background-position: -83px -83px; +} +.infobox::before { + background-position: -161px -83px; +} +.noticebox { + color: #666; + background: var(--neutral-light-color)6ca; + border-top: 1px solid #ffd324; + border-bottom: 1px solid #ffd324; +} +.infobox { + color: #222; + background: #cfc; + border-top: 1px solid green; + border-bottom: 1px solid green; +} +.descbox { + padding: 7px 10px 7px 10px; + border: 1px solid #c5c5c5; + margin: 6px 0; +} + +/* Styles for stats bars and progress bars. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.generic_bar, .progress_bar { + border: 1px solid #cecaca; + background: var(--neutral-light-color); + min-height: 16px; + line-height: 1.4em; + border-radius: 2px; + position: relative; + overflow: hidden; + color: rgba(0, 0, 0, 0.6); +} +.generic_bar span, .progress_bar span { + position: relative; + z-index: 2; + text-shadow: 1px 1px rgba(255, 255, 255, .4); + display: inline-block; + padding: 0 5px; +} +.generic_bar .bar, .progress_bar .bar { + position: absolute; + z-index: 1; + top: 0; + left: 0; + bottom: 0; + background: orange; + transition: width .3s; + border-radius: 1px; + box-shadow: 4px -4px 8px rgba(0, 0, 0, 0.1) inset, + 4px 4px 8px rgba(255,255,255,0.3) inset; + display: block; +} +.generic_bar.vertical { + width: 15px; +} +.generic_bar.vertical .bar { + right: 0; + top: auto; + box-shadow: 4px -4px 4px rgba(0, 0, 0, 0.1) inset, + 4px 4px 4px rgba(255,255,255,0.3) inset; +} + +.progress_bar { + border-radius: 4px; + text-align: center; + font-weight: bold; + color: rgba(0, 0, 0, 0.8); +} +.progress_bar .bar { + box-shadow: -1px 1px 0 rgba(255, 255, 255, 0.25) inset, + 1px -1px 0 rgba(0,0,0,0.1) inset; + background-color: #75da41; + background-size: 30px 30px; + background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress_yellow .bar { + background-color: #f6c51c; +} + +.progress_green .bar { + background-color: #75da41; +} + +.progress_red .bar { + background-color: #f45d4c; +} + +.progress_blue .bar { + background-color: #34c2e3; +} + +/* Styles for the profile section. +------------------------------------------------- */ + +dl { + overflow: auto; +} + +/* The basic user info on the left */ +#basicinfo { + width: 20%; + float: left; +} +#detailedinfo { + width: 79.5%; + float: right; +} +#basicinfo > * { + margin-bottom: 3px; +} +#basicinfo h4 { + font-size: 1.4em; + font-weight: normal; + -webkit-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + word-wrap: break-word; /* IE fallback */ + overflow-wrap: break-word; +} +#basicinfo h4 span.position { + font-size: 0.8em; + display: block; +} +#basicinfo img.avatar, dl.settings img.avatar { + display: block; + max-width: 160px; + height: auto !important; +} +#basicinfo ul { + list-style-type: none; +} +#basicinfo .icon_fields li { + display: block; + float: left; + margin-right: 5px; + height: 20px; +} +#basicinfo #userstatus { + display: block; + clear: both; +} +#basicinfo #userstatus img { + vertical-align: middle; +} +#detailedinfo dl, #tracking dl { + clear: right; + overflow: auto; + margin: 0 0 18px 0; + padding: 0 0 15px 0; + border-bottom: 1px #ccc solid; +} +#detailedinfo dt, #tracking dt { + width: 35%; + margin: 0 0 3px 0; + font-weight: bold; + color: #444; +} +#detailedinfo dd, #tracking dd { + width: 65%; + float: left; + margin: 0 0 3px 0; +} +#detailedinfo .noborder { + border-bottom: 0; +} +#detailedinfo dt.clear { + width: 100%; +} +#personal_picture { + display: block; + margin-bottom: 4px; +} +#avatar_server_stored div { + float: left; +} +#avatar_upload { + overflow: auto; +} +#smileypr { + margin-left: 10px; +} +.edit_avatar_img { + margin: 0 0 1em; +} + +/* Activity by time */ +#activitytime { + margin: 6px 0; +} +.activity_stats { + margin: 10px 0; +} +.activity_stats li { + width: 4.16%; + float: left; + text-align: center; +} +.activity_stats li span { + display: block; + border: 1px solid #666; + border-left: none; + border-right: none; + background: #eee; +} +.activity_stats li.last span { + border-right: none; +} +.activity_stats li .generic_bar { + height: 100px; + border-bottom: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + margin: 0 auto; +} +.activity_stats li .generic_bar span { + position: absolute; + top: -1000em; + left: -1000em; +} + +.profile_pie { + background: url(../images/stats_pie.png); + background-size: auto 20px; + float: left; + height: 20px; + width: 20px; + margin: 0 12px 0 0; + text-indent: -1000em; +} + +/* View posts */ +.topic .time { + float: right; +} +.counter { + padding: 5px 6px 1px 2px; + font-size: 2.2em; + font-weight: bold; + color: #3f3f3f; + float: left; +} +.topic_details { + padding: 0 4px 4px 4px; + display: flex; +} +.counter + .topic_details { + margin-left: 25px; +} +.list_posts { + padding: 1em 2em; + -webkit-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + overflow-wrap: break-word; +} + +#recent .list_posts { + border: 1px solid var(--neutral-color); + border-radius: 5px; +} + +.topic h4 { + margin: 3px 0; +} +.topic .post { + margin: 0 12px; + min-height: 80px; + height: auto !important; + height: 80px; +} +.topic .mod_icons { + text-align: right; + margin-right: 12px; +} + +#creator dt { + width: 40%; +} +#creator dd { + width: 55%; + margin: 0 0 10px 2px; +} +.centericon { + vertical-align: middle; +} +.sizefix { + width: 16px; + height: 16px; +} + +.boardslist > ul > li { + margin: 12px; +} +.boardslist > ul > li > ul { + columns: 2 250px; +} +.boardslist > ul > li > ul > li { + break-inside: avoid; + display: inline-block; + vertical-align: top; + width: 100%; +} +.boardslist a { + font-weight: bold; + border-bottom: 1px solid #c4c4c4; + display: block; + margin-bottom: 0.5em; +} +.boardslist a:hover { + text-decoration: none; + border-bottom: 1px solid #334466; +} +.boardslist label { + display: inline-block; + text-indent: -3ch; + margin: 0 3ch; +} + +#theme_settings { + overflow: auto; + margin: 0; + padding: 0; +} + +#theme_settings li { + margin: 10px 0; + padding: 0; +} +/* Paid Subscriptions */ +#paid_subscription { + width: 100%; +} +#paid_subscription dl.settings { + margin-bottom: 0; +} +#paid_subscription dl.settings dd, #paid_subscription dl.settings dt { + margin-bottom: 4px; +} +/* Pick theme */ +#pick_theme { + width: 100%; + float: left; +} +#pick_theme .selected { + background: #cddbe6; +} + +/* Signature preview */ + +#preview_signature, #preview_signature_display { + width: 100%; + overflow: hidden; +} + +/* Issue a warning */ +#warn_body { + width: 100%; + font-size: 0.9em; +} +#warn_temp { + font-size: smaller; +} + +/* Warning level bar */ +.warning_level { + text-align: center; + font-weight: bold; + max-width: 250px; +} +.warning_level.none .bar { + background-color: #75da41; +} +.warning_level.watched .bar { + background-color: #ffd800; +} +.warning_level.moderated .bar { + background-color: orange; +} +.warning_level.muted .bar { + background-color: #f45d4c; +} + +/* Styles for the statistics center. +------------------------------------------------- */ +#statistics .roundframe { + margin: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +dl.stats dt { + width: 50%; + float: left; + margin: 0 0 4px 0; + line-height: 1.5em; + clear: both; + font-size: 1em; + overflow: hidden; + word-wrap: break-word; /* IE fallback */ + overflow-wrap: break-word; +} +dl.stats dd { + width: 48%; + font-size: 1em; + float: left; + margin: 0 0 4px 2%; +} +dl.stats { + padding: 5px; +} + +/* Forum history table. */ +#stats td, #stats th { + width: 15%; + padding: 4px; + text-align: center; +} +#stats tr.windowbg th.lefttext { + text-align: left; +} +#stats tr.windowbg th.stats_month { + width: 25%; + padding: 0 2em; + text-align: left; +} +#stats tr.windowbg td.stats_day { + padding: 0 3.5em; + text-align: left; +} + +/* Styles for the personal messages section. +------------------------------------------------- */ + +#personal_messages h2 span#author, #personal_messages h2 span#topic_title { + float: left; +} +#personal_messages h2 span#author { + margin: 0 0 0 6px; +} +#personal_messages h2 span#topic_title { + margin: 0 0 0 9em; +} +#personal_messages div.labels { + padding: 0 12px 0 0; +} +#personal_messages .capacity_bar { + background: var(--neutral-light-color); + display: block; + margin: 6px 0 0 12px; + height: 12px; + border: 1px solid #adadad; + width: 10em; +} +#personal_messages .capacity_bar span { + border-right: 1px solid #adadad; + display: block; + height: 12px; +} +#personal_messages .capacity_bar span.empty { + background: #a6d69d; +} +#personal_messages .capacity_bar span.filled { + background: #eea800; +} +#personal_messages .capacity_bar span.full { + background: #f10909; +} +#personal_messages .reportlinks { + padding: 6px 1.3em; +} +#personal_messages .pm_inline_time { + display: none; +} +#search_labels li { + padding: 4px 6px; +} +#manrules div.righttext { + padding: 4px 1px; +} +dl.addrules dt.floatleft { + width: 15em; + color: #333; + padding: 0 15px 6px 15px; +} +#addrule fieldset { + clear: both; +} +#to_item_list_container div, #bcc_item_list_container div { + float: left; + margin-right: 10px; +} +.unread_pm { + background: #cfc; +} +/* Styles for the show alerts section. +------------------------------------------------- */ +#alerts .windowbg { + display: flex; + align-items: baseline; + justify-content: space-between; + padding-top: 1em; +} +#alerts .alert_inline_time { + display: none; +} +.alert_time time { + margin:0; + float: inherit; +} +#alerts .quickbuttons { + display: flex; + margin: 4px 0; +} +#alerts .quickbuttons li, #alerts .alert_time { + white-space: nowrap; +} +#alerts .alert_image { + width: 65px; + padding: 6px 0; + text-align: center; + vertical-align: middle; +} +#alerts .alert_image > div { + position: relative; +} +#alerts .alert_image .avatar { + max-width: 80%; + max-height: 80%; + margin-top: 4px; + vertical-align: bottom; +} +#alerts .alert_image span.alert_icon { + display: block; + width: 100%; + line-height: 1em; +} +#alerts .alert_image .avatar + .alert_icon { + width: auto; + position: absolute; + right: 0; + top: 0; +} + +/* Styles for the memberlist section. +------------------------------------------------- */ +#mlist_search { + margin: auto; + max-width: 500px; +} +#mlist .selected { + white-space: nowrap; +} +#mlist .is_online { + width: 60px; +} +#mlist .email_address { + width: 25px; +} +#mlist .website_url { + width: 70px; +} +#mlist .icq, #mlist .skype { + width: 30px; +} +#mlist .post_count { + width: 115px; +} + +/* Styles for the search section. +------------------------------------------------- */ +#searchform fieldset { + text-align: left; + padding: 0; + border: none; +} + +.searchfielset { + padding: 0; +} +#searchform .roundframe { + border-radius: 0; + margin: 0; + padding: 32px; + display: flex; + justify-content: center; +} +#searchform .alt { + border-top: 0; + border-bottom-left-radius: 7px; + border-bottom-right-radius: 7px; +} +#searchform p.clear { + clear: both; +} +#advanced_search { + text-align: center !important; +} +#advanced_search dl#search_options { + margin: 0 auto; + width: 600px; + padding-top: 12px; + overflow: hidden; +} +#advanced_search dt { + padding: 2px; + text-align: right; + width: 20%; +} +#advanced_search dd { + width: 75%; + float: left; + padding: 2px; + margin: 0 0 0 6px; + text-align: left; +} +#search_results { + margin-bottom: 5px; +} + +/* Styles for the help section. +------------------------------------------------- */ + +#help_container { + padding: 0 0 8px 0; +} +#helpmain { + margin: 12px 0 0 0; + padding: 8px 20px 12px 20px; + border: 1px solid var(--neutral-color); + box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.1); + overflow: auto; +} +#helpmain p { + margin: 10px 0; + line-height: 1.5em; +} +#helpmain ul { + line-height: 2em; + margin: 0 0 0 25px; +} +#helpmain ul li { + list-style-type: disc; +} +#helpmain ul li a { + font-weight: bold; +} + +/* Styles for the tooltips +------------------------------------------------------- */ +.tooltip { + position: absolute; + z-index: 999; + left: -9999px; + word-wrap: break-word; /* IE fallback */ + overflow-wrap: break-word; + max-width: 350px; + padding: 6px 9px; + color: #333; + background: var(--neutral-light-color); + border: 1px solid #aaa; + border-radius: 4px; + box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2), 0 0px 10px rgba(0, 0, 0, 0.05) inset; +} + +/* Styles for popup windows */ +.popup_container { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(40, 64, 80, 0.5); + z-index: 6; +} +#genericmenu > .popup_container { + z-index: 5; +} +#adm_submenus > .popup_container { + z-index: 4; +} +.popup_window, +#main_menu .popup_window, +#genericmenu .popup_window, +#adm_submenus .popup_window { + position: relative; + width: auto; + z-index: 99; + margin: 0 auto; + padding: 0; +} +.popup_window { + top: 15%; + width: 480px; + padding: 0 6px 6px 6px; +} +.popup_heading { + padding: 10px 8px; + color: var(--khaganat-color); +} +.popup_content { + color: #222; + line-height: 1.6em; + max-height: 30em; + overflow: auto; + padding: 10px 8px; + border: 1px solid #bbb; + border-bottom: 1px solid var(--neutral-color); + border-radius: 6px 6px 2px 2px; + box-shadow: 0 -2px 3px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(255, 255, 255, 0.2); +} + +#main_menu .popup_heading, +#genericmenu .popup_heading, +#adm_submenus .popup_heading { + display: none; +} +#main_menu .popup_container, +#genericmenu > .popup_container, +#adm_submenus > .popup_container { + display: block; + position: relative; + background: none; + margin: 0; + height: auto; /* In case anything fishy happens in the situations where this used make sure it stays still */ +} +.main_icons.hide_popup { + float: right; +} +.popup_heading .icon { + vertical-align: middle; + margin: -4px 4px 0 0; +} + +.generic_list_wrapper, /*.windowbg,*/ .approvebg, .approvebg2 { + background: var(--neutral-light-color); + margin: 12px 0 0 0; + padding: 12px 16px; + + overflow: auto; +} +/* Here comes the glory... */ +/* TODO : ce serait bien avec deux couleurs différentes ? mais pas évident à assortir et laisser accessible ET joli */ +.windowbg:nth-of-type(even), .bg.even { + background: var(--neutral-light-color); +} +.windowbg:nth-of-type(odd), .bg.odd { + background: var(--neutral-light-color); +} +.windowbg { + border-bottom: #ddd solid 1px; +} +.windowbg:last-child, .windowbg:last-of-type { + border-bottom: none; +} + +/* Highlight the target item */ +.windowbg:target { + background: var(--neutral-light-color); +} + +/* Add some hover on table rows */ +tr.windowbg:hover { + background: #e2eef8; +} + +/* Special treatment for #forumposts area */ +#forumposts .windowbg, #forumposts .approvebg, #forumposts .approvebg2, #pmFolder .windowbg { + overflow: visible; + padding: 0.3em; + margin-top: 0.2em; + border-radius: 3px; +} +/* Nobody wants locked topics to stand out much. */ +.windowbg.locked { + background: #e7eaef; +} +/* Sticky topics get a different background */ +.windowbg.sticky { + background: #cfdce8; +} +/* Locked AND sticky are a bit more technical */ +.windowbg.sticky.locked { + background: #e8d8cf; +} +/* Awaiting approval is a bit special, topics first */ +.windowbg.approvetopic { + background: #e4a17c; +} +/* Unapproved posts in approved topics */ +.windowbg.approvepost { + background: #ffcbcb; +} +.generic_list_wrapper .additional_row { + margin: 0; + padding: 5px 0; + border-radius: 0; +} +.generic_list_wrapper table.table_grid { + border-bottom: 1px solid #aaa; +} + +div#editlang_desc { + margin-bottom: 8px; +} +.topic_details .smalltext { + font-size: 0.9em; +} +.table_grid tr.windowbg td.centercol { + text-align: center; +} +tr.windowbg { + box-shadow: none; +} +#postmodify #message { + width: 100%; +} +#postmodify .lastedit { + font-weight: bold; +} + +.mvisible { + border-top: 1px solid var(--neutral-color); + font-size: small; + color: var(--neutral-mid-color); + float: right; + line-height: 2em; +} +.lastedit { +} + +/* Colors for background of posts requiring approval */ +.approvebg { + color: #222; + background: #ffeaea; +} +.approvebg2 { + color: #222; + background: var(--neutral-light-color)2f2; +} + +div#manage_boards dl dd textarea[name=desc] { + margin-top: 1px; +} + +.bold_text { + font-weight: bold; +} + +/* Profile > This needed for responsive (get rid of
    ) */ +.infolinks { + display: inline-block; +} +#groups .windowbg { + box-shadow: none; + border-radius: 0; + border-top: 0; + margin: 0; +} +#groups .padding { + margin: 0 0 25px 0; +} +.groupmembership textarea { + width: 100%; +} +.groupmembership .righttext { + margin-top: 1ex; +} + +/* BoardIndex */ +/* This place covers board places (boardindex/messageindex/recent) */ +.boardindex_table:not(:last-child) { +} + +h2 .collapse { + float: right; + margin: 4px 4px 0 0; +} +.board_icon a, .board_icon div { + background: url(../images/boardicons.svg) no-repeat 0 0 / 90px; + display: inline-block; + width: 45px; + height: 45px; + border-bottom:none; +} +.board_icon a:hover, .board_icon div:hover { + border-bottom:none; +} +.board_icon a.board_on2, .board_icon div.board_on2 { + background-position: -45px 0; +} +.board_icon a.board_off, .board_icon div.board_off { + background-position: 0 -45px; +} +.board_icon a.board_redirect, .board_icon div.board_redirect { + background-position: -45px -45px; +} +.board_icon { + text-align: center; + padding: 8px 0 0 0; + width: 60px; + flex-shrink: 0; +} +.boardindex_table .board_icon { + width: 80px; +} +.khbb_children .board_icon { + width: 60px; + margin-left: 20px; +} + +.boardindex_table .info { + width: calc(55% - 80px); +} +.cat_bar .info { + width: 55% ; + display:flex; + align-items: center; + padding: 0; +} +div.cat_bar.without_biseau { + padding-top: 1em; +} +.cat_bar .info > span { + margin-left: 1em; +} +.boardindex_table .board_stats, .cat_bar .board_stats { + /*padding: 13px 10px 10px;*/ +} + +.boardindex_table .board_stats p { + border-left: 1px solid var(--neutral-color); + border-right: 1px solid var(--neutral-color); +} +.info { + overflow: hidden; + overflow-wrap: break-word; + padding: 5px 5px 5px 0; + flex-grow: 1; +} +.info .subject { + font-size: 1.1em; +} +.board_stats { + width: 15%; + font-size: 0.9em; + margin: 0 0 0 auto; + text-align: center; + display: flex !important ; + justify-content: space-around; +} + +.lastpost { + width: 30%; + font-size: 0.9em; + padding-top: 3px; +} +.cat_bar .lastpost { + padding: 0; +} +.lastpost p { + display: flex; + flex-direction: column; +} + +.windowbg .lastpost p { + display: inherit; +} + +.board_icon, .info, .board_stats, .lastpost { + display: inline-block; +} +.main_container { + /* pas de marge pour les biseaux + * margin-bottom: 0.5em;*/ +} +.up_contain { + overflow: hidden; + border: 1px solid var(--neutral-color); + display: flex; + flex-wrap: wrap; + align-items: center; +} +.up_contain:last-child { + border:none; +} +/* Child boards */ +.children { + border-top: 1px solid var(--neutral-color); + padding: 5px; + width: 100%; +} +.khbb_children { + display: flex; + border-bottom: 1px solid var(--neutral-color); + align-items: center; +} +.khbb_children:last-of-type { + border:none; +} +.khbb_children .info { + margin-left: 1em; +} +.children p { + font-size: 0.9em; +} +.children span::after { + content: ", "; +} +.children span:last-of-type::after { + content: ""; +} +p.moderators { + font-size: 0.9em; + font-weight: bold; +} +span.postby { + display: block; +} +/* Info Center */ +#info_center { + clear: both; +} +#info_center .sub_bar { + border-top: 1px solid var(--neutral-color); +} +#info_center .sub_bar:first-child { + border-top: none; +} +#upshrink_stats { + margin-top: 4px; +} +#ic_recentposts { + line-height: 1.6em; + width: 98%; + margin: -2px 0 0 23px; + font-size: 0.9em; +} +#ic_recentposts th { + text-align: left; + padding: 0 4px 0 0; +} +#ic_recentposts td { + border-top: 1px solid #eaeaea; + padding: 0 4px 0 0; + vertical-align: top; +} +#ic_recentposts tr:first-child td { + border-top: none; +} +#ic_recentposts .recentpost strong { + width: 40%; +} +#ic_recentposts .recentposter { + width: 15%; +} +#ic_recentposts .recentboard { + width: 20%; +} +#ic_recentposts .recenttime { + width: 25%; +} +#ic_recentposts .recenttime strong { + color: #555; +} +#ic_recentposts .windowbg { + background: none; +} +#upshrink_stats p.inline { + border: none; + margin: 0; + padding: 2px 29px; + line-height: 1.6em; + font-size: 0.9em; +} +#upshrink_stats p.inline span { + margin: 0; + padding: 4px 0 0 0; +} +#upshrink_stats span.membergroups { + display: block; +} + +/* MessageIndex */ +/* Start with description and other things */ +#description_board, .filter_row { + padding: 8px 10px; + border-bottom: none; + box-shadow: none; +} +#description_board h2, #description_board div { + display: inline-block; +} +#description_board h2::after { + content: " - "; +} +/* Topic list */ +#topic_header { + margin: 0; + border-radius: 0; + display: flex; +} +#topic_header div { + font-size: 1em; + padding: 0; +} +#topic_header input { + margin-top: 5px !important; +} +#topic_container .windowbg { + border-top: none; + display: flex; + box-shadow: none; + border-radius: 0; + padding: 0; + margin: 0; + overflow: hidden; + align-items: center; + flex-direction: row; +} +#topic_container .lastpost, #topic_header .lastpost { + width: 20%; +} +#topic_container .lastpost, #topic_container .board_stats { + flex-shrink: 0; +} +.icon img, .moderation input { + margin-top: 15px; +} +.moderation { + display: inline-block; + width: 35px; + flex-shrink: 0; + vertical-align: middle; + text-align: center; +} +.mod_comment { + width: 100%; +} +/* Quick moderation selects and submit */ +#quick_actions { + margin: 6px 0; +} +/* Icons and jump to */ +#topic_icons::before { + display: block; + height: 8px; + clear: both; + content: ""; +} +#topic_icons .information { + font-size: .9em; +} +#topic_icons ul { + padding: 0 12px 0 4px; + line-height: 2em; + display: flex; + width: 90%; + margin: 0 auto; + justify-content: space-between; + flex-wrap: wrap; +} + +#topic_icons ul li { + padding: 0 .4em; + border: #ddd solid 1px; + border-radius: 3px; +} + +/* Should lose this before RC1. It's a kludge. Can be fixed by new image */ +#topic_icons .floatleft img:first-child { + padding: 0 2px; +} + +/* Display */ +/* Poll question */ +#poll { + overflow: hidden; +} + +/* Poll vote options */ +#poll_options ul.options li { + padding: 6px 0 6px 25px; +} + +/* Poll results */ +#poll_options dl.options { + padding: 12px 0 12px 25px; + line-height: 1.4em; +} +#poll_options dl.options dt { + padding: 4px 0; + width: 30%; + max-width: 30em; + float: left; + clear: left; +} +#poll_options dl.options .voted { + font-weight: bold; +} +#poll_options dl.options dd { + width: 60%; + max-width: 45em; + float: left; + margin: 0 0 4px 0; + text-align: right; +} + +/* Poll notices */ +#poll_options p { + margin: 0 18px 2px 18px; + padding: 0 6px 6px 6px; +} + +div#pollmoderation { + overflow: auto; +} + +/* Styles for edit poll section. */ +#edit_poll dl.poll_options dt { + width: 33%; +} +#edit_poll dl.poll_options dd { + width: 65%; +} + +/* Linked events */ +.event_title { + font-size: larger; + vertical-align: middle; +} +.event_title + a { + margin-left: 1em; +} + +/* On to the posts */ +#forumposts { + clear: both; + margin: 8px 0 0 0; + margin-bottom: 0.3em; + +} +#forumposts .cat_bar { + margin: 0 0 -4px 0; +} +/* Topic information */ +#forumposts .catbg img { + margin: 0 4px -2px 0; +} +#forumposts .catbg span { + white-space: pre; + /* Specific sizing for clarity without ClearType. */ + font-size: 0.818em; + font-weight: normal; + padding: 2px 0; +} +/* poster and postarea + moderation area underneath */ +.post_wrapper { + display: flex; +} +.post_wrapper::after { + content: ""; + display: block; + clear: both; +} +.windowbg .recent_title .page_number { + margin: 0 0.5em; +} +/* poster details and list of items */ +.poster { + /* Don't set this in em.It will eat too much space if people need to set large text sizes. */ + width: 17%; + -webkit-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; + word-wrap: break-word; /* IE fallback */ + overflow-wrap: break-word; + padding: 1em; + border-right: 1px groove var(--color1); +} +.poster h3 { + font-size: 1.2em; +} +.poster h3, .poster h3 a, .poster li:hover h3 a, .poster h3 a:hover .poster li h3 a, .poster h3 a:focus { + margin: 0; + padding: 0; + text-transform: capitalize; +} + +.poster .profile .profile_icons li, .poster .im_icons li { + display: table-cell; + padding-right: 5px; +} +.postarea { + width: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; +} +.moderatorbar { +} +/* The visible stuff below the avatar. */ +.user_info > li { + margin: 3px 0 0 0; + font-size: 0.85em; +} +.poster li.title { + font-weight: bold; +} +.poster li.membergroup { + font-style: italic; +} +.poster li.postgroup { + font-style: italic; +} +/* @todo Re-code this a bit to give background on anchor. */ +.poster li.poster_online, .poster li.poster_online:hover { + padding: 1px 1px 1px 1px; + margin: 3px 10px; +} +.poster li.poster_online a { + color: #c06002; + line-height: 1.6em; +} +.poster li.poster_online:hover, .poster li.poster_online:hover a { + /*text-decoration: underline;*/ +} +.poster li.warning a img { + vertical-align: bottom; + padding: 0 2px; +} +.poster img { + vertical-align: middle; +} +img.avatar { + object-fit: scale-down; +} +.poster img.avatar { + max-width: 100%; +} + +.postarea div.flow_hidden { + width: 100%; +} +.moderatorbar { + clear: right; +} +.messageicon { + display: inline-block; +} +.messageicon img, #iconList img { + vertical-align: middle; +} +.keyinfo { + padding: 0.3em; +} +.keyinfo .postinfo { + padding: 1px 0 5px 0; + line-height: 1.5em; + font-size: 0.8em; + display: flex; + flex-flow: row wrap; + justify-content: space-between; + align-items: center; +} +.postinfo_link { + font-style: italic; +} + +.keyinfo .postinfo .spacer { + flex: 1 1 auto; +} +/*.keyinfo .postinfo .modified { + color: #333; + font-weight: normal; + font-style: italic; + padding: 2px 4px 0 4px; +}*/ +/* PMs postinfo */ +#personal_messages .keyinfo .postinfo { + flex-direction: column; + align-items: flex-start; + font-weight: normal; +} +#reason::before { + content: " - "; +} +.subject_title a { + font-size: 0.9em; + color: #333; + font-weight: bold; +} +.subject_hidden a { + display: none; +} + +.inner { + padding: 7px 8px 2px 2px; + margin: 0; + border-top: 1px solid var(--neutral-color); + box-shadow: 0 1px 0 var(--neutral-light-color) inset; + min-height: 85px; + word-wrap: break-word; /* IE fallback */ + overflow-wrap: break-word; +} +img.smiley { + vertical-align: bottom; +} +.attachments { + padding: 12px 0 0 0; +} +.attached { + padding: 0 6px 8px 6px; + max-width: 100%; + display: inline-block; + vertical-align: top; +} +.attachments_top { + margin: 0 auto; + text-align: center; +} +.attachments hr { + clear: both; + margin: 12px 0; +} +.show_on_hover:hover span { + display:none; +} +.show_on_hover:hover:before { + content:attr(data-hover); +} +/* Separator of posts. More useful in the print stylesheet. */ +#forumposts .post_separator { + display: none; +} +/* Next and previous topic links */ +.nextlinks { + text-transform: capitalize; + background: var(--neutral-color); + padding: 0.2em 0.5em 0em; +} +/* Styles for the quick reply area. */ +#quickreply { + clear: both; +} +#quickreply_options .roundframe { + margin: 0; + padding: 8px 10% 12px 10%; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +#quickReplyExpand { + float: right; + margin: 2px 2px 0 2px; +} +/* Styles for edit post section */ +form#postmodify .roundframe { + padding: 12px 12%; + margin: 0; +} +#post_header { + padding: 6px; + overflow: hidden; +} +#post_header dt { + float: left; + padding: 0; + width: 15%; + margin: 6px 0 0 0; + font-weight: bold; +} +#post_header dd { + float: left; + padding: 0; + width: 83%; + margin: 4px 0; +} +#post_header img { + vertical-align: middle; +} +ul.post_options { + margin: 0 0 0 12px; + padding: 0; + overflow: hidden; +} +ul.post_options li { + margin: 2px 0; + width: 49%; + float: left; +} +#post_additional_options_header { + margin-top: 0.5em; +} +#post_additional_options { + overflow: hidden; +} +#post_additional_options .progress_bar { + height: 22px; +} +#post_settings, #postAttachment, #postAttachment2, #attachment_previews { + padding: 10px 0; +} +#postAttachment dd, #postAttachment2 dd { + margin: 4px 0; +} +#postAttachment dd { + width: 45%; + float: left; +} +#postAttachment dt, #postAttachment2 dt { + font-weight: bold; +} +#post_draft_options { + background: #fdfdfd; + border: 1px solid #aaa; + border-left: 1px solid #bbb; + border-top: none; +} +#post_draft_options .settings dd, #post_draft_options .settings dt { + width: 50%; + border-top: 1px solid #e4e4e4; + padding: 5px 10px; + margin: 0; +} +#post_draft_options .settings dd:first-of-type, #post_draft_options .settings dt:first-child { + border-top: none; /* Some people are OCD, like me. :P */ +} +#post_draft_options .settings strong { + color: #555; +} +#post_confirm_buttons { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + width: 100%; +} +#post_confirm_buttons, #shortcuts { + padding: 12px 0; +} +#post_confirm_buttons .smalltext { + flex: 1; + word-break: break-word; + margin: 0 5px 0 0; +} +#post_confirm_buttons .post_button_container { + vertical-align: top; +} +#post_confirm_buttons .padding { + flex: 1 100%; +} +.post_verification { + margin-top: 6px; +} +.post_verification #verification_control { + margin: 4px 0 4px 12px; +} +/* The BBC buttons */ +#bbcBox_message { + margin: 10px 6px; +} +#bbcBox_message div { + margin: 2px 0; + vertical-align: top; +} +#bbcBox_message div img { + margin: 0 1px 0 0; + vertical-align: top; +} +#bbcBox_message select { + margin: 0 2px; +} +/* The smiley strip */ +#smileyBox_message { + margin: 6px; +} +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature, .attachments, .under_message, +.custom_fields_above_signature, +.custom_fields_below_signature { + width: 100%; + overflow: auto; + clear: right; + padding: 0.5em; + border-top: 1px solid var(--neutral-color); + box-shadow: 0 1px 0 var(--neutral-light-color) inset; + line-height: 1.4em; + font-size: small; + color: var(--neutral-mid-color); +} + +.under_message { + overflow: visible; + border: none; + box-shadow: none; +} +.smflikebutton { + margin-top: 4px; +} +.like_count, +.smflikebutton:last-child { + margin-bottom: 4px; +} +/* Events */ +.edit_event { + margin: 0 10px; + vertical-align: top; +} +/* ModerationButtons */ +#moderationbuttons { +} +#moderationbuttons_strip { + margin: 4px 0 4px; +} +#moderationbuttons ul li { + padding: 0 6px 4px 0; + margin: 0; +} + +/* File error */ +.errorfile_table { + font-family: monospace; + border-spacing: 1px; +} +.errorfile_table td { + background: #fbfbfb; +} +.errorfile_table .current { + background: #fbc6c6; +} +.errorfile_table .file_line.current { + background: #fb9090; +} +.errorfile_table .file_line { + background: #ececec; +} + +/* General Classes */ +/* Cat_bar / catbg */ +div.cat_bar { + background: var(--color2); + padding: 0; + padding-bottom: 1em; + color: var(--neutral-light-color); + margin-top: 0; +} + +.cat_bar h2 { + padding-left: 1em; +} + +/* Styles for rounded headers. */ +.cat_bar .desc { + font-size: 12px; + line-height: 1.5em; + font-weight: normal; + margin: auto 1em; + margin-right: 0; +} +.cat_bar .desc a { + color: var(--neutral-light-color); + font-weight: 600; +} +h2.catbg { + font-size: 1.1em; +} +h2.catbg, h2.catbg a, h2.catbg a:hover { + color: var(--neutral-light-color); +} + +h2.catbg a:hover { + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.4); +} +h2.catbg .main_icons::before, h2.catbg .icon { + margin: 0 5px 0 0; +} +.cat_bar + .windowbg, .cat_bar + .roundframe { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.cat_bar + .title_bar { + margin-top: 0; +} + +#admin_content .cat_bar { + padding: .5em 0; +} + +/* Roundframe */ +.roundframe { + /*margin: 10px 0 0 0; + padding: 12px 16px;*/ + background: var(--neutral-light-color); + /*border: 1px solid #c5c5c5; + box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.1);*/ + overflow: auto; +} +/* TitleBar & SubBar */ +.title_bar { + background: var(--color2); + color: var(--neutral-light-color); + align-items: center; + /* Nul sur les stats + * margin: 5px 0 0 0;*/ +} +.title_bar a { + color: var(--neutral-light-color); +} +.sub_bar { + border-bottom: 1px solid var(--neutral-color); + text-shadow: none; + background: none; + box-shadow: 0 -1px 0 #999 inset; + clear: both; +} + +h3.titlebg, h4.titlebg, h2.subbg, h4.subbg, .subbg { + background: none; + color: #555; + font-weight: bold; + overflow: hidden; + padding: 6px 12px 5px 12px; + text-shadow: none; +} + +h2.titlebg { + color: var(--neutral-light-color); + padding: 6px 12px 5px 12px; +} +.titlebg { +} + +.title_bar + .windowbg, .title_bar + .roundframe { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +/* Other */ +/* Information */ +.information { + background: #f8f8f8; + overflow: auto; + padding-bottom: .5em; + padding: 12px 9px 8px 9px; +} +.generic_list_wrapper .information div { + background: none; +} +.information a:not(.button) { + font-weight: bold; +} +p.information img { + vertical-align: middle; +} +#messageindex .information { + border-radius: 0; + margin: 0; +} +#topic_icons .information, +#messageindex .information { + border-top: 1px solid var(--neutral-color); +} +.topic_pages { + font-size: 0.75em; + margin: 0 0 0 5px; +} +.topic_pages::before { + content: "\00ab "; +} +.topic_pages::after { + content: " \00bb" +} +/* Mentions */ +.atwho-view { + position: absolute; + top: 0; + left: 0; + display: none; + margin-top: 18px; + background: var(--neutral-light-color); + border: 1px solid var(--neutral-color); + border-radius: 3px; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); + min-width: 120px; + z-index: 11110 !important; +} +.atwho-view .cur { + background: #3366ff; + color: var(--neutral-light-color); +} +.atwho-view .cur small { + color: var(--neutral-light-color); +} +.atwho-view strong { + color: #3366ff; +} +.atwho-view .cur strong { + color: var(--neutral-light-color); + font-weight: bold; +} +.atwho-view ul { + list-style: none; + padding: 0; + margin: auto; +} +.atwho-view ul li { + display: block; + padding: 5px 10px; + border-bottom: 1px solid var(--neutral-color); + cursor: pointer; +} +.atwho-view small { + font-size: smaller; + color: #777; + font-weight: normal; +} +/* On/Off Icons (User) */ +.on, .off { + display: inline-block; + width: 14px; + height: 14px; + border-radius: 50%; + border: 1px solid transparent; + vertical-align: middle; +} +.on { + background: #89e75a; + border-color: #74d246; +} +.off { + background: #a7a2a2; + border-color: #969292; +} +#userstatus .smalltext { + margin: 0 0 0 5px !important; +} + +/* Styles for print media. */ +@media print { + #headerarea { + display: none; + } + + .tborder { + border: none; + } +} +/* Who */ +.action_who #upper_show { + margin-top: 6px; +} +.action_who #lower_pagesection { + margin-top: 4px; +} +.action_who #lower_pagelinks { + margin-top: -4px; +} +.action_who select { + margin-top: -1px !important; +} +span.member.hidden { + display: inline-block; + font-style: italic; +} + +/* Icons (converted from img to css) */ +/* Stay here till I find a better place for you guys */ +h2.profile_hd::before { + vertical-align: middle; +} +h2.profile_hd::before, +.main_icons.profile_hd::before { + content: ""; + background: url(../images/icons/profile.png) no-repeat; + height: 24px; + width: 24px; + display: inline-block; +} +.main_icons.profile_sm::before { + background: url(../images/icons/profile.png) no-repeat; +} +.xx { + background: url(../images/post/xx.png) 2px no-repeat; + padding: 25px 6px 25px 18px; +} + +/* Those classes are sharing exact same gradient. */ +/* Background of buttons */ +/* Not for .button ! +.top_menu, +#top_section, .quickbuttons > li, +.quickbuttons li ul, +.inline_mod_check, .popup_window, #inner_section, .post_options ul { + background: var(--neutral-light-color); +} + +.quickbuttons li ul li a:hover, .quickbuttons ul li a:focus, +.post_options ul a:hover, .post_options ul a:focus, .notify_dropdown a:hover, .notify_dropdown a:focus +{ + background: var(--khaganat-color); + color: var(--neutral-light-color); +}*/ +/* Well some of them has different gradient effect on hover */ +.button:hover, #search_form .button:hover { + background: var(--khaganat-color); + color: var(--neutral-light-color); +} +/* If it fits I sits... */ +/*.navigate_section ul, */ +.popup_content, .up_contain { + background: var(--neutral-light-color); +} + +/* Topic/Board follow-alert menu */ +.notify_dropdown strong { + font-size: 1.1em; +} +.notify_dropdown a { + display: block; + padding: 0.5em; + text-decoration: none; + border: 1px solid transparent; + border-radius: 3px; +} +.notify_dropdown a:hover, .notify_dropdown a:focus { + border-color: var(--neutral-color); +} +.notify_dropdown span { + font-size: 0.9em; +} + +.notify_dropdown { + top: inherit !important; + left: inherit !important; +} +/* Some new stuff */ +#display_head { + clear: both; + display: flex; + align-items: center; + background: var(--khaganat-color); + position: relative; + margin-bottom: 0.3em; + padding-bottom: 1em; +} +#recent #display_head { + margin-bottom: 0; +} +#display_head p { + padding: 0.2em 0.5em 0.2em 2em; + overflow-wrap: break-word; + line-height: 1.2em; + width: 100%; + align-items: center; + color: var(--neutral-light-color); + font-size: 12px; + max-width: 80ch; +} +#display_head span { + margin: -4px 0 0 0; +} +.display_title { + font-weight: normal; + font-size: 1.4em; + padding: 0 0.4em 0 1em; + color: var(--neutral-light-color); + z-index: 5; + /* + line-height: 1em; + overflow-wrap: break-word; + align-items: center; + display: flex; + box-sizing: content-box;*/ + +} +/* Pas forcément top vu comme les lignes peuvent bouger +.display_title:after { + border-right: 26px solid transparent; + border-bottom: 26px solid var(--khaganat-color); + margin-right: -26px; + content: " "; + box-sizing: content-box; + padding-left: 0.2em; +}*/ + +#reported_posts .main_icons, +#reported_members .main_icons { + margin: -3px 1px 0 0; +} +#reported_posts .quickbuttons li a, +#reported_members .quickbuttons li a { + background: none; +} + +/* Some colors for generic usage */ +/* Sometimes there will be an error when you post */ +/* Messages that somehow need to attract the attention. */ +.red, .meaction, .error, .alert, .warn_mute { + color: red; +} +.khbb_nav .error { + margin-left: 3px; + padding: 3px 6px 0px 6px; + background: var(--color5); + color: var(--neutral-light-color); + clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); + position: absolute; + top: 0; + right: 0; +} + +/* Adding some classes for generic usage and JS rules */ +.hidden { + display: none; +} +.inline_block { + display: inline-block; +} +.block { + display: block; + margin: 0 0 5px 0; +} + +/* Alternating colors */ +.stripes:nth-of-type(even) { + background-color: #f2f2f2; +} +.stripes:nth-of-type(odd) { + background-color: var(--neutral-light-color); +} +.alternative { + background-color: #f2f2f2; +} +.alternative2 { + background-color: #e8edf0; +} + +.centerbox { + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +.dz-image-preview { + display: flex; + flex-flow: row wrap; + justify-content: space-between; + align-items: center; + margin-top: 12px; +} +#attachment_previews { + display: none; +} +#attachment_previews div.descbox > div, +#attachment_previews div.errorbox > div, +#attachment_previews div.infobox > div { + padding: 10px; +} +#attachment_previews .attach-preview { + flex: 0 0 auto; + width: 170px; +} +#attachment_previews .attachment_info { + flex: 1 1 auto; + width: 250px; +} +#attachment_previews .attach-ui { + min-height: 36px; + padding: 10px 0; + float: right; +} +input[name="attachBBC"] { + width: 100%; + margin-top: 10px; +} +.attachment_info .progress_bar, .attachment_info .attached_BBC, a#attach_cancel_all, a#attach_upload_all, .attach-ui { + display: none; +} +.attachment_info .progress_bar { + margin: 6px 0; +} +.attached_BBC_width_height label { + min-width: 100px; + display: inline-block; +} +.attached_BBC_width, .attached_BBC_height { + margin: 10px 1em 0 0; + display: inline-block; +} +.attachment_info input[type="number"] { + width: 5em; +} +#attachment_upload { + min-height: 50px; +} +#drop_zone_ui { + display: none; +} +#total_progress { + width: 50%; + display: none; +} +#max_files_progress, #max_files_progress_text { + display: none; +} + +/* Hide this from desktop users sshh... our little sekrit */ +.mobile_buttons, .mobile_display { + display: none; +} + +/* Two-Factor Auth code container */ +.tfacode { + background: #d0e7f8; + padding: 5px; + display: inline-block; +} + +/* TFA QR block */ +.tfa_qrcode { + padding: 6% 8%; +} + +.tfa_qrcode img { + width: 140px; +} + +/* This was named as "winfo" before, but its better named noup */ +.noup { + border-top-left-radius: 0; + border-top-right-radius: 0; + margin: 0 0 10px 0 !important; +} +.information.noup { + border-radius: 0; + margin: 0 !important; + border-bottom: none; +} +.windowbg.noup { + box-shadow: none; +} + +/* Make the reCAPTCHA dialog centered to match the positioning of the built-in verification */ +.g-recaptcha { + display: inline-block; +} + +/* If its collapsed you know what to do */ +.collapsed { + opacity: 0.5; + transition: 1s; +} +.collapsed:hover { + opacity: 1; +} + +/* Lets not allow our textarea in news section overflow too much to left */ +tr[id^='list_news_lists_'] textarea { + width: 100%; + resize: vertical; + min-height: 100px; +} + +/* Responsive Youtube embed */ +.videocontainer { + max-width: 560px; +} +.centertext .videocontainer, +.justifytext .videocontainer { + margin: 0 auto; +} +.righttext .videocontainer { + margin: 0 0 0 auto; +} +.lefttext .videocontainer { + margin: 0 auto 0 0; +} +.videocontainer > div { + position: relative; + padding-bottom: 56.25%; +} +.videocontainer iframe { + position: absolute; + top: 0; + left: 0; + width: 100% !important; + height: 100% !important; +} +.videocontainer video { + object-fit: contain; + background: black; + max-width: 100%; +} + +.backtrace:not(:last-child) { + padding-bottom: 0.5em; + border-bottom: 1px solid var(--neutral-color); + margin-bottom: 0.5em; +} + +/* To break or not to break that is the question indeed */ +.word_break { + word-break: break-all; +} + +div.sceditor-container:not(.sceditor-maximize) { + z-index: 4; +} + +#attach_current_directory { + word-break: break-word; +} +/* Add max-width for theme thumbnails */ +img.theme_thumbnail { + max-width: 250px; +} + +#lang_main_files_list .name, #member_list .email, #approve_list .email { + word-break: break-word; +} +/* khbb : les modifs 100% Khaganat */ + +.khbb_nav { + position: relative; + width: 100%; + display: flex; + background-color: rgba(255,255,255,0.5); + justify-content: space-between; + align-items: center; + z-index: 99; +} +.khbb_nav ul { + display: flex; + flex-wrap: wrap; + width: 100%; + justify-content: center; +} +.khbb_nav ul li { + position: relative; + +} +.khbb_nav ul li a{ + color: var(--dark-color); + padding: 0 0.2em; + margin: 0 0.2em; + font-size: 0.9em; + display: flex; + justify-content: center; + align-items: center; + /*background: linear-gradient(0deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 50%); */ + border-left: 1px solid var(--neutral-light-color); + border-right: 1px solid var(--neutral-light-color); + border-radius: 6px; +} + +.khbb_nav ul li a:hover, .khbb_nav ul li a:focus { + /*background-color: var(--neutral-light-color);*/ + cursor: pointer; + border-left: 1px solid var(--neutral-light-color); + border-right: 1px solid var(--neutral-light-color); +} + +.khbb_nav ul li img { + width: 2em; +} +.khbb_nav ul li:hover img { + clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); + background-color: var(--neutral-light-color); +} +.khbb_nav ul li a:hover .khbb_subtitlemenu, .khbb_nav ul li a:focus .khbb_subtitlemenu { + color: var(--neutral-light-color) ; +} + +.khbb_subtitlemenu { + color:var(--khaganat-color); + text-align: center; + padding: 5px; + z-index: 1; + top: 100%; + padding: 0; +} + + +.khbb_nav ul li span.amt { + position: absolute; + top: 0; + left: 0; +} + +.khbb_identity ul li { + margin-right: 0.6em; +} + +.khbb_identity { + text-transform: capitalize; + padding: 0 0.5em; + display: flex; + background-color: var(--neutral-light-color); + justify-content: center; + align-items: baseline; + max-width: 30%; + box-shadow: 0px 0px 5px 1px var(--neutral-light-color); + border-radius: 0.5em 0; +} + +.khbb_identity span { + display: inline; +} + +.go_to_top { + position:fixed; + background-color: var(--neutral-light-color) ; + max-width: 5em; + display: block; + bottom: 0; + right: 0; +} + +.khbb_subtitle { + display: flex; + justify-content: space-between; + max-width: 1200px; + margin: 0 auto; + width: 90%; +} + + +.cat_bar { + display: flex; + flex-wrap: wrap; + align-items: end; +} + +/* Pour inclure les barres de khaganat */ +.khbb_body { + display:flex; + min-height:calc(100vh - 3em);; + + flex-direction: column; + justify-content: space-between; + position: relative; +} + +.khbb_forum { + height: 100%; +} + +.khnav_logo_bg { + z-index: 1; +} + +#khfooter_bottom { +} + +.khfooter { + align-items: initial; + overflow: hidden; + margin-top: 0.5em !important; +} +.khfooter div img { + box-sizing: content-box; +} +.khfooter div { + height: 2.5em; + align-items: initial !important; +} +/* Collapse pur css // Utilser details est aussi bien ! +.khbb_collapse-able { + height: 1.2rem; + overflow: hidden; +} + +.khbb_collapse-able:active, .khbb_collapse-able:hover { + height: auto; +} +.khbb_collapse-able span { + font-size: 0.8em; + font-style: italic; +} */ + +/* Search */ +.khbb_quicksearch { +} +.khbb_no { + display:none; +} + +/* Biseaux */ +.khbiseau_bottom_white { + border-style: solid; + border-color: white transparent transparent transparent; + border-width: 0.5em; + padding: 0; + background-color: transparent !important; + } +.khbiseau_bottom_color { + border-style: solid; + border-color: var(--color2) transparent transparent transparent; + border-width: 0.5em; + padding: 0; + background-color: transparent !important; + } + +.khbiseau_topright_white { + border-style: solid; + border-color: transparent transparent #fff transparent; + border-width: 0 1.5em 1.5em 0; +} + +.khbiseau_topright_color { + border-style: solid; + border-color: transparent transparent var(--color2) transparent; + border-width: 0 1em 1em 0; +} +.khbiseau_topright_khcolor { + border-style: solid; + border-color: transparent transparent var(--khaganat-color) transparent; + border-width: 0 1em 1em 0; +} + +.khbiseau_right_color { + border-style: solid; + border-color: transparent transparent red red; + border-width: 1.5em 0em 1.5em 1.5em; + height: 100%; + position: absolute; + right: 0; +} + +/* Petit hexagone */ +.not_toggle { + padding-left: 1em; +} +.not_toggle::before { + width: 17px; + height: 17px; + display: inline-block; + background: #f7f7f7; + overflow: hidden; + content: ""; + vertical-align: middle; + margin: 0 5px 0 5px; + transition: background-color 0.25s; + clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); +} + +/* Divers KH */ +.khbb_label { + background-color: var(--neutral-light-color); + color: var(--dark-color); + clip: rect(0 0 0 0); /* Old compatibility*/ + clip-path: inset(50%); + height: 1px; + overflow: hidden; + position: absolute; + white-space: nowrap; + width: 1px; +} + +.khbottom .buttonlist { + display:flex; + flex-direction: row-reverse; +} +.khbottom .button_strip_reply { + margin-left: 1em; + font-weight: bold; +} + +/*Plugin Theme Changer Remix*/ +/* Mode "rien à battre", faut mettre en "bottom" sinon ça passe pas...*/ +.changetheme { + position: absolute; + right: 0; + z-index: 2000; + top:0; +} + diff --git a/css/jquery.sceditor.theme.css b/css/jquery.sceditor.theme.css new file mode 100644 index 0000000..4ddb7d4 --- /dev/null +++ b/css/jquery.sceditor.theme.css @@ -0,0 +1,625 @@ +/*! SCEditor | (C) 2011-2013, Sam Clarke | sceditor.com/license */ +/** + * SCEditor + * https://www.sceditor.com/ + * + * Copyright (C) 2011-12, Sam Clarke (samclarke.com) + * + * SCEditor is licensed under the MIT license: + * https://opensource.org/licenses/mit-license.php + */ +div.sceditor-grip, +.sceditor-button div { + background-image: url("../images/icons/editor_sprite.png"); + background-repeat: no-repeat; + width: 16px; + height: 16px; +} +.sceditor-button-flash div { + background-position: 0px -712px; +} +.sceditor-button-youtube div { + background-position: 0px 0px; +} +.sceditor-button-link div { + background-position: 0px -16px; +} +.sceditor-button-unlink div { + background-position: 0px -32px; +} +.sceditor-button-underline div { + background-position: 0px -48px; +} +.sceditor-button-time div { + background-position: 0px -64px; +} +.sceditor-button-table div { + background-position: 0px -80px; +} +.sceditor-button-superscript div { + background-position: 0px -96px; +} +.sceditor-button-subscript div { + background-position: 0px -112px; +} +.sceditor-button-strike div { + background-position: 0px -128px; +} +.sceditor-button-source div { + background-position: 0px -144px; +} +.sceditor-button-size div { + background-position: 0px -160px; +} +.sceditor-button-rtl div { + background-position: 0px -176px; +} +.sceditor-button-right div { + background-position: 0px -192px; +} +.sceditor-button-removeformat div { + background-position: 0px -208px; +} +.sceditor-button-quote div { + background-position: 0px -224px; +} +.sceditor-button-print div { + background-position: 0px -240px; +} +.sceditor-button-pastetext div { + background-position: 0px -256px; +} +.sceditor-button-paste div { + background-position: 0px -272px; +} +.sceditor-button-outdent div { + background-position: 0px -288px; +} +.sceditor-button-orderedlist div { + background-position: 0px -304px; +} +.sceditor-button-maximize div { + background-position: 0px -320px; +} +.sceditor-button-ltr div { + background-position: 0px -336px; +} +.sceditor-button-left div { + background-position: 0px -352px; +} +.sceditor-button-justify div { + background-position: 0px -368px; +} +.sceditor-button-italic div { + background-position: 0px -384px; +} +.sceditor-button-indent div { + background-position: 0px -400px; +} +.sceditor-button-image div { + background-position: 0px -416px; +} +.sceditor-button-horizontalrule div { + background-position: 0px -432px; +} +.sceditor-button-format div { + background-position: 0px -448px; +} +.sceditor-button-font div { + background-position: 0px -464px; +} +.sceditor-button-emoticon div { + background-position: 0px -480px; +} +.sceditor-button-email div { + background-position: 0px -496px; +} +.sceditor-button-date div { + background-position: 0px -512px; +} +.sceditor-button-cut div { + background-position: 0px -528px; +} +.sceditor-button-copy div { + background-position: 0px -544px; +} +.sceditor-button-color div { + background-position: 0px -560px; +} +.sceditor-button-code div { + background-position: 0px -576px; +} +.sceditor-button-center div { + background-position: 0px -592px; +} +.sceditor-button-bulletlist div { + background-position: 0px -608px; +} +.sceditor-button-bold div { + background-position: 0px -624px; +} +div.sceditor-grip { + background-position: 0px -640px; + width: 10px; + height: 10px; +} +.rtl div.sceditor-grip { + background-position: 0px -650px; + width: 10px; + height: 10px; +} +/** + * SCEditor + * https://www.sceditor.com/ + * + * Copyright (C) 2011-12, Sam Clarke (samclarke.com) + * + * SCEditor is licensed under the MIT license: + * https://opensource.org/licenses/mit-license.php + */ +/*--------------------------------------------------- + LESS Elements 0.7 + --------------------------------------------------- + A set of useful LESS mixins + More info at: http://lesselements.com + ---------------------------------------------------*/ +.sceditor-container { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + position: relative; + background: #fff; + border: 1px solid #d9d9d9; + font-size: 13px; + font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; + color: #222; + line-height: 1; + font-weight: bold; + border-radius: 4px; + background-clip: padding-box; + min-width: 100%; + max-width: 100%; +} +.sceditor-container *, +.sceditor-container *::before, +.sceditor-container *::after { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +.sceditor-container, +.sceditor-container div, +div.sceditor-dropdown, +div.sceditor-dropdown div { + padding: 0; + margin: 0; + z-index: 5; +} +.sceditor-container iframe, +.sceditor-container textarea { + line-height: normal; + border: 0; + outline: none; + font-size: 14px; + color: #111; + box-sizing: border-box; + padding: 0 5px; + margin: 0px; + resize: none; + background: #fff; + display: flex; + flex-basis: 175px; + flex-grow: 1; + min-width: 100%; + max-width: 100%; + height: 175px; + min-height: 1px; + max-height: 100%; +} +.sceditor-container iframe { + font-family: Verdana, Arial, Helvetica, sans-serif; +} +.sceditor-container textarea { + font-family: "DejaVu Sans Mono", Monaco, Consolas, monospace; +} +div.sceditor-dnd-cover { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + background: rgba(255, 255, 255, 0.2); + border: 5px dashed #aaa; + z-index: 200; + font-size: 2em; + text-align: center; + color: #aaa; +} +div.sceditor-dnd-cover p { + position: relative; + top: 45%; + pointer-events: none; +} +div.sceditor-resize-cover { + position: absolute; + top: 0; + left: 0; + background: #000; + width: 100%; + height: 100%; + z-index: 10; + opacity: 0.3; +} +div.sceditor-grip { + overflow: hidden; + width: 10px; + height: 10px; + cursor: pointer; + position: absolute; + bottom: 0; + right: 0; + z-index: 3; + line-height: 0; +} +div.sceditor-grip.has-icon { + background-image: none; +} +.sceditor-maximize { + position: fixed; + top: 0; + left: 0; + height: 100% !important; + width: 100% !important; + border-radius: 0; + background-clip: padding-box; + z-index: 2000; +} +html.sceditor-maximize, +body.sceditor-maximize { + height: 100%; + width: 100%; + padding: 0; + margin: 0; + overflow: hidden; +} +.ie6.sceditor-maximize { + position: absolute; +} +.sceditor-maximize div.sceditor-grip { + display: none; +} +.sceditor-maximize div.sceditor-toolbar { + border-radius: 0; + background-clip: padding-box; +} +div.sceditor-smileyPopup, div.sceditor-dropdown { + border: 1px solid #ccc; + background: #fff; + color: #333; + z-index: 4000; + padding: 10px; + line-height: 1; + border-radius: 2px; + background-clip: padding-box; + box-shadow: 1px 2px 4px rgba(0, 0, 0, .2); + overflow-y: auto; +} + +div.sceditor-smileyPopup, .sceditor-smileyPopup { + width: auto; + position: absolute; + top: 0; + max-width:90%; + } +/*@media screen and (min-width: 1024px) { + div.sceditor-smileyPopup { + max-height: 50%; + width: 50%; + position: fixed; + background:aliceblue !important; + } + #sceditor-popup { + height: 100%; + } + #sceditor-popup-smiley { + height: 90%; + overflow: auto; + } +} +@media screen and (max-width: 1024px) { + div.sceditor-smileyPopup { + width: 90%; + position: absolute; + background:black !important; + } +}*/ +/** + * Dropdown styleing + */ +div.sceditor-dropdown { + position: absolute; + border: 1px solid #ccc; + background: #fff; + color: #333; + z-index: 4000; + padding: 10px; + line-height: 1; + border-radius: 2px; + background-clip: padding-box; + box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2); +} +div.sceditor-dropdown a, +div.sceditor-dropdown a:link { + color: #333; +} +div.sceditor-dropdown form { + margin: 0; +} +div.sceditor-dropdown label { + display: block; + font-weight: bold; + color: #3c3c3c; + padding: 4px 0; +} +div.sceditor-dropdown input, +div.sceditor-dropdown textarea { + font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; + outline: 0; + padding: 4px; + border: 1px solid #ccc; + border-top-color: #888; + margin: 0 0 .75em; + border-radius: 1px; + background-clip: padding-box; +} +div.sceditor-dropdown textarea { + padding: 6px; +} +div.sceditor-dropdown input:focus, +div.sceditor-dropdown textarea:focus { + border-color: #aaa; + border-top-color: #666; + box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.1); +} +div.sceditor-dropdown .button { + font-weight: bold; + color: #444; + padding: 0 12px; + background: #ececec; + border: solid 1px #ccc; + border-radius: 2px; + background-clip: padding-box; + cursor: pointer; + margin: .3em 0 0; +} +div.sceditor-dropdown .button:hover { + background: #f3f3f3; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); +} +div.sceditor-font-picker, +div.sceditor-fontsize-picker, +div.sceditor-format { + padding: 6px 0; +} +div.sceditor-emoticons, +div.sceditor-more-emoticons, +div.sceditor-color-picker { + padding: 0; +} +.sceditor-pastetext textarea { + border: 1px solid #bbb; + width: 20em; +} +.sceditor-emoticons img, +.sceditor-more-emoticons img { + padding: 0; + cursor: pointer; + margin: 2px; +} +.sceditor-insertemoticon { + padding: 4px !important; +} + +.sceditor-insertemoticon > div, .sceditor-insertemoticon > center { + display: inline-block; + vertical-align: middle; +} +.sceditor-more { + border-top: 1px solid #bbb; + display: inline-block; + cursor: pointer; + font-weight: bold; + padding: 0 4px !important; + margin-top: 4px !important; +} +.sceditor-dropdown a:hover { + background: #eee; +} +.sceditor-fontsize-option, +.sceditor-font-option, +.sceditor-format a { + display: block; + padding: 7px 10px; + cursor: pointer; + text-decoration: none; + color: #222; +} +.sceditor-fontsize-option { + padding: 7px 13px; +} +.sceditor-color-column { + float: left; +} +.sceditor-color-option { + display: block; + border: 1px solid #fff; + height: 10px; + width: 10px; + overflow: hidden; + display: inline-block; + border: 1px solid #fff; +} +@media screen and (min-width: 1024px) { + .sceditor-color-option { + height: 24px; + width: 24px; + } + .sceditor-color-picker { + width: 131px; + } +} +@media screen and (max-width: 1024px) { + .sceditor-color-option { + height: 48px; + width: 48px; + } + .sceditor-color-picker { + width: 251px; + } +} +.sceditor-color-option:hover { + border: 1px solid #333; +} +/** + * Toolbar styleing + */ +div.sceditor-toolbar { + flex-shrink: 0; + overflow: hidden; + padding: 3px 5px 2px; + background: #f7f7f7; + border-bottom: 1px solid #c0c0c0; + line-height: 0; + text-align: left; + user-select: none; + border-radius: 3px 3px 0 0; + background-clip: padding-box; + margin: 0 0 5px; +} +div.sceditor-group { + display: inline-block; + background: #ddd; + margin: 1px 5px 1px 0; + padding: 1px; + border-bottom: 1px solid #aaa; + border-radius: 3px; + background-clip: padding-box; +} +.sceditor-button { + float: left; + cursor: pointer; + padding: 3px 5px; + width: 16px; + height: 20px; + border-radius: 3px; + background-clip: padding-box; +} +.sceditor-button:hover, +.sceditor-button:active, +.sceditor-button.active { + background: #fff; + box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.3), inset -1px 0 rgba(0, 0, 0, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2); +} + +.sceditor-button:active { + background: #fff; + box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.3), inset -1px 0 rgba(0, 0, 0, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2), inset 0 0 8px rgba(0, 0, 0, 0.3); +} +.sceditor-button.disabled:hover { + background: inherit; + cursor: default; + box-shadow: none; +} +.sceditor-button, +.sceditor-button div { + display: block; +} +.sceditor-button svg { + display: inline-block; + height: 16px; + width: 16px; + margin: 2px 0; + fill: #111; + pointer-events: none; + line-height: 1; +} +.sceditor-button.disabled svg { + fill: #888; +} +.sceditor-button div { + margin: 2px 0; + padding: 0; + overflow: hidden; + line-height: 0; + font-size: 0; + color: transparent; +} +.sceditor-button.has-icon div { + display: none; +} +.sceditor-button.disabled div { + opacity: 0.3; +} +.text .sceditor-button, +.text .sceditor-button div, +.sceditor-button.text, +.sceditor-button.text div, +.text-icon .sceditor-button, +.text-icon .sceditor-button div, +.sceditor-button.text-icon, +.sceditor-button.text-icon div { + display: inline-block; + width: auto; + line-height: 16px; + font-size: 1em; + color: inherit; + text-indent: 0; +} +.text-icon .sceditor-button.has-icon div, +.sceditor-button.has-icon div, +.text .sceditor-button div, +.sceditor-button.text div { + padding: 0 2px; + background: none; +} +.text .sceditor-button svg, +.sceditor-button.text svg { + display: none; +} +.text-icon .sceditor-button div, +.sceditor-button.text-icon div { + padding: 0 2px 0 20px; +} +.rtl div.sceditor-toolbar { + text-align: right; +} +.rtl .sceditor-button { + float: right; +} +.rtl div.sceditor-grip { + right: auto; + left: 0; +} + +/* SMF buttons styles */ +.sceditor-button-pre div { + background-position: 0 -696px; +} +.sceditor-button-floatleft div { + background-position: 0px -680px; +} +.sceditor-button-floatright div { + background-position: 0px -664px; +} +.sceditor-insertemoticon img, +.sceditor-smileyPopup img { + margin: 0; + border-left: var(--neutral-mid-color) 1px dotted; + padding: 0 0.3em; +} +.sceditor-insertemoticon img, +div.sceditor-dropdown img, +.sceditor-smileyPopup img { + cursor: pointer; +} diff --git a/css/responsive.css b/css/responsive.css new file mode 100644 index 0000000..e9502e5 --- /dev/null +++ b/css/responsive.css @@ -0,0 +1,996 @@ +/* Reprise du bazar en mode < 700, > 700-1000 < et >1000 +/* Modif Khaganat ; à retravailler */ + +/*Large screen */ +@media (min-width: 1000px) { + .khbb_nav { + /*padding: 0 10em;*/ + } +} + +/* Middle Screen */ +@media (min-width: 700px) and (max-width: 1000px) { + .lastpost { + width: 20%; + margin: 3px 0 0 5px; + } + #alerts .alert_time { + display: none; + } + #alerts .alert_inline_time { + display: block; + } +} +/* Little Screen */ +@media (max-width: 700px) { + + /* Menu */ + .khnav_sticky { + z-index: 10 !important; + } + .khbb_mobile_button { + display: flex; + justify-content: center; + align-items: center; + background-color: var(--color1); + color: var(--neutral-light-color); + padding: 0.3em; + padding-right: 0.5em; + } + .khbb_nav { + flex-direction: column; + } + .khbb_nav ul { + /*background: var(--neutral-light-color);*/ + width: auto; + } + .khbb_nav ul li { + width: auto; + padding: 0.1em 1em; + margin: 0; + } + .khbb_nav ul li a { + flex-direction: row; + justify-content: start; + } + .khbb_nav ul li a img { + height: 1.2em; + width: initial; + } + .khbb_subtitlemenu { + display: block; + visibility: visible; + position: relative; + padding: 0; + background-color: inherit; + color: inherit; + } + .khbb_nav ul li a span.amt, .khbb_nav ul li a span.error { + position: relative; + } + + /* Autres modifs maisons */ + .khbb_subtitle { + justify-content: center; + } + .khbb_identity { + max-width: initial; + } + .khbb_subtitle .news { + display: none !important; + } + /* Board */ + .board_stats, .cat_bar .lastpost { + display: none !important; + } + .khbb_children { + flex-wrap: wrap; + } + .khbb_children .lastpost { + display: flex; + flex-direction: column; + } + .boardindex_table .khbb_children .info { + width: calc(100% - 100px); + } + /*Messages */ + #forumposts .windowbg { + margin: 0.5em; + border-radius: 5px; + box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.1); + border-top: none; + } + + .post_wrapper { + flex-direction: column; + } + .poster { + padding: 0.5em 0.5em 0 0.5em; + border-right: none; + } + /* Breadcrumb ; les flèches créent une marge... Mais changer le padding suffirait ?*/ + .navigate_section ul li::before, .navigate_section ul li::after { + } + .navigate_section ul li { + padding: .5em 0.2em .5em 1em; + } + /* page "recents" et autres affichages de ce genre */ + #recent .windowbg .recent_title { + flex-direction: column; + } + #alerts .windowbg { + flex-direction: column; + } + + + + /* Stuff de SMF rangé en mode plus simple */ + .lastpost { + margin: 0 0 0 20px; + } + .board_stats { + display: none; + } + #alerts .alert_time { + display: none; + } + #alerts .alert_inline_time { + display: block; + } + #profile_menu_top .textmenu, + #pm_menu_top .textmenu, + #alerts_menu_top .textmenu { + display: none; + } + #pm_menu_top .main_icons, + #alerts_menu_top .main_icons { + display: inline-block; + } + #member_list .ip, #member_list .last_active, #member_list .user_name { + display: none !important; + } +} + + +@media (min-width: 720px) and (max-width: 799px) { + #top_info .welcome { + display: none; + } + /* Calendar */ + #event_time_options { + width: 44%; + } + #event_title { + padding: 0; + } + #evtitle { + width: 98%; + } + .event_options_left, .event_options_right { + display: block; + max-width: unset; + width: unset; + } + #event_title input[type="text"] { + width: 100%; + } + #post_event #event_board select { + width: calc(100% - 90px); + max-width: unset; + } +} + +/* We have shared things... */ +@media screen and (max-width: 720px) { + /* Remove some content from the hooks table */ + #list_integration_hooks th#header_list_integration_hooks_function_name, #list_integration_hooks td.function_name, + #list_integration_hooks th#header_list_integration_hooks_remove, #list_integration_hooks td.remove { + display: none; + } + /* New Mobile Action/Mod Pop (Test) */ + .moderationbuttons_check { + display: none; + } + .moderationbuttons_mobile_check { + display: inline-block; + } + #mobile_action .button, #mobile_moderation .button, #mobile_action .top_menu { + width: 100%; + margin: 0; + border-radius: 0; + border-left: 0; + border-right: 0; + text-indent: 5px; + } + #mobile_action .button, #mobile_moderation .button { + line-height: 2.8em; + height: auto; + } + #mobile_action .notify_dropdown { + top: 0 !important; + left: 0 !important; + position: relative; + } + #mobile_action .top_menu { + padding: 0; + margin: 0 auto; + } + #mobile_action .notify_dropdown a { + border-bottom: 1px solid #999; + } + #mobile_action .notify_dropdown a:last-of-type { + border-bottom: none; + } + #mobile_action .notify_dropdown span { + display: none; + } + .mobile_buttons { + margin: 5px 0; + } + .mobile_buttons .button { + margin: 0; + } + .pagesection .buttonlist, #moderationbuttons { + display: none; + } + .mobile_buttons { + display: block; + } + + /* Stuff */ + #top_info { + padding: 5px; + } + .infolinks { + display: inline-block; + margin: 5px 7px 0 0; + } + #registration .field_icons { + float: left; + margin: 5px 0 0 3px; + } + dl.register_form dt span { + display: inline; + } + #quick_actions { + display: flex; + justify-content: flex-end; + } + #quick_actions > * { + flex: 0 1 auto; + margin: 0 5px 0 0; + max-width: 40%; + white-space: nowrap; + } + #quick_actions > .button.qaction { + flex: 0 0 auto; + margin: 0 !important; + } + + /* Menu */ + .postinfo .quickbuttons { + justify-content: end; + display: flex; + flex-wrap: wrap; + + } + .quickbuttons li:hover ul { + display: none; + } + + /* General */ + .action_home { + width: 100% !important; + } + #wrapper { + border-left: 0; + border-right: 0; + border-radius: 0; + } + #footer { + padding: 10px; + } + #top_section .inner_wrap, #wrapper, #header, #footer .inner_wrap { + width: 100%; + } + #upper_section, #inner_section, #content_section { + border-radius: 0; + } + #boardindex_table .stats { + display: none; + } + .login { + width: 100%; + } + #inner_wrap { + flex-flow: row wrap; + } + #inner_wrap .user, + #inner_wrap .news { + width: auto; + max-width: initial; + } + #languages_form { + padding-right: 10px; + } + + /* BoardIndex */ + .board_stats { + display: none; + } + .info { + width: calc(100% - 65px); + } + .lastpost { + width: 100%; + padding: 0; + min-height: 2em; + } + .up_contain .lastpost { + border-top: 1px solid #ddd; + min-height: initial; + } + .lastpost p { + margin: 5px; + } + span.postby { + display: inline-block; + } + /* Stats Center */ + #ic_recentposts { + margin: 0; + width: 100%; + } + #upshrink_stats p.inline, #upshrink_stats p.last { + padding: 5px; + } + + /* MessageIndex */ + #messageindex .board_icon, #messageindex .lastpost { + display: none; + } + #messageindex .info { + padding: 8px 10px; + } + .info_block { + display: block; + width: 95%; + } + .moderation a { + padding: 3px; + } + #topic_container .moderation .main_icons { + display: none; + } + /* Unread */ + #unread .board_icon, #unread .lastpost, #unreadreplies .board_icon, #unreadreplies .lastpost { + display: none; + } + #unread .info, #unreadreplies .info { + padding-left: 5px; + } + + /* Display (Topics) */ + .poster { + float: none; + width: auto; + position: relative; + } + .postarea { + margin: 0; + } + .inner { + padding: 1em 2px; + } + .moderatorbar { + margin: 0; + } + .keyinfo { + clear: both; + } + .keyinfo .postinfo { + font-weight: normal; + align-items: flex-start; + } + .keyinfo .postinfo .postinfo_link { + max-width: 55%; + } + .keyinfo .postinfo .quickbuttons { + max-width: 45%; + } + .keyinfo .postinfo .smalltext, + .keyinfo .page_number { + opacity: 0.6; + } + .keyinfo .postinfo a.smalltext:hover { + opacity: 1; + } + img.icon, #forumposts .catbg img { + display: none; + } + .poster h4 { + display: inline-block; + } + .user_info { + display: inline; + font-size: small; + } + .user_info li, + .custom_fields_above_member { + display: none; + } + .user_info li.title, + .user_info li.membergroup { + display: inline-block; + font-weight: normal; + color: var(--neutral-mid-color); + } + .user_info li::before { + content: "·"; + padding: 0 0.5ch 0 0ch; + } + .like_count, + .smflikebutton:last-child { + margin-bottom: 8px; + } + .button.mobile { + margin: 0 0 5px 0; + } + .pagelinks { + margin: 0; + z-index: inherit; + } + + /* Profile */ + #admin_content .content { + padding: 0; + } + #creator dt { + width: 33%; + } + #creator dd { + width: 65%; + } + #basicinfo, #detailedinfo { + width: 100%; + } + #basicinfo { + margin: 0 0 5px 0; /* For UX */ + } + /* Buddies & Ignore List */ + #edit_buddies .buddy_custom_fields { + display: none; + } + /* PersonalMessages */ + #personal_messages .pm_time, #personal_messages .pm_from_to { + display: none; + } + #personal_messages .pm_inline_time { + display: block; + } + /* Alerts Page */ + #alerts .alert_text, #alerts .alert_time, #alerts .alert_buttons { + display: block; + } + #alerts .alert_time { + float: left; + } + #alerts .alert_text { + margin: 11px 0 0; + } + #alerts .alert_buttons .quickbuttons { + margin: 0 0 11px; + display: block; + } + #alerts .alert_image { + width: 60px; + } + /* Post Screen */ + form#postmodify .roundframe, #post_event .roundframe { + padding: 5px; + } + #post_header input { + width: 100%; + } + #post_confirm_buttons .smalltext { + display: none; + } + ul.post_options { + padding: 0; + margin: 0; + } + ul.post_options li { + margin: 2px 5px 0 0; + width: 48%; + } + /* Search */ + #searchform .roundframe { + padding: 5px; + flex-direction: column; + } + #advanced_search dt { + text-align: left; + width: 100%; + float: left; + } + #advanced_search dd { + width: auto; + } + #advanced_search dl#search_options { + width: 100%; + } + input#searchfor, input#userspec { + width: 75%; + } + /* Hide me */ + #inner_wrap.hide_720, #inner_wrap time, #inner_wrap .news, + #search_form, #smflogo, #message_index_jump_to, .nextlinks, #display_jump_to, + #siteslogan, th.id_group, th.registered, th.posts, th.reg_group, th.reg_date, td.reg_group, td.reg_date, + td.id_group, td.registered, td.posts:not(.unique), td.statsbar.posts, + #approve_list .ip, #approve_list .date_registered, #group_members .date_registered, + #main_content_section .navigate_section, .time, + #header_custom_profile_fields_field_type, #header_custom_profile_fields_active, + #header_custom_profile_fields_placement, #custom_profile_fields .active, #custom_profile_fields .field_type, #custom_profile_fields .placement { + display: none !important; + } + /* Generic Lists */ + #topic_notification_list .last_post, #topic_notification_list .started_by, + #request_list .time_applied, #file_list .date, #ban_list .notes, #ban_list .reason, #ban_log .email, + #mail_queue .priority, #attachments .posted { + display: none; + } + + /* Admin */ + .admin_search { + float: none; + } + .table_grid.half_content { + width: 100%; + margin: 0; + padding: 0; + } + .table_grid select { + max-width: 85vw; + } + #private, #enclose { + width: 95%; + } + /* Edit Language */ + #language_list .character_set { + display: none; + } + /* Generic Classes for Customizations */ + .hide_720 { + display: none; + } + .block_720 { + display: block; + } + .inlineblock_720 { + display: inline-block; + } +} + +/* Tricky menu */ +@media (min-width: 561px) { + #mobile_user_menu.popup_container { + display: block !important; + } + + + div[id^="mobile_generic_menu_"].popup_container { + display: block !important; + } + #main_menu .popup_window_menu + #main_menu .popup_window, + #genericmenu .popup_window, + #adm_submenus .popup_window { + box-shadow: none; + border-width: 0; + background: none; + } +} +@media (max-width: 560px) { + /* This is general */ + #main_menu .popup_container, + #genericmenu .popup_container, + #adm_submenus .popup_container { + display: none; + z-index: 20; + width: auto; + background:var(--neutral-light-color); + /* position: fixed; + left: 0; + transform: translate(50%); + * Cause souci sur menu type profil (#genericmenu .popup_container), voir les effets de bords */ + + } + #main_menu .popup_heading, + #genericmenu .popup_heading, + #adm_submenus .popup_heading { + display: block; + } + #main_menu { + margin: 0; + } + .popup_window, + #main_menu .popup_window_menu + #main_menu .popup_window, + #genericmenu .popup_window, + #adm_submenus .popup_window { + top: 15%; + width: 95vw; + min-height: auto; + max-height: 90vh; + overflow-x: hidden; + overflow-y: scroll; + } + #adm_submenus { + padding: 0; + } + #adm_submenus .dropmenu li { + float: left; + margin: 0; + } + .generic_menu { + display: none; + } + #mobile_user_menu .dropmenu, + div[id^="mobile_generic_menu_"] .generic_menu, + .generic_menu > .dropmenu { + display: flex; + width: auto; + flex-direction: column; + } + a.mobile_user_menu, + a[class^="mobile_generic_menu_"] { + display: flex; + align-items: center; + margin: 0 0 4px 0; + justify-content: center; + } + a[class^="mobile_generic_menu_"] { + margin: 8px 0; + } + .menu_icon { + display: inline-block; + background: url(../images/icons/menu.svg) no-repeat; + height: 24px; + width: 24px; + } + .dropmenu li, .dropmenu li:hover, + .dropmenu li a, .dropmenu li a:hover, + .dropmenu li a.active, .dropmenu li a.active:hover, .dropmenu li:hover a.active, + .dropmenu li ul, .dropmenu li li, .dropmenu li li a { +/* Inutile ? règle souci de saut au survol quand commenté width: 100%; + padding: 0; + margin: 0; + border-left: 0; + border-right: 0;*/ + } + .dropmenu li a, .dropmenu li a:hover { + border-radius: 0; + padding: 5px 0 !important; + } + .dropmenu li li li a, + .dropmenu li li li a:hover { + padding: 5px 24px !important; + } + .dropmenu li a, .dropmenu li:hover a, + .dropmenu li a.active, .dropmenu li a.active:hover, + .dropmenu ul li a:hover, .dropmenu li li a:hover, + .dropmenu ul li li:hover, .dropmenu li ul, + .dropmenu li li:hover ul, .dropmenu li li ul { + border-left: 0; + border-right: 0; + } + .dropmenu ul li a { + width: auto !important; + } + .dropmenu li.subsections > a::after { + position: absolute; + padding: 5px 0; + right: 10px; + font: 83.33%/150% Arial, sans-serif; + content: "\25bc" !important; + } + .dropmenu > .subsections > a::before { + position: relative; + padding: 0 .5em; + } + .dropmenu li ul, + .dropmenu li li:hover ul, .dropmenu li li ul { + position: relative; + border-radius: 0; + left: 0; + box-shadow: none; + } + /* 3rd level menu tests */ + .dropmenu li ul ul { + margin: 0 !important; + } +} + +@media (min-width: 481px) and (max-width: 560px) { + /* Calendar */ + #event_time_options { + width: 40%; + } + #event_title, #event_board { + width: 100%; + } + #evtitle { + width: 98%; + } +} + +/* Entry level phones */ +@media (max-width: 480px) { + + .board_moderators { + display: none; + } + #top_info .welcome { + display: none; + } + #pm_menu, #alerts_menu, #profile_menu { + min-width: initial; + width: 25em; + max-width: calc(100vw - 17px); + } + #footer { + text-align: center; + } + #footer ul { + width: 100%; + float: none; + } + #footer li { + display: block; + float: none; + } + /* MessageIndex */ + #main_content_section .pagelinks { + display: block; + } + #main_content_section .pagesection { + margin: 5px 0; + padding: 0; + } + #topic_icons p { + display: block; + width: 100%; + } + /* some new stuff for far better UX */ + .mobile_subject { + position: relative; + } + fieldset { + max-width: 100%; + min-width: unset; + } + /* Register Page */ + #registration .button { + font-size: 0.67em; + } + dl.register_form, dl.register_form dt, dl.register_form dd { + float: none; + width: 100%; + } + /* Login Page */ + .login dt, .login dd { + float: none; + width: 100%; + text-align: left; + } + .login #ajax_loginuser, .login #ajax_loginpass, .login #loginuser, .login #loginpass, .login select { + width: 100%; + } + + /* Display (Topic View) */ + .subject_title input { + width: 90%; + } + #quickreply_options .roundframe { + padding: 8px 10px 12px 10px; + } + + /* Post Section */ + #post_header dd { + width: 55%; + } + #post_header dt { + width: 35%; + } + img#icons { + margin: 0 0 0 5px; + } + #quickreply_options #postmodify { + width: 100%; + } + /* Poll */ + #poll_options dl.options { + padding: 0; + } + #poll_options dl.options dt, + #poll_options dl.options dd, + dl.settings dt, dl.settings dd, + #creator .settings dt, #creator .settings dd, + div#report_form dl.settings dd, div#report_form dl.settings dt, + #tracking dt, #tracking dd, + #detailedinfo dt, #detailedinfo dd, + #advanced_search dt, #advanced_search dd { + width: 100%; + float: none; + } + #post_draft_options dl.settings dt, #post_draft_options dl.settings dd { + width: 50%; + float: left; + } + dl.settings dd textarea, #report_comment { + width: 100%; + } + .move_topic { + width: 100%; + } + .bbc_float { + max-width: 100% !important; + margin-left: 0.5em !important; + margin-right: 0.5em !important; + } + /* PersonalMessages */ + #personal_messages .pm_icon { + display: none; + } + #personal_messages div.labels { + clear: both; + } + /* Alerts page */ + #alerts .alert_image { + width: 40px; + padding-left: 6px; + } + #alerts .alert_image .avatar { + display: none; + } + #alerts .alert_image .avatar + .alert_icon { + position: static; + } + /* Buddies & Ignore List */ + #edit_buddies .buddy_email { + display: none; + } + /* Stats Center */ + .half_content { + width: 100%; + margin: 0; + padding: 0; + } + th.recentboard, th.recenttime, + td.recentboard, td.recenttime { + display: none; + } + .sceditor-container { + min-height: 375px; + } + + /* Memberlist */ + th.website_url, + td.website_url, td.reg_group, td.reg_date, td.post_num { + display: none; + } + #mlist .post_count { + width: 50px; + } + #mlist .post_count .generic_bar { + border: 0; + background: transparent; + color: inherit; + } + #mlist .post_count .generic_bar .bar { + background: transparent; + box-shadow: none; + } + #mlist_search dt { + width: 100%; + display: block; + padding: 0; + } + #mlist_search dd { + padding: 0; + margin: 0; + } + #mlist_search input[type="checkbox"] { + margin: 0 13px 3px 3px; + vertical-align: middle; + } + /* Moderation */ + .post_note input { + width: 75%; + } + .modbox .floatleft { + float: none; + } + #warning_list .reason, #moderation_log_list .position, #moderation_log_list .ip, #group_members .last_active, + #group_request_list .date, #group_lists .icons, #regular_membergroups_list .icons, #post_count_membergroups_list .icons, #watch_user_list .last_login { + display: none; + } + /* Admin */ + #live_news, #support_info { + width: 100%; + padding: 0; + margin: 0 0 5px 0; + } + fieldset.admin_group a { + width: 50%; + float: left; + margin: 0 0 5px 0; + } + + .error_info, #fatal_error { + width: 100% !important; + padding: 0 !important; + float: none; + } + + /* Calendar */ + .event_options_left, .event_options_right { + width: 100%; + } + #event_title, #event_board { + width: 100%; + } + #evtitle { + width: 98%; + } + + /* Menu tests */ + #header_news_lists_preview, tr[id^="list_news_lists_"] td:nth-child(even), + #header_smiley_set_list_default, #header_smiley_set_list_url, #header_smiley_set_list_check, + tr[id^="list_smiley_set_list_"] td:nth-child(odd), + #header_mail_queue_priority, + tr[id^="list_mail_queue_"] td:nth-child(odd), + #header_member_list_user_name, #header_member_list_ip, + #header_member_list_last_active, #header_member_list_posts { + display: none; + } + tr[id^="list_mail_queue_"] td:first-of-type, + tr[id^="list_mail_queue_"] td:last-of-type { + display: table-cell; + } + .msearch_details { + width: 100% !important; + float: none; + } + .msearch_details .righttext { + text-align: left; + } + .msearch_details input { + width: 90%; + } + .msearch_details input[type="checkbox"] { + width: 5%; + } + /* Generic Lists */ + #request_list .time_applied, + #track_user_list .date, #track_user_list .date2, #file_list .filesize, #file_list .downloads, + #ban_list .added, #ban_list .num_triggers, #ban_log .date, #mail_queue .age, #attachments .subject { + display: none; + } + /* Likes */ + #likes li .like_time { + display: none; + } + /* Generic Classes for Customizations */ + .hide_480 { + display: none; + } + .block_480 { + display: block; + } + .inlineblock_480 { + display: inline-block; + } +} + + diff --git a/css/rtl.css b/css/rtl.css new file mode 100644 index 0000000..142c324 --- /dev/null +++ b/css/rtl.css @@ -0,0 +1,687 @@ +/* Common classes to easy styling. +------------------------------------------------------- */ + +.floatright { + float: left; +} +.floatleft { + float: right; +} +.clear_left { + clear: right; +} +.clear_right { + clear: left; +} +.righttext { + text-align: left; +} +.lefttext { + text-align: right; +} +/* Styling for BBC tags */ +.bbc_list { + text-align: right; +} +/* A quote, perhaps from another post. */ +.bbc_standard_quote::before, .bbc_alternate_quote::before { + content: '\275E'; + margin-left: 0.25em; +} + +/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */ +.signature, .attachments, .custom_fields_above_signature { + clear: left; +} + +/* the page navigation area */ +.main_icons.move::before, .main_icons.next_page::before { + background-position: -31px -57px; +} +.main_icons.previous_page::before { + background-position: -5px -31px; +} + +/* Amounts */ +.amt { + margin-left: 0; + margin-right: 3px; +} + +/* Lists with settings use these a lot. +------------------------------------------------------- */ +dl.settings { + clear: left; +} +dl.settings dt { + float: right; + clear: both; +} +dl.settings dt.windowbg { + float: right; +} +dl.settings dd { + float: left; +} +dl.settings img { + margin: 0 0 0 10px; +} + +/* Styles for popup windows +------------------------------------------------------- */ +.popup_heading .hide_popup { + float: left; +} + +/* Styles for rounded headers. +------------------------------------------------------- */ + +h3.catbg .icon { + margin: -2px 0 0 5px; +} +.cat_bar .desc { + margin: -8px 13px 4px 0; +} + +/* Introduce New Title Bar */ +h3.titlebg, h4.titlebg, .titlebg, h3.subbg, h4.subbg, .subbg { + padding-right: 9px; + padding-left: 9px; +} + +/* Styles for the standard dropdown menus. +------------------------------------------------------- */ +#main_menu { + float: right; +} +#menu_nav { + padding: 0; +} + +/* Level 3 submenu wrapper positioning. */ +.dropmenu li ul ul { + margin: -2em 3.1em 0 0; +} +/* This is a small fix for dropmenu icons */ +.dropmenu .main_icons, #profile_menu .main_icons, .dropmenu img { + margin: 0 -4px 0 8px; +} + +/* Hiding Level 3 submenu off hover. */ +.dropmenu li:hover ul ul, .dropmenu li ul ul, .dropmenu li:hover ul ul ul, .dropmenu li ul ul ul { + right: -9999px; + left: unset; +} +/* Reposition as visible on hover. */ +.dropmenu li li:hover ul, .dropmenu li li ul { + right: 11em; +} + +/* Indicator for additional levels. Best in the anchor so it stays visible on hover. */ +.dropmenu li li.subsections > a::after { + left: 10px; + right: auto; + content: '\25c4'; +} + +/* the main title. */ +h1.forumtitle { + float: right; +} +/* float these items to the left */ +#siteslogan, img#smflogo { + float: left; +} +/* Tweak the SMF logo */ +img#smflogo { + margin-right: 1em; +} + +/* Styles for the general looks of the theme. +------------------------------------------------------- */ +.user { + padding-left: 0; + text-align: left; +} +#upper_section .news { + float: right; +} +.navigate_section .unread_links { + float: left; +} + +/* Profile drop it needs reverse on RTL */ +#profile_menu_top > img.avatar { + float: right; + margin: 2px 0 0 5px; +} +#profile_menu .profile_user_info { + margin: 3px 10px 5px 0; +} +#profile_menu .profile_user_avatar img { + margin: 5px 10px 0 0; +} +.profile_user_links li { + padding-right: 24px; + padding-left: 0; +} + +/* The framing graphics */ +#search_form { + text-align: left; +} + +/* The navigation list (i.e. linktree) */ +.navigate_section ul li { + float: right; +} + +.navigate_section ul li .dividers { + padding: 0 6px 0 2px; +} + +/* the posting icons */ +#postbuttons_upper ul li a span { + line-height: 19px; + padding: 0 6px 0 0; +} + +.mark_read { + float: left; +} + +/* Poll results */ +#poll_options dl.options { + padding: 1em 2em 1em 2.5em; + margin: 0 0 1em 1em; +} +#poll_options dl.options dt { + float: right; + clear: right; +} +#poll_options dl.options dd { + float: right; + text-align: left; +} + +/* poster and postarea + moderation area underneath */ +.poster { + float: right; +} +.postarea, .moderatorbar { + margin: 0 175px 0 0; +} +.keyinfo h5::after { + clear: left; +} +.moderatorbar { + clear: left; +} +/* poster details and list of items */ +.poster h4, .poster ul { + padding: 0; + margin: 0; +} + +/* The quick buttons */ +ul.quickbuttons { + float: left; + clear: left; +} +ul.quickbuttons li { + float: right; +} +.quickbuttons li:last-child, .quickbuttons li:last-child:hover { + border-radius: 4px 1px 1px 4px; + padding-bottom: 0; +} +.quickbuttons li:first-child, .quickbuttons li:first-child:hover { + border-radius: 1px 4px 4px 1px; + padding-bottom: 0; + line-height: 1.9em; +} +.quickbuttons li.quick_edit, .quickbuttons li.post_options { + line-height: 1.9em; + position: relative; +} +.quickbuttons li ul { + text-align: right; + right: unset; + left: -1px; +} +/* The buttonrow */ +.buttonrow .button:last-child { + border-radius: 0; + border-right: 0; +} +.buttonrow .button:first-child { + border-radius: 0; + border-right: 1px solid #ccc; +} + +.post_verification #verification_control { + margin: .3em 1em .3em 0; +} +.post { + clear: left; +} +#forumposts .modified { + float: right; +} +#forumposts .reportlinks { + margin-left: 1.5em; + text-align: left; + clear: left; +} + +#moderationbuttons_strip { + float: right; +} +#moderationbuttons_strip ul { + margin: 0 0.2em 0 0; + padding: 0 1em 0 0; +} +/* The jump to box */ +#display_jump_to { + text-align: left; +} +#display_jump_to select { + margin: 0 5px 0 0; +} + +/* mlist */ +#mlist .website_url { + width: 80px; +} + +/* Styles for edit post section +---------------------------------------------------- */ +#post_header dt { + float: right; +} +#post_header dd { + float: right; +} +ul.post_options { + margin: 0 1em 0 0; +} +ul.post_options li { + float: right; + margin: 0 2px; +} + +/* Styles for edit event section +---------------------------------------------------- */ +#post_event div.event_options { + float: left; +} +#post_event #event_main input { + margin: 0 0 1em 0; + float: right; +} +#post_event #event_main div.smalltext { + float: left; +} +#post_event ul.event_main li { + float: left; +} +#post_event ul.event_options { + padding: 0 .7em .7em 0; +} +#post_event #event_main select, #post_event ul.event_options li select, +#post_event ul.event_options li input[type="checkbox"] { + margin: 0 0 0 1em; +} + +/* Styles for edit poll section. +---------------------------------------------------- */ +#edit_poll fieldset input { + margin-right: 7em; +} +#edit_poll ul.poll_main li { + padding-right: 1em; +} +#edit_poll ul.poll_main input { + margin-right: 1em; +} +#edit_poll div.poll_options { + float: right; +} +#edit_poll ul.poll_main, dl.poll_options { + padding: 0 .7em 0 0; +} +#edit_poll dl.poll_options dt { + padding: 0 1em 0 0; +} +#edit_poll dl.poll_options dd input { + margin-right: 0; +} + +/* Styles for the personal messages section. +------------------------------------------------- */ +#personal_messages h3 span#author, #personal_messages h3 span#topic_title { + float: right; +} +#personal_messages h3 span#author { + margin: 0 0.5em 0 0; +} +#personal_messages h3 span#topic_title { + margin: 0 9em 0 0; +} +#personal_messages .labels { + padding: 0 0 0 1em; +} +#to_item_list_container div, #bcc_item_list_container div { + float: right; + margin: 0; +} + +/* Styles for the move topic section. */ +.move_topic { + text-align: right; +} + +/* Styles for the login areas. +------------------------------------------------------- */ +.login dt { + float: right; +} +.login dd { + float: right; + text-align: right; +} +.login h3 img { + margin: 0 0 0.5em; +} + +/* Additional profile fields */ +dl.register_form { + clear: left; +} + +dl.register_form dt { + float: right; +} + +/* Styles for maintenance mode. +------------------------------------------------------- */ +#maintenance_mode img.floatleft { + margin-left: 1em; +} +/* common for all admin sections */ +h3.titlebg img { + margin-left: 0.5em; +} +tr.titlebg td { + padding-right: 0.7em; +} +div#admin_menu { + padding-right: 0; +} +#admin_content { + clear: right; +} + +/* Styles for generic tables. +------------------------------------------------------- */ +#info_center .cat_bar, .table_grid tr.catbg th { + text-align: right; +} +.message_index_title { + margin-left: 40px; +} + +/* Styles for info boxes. +------------------------------------------------- */ +.errorbox, .noticebox, .infobox { + padding: 7px 35px 7px 10px; +} +.errorbox::before, .noticebox::before, .infobox::before { + left: 0; + right: 10px; +} +.errorbox p.alert { + margin: 0 0 0 4px; + float: right; +} +.errorbox, .noticebox, .infobox { + padding: 7px 35px 7px 10px; +} + +/* Styles for the profile section. +------------------------------------------------- */ +#basicinfo { + float: right; +} +#detailedinfo { + float: left; +} +#basicinfo .icon_fields li { + float: right; + margin-right: 0; + margin-left: 5px; +} +#avatar_server_stored div { + float: right; +} +#detailedinfo dt, #tracking dt { + float: right; +} +#userstatus .smalltext, .pm_icon { + margin: 0 5px 0 0 !important; +} +/* h3 HD Icons */ +h3.search_hd { + padding: 8px 45px 6px; + background-position: 99% 50%; +} +h3.profile_hd { + padding: 8px 50px 8px 0; + background-position: 99% 50%; +} + +/* Activity by time */ +#activitytime { + clear: right; +} +.activity_stats li { + float: right; +} +.activity_stats li span { + border-width: 1px 0 0 1px; +} +.activity_stats li.last span { + border-left: none; +} +.profile_pie { + background-image: url(../images/stats_pie_rtl.png); + float: right; + margin-right: 0; + margin-left: 1em; +} + +/* Most popular boards by posts and activity */ +#popularposts { + float: right; +} +#popularactivity { + float: left; +} + +/* View posts */ +.topic .time { + float: left; +} +.counter { + padding: 0.2em 0.2em 0.1em 0.5em; + float: right; +} +.topic .mod_icons { + text-align: left; + margin-right: 0; + margin-left: 1em; +} + +#ip_list li.header, #ip_list li.ip { + float: right; +} +#creator dt { + float: right; +} +#creator dd { + float: right; +} + +.ignoreboards ul { + margin: 0 1em 0 0; +} +.ignoreboards li { + float: right; +} + +#pick_theme { + float: right; +} +.infolinks { + min-width: 95%; + float: right; +} + +/* Styles for the statistics center. +------------------------------------------------- */ +.stats_icon { + margin: 2px 3px -1px 6px; +} +dl.stats dt { + float: right; +} +dl.stats dd { + margin: 0 2% 4px 0; +} +#stats tr.windowbg th.stats_month { + text-align: right; +} +.generic_bar .bar, .progress_bar .bar { + left: unset; + right: 0; +} +tr.windowbg th.stats_month, tr.windowbg td.stats_day { + text-align: right; +} +#stats tr.windowbg th.lefttext, #stats tr.titlebg th.lefttext { + text-align: right; +} + +/* Styles for the advanced search section. +------------------------------------------------- */ +#searchform fieldset { + text-align: right; +} +#advanced_search dt { + float: right; + text-align: left; +} +#advanced_search dd { + float: right; + margin: 0 0.5em 0 0; + text-align: right; +} +/* Boards picker */ +#searchform fieldset p { + text-align: right; +} + +.search_results_posts .buttons { + padding: 5px 0 0 1em; +} + +/* Styles for the help section. +------------------------------------------------- */ +#helpmain h3.section { + padding: 0 0.5em 0.5em 0; +} +/* put back the bullets please */ +#helpmain ul { + margin: 0 25px 0 0; + padding-left: 0; +} +#helpmain #messageindex { + clear: left; +} + +/* Styles for the admincenter (reverse admin.css). +------------------------------------------------- */ +/* common admin classes */ +#admin_content .button { + float: left; +} + +#manage_boards .button { + margin: 2px 6px 0px 6px; +} + +/* Styles for the package manager. +------------------------------------------------- */ +#package_list .tborder { + margin: .25em 26px .25em 0; +} +#package_list ol, #package_list ol li { + margin-left: 0; + margin-right: 50px; +} + +/* ManageBoards */ +#manage_boards ul { + overflow: hidden; +} +#manage_boards li { + overflow: hidden; +} +.move_links { + padding: 0 0 0 13px; +} + +span.search_weight { + text-align: left; +} + +/* Manage Bans */ +.ban_restriction { + margin: 0.2em 2.2em 0.2em 0; +} + +/* Themes */ +.is_directory { + padding-right: 18px; + padding-left: 0; +} +.is_directory span { + margin: -2px 0 0 3px; +} + +/* Styles for the moderation center. +------------------------------------------------- */ +ul.moderation_notes li { + padding: 4px 4px 4px 0; +} + +h3 .collapse { + float: left; +} + +.pages { + margin-left: 0; + margin-right: 7px; +} + +/* Styles for the calendar. +----------------------------- */ +#main_grid th.days, #main_grid td.days { + text-align: right; +} + +/* Code is a code do it LTR */ +code.bbc_code, pre.file_content { + text-align: left; + direction: ltr; +} \ No newline at end of file diff --git a/images/banniere.jpg b/images/banniere.jpg new file mode 100644 index 0000000..283a903 Binary files /dev/null and b/images/banniere.jpg differ diff --git a/images/bbc/bbc_bg.png b/images/bbc/bbc_bg.png new file mode 100644 index 0000000..1a2aa76 Binary files /dev/null and b/images/bbc/bbc_bg.png differ diff --git a/images/bbc/bbc_hoverbg.png b/images/bbc/bbc_hoverbg.png new file mode 100644 index 0000000..7d4fcfb Binary files /dev/null and b/images/bbc/bbc_hoverbg.png differ diff --git a/images/bbc/index.php b/images/bbc/index.php new file mode 100644 index 0000000..2cf5d33 --- /dev/null +++ b/images/bbc/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/images/bbc/spoiler.gif b/images/bbc/spoiler.gif new file mode 100644 index 0000000..4397ee0 Binary files /dev/null and b/images/bbc/spoiler.gif differ diff --git a/images/blank.png b/images/blank.png new file mode 100644 index 0000000..e32226b Binary files /dev/null and b/images/blank.png differ diff --git a/images/boardicons.png b/images/boardicons.png new file mode 100644 index 0000000..d541fcd Binary files /dev/null and b/images/boardicons.png differ diff --git a/images/boardicons.svg b/images/boardicons.svg new file mode 100644 index 0000000..8bddb90 --- /dev/null +++ b/images/boardicons.svg @@ -0,0 +1,238 @@ + + + + diff --git a/images/buddy_useroff.png b/images/buddy_useroff.png new file mode 100644 index 0000000..943cbdf Binary files /dev/null and b/images/buddy_useroff.png differ diff --git a/images/buddy_useron.png b/images/buddy_useron.png new file mode 100644 index 0000000..de14afa Binary files /dev/null and b/images/buddy_useron.png differ diff --git a/images/cake.png b/images/cake.png new file mode 100644 index 0000000..24ded25 Binary files /dev/null and b/images/cake.png differ diff --git a/images/construction.png b/images/construction.png new file mode 100644 index 0000000..48ea489 Binary files /dev/null and b/images/construction.png differ diff --git a/images/curve.png b/images/curve.png new file mode 100644 index 0000000..9a096ac Binary files /dev/null and b/images/curve.png differ diff --git a/images/curve2.png b/images/curve2.png new file mode 100644 index 0000000..fd64134 Binary files /dev/null and b/images/curve2.png differ diff --git a/images/forum_logo.png b/images/forum_logo.png new file mode 100644 index 0000000..67eb272 Binary files /dev/null and b/images/forum_logo.png differ diff --git a/images/generic_attach.png b/images/generic_attach.png new file mode 100644 index 0000000..0f7f32d Binary files /dev/null and b/images/generic_attach.png differ diff --git a/images/helptopics.png b/images/helptopics.png new file mode 100644 index 0000000..40a90b8 Binary files /dev/null and b/images/helptopics.png differ diff --git a/images/helptopics_hd.png b/images/helptopics_hd.png new file mode 100644 index 0000000..fb76bf3 Binary files /dev/null and b/images/helptopics_hd.png differ diff --git a/images/icons/admin.png b/images/icons/admin.png new file mode 100644 index 0000000..cb09f42 Binary files /dev/null and b/images/icons/admin.png differ diff --git a/images/icons/admin.svg b/images/icons/admin.svg new file mode 100644 index 0000000..1209e7d --- /dev/null +++ b/images/icons/admin.svg @@ -0,0 +1,63 @@ + + + + diff --git a/images/icons/admin_sprite.png b/images/icons/admin_sprite.png new file mode 100644 index 0000000..84bb112 Binary files /dev/null and b/images/icons/admin_sprite.png differ diff --git a/images/icons/alerts.png b/images/icons/alerts.png new file mode 100644 index 0000000..b397c53 Binary files /dev/null and b/images/icons/alerts.png differ diff --git a/images/icons/alerts.svg b/images/icons/alerts.svg new file mode 100644 index 0000000..10d260b --- /dev/null +++ b/images/icons/alerts.svg @@ -0,0 +1,64 @@ + + + + diff --git a/images/icons/bell.svg b/images/icons/bell.svg new file mode 100644 index 0000000..63c44ba --- /dev/null +++ b/images/icons/bell.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/icons/clip.png b/images/icons/clip.png new file mode 100644 index 0000000..be540f3 Binary files /dev/null and b/images/icons/clip.png differ diff --git a/images/icons/config_hd.png b/images/icons/config_hd.png new file mode 100644 index 0000000..73bfaba Binary files /dev/null and b/images/icons/config_hd.png differ diff --git a/images/icons/delete.png b/images/icons/delete.png new file mode 100644 index 0000000..aa299eb Binary files /dev/null and b/images/icons/delete.png differ diff --git a/images/icons/editor_sprite.png b/images/icons/editor_sprite.png new file mode 100644 index 0000000..e097db6 Binary files /dev/null and b/images/icons/editor_sprite.png differ diff --git a/images/icons/generic.svg b/images/icons/generic.svg new file mode 100644 index 0000000..27cd449 --- /dev/null +++ b/images/icons/generic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/icons/help.png b/images/icons/help.png new file mode 100644 index 0000000..5e120af Binary files /dev/null and b/images/icons/help.png differ diff --git a/images/icons/home.png b/images/icons/home.png new file mode 100644 index 0000000..0b79f35 Binary files /dev/null and b/images/icons/home.png differ diff --git a/images/icons/home.svg b/images/icons/home.svg new file mode 100644 index 0000000..82d6626 --- /dev/null +++ b/images/icons/home.svg @@ -0,0 +1,65 @@ + + + + diff --git a/images/icons/index.php b/images/icons/index.php new file mode 100644 index 0000000..2cf5d33 --- /dev/null +++ b/images/icons/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/images/icons/login.png b/images/icons/login.png new file mode 100644 index 0000000..0225dfb Binary files /dev/null and b/images/icons/login.png differ diff --git a/images/icons/login.svg b/images/icons/login.svg new file mode 100644 index 0000000..c2ba617 --- /dev/null +++ b/images/icons/login.svg @@ -0,0 +1,63 @@ + + + + diff --git a/images/icons/logout.svg b/images/icons/logout.svg new file mode 100644 index 0000000..c2ba617 --- /dev/null +++ b/images/icons/logout.svg @@ -0,0 +1,63 @@ + + + + diff --git a/images/icons/main_icons_sprite.png b/images/icons/main_icons_sprite.png new file mode 100644 index 0000000..54f1c6a Binary files /dev/null and b/images/icons/main_icons_sprite.png differ diff --git a/images/icons/main_icons_sprite_hd.png b/images/icons/main_icons_sprite_hd.png new file mode 100644 index 0000000..2f6d9ee Binary files /dev/null and b/images/icons/main_icons_sprite_hd.png differ diff --git a/images/icons/members.png b/images/icons/members.png new file mode 100644 index 0000000..9549b52 Binary files /dev/null and b/images/icons/members.png differ diff --git a/images/icons/members.svg b/images/icons/members.svg new file mode 100644 index 0000000..def9b61 --- /dev/null +++ b/images/icons/members.svg @@ -0,0 +1,64 @@ + + + + diff --git a/images/icons/menu.svg b/images/icons/menu.svg new file mode 100644 index 0000000..c1ad1ec --- /dev/null +++ b/images/icons/menu.svg @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/images/icons/moderate.png b/images/icons/moderate.png new file mode 100644 index 0000000..d51e07b Binary files /dev/null and b/images/icons/moderate.png differ diff --git a/images/icons/moderate.svg b/images/icons/moderate.svg new file mode 100644 index 0000000..f06fe98 --- /dev/null +++ b/images/icons/moderate.svg @@ -0,0 +1,64 @@ + + + + diff --git a/images/icons/modify_inline.png b/images/icons/modify_inline.png new file mode 100644 index 0000000..9ec041b Binary files /dev/null and b/images/icons/modify_inline.png differ diff --git a/images/icons/pm.png b/images/icons/pm.png new file mode 100644 index 0000000..3bd991f Binary files /dev/null and b/images/icons/pm.png differ diff --git a/images/icons/pm.svg b/images/icons/pm.svg new file mode 100644 index 0000000..3081b5f --- /dev/null +++ b/images/icons/pm.svg @@ -0,0 +1,64 @@ + + + + diff --git a/images/icons/profile.png b/images/icons/profile.png new file mode 100644 index 0000000..e7b0189 Binary files /dev/null and b/images/icons/profile.png differ diff --git a/images/icons/profile.svg b/images/icons/profile.svg new file mode 100644 index 0000000..f403b83 --- /dev/null +++ b/images/icons/profile.svg @@ -0,0 +1,68 @@ + + + + + diff --git a/images/icons/profile_hd.png b/images/icons/profile_hd.png new file mode 100644 index 0000000..2ac2218 Binary files /dev/null and b/images/icons/profile_hd.png differ diff --git a/images/icons/profile_sm.png b/images/icons/profile_sm.png new file mode 100644 index 0000000..15112f6 Binary files /dev/null and b/images/icons/profile_sm.png differ diff --git a/images/icons/recent.png b/images/icons/recent.png new file mode 100644 index 0000000..8068753 Binary files /dev/null and b/images/icons/recent.png differ diff --git a/images/icons/recent.svg b/images/icons/recent.svg new file mode 100644 index 0000000..4703bb2 --- /dev/null +++ b/images/icons/recent.svg @@ -0,0 +1,64 @@ + + + + diff --git a/images/icons/search.png b/images/icons/search.png new file mode 100644 index 0000000..d30655d Binary files /dev/null and b/images/icons/search.png differ diff --git a/images/icons/search.svg b/images/icons/search.svg new file mode 100644 index 0000000..f1a1323 --- /dev/null +++ b/images/icons/search.svg @@ -0,0 +1,74 @@ + + + + + + diff --git a/images/icons/stats_info.png b/images/icons/stats_info.png new file mode 100644 index 0000000..3a8da25 Binary files /dev/null and b/images/icons/stats_info.png differ diff --git a/images/icons/toggle.png b/images/icons/toggle.png new file mode 100644 index 0000000..54d9b20 Binary files /dev/null and b/images/icons/toggle.png differ diff --git a/images/icons/top.png b/images/icons/top.png new file mode 100644 index 0000000..b948c6f Binary files /dev/null and b/images/icons/top.png differ diff --git a/images/icons/unread.png b/images/icons/unread.png new file mode 100644 index 0000000..71b22a0 Binary files /dev/null and b/images/icons/unread.png differ diff --git a/images/icons/unread.svg b/images/icons/unread.svg new file mode 100644 index 0000000..c7a46de --- /dev/null +++ b/images/icons/unread.svg @@ -0,0 +1,64 @@ + + + + diff --git a/images/icons/unread_replies.png b/images/icons/unread_replies.png new file mode 100644 index 0000000..019d2ca Binary files /dev/null and b/images/icons/unread_replies.png differ diff --git a/images/icons/unread_replies.svg b/images/icons/unread_replies.svg new file mode 100644 index 0000000..c1e3e59 --- /dev/null +++ b/images/icons/unread_replies.svg @@ -0,0 +1,109 @@ + + + + diff --git a/images/icq.png b/images/icq.png new file mode 100644 index 0000000..1127f24 Binary files /dev/null and b/images/icq.png differ diff --git a/images/index.php b/images/index.php new file mode 100644 index 0000000..2cf5d33 --- /dev/null +++ b/images/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/images/ip.png b/images/ip.png new file mode 100644 index 0000000..2f77e04 Binary files /dev/null and b/images/ip.png differ diff --git a/images/loading_sm.gif b/images/loading_sm.gif new file mode 100644 index 0000000..0fa9f5a Binary files /dev/null and b/images/loading_sm.gif differ diff --git a/images/membericons/blank.png b/images/membericons/blank.png new file mode 100644 index 0000000..e32226b Binary files /dev/null and b/images/membericons/blank.png differ diff --git a/images/membericons/icon.png b/images/membericons/icon.png new file mode 100644 index 0000000..6ab8bac Binary files /dev/null and b/images/membericons/icon.png differ diff --git a/images/membericons/iconadmin.png b/images/membericons/iconadmin.png new file mode 100644 index 0000000..66b880c Binary files /dev/null and b/images/membericons/iconadmin.png differ diff --git a/images/membericons/icongmod.png b/images/membericons/icongmod.png new file mode 100644 index 0000000..29f973f Binary files /dev/null and b/images/membericons/icongmod.png differ diff --git a/images/membericons/iconmod.png b/images/membericons/iconmod.png new file mode 100644 index 0000000..abed5f4 Binary files /dev/null and b/images/membericons/iconmod.png differ diff --git a/images/membericons/index.php b/images/membericons/index.php new file mode 100644 index 0000000..2cf5d33 --- /dev/null +++ b/images/membericons/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/images/new_redirect.png b/images/new_redirect.png new file mode 100644 index 0000000..e9c2db8 Binary files /dev/null and b/images/new_redirect.png differ diff --git a/images/post/angry.png b/images/post/angry.png new file mode 100644 index 0000000..c21dd7f Binary files /dev/null and b/images/post/angry.png differ diff --git a/images/post/cheesy.png b/images/post/cheesy.png new file mode 100644 index 0000000..fa13c98 Binary files /dev/null and b/images/post/cheesy.png differ diff --git a/images/post/clip.png b/images/post/clip.png new file mode 100644 index 0000000..889d90e Binary files /dev/null and b/images/post/clip.png differ diff --git a/images/post/exclamation.png b/images/post/exclamation.png new file mode 100644 index 0000000..391c60a Binary files /dev/null and b/images/post/exclamation.png differ diff --git a/images/post/grin.png b/images/post/grin.png new file mode 100644 index 0000000..fd00389 Binary files /dev/null and b/images/post/grin.png differ diff --git a/images/post/index.php b/images/post/index.php new file mode 100644 index 0000000..2cf5d33 --- /dev/null +++ b/images/post/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/images/post/lamp.png b/images/post/lamp.png new file mode 100644 index 0000000..f7b5f98 Binary files /dev/null and b/images/post/lamp.png differ diff --git a/images/post/moved.png b/images/post/moved.png new file mode 100644 index 0000000..8a91d47 Binary files /dev/null and b/images/post/moved.png differ diff --git a/images/post/poll.png b/images/post/poll.png new file mode 100644 index 0000000..d4d8a35 Binary files /dev/null and b/images/post/poll.png differ diff --git a/images/post/question.png b/images/post/question.png new file mode 100644 index 0000000..1fe069b Binary files /dev/null and b/images/post/question.png differ diff --git a/images/post/recycled.png b/images/post/recycled.png new file mode 100644 index 0000000..682e09e Binary files /dev/null and b/images/post/recycled.png differ diff --git a/images/post/sad.png b/images/post/sad.png new file mode 100644 index 0000000..8622395 Binary files /dev/null and b/images/post/sad.png differ diff --git a/images/post/smiley.png b/images/post/smiley.png new file mode 100644 index 0000000..11eef52 Binary files /dev/null and b/images/post/smiley.png differ diff --git a/images/post/thumbdown.png b/images/post/thumbdown.png new file mode 100644 index 0000000..e4cab2a Binary files /dev/null and b/images/post/thumbdown.png differ diff --git a/images/post/thumbup.png b/images/post/thumbup.png new file mode 100644 index 0000000..5a36f3b Binary files /dev/null and b/images/post/thumbup.png differ diff --git a/images/post/wink.png b/images/post/wink.png new file mode 100644 index 0000000..3f20448 Binary files /dev/null and b/images/post/wink.png differ diff --git a/images/post/xx.png b/images/post/xx.png new file mode 100644 index 0000000..7999038 Binary files /dev/null and b/images/post/xx.png differ diff --git a/images/selected.png b/images/selected.png new file mode 100644 index 0000000..a50ca32 Binary files /dev/null and b/images/selected.png differ diff --git a/images/selected_open.png b/images/selected_open.png new file mode 100644 index 0000000..b6f7534 Binary files /dev/null and b/images/selected_open.png differ diff --git a/images/skype.png b/images/skype.png new file mode 100644 index 0000000..2e25b1b Binary files /dev/null and b/images/skype.png differ diff --git a/images/smflogo.svg b/images/smflogo.svg new file mode 100644 index 0000000..5223406 --- /dev/null +++ b/images/smflogo.svg @@ -0,0 +1,2 @@ +®® + diff --git a/images/stats_pie.png b/images/stats_pie.png new file mode 100644 index 0000000..5de2b57 Binary files /dev/null and b/images/stats_pie.png differ diff --git a/images/stats_pie_rtl.png b/images/stats_pie_rtl.png new file mode 100644 index 0000000..8add9c1 Binary files /dev/null and b/images/stats_pie_rtl.png differ diff --git a/images/thumbnail.png b/images/thumbnail.png new file mode 100644 index 0000000..8ddeaad Binary files /dev/null and b/images/thumbnail.png differ diff --git a/images/topic/index.php b/images/topic/index.php new file mode 100644 index 0000000..2cf5d33 --- /dev/null +++ b/images/topic/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/images/topic/normal_post.png b/images/topic/normal_post.png new file mode 100644 index 0000000..1821dc4 Binary files /dev/null and b/images/topic/normal_post.png differ diff --git a/images/topic/normal_post_locked.png b/images/topic/normal_post_locked.png new file mode 100644 index 0000000..8281e5b Binary files /dev/null and b/images/topic/normal_post_locked.png differ diff --git a/images/topic/normal_post_locked_sticky.png b/images/topic/normal_post_locked_sticky.png new file mode 100644 index 0000000..5c82388 Binary files /dev/null and b/images/topic/normal_post_locked_sticky.png differ diff --git a/images/topic/normal_post_sticky.png b/images/topic/normal_post_sticky.png new file mode 100644 index 0000000..61673d1 Binary files /dev/null and b/images/topic/normal_post_sticky.png differ diff --git a/index.php b/index.php new file mode 100644 index 0000000..2cf5d33 --- /dev/null +++ b/index.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/index.template.php b/index.template.php new file mode 100644 index 0000000..18423b9 --- /dev/null +++ b/index.template.php @@ -0,0 +1,887 @@ + '' . $txt['pages'] . '', + 'previous_page' => '', + 'current_page' => '%1$d ', + 'page' => '%2$s ', + 'expand_pages' => ' ... ', + 'next_page' => '', + 'extra_after' => '', + ); + + // Allow css/js files to be disabled for this specific theme. + // Add the identifier as an array key. IE array('smf_script'); Some external files might not add identifiers, on those cases SMF uses its filename as reference. + if (!isset($settings['disable_files'])) + $settings['disable_files'] = array(); +} + +/** + * The main sub template above the content. + */ +function template_html_above() +{ + global $context, $scripturl, $txt, $modSettings; + + // Show right to left, the language code, and the character set for ease of translating. + echo ' + + + '; + + /* + You don't need to manually load index.css, this will be set up for you. + Note that RTL will also be loaded for you. + To load other CSS and JS files you should use the functions + loadCSSFile() and loadJavaScriptFile() respectively. + This approach will let you take advantage of SMF's automatic CSS + minimization and other benefits. You can, of course, manually add any + other files you want after template_css() has been run. + + * Short example: + - CSS: loadCSSFile('filename.css', array('minimize' => true)); + - JS: loadJavaScriptFile('filename.js', array('minimize' => true)); + You can also read more detailed usages of the parameters for these + functions on the SMF wiki. + + * Themes: + The most efficient way of writing multi themes is to use a master + index.css plus variant.css files. If you've set them up properly + (through $settings['theme_variants']), the variant files will be loaded + for you automatically. + Additionally, tweaking the CSS for the editor requires you to include + a custom 'jquery.sceditor.theme.css' file in the css folder if you need it. + + * MODs: + If you want to load CSS or JS files in here, the best way is to use the + 'integrate_load_theme' hook for adding multiple files, or using + 'integrate_pre_css_output', 'integrate_pre_javascript_output' for a single file. + */ + + // load in any css from mods or themes so they can overwrite if wanted + template_css(); + + // load in any javascript files from mods and themes + template_javascript(); + + echo ' + ', $context['page_title_html_safe'], ' + '; + + // Content related meta tags, like description, keywords, Open Graph stuff, etc... + foreach ($context['meta_tags'] as $meta_tag) + { + echo ' + $meta_value) + echo ' ', $meta_key, '="', $meta_value, '"'; + + echo '>'; + } + + /* What is your Lollipop's color? + Theme Authors, you can change the color here to make sure your theme's main color gets visible on tab */ + echo ' + '; + + // Please don't index these Mr Robot. + if (!empty($context['robot_no_index'])) + echo ' + '; + + // Present a canonical url for search engines to prevent duplicate content in their indices. + if (!empty($context['canonical_url'])) + echo ' + '; + + // Show all the relative links, such as help, search, contents, and the like. + echo ' + + ', ($context['allow_search'] ? ' + ' : ''); + + // If RSS feeds are enabled, advertise the presence of one. + if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged'])) + echo ' + + '; + + // If we're viewing a topic, these should be the previous and next topics, respectively. + if (!empty($context['links']['next'])) + echo ' + '; + + if (!empty($context['links']['prev'])) + echo ' + '; + + // If we're in a board, or a topic for that matter, the index will be the board's index. + if (!empty($context['current_board'])) + echo ' + '; + + // Output any remaining HTML headers. (from mods, maybe?) + echo $context['html_headers']; + + echo ' + + +'; +} + +/** + * The upper part of the main template layer. This is the stuff that shows above the main forum content. + */ +function template_body_above() +{ + global $context, $settings, $scripturl, $txt, $modSettings, $maintenance; + // Liens pour accessibilité, invisible sans utiliser la navigation au clavier + // menu du forum + echo ''. $txt['khbb_link_main_menu'] .' '; + // contenu du forum + echo '' . $txt['khbb_link_content_section'] . ' '; + // recherche du forum + echo '' . $txt['khbb_link_search'] . ' '; + // Appeler la barre générale de Khaganat + include("khnav_header.php"); +echo '
    '; + // Wrapper div now echoes permanently for better layout options. h1 a is now target for "Go up" links. + echo ' + +
    + '; + echo ' +
    '; + // début menu du haut. On reconstruit sauce maison. + echo ' +
    + + ', $txt['mobile_user_menu'], ' +
    +
    '; + echo ' '; +// Fin menu + + theme_linktree(); + + // The main content should go here. + echo ' +
    +
    '; +} +/** + * The stuff shown immediately below the main content, including the footer + */ +function template_body_below() +{ + global $context, $txt, $scripturl, $modSettings; + + echo ' +
    +
    + '; + + // Show the footer with copyright, terms and help links. + echo '
    + + +
    + '; + +// There is now a global "Go to top" link at the right. + + echo ' + + '; + + echo '
    '; + // Fin du forum + // Inclure le footer Khaganat + include("khnav_footer.php"); + echo '
    '; +} + + + +/** + * This shows any deferred JavaScript and closes out the HTML + */ +function template_html_below() +{ + // Load in any javascipt that could be deferred to the end of the page + template_javascript(true); + + + + +echo ' +'; +} + +/** + * Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".. + * + * @param bool $force_show Whether to force showing it even if settings say otherwise + */ +function theme_linktree($force_show = false) +{ + global $context, $shown_linktree, $scripturl, $txt; + + // If linktree is empty, just return - also allow an override. + if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show)) + return; + + echo ' + '; + + $shown_linktree = true; +} + +/** + * Show the menu up top. Something like [home] [help] [profile] [logout]... + */ +function template_menu() +{ + global $context, $settings; + + echo '