', cleanXml($context['message']), ' '; } function template_quotefast() { global $context, $settings, $options, $txt; echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> ', cleanXml($context['quote']['xml']), ' '; } function template_modifyfast() { global $context, $settings, $options, $txt; echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> '; } function template_modifydone() { global $context, $settings, $options, $txt; echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> '; if (empty($context['message']['errors'])) { echo ' ' . $txt['last_edit'] . ': ' . $context['message']['modified']['time'] . ' ' . $txt['by'] . ' ' . $context['message']['modified']['name'] . ' »'), ']]> '; } else echo ' ', $context['message']['errors']), ']]>'; echo ' '; } function template_modifytopicdone() { global $context, $settings, $options, $txt; echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> '; if (empty($context['message']['errors'])) { echo ' ' . $txt['last_edit'] . ': ' . $context['message']['modified']['time'] . ' ' . $txt['by'] . ' ' . $context['message']['modified']['name'] . ' »'), ']]>'; if (!empty($context['message']['subject'])) echo ' '; } else echo ' ', $context['message']['errors'])), ']]>'; echo ' '; } function template_post() { global $context, $settings, $options, $txt; 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']) ? ' ' : '', ' ', 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 ' '; } function template_pm() { global $context, $settings, $options, $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 ' '; } function template_stats() { global $context, $settings, $options, $txt, $modSettings; 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 ' '; } function template_split() { global $context, $settings, $options; 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() { } } function template_results() { global $context, $settings, $options, $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 ' '; } function template_jump_to() { global $context, $settings, $options; echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> '; foreach ($context['jump_to'] as $category) { echo ' '; foreach ($category['boards'] as $board) echo ' '; } echo ' '; } function template_message_icons() { global $context, $settings, $options; echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> '; foreach ($context['icons'] as $icon) echo ' '; echo ' '; } function template_check_username() { global $context, $settings, $options, $txt; echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> ', cleanXml($context['checked_username']), ' '; } // This prints XML in it's most generic form. function template_generic_xml() { global $context, $settings, $options, $txt; 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. 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), ''; } function template_webslice_header_above() { global $settings; echo ' '; } function template_webslice_header_below() { } // This shows a webslice of the recent posts. function template_webslice_recent_posts() { global $context, $scripturl, $txt; echo '
', cleanXml($txt['recent_posts']), '
'; $alternate = 0; foreach ($context['recent_posts_data'] as $item) { echo '
', cleanXml($item['subject']), ' ', cleanXml($txt['by']), ' ', cleanXml(!empty($item['poster']['link']) ? '' . $item['poster']['name'] . '' : $item['poster']['name']), '
'; $alternate = !$alternate; } echo '
'; if ($context['user']['is_guest']) echo ' ', $txt['login'], ''; else echo ' ', cleanXml($context['user']['name']), ', ', cleanXml($txt['msg_alert_you_have']), ' ', cleanXml($context['user']['messages']), ' ', cleanXml($context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase']), '', cleanXml($txt['newmessages4'] . ' ' . $context['user']['unread_messages']), ' ', cleanXml($context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']); echo '
'; } ?>