PATH:
home
/
sudairsocs
/
www
/
forum
/
Themes
/
Reseller_v2.0.4
<?php /** * Simple Machines Forum (SMF) * * @package SMF * @author Simple Machines https://www.simplemachines.org * @copyright 2022 Simple Machines and individual contributors * @license https://www.simplemachines.org/about/smf/license.php BSD * * @version 2.1.2 */ /** * The main messageindex. */ function template_main() { global $context, $settings, $options, $scripturl, $modSettings, $txt; echo '<div id="display_head"> <h2 class="display_title"><a href="', $scripturl, '?board=', $context['current_board'], '.0">', $context['name'], '</a></h2>'; if (isset($context['description']) && $context['description'] != '') echo ' <p>', $context['description'], '</p>'; if (!empty($context['moderators'])) echo ' <p>', count($context['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $context['link_moderators']), '.</p>'; if (!empty($settings['display_who_viewing'])) { echo ' <p>'; // 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'], ' </p>'; } echo ' </div>'; if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) { echo ' <div id="board_', $context['current_board'], '_childboards" class="boardindex_table"> <div class="main_container"> <div class="cat_bar"> <h3 class="catbg">', $txt['sub_boards'], '</h3> </div>'; foreach ($context['boards'] as $board) { echo ' <div id="board_', $board['id'], '" class="board_container ', (!empty($board['css_class']) ? $board['css_class'] : ''), '"> <div class="board_icon"> ', function_exists('template_bi_' . $board['type'] . '_icon') ? call_user_func('template_bi_' . $board['type'] . '_icon', $board) : template_bi_board_icon($board), ' </div> <div class="board_info"> ', function_exists('template_bi_' . $board['type'] . '_info') ? call_user_func('template_bi_' . $board['type'] . '_info', $board) : template_bi_board_info($board), ' </div><!-- .info -->'; // Show some basic information about the number of posts, etc. echo ' <div class="board_stats"> ', function_exists('template_bi_' . $board['type'] . '_stats') ? call_user_func('template_bi_' . $board['type'] . '_stats', $board) : template_bi_board_stats($board), ' </div>'; // Show the last post if there is one. echo ' <div class="board_lastpost"> ', function_exists('template_bi_' . $board['type'] . '_lastpost') ? call_user_func('template_bi_' . $board['type'] . '_lastpost', $board) : template_bi_board_lastpost($board), ' </div>'; // Won't somebody think of the children! function_exists('template_bi_' . $board['type'] . '_children') ? call_user_func('template_bi_' . $board['type'] . '_children', $board) : template_bi_board_children($board); echo ' </div><!-- #board_[id] -->'; } echo ' </div> </div><!-- #board_[current_board]_childboards -->'; } // Let them know why their message became unapproved. if ($context['becomesUnapproved']) echo ' <div class="noticebox"> ', $txt['post_becomes_unapproved'], ' </div>'; // If this person can approve items and we have some awaiting approval tell them. if (!empty($context['unapproved_posts_message'])) echo ' <div class="noticebox"> ', $context['unapproved_posts_message'], ' </div>'; if (!$context['no_topic_listing']) { echo ' <div class="pagesection"> ', $context['menu_separator'], ' <div class="pagelinks floatleft"> <a href="#bot" class="button">', $txt['go_down'], '</a> ', $context['page_index'], ' </div> ', template_button_strip($context['normal_buttons'], 'right'), ' </div>'; // If Quick Moderation is enabled start the form. if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) echo ' <form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" class="clear" name="quickModForm" id="quickModForm">'; echo ' <div id="messageindex">'; // No topics... just say, "sorry bub". if (empty($context['topics'])) echo ' <div class="windowbg">', $txt['topic_alert_none'], '</div>'; $stickybar = false; $normalbar = false; foreach ($context['topics'] as $topic) { // Separate sticky topics from normal topics if (!empty($settings['st_separate_sticky_locked'])) { if ($topic['is_sticky'] && !$stickybar){ echo ' <div class="title_bar"> <h3 class="titlebg"> ', $txt['st_sticky_topic'], ' </h3> </div>'; $stickybar = true; } elseif (!$topic['is_sticky'] && $stickybar && !$normalbar) { echo ' <div class="title_bar"> <h3 class="titlebg"> ', $txt['st_normal_topic'], ' </h3> </div>'; $normalbar = true; } } // Contain the topic list echo ' <div class="topic_container ', $topic['css_class'], '"> <div class="topic_icon"> <img src="', $topic['first_post']['icon_url'], '" alt=""> ', $topic['is_posted_in'] ? '<span class="main_icons profile_sm"></span>' : '', ' </div> <div class="topic_info', !empty($context['can_quick_mod']) ? '' : ' info_mod', '"> <div ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" ondblclick="oQuickModifyTopic.modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\');"' : ''), '>'; // Now we handle the icons echo ' <div class="icons">'; if ($topic['is_watched']) echo ' <span class="main_icons watch" title="', $txt['watching_this_topic'], '"></span>'; if ($topic['is_locked']) echo ' <span class="main_icons lock"></span>'; if ($topic['is_sticky']) echo ' <span class="main_icons sticky"></span>'; if ($topic['is_redirect']) echo ' <span class="main_icons move"></span>'; if ($topic['is_poll']) echo ' <span class="main_icons poll"></span>'; echo ' </div>'; echo ' <div class="topic_title"> ', $topic['new'] && $context['user']['is_logged'] ? '<a href="' . $topic['new_href'] . '" id="newicon' . $topic['first_post']['id'] . '" class="new_posts">' . $txt['new'] . '</a>' : '', ' <span class="preview', $topic['is_sticky'] ? ' bold_text' : '', '" title="', $topic[(empty($modSettings['message_index_preview_first']) ? 'last_post' : 'first_post')]['preview'], '"> <span id="msg_', $topic['first_post']['id'], '">', $topic['first_post']['link'], (!$topic['approved'] ? ' <em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span> </span> </div> <p class="started_by"> ', $txt['started_by'], ' ', $topic['first_post']['member']['link'], ' </p> ', !empty($topic['pages']) ? '<span id="pages' . $topic['first_post']['id'] . '" class="pagelinks">' . $topic['pages'] . '</span>' : '', ' </div><!-- #topic_[first_post][id] --> </div><!-- .topic_info --> <div class="topic_stats"> <p> <strong>', $topic['replies'], '</strong> ', $txt['replies'], '<br> <strong>', $topic['views'], '</strong> ', $txt['views'], ' </p> </div> <div class="topic_lastpost"> ', !empty($settings['st_enable_avatars_topics']) && !empty($topic['last_post']['member']['avatar']) ? themecustoms_avatar($topic['last_post']['member']['avatar']['href'], $topic['last_post']['member']['id']) : '', ' <p> ', $txt['last_post'], ': ', $topic['last_post']['member']['link'], ', <a href="', $topic['last_post']['href'], '">', $topic['last_post']['time'], '</a> </p> </div>'; // Show the quick moderation options? if (!empty($context['can_quick_mod'])) { echo ' <div class="topic_moderation">'; if ($options['display_quick_mod'] == 1) echo ' <input type="checkbox" name="topics[]" value="', $topic['id'], '">'; else { // Check permissions on each and show only the ones they are allowed to use. if ($topic['quick_mod']['remove']) echo ' <a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=remove;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="main_icons delete" title="', $txt['remove_topic'], '"></span></a>'; if ($topic['quick_mod']['lock']) echo ' <a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=lock;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="main_icons lock" title="', $topic['is_locked'] ? $txt['set_unlock'] : $txt['set_lock'], '"></span></a>'; if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) echo ' <br>'; if ($topic['quick_mod']['sticky']) echo ' <a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=sticky;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="main_icons sticky" title="', $topic['is_sticky'] ? $txt['set_nonsticky'] : $txt['set_sticky'], '"></span></a>'; if ($topic['quick_mod']['move']) echo ' <a href="', $scripturl, '?action=movetopic;current_board=', $context['current_board'], ';board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><span class="main_icons move" title="', $txt['move_topic'], '"></span></a>'; } echo ' </div><!-- .moderation -->'; } echo ' </div><!-- .topic_container -->'; } if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) { echo ' <div class="righttext" id="quick_actions"> <select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.move_to.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '> <option value="">--------</option>'; foreach ($context['qmod_actions'] as $qmod_action) if ($context['can_' . $qmod_action]) echo ' <option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>'; echo ' </select>'; // Show a list of boards they can move the topic to. if ($context['can_move']) echo ' <span id="quick_mod_jump_to"></span>'; echo ' <input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' && confirm(\'', $txt['quickmod_confirm'], '\');" class="button qaction"> </div><!-- #quick_actions -->'; } echo ' </div><!-- #messageindex -->'; // Finish off the form - again. if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) echo ' <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '"> </form>'; echo ' <div class="pagesection"> <div class="pagelinks"> <a href="#main_content_section" class="button" id="bot">', $txt['go_up'], '</a> ', $context['page_index'], ' </div> ', template_button_strip($context['normal_buttons'], 'right'), ' </div>'; } // Show breadcrumbs at the bottom too. theme_linktree(); if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) echo ' <script> if (typeof(window.XMLHttpRequest) != "undefined") aJumpTo[aJumpTo.length] = new JumpTo({ sContainerId: "quick_mod_jump_to", sClassName: "qaction", sJumpToTemplate: "%dropdown_list%", iCurBoardId: ', $context['current_board'], ', iCurBoardChildLevel: ', $context['jump_to']['child_level'], ', sCurBoardName: "', $context['jump_to']['board_name'], '", sBoardChildLevelIndicator: "==", sBoardPrefix: "=> ", sCatSeparator: "-----------------------------", sCatPrefix: "", bNoRedirect: true, bDisabled: true, sCustomName: "move_to" }); </script>'; // Javascript for inline editing. echo ' <script> var oQuickModifyTopic = new QuickModifyTopic({ aHidePrefixes: Array("lockicon", "stickyicon", "pages", "newicon"), bMouseOnDiv: false, }); </script>'; template_topic_legend(); // Lets pop the... echo ' <div id="mobile_action" class="popup_container"> <div class="popup_window description"> <div class="popup_heading">', $txt['mobile_action'], ' <a href="javascript:void(0);" class="main_icons hide_popup"></a> </div> ', template_button_strip($context['normal_buttons']), ' </div> </div>'; } /** * Shows a legend for topic icons. */ function template_topic_legend() { global $context, $settings, $txt, $modSettings; echo ' <div class="tborder" id="topic_icons"> <div class="information"> <p id="message_index_jump_to"></p>'; if (empty($context['no_topic_listing'])) echo ' <p class="floatleft">', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? ' <span class="main_icons profile_sm"></span> ' . $txt['participation_caption'] . '<br>' : '', ' ' . ($modSettings['pollMode'] == '1' ? '<span class="main_icons poll"></span> ' . $txt['poll'] . '<br>' : '') . ' <span class="main_icons move"></span> ' . $txt['moved_topic'] . '<br> </p> <p> <span class="main_icons lock"></span> ' . $txt['locked_topic'] . '<br> <span class="main_icons sticky"></span> ' . $txt['sticky_topic'] . '<br> <span class="main_icons watch"></span> ' . $txt['watching_topic'] . '<br> </p>'; if (!empty($context['jump_to'])) echo ' <script> if (typeof(window.XMLHttpRequest) != "undefined") aJumpTo[aJumpTo.length] = new JumpTo({ sContainerId: "message_index_jump_to", sJumpToTemplate: "<label class=\"smalltext jump_to\" for=\"%select_id%\">', $context['jump_to']['label'], '<" + "/label> %dropdown_list%", iCurBoardId: ', $context['current_board'], ', iCurBoardChildLevel: ', $context['jump_to']['child_level'], ', sCurBoardName: "', $context['jump_to']['board_name'], '", sBoardChildLevelIndicator: "==", sBoardPrefix: "=> ", sCatSeparator: "-----------------------------", sCatPrefix: "", sGoButtonLabel: "', $txt['quick_mod_go'], '" }); </script>'; echo ' </div><!-- .information --> </div><!-- #topic_icons -->'; } /** * 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 themecustoms_bi_board_lastpost(array $board) : void { global $settings, $txt; // Will still add the class, in case the design depends on it. if (!empty($board['last_post']['id'])) echo ' ', !empty($settings['st_enable_avatars_boards']) && !empty($board['last_post']['member']['avatar']) ? themecustoms_avatar($board['last_post']['member']['avatar']['href'], $board['last_post']['member']['id']) : '', ' <p> <span class="post">', sprintf($txt['post_by_member'], $board['last_post']['link'], $board['last_post']['member']['link']), '</span> <span class="time">', timeformat($board['last_post']['timestamp']), '</span> </p>'; } ?>
[+]
..
[-] GenericControls.template.php
[edit]
[-] PersonalMessage.template.php
[edit]
[-] .gitignore
[edit]
[-] BoardIndex.template.php
[edit]
[-] GenericMenu.template.php
[edit]
[-] CHANGELOG.md
[edit]
[-] index.template.php
[edit]
[+]
languages
[-] package.json
[edit]
[-] index.php
[edit]
[-] readme.txt
[edit]
[-] theme_info.xml
[edit]
[+]
css
[-] Admin.template.php
[edit]
[-] Recent.template.php
[edit]
[-] Memberlist.template.php
[edit]
[-] MessageIndex.template.php
[edit]
[-] Themes.template.php
[edit]
[-] Post.template.php
[edit]
[-] LICENSE
[edit]
[-] Search.template.php
[edit]
[-] Display.template.php
[edit]
[+]
images
[-] Profile.template.php
[edit]
[+]
scripts
[+]
themecustoms