コード例 #1
0
/**
 *	Displays the list of possible users a ticket can have assigned.
 *
 *	Will have been populated by shd_assign() in SimpleDesk-Assign.php, adding into $context['member_list'].
 *
 *	This allows users to assign tickets to other users, or themselves, or to unassign a previously assigned ticket. Future versions will
 *	likely add further options here.
 *
 *	@see shd_assign()
 *	@since 1.0
*/
function template_assign()
{
    global $context, $txt, $scripturl, $settings;
    if (empty($context['shd_return_to'])) {
        $context['shd_return_to'] = 'ticket';
    }
    // Back to the helpdesk.
    echo '
		<div class="floatleft">
			', template_button_strip(array($context['navigation']['back']), 'bottom'), '
		</div><br class="clear" /><br />';
    echo '
	<div class="cat_bar grid_header">
		<h3 class="catbg">
			<img src="', $settings['default_images_url'], '/simpledesk/assign.png" alt="*" />
			', $txt['shd_ticket_assign_ticket'], '
		</h3>
	</div>
	<div class="roundframe">
		<form action="', $scripturl, '?action=helpdesk;sa=assign2;ticket=', $context['ticket_id'], '" method="post" onsubmit="submitonce(this);">
			<div class="content">
				<dl class="settings">
					<dt>
						<strong>', $txt['shd_ticket_assignedto'], ':</strong>
					</dt>
					<dd>
						', $context['member_list'][$context['ticket_assigned']], '
					</dd>
					<dt>
						<strong>', $txt['shd_ticket_assign_to'], ':</strong>
					</dt>
					<dd>
						<select name="to_user">';
    foreach ($context['member_list'] as $id => $name) {
        echo '
							<option value="', $id, '"', $id == $context['ticket_assigned'] ? ' selected="selected"' : '', '>', $name, '</option>';
    }
    echo '
						</select>
					</dd>
					<dt>
						<input type="submit" name="cancel" value="', $context['shd_return_to'] == 'home' ? $txt['shd_cancel_home'] : $txt['shd_cancel_ticket'], '" accesskey="c" class="button_submit" />
					</dt>
					<dd>
						<input type="submit" value="', $txt['shd_ticket_assign_ticket'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button_submit" />
					</dd>
				</dl>
				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />';
    if ($context['shd_return_to'] == 'home') {
        echo '
				<input type="hidden" name="home" value="1" />';
    }
    echo '
			</div>
		</form>
	</div>
	<span class="lowerframe"><span></span></span>';
}
コード例 #2
0
/**
 *	Display the replacement front page.
 *
 *	@since 2.0
*/
function template_shd_frontpage()
{
    global $context, $txt, $settings, $scripturl;
    echo '
		<div class="modbuttons clearfix margintop">';
    template_button_strip($context['navigation'], 'bottom');
    echo '
		</div>
		<div id="admin_content">
			', $context['shdp_frontpage_content'], '
		</div>';
}
コード例 #3
0
/**
 * SMF Arcade
 *
 * @package SMF Arcade
 * @version 2.6 Alpha
 * @license http://download.smfarcade.info/license.php New-BSD
 */
function template_arcade_arena_matches()
{
    global $scripturl, $txt, $context, $settings, $user_info, $modSettings;
    $buttons = array();
    if ($context['arcade']['can_create_match']) {
        $buttons['newMatch'] = array('text' => 'arcade_newMatch', 'image' => 'arcade_newmatch.gif', 'url' => $scripturl . '?action=arcade;sa=newMatch', 'lang' => true);
    }
    echo '
	<div class="pagesection">
		<div class="align_left">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#bot"><b>' . $txt['go_down'] . '</b></a>' : '', '</div>
		', template_button_strip($buttons, 'right'), '
	</div>	
	<div class="game_table">
		<table cellspacing="0" class="table_grid">
			<thead>
				<tr class="catbg">';
    if (!empty($context['matches'])) {
        echo '
					<th scope="col" class="first_th"></th>
					<th scope="col">', $txt['match_name'], '</th>
					<th scope="col">', $txt['match_status'], '</th>
					<th scope="col">', $txt['match_players'], '</th>
					<th scope="col" class="smallext last_th">', $txt['match_round'], '</th>';
    } else {
        echo '
					<th scope="col" class="first_th" width="8%">&nbsp;</th>
					<th class="smalltext" colspan="2"><strong>', $txt['arcade_no_matches'], '</strong></th>
					<th scope="col" class="last_th" width="8%">&nbsp;</th>';
    }
    echo '
				</tr>
			</thead>
			<tbody>';
    foreach ($context['matches'] as $match) {
        echo '
				<tr class="windowbg">
					<td></td>
					<td class="windowbg2">', $match['link'], '<br >', $match['starter']['link'], '</td>
					<td>', $txt[$match['status']], '</td>
					<td>', $match['players'], ' / ', $match['players_limit'], '</td>
					<td>', $match['round'], ' / ', $match['rounds'], '</td>
				</tr>';
    }
    echo '
			</tbody>
		</table>
	</div>
	<div class="pagesection">
		<div class="align_left">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#top"><b>' . $txt['go_up'] . '</b></a>' : '', '</div>
		', template_button_strip($buttons, 'right'), '
	</div>';
}
コード例 #4
0
function template_main()
{
    global $context, $settings, $options, $txt, $scripturl, $modSettings;
    echo '
		<div id="calendar">
			<div id="month_grid">
				', template_show_month_grid('prev'), '
				', template_show_month_grid('current'), '
				', template_show_month_grid('next'), '
			</div>
			<div id="main_grid" style="', $context['browser']['is_ie'] && !$context['browser']['is_ie8'] ? 'float: ' . ($context['right_to_left'] ? 'right; padding-right' : 'left; padding-left') . ': 20px;' : 'margin-' . ($context['right_to_left'] ? 'right' : 'left') . ': 220px; ', '">
				', $context['view_week'] ? template_show_week_grid('main') : template_show_month_grid('main');
    // Build the calendar button array.
    $calendar_buttons = array('post_event' => array('test' => 'can_post', 'text' => 'calendar_post_event', 'image' => 'calendarpe.gif', 'lang' => true, 'url' => $scripturl . '?action=calendar;sa=post;month=' . $context['current_month'] . ';year=' . $context['current_year'] . ';' . $context['session_var'] . '=' . $context['session_id']));
    template_button_strip($calendar_buttons, 'right');
    // Show some controls to allow easy calendar navigation.
    echo '
				<form id="calendar_navigation" action="', $scripturl, '?action=calendar" method="post" accept-charset="', $context['character_set'], '">
					<select name="month">';
    // Show a select box with all the months.
    foreach ($txt['months'] as $number => $month) {
        echo '
						<option value="', $number, '"', $number == $context['current_month'] ? ' selected="selected"' : '', '>', $month, '</option>';
    }
    echo '
					</select>
					<select name="year">';
    // Show a link for every year.....
    for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) {
        echo '
						<option value="', $year, '"', $year == $context['current_year'] ? ' selected="selected"' : '', '>', $year, '</option>';
    }
    echo '
					</select>
					<input type="submit" class="button_submit" value="', $txt['view'], '" />';
    echo '
				</form>
				<br class="clear" />
			</div>
		</div>';
}
コード例 #5
0
/**
 *	Entry point for displaying the post new ticket/edit ticket UI.
 *
 *	@since 1.0
*/
function template_ticket_post()
{
    global $context;
    // Back to the helpdesk.
    echo '
		<div class="floatleft">
			', template_button_strip(array($context['navigation']['back']), 'bottom'), '
		</div><br class="clear" /><br />';
    template_preview();
    template_ticket_info();
    template_ticket_subjectbox();
    template_ticket_meta();
    template_ticket_postbox();
    template_ticket_footer();
    if (!empty($context['ticket_form']['do_replies'])) {
        template_ticket_begin_replies();
        template_ticket_do_replies();
        template_ticket_end_replies();
    }
    template_ticket_pageend();
    template_ticket_proxy_js();
}
コード例 #6
0
/**
 * The main calendar - January, for example.
 */
function template_show_calendar()
{
    global $context, $txt, $scripturl, $modSettings;
    echo '
		<div id="calendar">
			<div id="month_grid">
				', template_show_month_grid('prev'), '
				', template_show_month_grid('current'), '
				', template_show_month_grid('next'), '
			</div>
			<div id="main_grid">
				', $context['view_week'] ? template_show_week_grid('main') : template_show_month_grid('main');
    // Show some controls to allow easy calendar navigation.
    echo '
				<form id="calendar_navigation" action="', $scripturl, '?action=calendar" method="post" accept-charset="UTF-8">';
    template_button_strip($context['calendar_buttons'], 'right');
    echo '
					<select name="month">';
    // Show a select box with all the months.
    foreach ($txt['months'] as $number => $month) {
        echo '
						<option value="', $number, '"', $number == $context['current_month'] ? ' selected="selected"' : '', '>', $month, '</option>';
    }
    echo '
					</select>
					<select name="year">';
    // Show a link for every year.....
    for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) {
        echo '
						<option value="', $year, '"', $year == $context['current_year'] ? ' selected="selected"' : '', '>', $year, '</option>';
    }
    echo '
					</select>
					<input type="submit" class="button_submit" value="', $txt['view'], '" />
				</form>
			</div>
		</div>';
}
コード例 #7
0
function template_search()
{
    global $context, $settings, $options, $scripturl, $txt;
    // Build the memberlist button array.
    $memberlist_buttons = array('view_all_members' => array('text' => 'view_all_members', 'image' => 'mlist.gif', 'lang' => true, 'url' => $scripturl . '?action=mlist' . ';sa=all'), 'mlist_search' => array('text' => 'mlist_search', 'image' => 'mlist.gif', 'lang' => true, 'url' => $scripturl . '?action=mlist' . ';sa=search', 'active' => true));
    // Start the submission form for the search!
    echo '
	<form action="', $scripturl, '?action=mlist;sa=search" method="post" accept-charset="', $context['character_set'], '">
		<div id="memberlist">
			<div class="pagesection">
				', template_button_strip($memberlist_buttons, ''), '
			</div>
			<div class="catbg clear">
				<h3>
					', $txt['mlist_search'], '
				</h3>
			</div>';
    // Display the input boxes for the form.
    echo '	<div id="memberlist_search" class="clear">
				<div style="overflow: hidden;">
					<div id="mlist_search" class="themepadding">
						<div id="search_term_input" class="bwgrid">
							<div class="bwcell2"><strong>', $txt['search_for'], ':</strong></div>
							<div class="bwcell10"><input type="text" name="search" value="', $context['old_search'], '"class="fullwidth input_text"  /></div> 
							<div class="bwcell4"><input type="submit" name="submit" value="' . $txt['search'] . '" style="margin: 1rem 0;" class="button_submit" /></div>
						</div><br>
						<div class="bwgrid">';
    $count = 0;
    foreach ($context['search_fields'] as $id => $title) {
        echo '
							<span class="bwcell33">
								<label for="fields-', $id, '"><input type="checkbox" name="fields[]" id="fields-', $id, '" value="', $id, '" ', in_array($id, $context['search_defaults']) ? 'checked="checked"' : '', ' class="input_check" />&nbsp; ', $title, '</label><br />
							</span>';
    }
    echo '
						</div><br class="clear" />
					</div>
				</div>
			</div>
		</div>
	</form>';
}
コード例 #8
0
ファイル: Recent.template.php プロジェクト: alencarmo/OCF
function template_replies()
{
    global $context, $settings, $options, $txt, $scripturl, $modSettings;
    echo '
	<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center">
		<tr>
			<td>', theme_linktree(), '</td>
		</tr>
	</table>

	<table border="0" width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td class="middletext" valign="middle">' . $txt[139] . ': ' . $context['page_index'] . '</td>';
    if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read'])) {
        $mark_read = array('markread' => array('text' => 452, 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=unreadreplies;topics=' . $context['topics_to_mark'] . ';sesc=' . $context['session_id']));
        echo '
			<td align="right" style="padding-right: 1ex;">
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						', template_button_strip($mark_read, 'bottom'), '
					</tr>
				</table>
			</td>';
    }
    echo '
		</tr>
	</table>

	<table border="0" width="100%" cellspacing="0" cellpadding="0" class="bordercolor">
		<tr><td>
			<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
				<tr class="titlebg">';
    if (!empty($context['topics'])) {
        echo '
					<td width="10%" colspan="2">&nbsp;</td>
					<td><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[70], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
					<td width="14%"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[109], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
					<td width="4%" align="center"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[110], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
					<td width="4%" align="center"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[301], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
					<td width="24%"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[111], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';
    } else {
        echo '
					<td width="100%" colspan="7">' . $txt[151] . '</td>';
    }
    echo '
				</tr>';
    foreach ($context['topics'] as $topic) {
        // Seperate lock and sticky again?
        if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false) {
            $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_sticky'));
        }
        if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'locked') !== false) {
            $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_locked'));
        }
        echo '
				<tr>
					<td class="windowbg2" valign="middle" align="center" width="6%">
						<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" /></td>
					<td class="windowbg2" valign="middle" align="center" width="4%">
						<img src="', $topic['first_post']['icon_url'], '" alt="" align="middle" /></td>
					<td class="windowbg', $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '3' : '', '" width="48%" valign="middle">
						', $topic['is_locked'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '', '
						', $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], '
						', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>
					<td class="windowbg2" valign="middle" width="14%">
						', $topic['first_post']['member']['link'], '</td>
					<td class="windowbg" valign="middle" width="4%" align="center">
						', $topic['replies'], '</td>
					<td class="windowbg" valign="middle" width="4%" align="center">
						', $topic['views'], '</td>
					<td class="windowbg2" valign="middle" width="22%">
						<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" style="float: right;" /></a>
						<span class="smalltext">
								', $topic['last_post']['time'], '<br />
								', $txt[525], ' ', $topic['last_post']['member']['link'], '
						</span>
					</td>
				</tr>';
    }
    echo '
			</table>
		</td></tr>
	</table>

	<table border="0" width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td class="middletext" valign="middle">' . $txt[139] . ': ' . $context['page_index'] . '</td>';
    if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read'])) {
        echo '
			<td align="right" style="padding-right: 1ex;">
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						', template_button_strip($mark_read, 'top'), '
					</tr>
				</table>
			</td>';
    }
    echo '
		</tr>
	</table><br />

	<div class="tborder"><div class="titlebg2">
		<table cellpadding="8" cellspacing="0" width="55%">
			<tr>
				<td align="left" style="padding-top: 2ex;" class="smalltext">', !empty($modSettings['enableParticipation']) ? '
					<img src="' . $settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' . $txt['participation_caption'] . '<br />' : '', '
					<img src="' . $settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' . $txt[457] . '<br />
					<img src="' . $settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' . $txt[454] . '<br />
					<img src="' . $settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' . $txt[455] . '
				</td>
				<td align="left" valign="top" style="padding-top: 2ex;" class="smalltext">
					<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" alt="" align="middle" /> ' . $txt[456] . '<br />' . ($modSettings['enableStickyTopics'] == '1' ? '
					<img src="' . $settings['images_url'] . '/icons/' . (!empty($settings['seperate_sticky_lock']) ? 'quick_sticky' : 'normal_post_sticky') . '.gif" alt="" align="middle" /> ' . $txt['smf96'] . '<br />' : '') . ($modSettings['pollMode'] == '1' ? '
					<img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['smf43'] : '') . '
				</td>
			</tr>
		</table>
	</div></div>';
}
コード例 #9
0
/**
 * Simple Machines Forum (SMF)
 *
 * @package SMF
 * @author Simple Machines
 * @copyright 2011 Simple Machines
 * @license http://www.simplemachines.org/about/smf/license.php BSD
 *
 * @version 2.0
 */

function template_main()
{
	global $context, $settings, $options, $txt, $scripturl, $modSettings;

	// Show some statistics if stat info is off.
	if (!$settings['show_stats_index'])
		echo '
	<div id="index_common_stats">
		', $txt['members'], ': ', $context['common_stats']['total_members'], ' &nbsp;&#8226;&nbsp; ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' &nbsp;&#8226;&nbsp; ', $txt['topics'], ': ', $context['common_stats']['total_topics'], '
		', ($settings['show_latest_member'] ? ' ' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
	</div>';

	// Show the news fader?  (assuming there are things to show...)
	if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
	{
		echo '
	<div id="newsfader">
		<div class="cat_bar">
			<h3 class="catbg">
				<img id="newsupshrink" src="', $settings['images_url'], '/icons/16/collapse.png" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
				', $txt['news'], '
			</h3>
		</div>
		<ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';

			foreach ($context['news_lines'] as $news)
				echo '
			<li>', $news, '</li>';

	echo '
		</ul>
	</div>
	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
	<script type="text/javascript"><!-- // --><![CDATA[

		// Create a news fader object.
		var oNewsFader = new smf_NewsFader({
			sSelf: \'oNewsFader\',
			sFaderControlId: \'smfFadeScroller\',
			sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
			iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
		});

		// Create the news fader toggle.
		var smfNewsFadeToggle = new smc_Toggle({
			bToggleEnabled: true,
			bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
			aSwappableContainers: [
				\'smfFadeScroller\'
			],
			aSwapImages: [
				{
					sId: \'newsupshrink\',
					srcExpanded: smf_images_url + \'/icons/16/collapse.png\',
					altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
					srcCollapsed: smf_images_url + \'/icons/16/expand.png\',
					altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
				}
			],
			oThemeOptions: {
				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
				sOptionName: \'collapse_news_fader\',
				sSessionVar: ', JavaScriptEscape($context['session_var']), ',
				sSessionId: ', JavaScriptEscape($context['session_id']), '
			},
			oCookieOptions: {
				bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
				sCookieName: \'newsupshrink\'
			}
		});
	// ]]></script>';
	}

	echo '
	<div id="boardindex_table">
		<table class="table_list">';

	/* 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 '
			<tbody class="header" id="category_', $category['id'], '">
				<tr>
					<td colspan="4">
						<div class="cat_bar">
							<h3 class="catbg">';

		if (!$context['user']['is_guest'] && !empty($category['show_unread']))
			echo '
								<a class="unread" href="', $scripturl, '?action=unread;c=', $category['id'], '" title="Unread posts in this board">
								  <svg viewBox="0 0 32 32"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#IconNewPosts"></use></svg>
								</a>';

		echo '
								<span class="category-name">', $category['name'], '</span>
							</h3>
						</div>
					</td>
				</tr>
			</tbody>';
    
		echo '
			<tbody class="content" id="category_', $category['id'], '_boards">';
			/* Each board in each category's boards has:
			new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
			children (see below.), link_children (easier to use.), children_new (are they new?),
			topics (# of), posts (# of), link, href, and last_post. (see below.) */
			foreach ($category['boards'] as $board)
			{
				echo '
				<tr id="board_', $board['id'], '" class="windowbg2">
					<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
						';

				// If the board or children is new, show an indicator.
				if ($board['new'])
                      echo '<svg class="star new-posts" viewBox="0 0 32 32" ><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#FullStar"></use></svg>';
                    elseif ($board['children_new'])
				  echo '<svg class="star child-posts" viewBox="0 0 32 32" ><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#ChildStar"></use></svg>';
				// Is it a redirection board?
				elseif ($board['is_redirect'])
					echo '
							<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
				// No new posts at all! The agony!!
				else
					echo '<svg class="star no-posts" viewBox="0 0 32 32" ><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#NoStar"></use></svg>';
				echo '
						
					</td>
					<td class="info">
						<a class="subject" href="', $board['href'], '">', $board['name'], '</a>';

				// Has it outstanding posts for approval?
				if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
					echo '
						<a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';

				echo '

						<p>', $board['description'] , '</p>';

				// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
				if (!empty($board['moderators']))
					echo '
						<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';

				// Show some basic information about the number of posts, etc.
					echo '
					</td>
					<td class="stats windowbg">
						<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
						', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
						</p>
					</td>
					<td class="lastpost">';

				/* The board's and children's 'last_post's have:
				time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
				link, href, subject, start (where they should go for the first unread post.),
				and member. (which has id, name, link, href, username in it.) */
				if (!empty($board['last_post']['id']))
					echo '
						<p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
						', $txt['in'], ' ', $board['last_post']['link'], '<br />
						', $txt['on'], ' ', $board['last_post']['time'],'
						</p>';
				echo '
					</td>
				</tr>';
				// 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'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <span class="new-post-in-child"><svg viewBox="0 0 32 32" ><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#IconNewPosts"></use></svg>' : '') . '</a>';
						else
							$child['link'] = '<a data-line="212" href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';

						// Has it posts awaiting approval?
						if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
							$child['link'] .= ' <a data-line="216" href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

						$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
					}
					echo '
					<tr id="board_', $board['id'], '_children">
						<td colspan="3" class="children windowbg">
							<strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
						</td>
					</tr>';
				}
			}
		echo '
			</tbody>';
		echo '
			<tbody class="divider">
				<tr>
					<td colspan="4"></td>
				</tr>
			</tbody>';
	}
	echo '
		</table>
	</div>';

	if ($context['user']['is_logged'])
	{
		echo '
	<div id="posting_icons">';

		// Mark read button.
		$mark_read_button = array(
			'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']),
		);

		echo '
		<ul class="icon_glossary">
            <li>
              <svg viewBox="0 0 32 32" alt="normal topic"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#NoStar"></use></svg>
              <span>Board</span>
            </li>
		  <li>
              <svg viewBox="0 0 32 32" alt="normal topic"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#FullStar"></use></svg>
              <span>has new posts</span>
            </li>
            <li>
              <svg viewBox="0 0 32 32" alt="normal topic"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#ChildStar"></use></svg>
              <span>only in children</span>
            </li>
            <li>
              <svg viewBox="0 0 32 32" alt="normal topic"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#IconNewPosts"></use></svg>
              <span>new in this</span>
            </li>
		</ul>
	</div>';

		// Show the mark all as read button?
		if ($settings['show_mark_read'] && !empty($context['categories']))
			echo '<div class="mark_read">', template_button_strip($mark_read_button, 'right'), '</div>';
	}
	else
	{
		echo '
	<div id="posting_icons" class="flow_hidden">
		<span style="font-size:11px; color:#666;">More forums will be visible if you <a href="http://ballp.it/index.php?action=register">register</a>.</span>
	</div>';
	}

	template_info_center();
}
コード例 #10
0
ファイル: Display.template.php プロジェクト: KeiroD/Elkarte
/**
 * Used to display items below the page, like page navigation
 */
function template_pages_and_buttons_below()
{
    global $context, $txt;
    // Show the page index... "Pages: [1]".
    template_pagesection('normal_buttons', 'right');
    // Show the lower breadcrumbs.
    theme_linktree();
    if (can_see_button_strip($context['mod_buttons'])) {
        echo '
			<i class="fa fa-2x fa-bars hamburger_30" data-id="moderationbuttons"></i>';
    }
    echo '
			<div id="moderationbuttons" class="hide_30 hamburger_30_target">', template_button_strip($context['mod_buttons'], 'bottom', array('id' => 'moderationbuttons_strip')), '</div>';
    // Show the jump-to box, or actually...let Javascript do it.
    echo '
			<div id="display_jump_to">&nbsp;</div>
			<script><!-- // --><![CDATA[
				aJumpTo[aJumpTo.length] = new JumpTo({
					sContainerId: "display_jump_to",
					sJumpToTemplate: "<label class=\\"smalltext\\" 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: "&#8195;",
					sBoardPrefix: "', isBrowser('ie8') ? '&#187; ' : '&#10148; ', '",
					sCatClass: "jump_to_header",
					sCatPrefix: "",
					sGoButtonLabel: "', $txt['go'], '"
				});
			// ]]></script>';
    // Tooltips for likes
    echo '
			<script><!-- // --><![CDATA[
				$(".like_button, .unlike_button, .likes_button").SiteTooltip({hoverIntent: {sensitivity: 10, interval: 150, timeout: 50}});
			// ]]></script>';
}
コード例 #11
0
function template_arcade_game_below()
{
    global $scripturl, $txt, $context, $settings;
    echo '
	<div class="pagesection">
		<div class="pagelinks floatleft">';
    if (isset($context['page_index'])) {
        echo $txt['pages'], ': ', $context['page_index'];
    }
    if (!empty($modSettings['topbottomEnable'])) {
        echo isset($context['page_index']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#top"><b>' . $txt['go_up'] . '</b></a>' : '';
    }
    echo '</div>
		', template_button_strip($context['arcade']['buttons'], 'right'), '
	</div>
	<div class="plainbox" id="arcadebox" style="display: none; position: fixed; left: 0px; top: 0px; width: 33%;">
		<div id="arcadebox_html" style=""></div>
	</div>';
}
コード例 #12
0
/**
 *	Displays the list of possible users a ticket can have assigned.
 *
 *	Will have been populated by shd_movedept() in SimpleDesk-MoveDept.php, adding into $context['dept_list'].
 *
 *	@see shd_movedept()
 *	@since 2.0
*/
function template_movedept()
{
    global $context, $txt, $scripturl, $settings;
    if (empty($context['shd_return_to'])) {
        $context['shd_return_to'] = 'ticket';
    }
    // Back to the helpdesk.
    echo '
		<div class="floatleft">
			', template_button_strip(array($context['navigation']['back']), 'bottom'), '
		</div><br class="clear" /><br />';
    echo '
	<div class="cat_bar grid_header">
		<h3 class="catbg">
			<img src="', $settings['default_images_url'], '/simpledesk/movedept.png" alt="*" />
			', $txt['shd_ticket_move_dept'], '
		</h3>
	</div>
	<div class="roundframe">
		<form action="', $scripturl, '?action=helpdesk;sa=movedept2;ticket=', $context['ticket_id'], '" method="post" onsubmit="submitonce(this);">
			<div class="content">
				<dl class="settings">
					<dt>
						<strong>', $txt['shd_current_dept'], ':</strong>
					</dt>
					<dd>
						<a href="', $scripturl, '?', $context['shd_home'], ';dept=', $context['current_dept'], '">', $context['current_dept_name'], '</a>
					</dd>
					<dt>
						<strong>', $txt['shd_ticket_move_to'], ':</strong>
						<div class="smalltext">', $context['visible_move_dept'], '</div>
					</dt>
					<dd>
						<select name="to_dept">';
    foreach ($context['dept_list'] as $id => $name) {
        echo '
							<option value="', $id, '"', $id == $context['current_dept'] ? ' selected="selected"' : '', '>', $name, '</option>';
    }
    echo '
						</select>
					</dd>
				</dl>
				<dl class="settings">
					<dt>
						<strong>', $txt['shd_move_send_pm'], ':</strong>
					</dt>
					<dd>
						<input type="checkbox" name="send_pm" id="send_pm" checked="checked" onclick="document.getElementById(\'pm_message\').style.display = this.checked ? \'block\' : \'none\';" class="input_check" />
					</dd>
				</dl>
				<fieldset id="pm_message">
					<dl class="settings">
						<dt>
							', $txt['shd_move_why'], '
						</dt>
						<dd>
							<textarea name="pm_content" rows="9" cols="70">', $txt['shd_move_dept_default'], '</textarea>
						</dd>
					</dl>
				</fieldset>
				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />';
    if ($context['shd_return_to'] == 'home') {
        echo '
				<input type="hidden" name="home" value="1" />';
    }
    echo '
				<input type="submit" name="cancel" value="', $context['shd_return_to'] == 'home' ? $txt['shd_cancel_home'] : $txt['shd_cancel_ticket'], '" accesskey="c" class="button_submit" />
				<input type="submit" value="', $txt['shd_ticket_move'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button_submit" />
			</div>
		</form>
	</div>
	<span class="lowerframe"><span></span></span>';
}
コード例 #13
0
function template_replies()
{
    global $context, $settings, $options, $txt, $scripturl, $modSettings;
    $showCheckboxes = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $settings['show_mark_read'];
    if ($showCheckboxes) {
        echo '
	<div id="recent">
		<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
			<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
			<input type="hidden" name="qaction" value="markread" />
			<input type="hidden" name="redirect_url" value="action=unreadreplies', !empty($context['showing_all_topics']) ? ';all' : '', $context['querystring_board_limits'], '" />';
    }
    if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read'])) {
        // Generate the button strip.
        $mark_read = array('markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=unreadreplies;topics=' . $context['topics_to_mark'] . ';' . $context['session_var'] . '=' . $context['session_id']));
        if ($showCheckboxes) {
            $mark_read['markselectread'] = array('text' => 'quick_mod_markread', 'image' => 'markselectedread.gif', 'lang' => true, 'url' => 'javascript:document.quickModForm.submit();');
        }
    }
    if (!empty($settings['use_tabs'])) {
        echo '
	<div id="readbuttons_top" class="readbuttons clearfix margintop">
		<div class="floatleft middletext">', $txt['pages'], ': ', $context['page_index'], '</div>';
        if (!empty($mark_read)) {
            template_button_strip($mark_read, 'bottom');
        }
        echo '
	</div>';
    }
    echo '
	<table border="0" width="100%" cellspacing="0" cellpadding="0" class="bordercolor">
		<tr><td>
			<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
				<tr class="titlebg">';
    if (!empty($context['topics'])) {
        echo '
					<td width="10%" colspan="2">&nbsp;</td>
					<td><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
					<td width="14%"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
					<td width="4%" align="center"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
					<td width="4%" align="center"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['views'], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
					<td width="24%"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';
        if ($showCheckboxes) {
            echo '
					<td>
						<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
					</td>';
        }
    } else {
        echo '
					<td width="100%" colspan="7">' . $txt['msg_alert_none'] . '</td>';
    }
    echo '
				</tr>';
    foreach ($context['topics'] as $topic) {
        // separate lock and sticky again?
        if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false) {
            $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_sticky'));
        }
        if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'locked') !== false) {
            $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_locked'));
        }
        echo '
				<tr>
					<td class="windowbg2" valign="middle" align="center" width="6%">
						<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" /></td>
					<td class="windowbg2" valign="middle" align="center" width="4%">
						<img src="', $topic['first_post']['icon_url'], '" alt="" align="middle" /></td>
					<td class="windowbg', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '3' : '', '" width="48%" valign="middle">
						', $topic['is_locked'] && !empty($settings['separate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '', '
						', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a> <span class="smalltext">', $topic['pages'], '
						', $txt['in'], ' ', $topic['board']['link'], '</span></td>
					<td class="windowbg2" valign="middle" width="14%">
						', $topic['first_post']['member']['link'], '</td>
					<td class="windowbg" valign="middle" width="4%" align="center">
						', $topic['replies'], '</td>
					<td class="windowbg" valign="middle" width="4%" align="center">
						', $topic['views'], '</td>
					<td class="windowbg2" valign="middle" width="22%">
						<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" style="float: right;" /></a>
						<span class="smalltext">
								', $topic['last_post']['time'], '<br />
								', $txt['by'], ' ', $topic['last_post']['member']['link'], '
						</span>
					</td>';
        if ($showCheckboxes) {
            echo '
					<td class="windowbg2" valign="middle" align="center">
						<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />
					</td>';
        }
        echo '
				</tr>';
    }
    if (empty($settings['use_tabs']) && !empty($mark_read)) {
        echo '
				<tr>
					<td class="catbg" colspan="', $showCheckboxes ? '8' : '7', '" align="right">
						<table><tr><td>
							', template_button_strip($mark_read, 'top'), '
						</td></tr></table>
					</td>
				</tr>';
    }
    echo '
			</table>
		</td></tr>
	</table>
	<div class="readbuttons clearfix marginbottom">
		<div class="floatleft middletext">', $txt['pages'], ': ', $context['page_index'], '</div>';
    if (!empty($settings['use_tabs']) && !empty($mark_read)) {
        template_button_strip($mark_read, 'top');
    }
    echo '
	</div>
	<br />';
    if ($showCheckboxes) {
        echo '
		</form>';
    }
    echo '
		<div class="tborder clearfix" id="topic_icons">
			<div class="titlebg2 clearfix">
				<div class="floatleft smalltext">
			<ul class="reset">
				', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
				<li><img src="' . $settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' . $txt['participation_caption'] . '</li>' : '', '
				<li><img src="' . $settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' . $txt['normal_topic'] . '</li>
				<li><img src="' . $settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' . sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']) . '</li>
				<li><img src="' . $settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' . sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']) . '</li>
			</ul>
			</div>
			<div class="floatleft smalltext">
			<ul class="reset">
				<li><img src="' . $settings['images_url'] . '/icons/quick_lock.gif" alt="" align="middle" /> ' . $txt['locked_topic'] . '</li>' . ($modSettings['enableStickyTopics'] == '1' ? '
				<li><img src="' . $settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' . $txt['sticky_topic'] . '</li>' : '') . ($modSettings['pollMode'] == '1' ? '
				<li><img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['poll'] : '') . '</li>
			</ul>
			</div>
			</div>
	</div>';
}
コード例 #14
0
function template_adk_view_file()
{
    global $context, $txt, $scripturl, $modSettings, $user_info, $boardurl, $settings, $adkFolder, $adkportal;
    $width_ = 100;
    if ($context['adkDownloadInformation']['approved'] == 0) {
        echo '
		<div class="eds_cat_bar" style="background: ' . $adkportal['Designeds']['borde'] . ';">
			<h3 class="eds_catbg" style="padding-top: 3px; background: ' . $adkportal['Designeds']['borde'] . '; color: ' . $adkportal['Designeds']['titulo'] . ';">
				&nbsp;
			</h3>
		</div>
		<div class="eds_down_profile approvebg" style="min-height: 65px; color: ' . $adkportal['Designeds']['letra'] . '; border-color: ' . $adkportal['Designeds']['borde'] . ';">
			<div class="eds_disable_post">
				<strong>' . $txt['adkdown_unnapproved_down'] . '</strong> 
			</div>
		</div>
		<div class="eds_botbar" style="background: ' . $adkportal['Designeds']['borde'] . ';">
			<span style="background: ' . $adkportal['Designeds']['borde'] . ';">&nbsp;</span>
		</div>';
    }
    if ($context['adkDownloadInformation']['approved'] == 1) {
        $newtxt = $scripturl . '?action=downloads;sa=unapprovedownload;id=' . $context['adkDownloadInformation']['id_file'] . ';sesc=' . $context['session_id'];
        $newtxt_2 = 'adkdown_unapprove';
    } else {
        $newtxt = $scripturl . '?action=downloads;sa=approvedownload;id=' . $context['adkDownloadInformation']['id_file'] . ';sesc=' . $context['session_id'];
        $newtxt_2 = 'adkdown_approve';
    }
    if (allowedTo('adk_downloads_manage') || $user_info['id'] == $context['adkDownloadInformation']['id_member']) {
        $context['you_can_edit_and_download'] = true;
    }
    if (allowedTo('adk_downloads_manage')) {
        $context['adk_downloads_manage'] = true;
    }
    if (!empty($context['adkDownloadInformation']['id_topic']) && $context['adkDownloadInformation']['id_board'] != $modSettings['recycle_board'] && $context['adkDownloadInformation']['topic_exists']) {
        $context['view_topic_you_can'] = true;
    }
    $menu_buttons = array('view_topic' => array('test' => 'view_topic_you_can', 'text' => 'adkdown_comment', 'image' => '', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['adkDownloadInformation']['id_topic'] . '.0', 'active' => true), 'edit' => array('test' => 'you_can_edit_and_download', 'text' => 'adkdown_edit', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=downloads;sa=editdownload;id=' . $context['adkDownloadInformation']['id_file'] . ';sesc=' . $context['session_id']), 'delete' => array('test' => 'you_can_edit_and_download', 'text' => 'adkdown_delete', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=downloads;sa=deletedownload;id=' . $context['adkDownloadInformation']['id_file'] . ';sesc=' . $context['session_id'], 'custom' => 'onclick="return confirm(\'' . $txt['adkdown_remove_message'] . '\');"'), 'approve' => array('test' => 'adk_downloads_manage', 'text' => $newtxt_2, 'image' => '', 'lang' => true, 'url' => $newtxt));
    echo '
	<div class="pagesection">
		', template_button_strip($menu_buttons, 'right'), '
	</div>';
    $att = str_replace('<a', '<a style="color: ' . $adkportal['Designeds']['link'] . ';"', $context['load_attachments']);
    echo '
		<table style="width: 100%;">
			<tr>
				<td>
					<div class="eds_cat_bar" style="background: ' . $adkportal['Designeds']['borde'] . ';">
						<h3 class="eds_catbg" style="background: ' . $adkportal['Designeds']['borde'] . '; color: ' . $adkportal['Designeds']['titulo'] . ';">
							<img src="' . $adkFolder['images'] . '/page_white_copy.png" style="vertical-align: text-bottom;" alt="" />&nbsp;' . $context['adkDownloadInformation']['file_title'] . '
							<span class="eds_author">', $txt['adkdown_author_info'], '</span>
						</h3>
					</div>
				</td>
			</tr>
		</table>
		<table style="width: 100%;">
			<tr>
				<td valign="top">
					<div class="eds_desc" style="border-color: ' . $adkportal['Designeds']['borde'] . '; background: ' . $adkportal['Designeds']['fondo'] . '; color: ' . $adkportal['Designeds']['letra'] . ';">
						<div class="eds_content">
							', !empty($context['adkDownloadInformation']['image']) ? '<div style="float: right;"><img src="' . $context['adkDownloadInformation']['image'] . '" alt="" /></div>' : '', '
							' . $context['adkDownloadInformation']['description'] . '
						</div>
						<div class="eds_files">
							<strong class="eds_title_attachments" style="color: ' . $adkportal['Designeds']['link'] . ';">' . $txt['adkdown_attach'] . ':</strong>
							<div class="eds_attachments smalltext" style="border-color: ' . $adkportal['Designeds']['borde'] . '; background-color: ' . $adkportal['Designeds']['att'] . '; color: ' . $adkportal['Designeds']['letra'] . ';">
								<div style="overflow: ', $context['browser']['is_firefox'] ? 'visible' : 'auto', ';">
									', implode('<br />', $att), '
								</div>
							</div>
						</div>
					</div>
					<div class="eds_botbar" style="background: ' . $adkportal['Designeds']['borde'] . ';">
						<span style="background: ' . $adkportal['Designeds']['borde'] . ';">&nbsp;</span>
					</div>
				</td>
				<td valign="top" style="width: 240px;">
					<div class="eds_autor" style="border-color: ' . $adkportal['Designeds']['borde'] . '; color: ' . $adkportal['Designeds']['letra'] . '; background: ' . $adkportal['Designeds']['fondo'] . ';">';
    // Show avatars, images, etc.?
    if (!empty($settings['show_user_images'])) {
        echo '<div style="float: right;">
								' . (!empty($context['member']['avatar']['image']) ? $context['member']['avatar']['image'] : '<img src="" alt="" border="0" />') . '</div>';
    }
    echo '
						<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/user_suit.png" />&nbsp;
						<a style="color: ' . $adkportal['Designeds']['link'] . ';" href="' . $scripturl . '?action=profile;u=' . $context['member']['id'] . '">
							<strong>' . $context['member']['name'] . '</strong>
						</a><br />';
    // Show the member's primary group (like 'Administrator') if they have one.
    if (isset($context['member']['group']) && $context['member']['group'] != '') {
        echo '
								<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/users.png" />&nbsp;' . $context['member']['group'] . '<br />';
    }
    // Show the post group if and only if they have no other group or the option is on, and they are in a post group.
    if ((empty($settings['hide_post_group']) || $context['member']['group'] == '') && $context['member']['post_group'] != '') {
        echo '
								<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/users.png" />&nbsp;' . $context['member']['post_group'] . '<br />';
    }
    echo '
								&nbsp;&nbsp;&nbsp;&nbsp;' . $context['member']['group_stars'] . '<br />';
    // Show how many posts they have made.
    echo '
									<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/newmsg.png" />&nbsp;' . $txt['member_postcount'] . ': ' . $context['member']['posts'] . '<br />';
    // Show the member's custom title, if they have one.
    if (isset($context['member']['title']) && $context['member']['title'] != '') {
        echo '
									' . $txt['adkdown_title_autor'] . ': ' . $context['member']['title'] . '<br />';
    }
    // Show their personal text?
    if (!empty($settings['show_blurb']) && $context['member']['blurb'] != '') {
        echo '
									' . $txt['adkdown_text_autor'] . ': ' . $context['member']['blurb'] . '<br />';
    }
    // Show the member's gender icon?
    if (!empty($settings['show_gender']) && $context['member']['gender']['image'] != '') {
        echo '
									' . $txt['gender'] . ': ' . $context['member']['gender']['image'] . '<br />';
    }
    // This shows the popular messaging icons.
    echo '
								' . $context['member']['icq']['link'] . '
								' . $context['member']['msn']['link'] . '
								' . $context['member']['aim']['link'] . '
								' . $context['member']['yim']['link'] . '<br />';
    // Show the profile, website, email address, and personal message buttons.
    if ($settings['show_profile_buttons']) {
        // Show the profile button
        echo '
									<a href="' . $context['member']['href'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="" title="" border="0" />' : '') . '</a>';
        // Don't show an icon if they haven't specified a website.
        if ($context['member']['website']['url'] != '') {
            echo '
									<a href="' . $context['member']['website']['url'] . '" title="' . $context['member']['website']['title'] . '" target="_blank">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="" border="0" />' : '') . '</a>';
        }
        // Don't show the email address if they want it hidden and is guest.
        if (empty($context['member']['hide_email'])) {
            echo '							
									<a href="mailto:' . $context['member']['email'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="" title="" border="0" />' : '') . '</a>';
        }
        //Send PM button
        echo '
									<a href="' . $scripturl . '?action=pm;sa=send;u=' . $context['member']['id'] . '" title="' . $context['member']['online']['label'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($context['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . $context['member']['online']['label'] . '" border="0" />' : $context['member']['online']['label']) . '</a>';
    }
    // Show online and offline buttons?
    if (!empty($modSettings['onlineEnable'])) {
        echo ($settings['use_image_buttons'] ? '<div style="float: right;"><img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" border="0" style="margin-top: 2px;" />' : $context['member']['online']['text']) . '</div> ';
    }
    $cat = str_replace('<a', '<a style="color: ' . $adkportal['Designeds']['link'] . ';"', $context['adkDownloadInformation']['cat']);
    echo '
					</div>
					<div class="eds_botbar" style="background: ' . $adkportal['Designeds']['borde'] . ';">
						<span style="background: ' . $adkportal['Designeds']['borde'] . ';">&nbsp;</span>
					</div>
					<div class="eds_topbar" style="background: ' . $adkportal['Designeds']['borde'] . ';">
						<span>' . $txt['adkdown_data_info'] . '</span>
					</div>
					<div class="eds_down smalltext" style="background: ' . $adkportal['Designeds']['fondo'] . '; border-color: ' . $adkportal['Designeds']['borde'] . '; color: ' . $adkportal['Designeds']['letra'] . ';">
						<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/menu.png" />&nbsp;<strong>' . $txt['adkdown_title'] . ': </strong> <a style="color: ' . $adkportal['Designeds']['link'] . ';" href="' . $scripturl . '?action=downloads;sa=view;down=' . $context['adkDownloadInformation']['id_file'] . '">' . $context['adkDownloadInformation']['file_title'] . '</a><br />
						<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/menu.png" />&nbsp;<strong>' . $txt['adkdown_category'] . ': </strong>' . $cat . ' <br />
						<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/menu.png" />&nbsp;<strong>' . $txt['adkdown_date'] . ': </strong>' . $context['adkDownloadInformation']['date'] . '<br />
						<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/menu.png" />&nbsp;<strong>' . $txt['adkdown_downloads'] . ': </strong>' . $context['adkDownloadInformation']['totaldownloads'] . '<br />
						<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/menu.png" />&nbsp;<strong>' . $txt['adkdown_vistas'] . ': </strong> ' . $context['adkDownloadInformation']['views'] . '
						', !empty($context['adkDownloadInformation']['lastdownload']) ? '<br /><img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/menu.png" />&nbsp;<strong>' . $txt['adkdown_last_down'] . ': </strong>' . $context['adkDownloadInformation']['lastdownload'] : '', ' 	
					</div>
					<div class="eds_botbar" style="background: ' . $adkportal['Designeds']['borde'] . ';">
						<span style="background: ' . $adkportal['Designeds']['borde'] . ';">&nbsp;</span>
					</div>
				</td>
			</tr>
		</table>';
}
コード例 #15
0
/**
 * Simple Machines Forum (SMF)
 *
 * @package SMF
 * @author Simple Machines
 * @copyright 2011 Simple Machines
 * @license http://www.simplemachines.org/about/smf/license.php BSD
 *
 * @version 2.0
 */
function template_main()
{
    global $context, $settings, $options, $txt, $scripturl, $modSettings;
    // Let them know, if their report was a success!
    if ($context['report_sent']) {
        echo '
<div class="windowbg" id="profile_success">
	', $txt['report_sent'], '
</div>';
    }
    // Show the anchor for the top and for the first message. If the first message is new, say so.
    echo '
<a id="top"></a>
<a id="msg', $context['first_message'], '"></a>', $context['first_new_message'] ? '<a id="new"></a>' : '';
    // Is this topic also a poll?
    if ($context['is_poll']) {
        echo '
<div class="tborder marginbottom" id="poll">
	<h3 class="titlebg">
		<img src="', $settings['images_url'], '/topic/', $context['poll']['is_locked'] ? 'normal_poll_locked' : 'normal_poll', '.gif" alt="" align="bottom" /> ', $txt['poll'], '
	</h3>
	<h4 class="windowbg headerpadding" id="pollquestion">
		', $context['poll']['question'], '
	</h4>
	<div class="windowbg clearfix" id="poll_options">';
        // Are they not allowed to vote but allowed to view the options?
        if ($context['poll']['show_results'] || !$context['allow_vote']) {
            echo '
		<dl class="options">';
            // Show each option with its corresponding percentage bar.
            foreach ($context['poll']['options'] as $option) {
                echo '
			<dt class="middletext', $option['voted_this'] ? ' voted' : '', '">', $option['option'], '</dt>
			<dd class="middletext">', $context['allow_poll_view'] ? $option['bar'] . ' ' . $option['votes'] . ' (' . $option['percent'] . '%)' : '', '</dd>';
            }
            echo '
		</dl>';
            if ($context['allow_poll_view']) {
                echo '
		<p><strong>', $txt['poll_total_voters'], ':</strong> ', $context['poll']['total_votes'], '</p>';
            }
        } else {
            echo '
		<form action="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], '" method="post" accept-charset="', $context['character_set'], '">';
            // Show a warning if they are allowed more than one option.
            if ($context['poll']['allowed_warning']) {
                echo '
			<p class="smallpadding">', $context['poll']['allowed_warning'], '</p>';
            }
            echo '
			<ul class="reset options">';
            // Show each option with its button - a radio likely.
            foreach ($context['poll']['options'] as $option) {
                echo '
				<li class="middletext">', $option['vote_button'], ' <label for="', $option['id'], '">', $option['option'], '</label></li>';
            }
            echo '
			</ul>

			<div class="submitbutton', !empty($context['poll']['expire_time']) ? ' border' : '', '">
				<input type="submit" value="', $txt['poll_vote'], '" class="button_submit" />
				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
			</div>
		</form>';
        }
        // Is the clock ticking?
        if (!empty($context['poll']['expire_time'])) {
            echo '
		<p><strong>', $context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on'], ':</strong> ', $context['poll']['expire_time'], '</p>';
        }
        echo '
	</div>
</div>
<div id="pollmoderation" class="clearfix">';
        // Build the poll moderation button array.
        $poll_buttons = array('vote' => array('test' => 'allow_return_vote', 'text' => 'poll_return_vote', 'image' => 'poll_options.gif', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start']), 'results' => array('test' => 'show_view_results_button', 'text' => 'poll_results', 'image' => 'poll_results.gif', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start'] . ';viewresults'), 'change_vote' => array('test' => 'allow_change_vote', 'text' => 'poll_change_vote', 'image' => 'poll_change_vote.gif', 'lang' => true, 'url' => $scripturl . '?action=vote;topic=' . $context['current_topic'] . '.' . $context['start'] . ';poll=' . $context['poll']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'lock' => array('test' => 'allow_lock_poll', 'text' => !$context['poll']['is_locked'] ? 'poll_lock' : 'poll_unlock', 'image' => 'poll_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lockvoting;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'edit' => array('test' => 'allow_edit_poll', 'text' => 'poll_edit', 'image' => 'poll_edit.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;topic=' . $context['current_topic'] . '.' . $context['start']), 'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']));
        template_button_strip($poll_buttons);
        echo '
</div><br class="clear" />';
    }
    // Does this topic have some events linked to it?
    if (!empty($context['linked_calendar_events'])) {
        echo '
<div class="linked_events">
	<h3 class="titlebg headerpadding">', $txt['calendar_linked_events'], '</h3>
	<div class="content windowbg">
		<ul class="reset">';
        foreach ($context['linked_calendar_events'] as $event) {
            echo '
			<li>
				', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" class="edit_event">*</a> ' : '', '<strong>', $event['title'], '</strong>: ', $event['start_date'], $event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : '', '
			</li>';
        }
        echo '
		</ul>
	</div>
</div>';
    }
    // Build the normal button array.
    $normal_buttons = array('reply' => array('test' => 'can_reply', 'text' => 'reply', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';last_msg=' . $context['topic_last_message']), 'add_poll' => array('test' => 'can_add_poll', 'text' => 'add_poll', 'image' => 'add_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start']), 'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : '') . 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');"', 'url' => $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'mark_unread' => array('test' => 'can_mark_unread', 'text' => 'mark_unread', 'image' => 'markunread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'send' => array('test' => 'can_send_topic', 'text' => 'send_topic', 'image' => 'sendtopic.gif', 'lang' => true, 'url' => $scripturl . '?action=emailuser;sa=sendtopic;topic=' . $context['current_topic'] . '.0'), 'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'));
    // Allow adding new buttons easily.
    call_integration_hook('integrate_display_buttons', array(&$normal_buttons));
    // Show the page index... "Pages: [1]".
    echo '
<div class="clearfix margintop" id="postbuttons">
	<div class="next">', $context['previous_next'], '</div>
	<div class="margintop middletext floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#lastPost"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
	<div class="nav floatright">', template_button_strip($normal_buttons, 'bottom'), '</div>
</div>';
    // Show the topic information - icon, subject, etc.
    echo '
<div id="forumposts" class="tborder">
	<h3 class="catbg3">
		<img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" align="bottom" alt="" />
		<span>', $txt['author'], '</span>
		<span id="top_subject">', $txt['topic'], ': ', $context['subject'], ' &nbsp;(', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')</span>
	</h3>';
    if (!empty($settings['display_who_viewing'])) {
        echo '
	<div id="whoisviewing" class="smalltext headerpadding windowbg2">';
        // Show just numbers...?
        if ($settings['display_who_viewing'] == 1) {
            echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members'];
        } 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'], '
	</div>';
    }
    echo '
	<form action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;" onsubmit="return oQuickModify.bInEditMode ? oQuickModify.modifySave(\'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\') : false">';
    // These are some cache image buttons we may want.
    $reply_button = create_button('quote.gif', 'reply', 'quote', 'align="middle"');
    $modify_button = create_button('modify.gif', 'modify', 'modify', 'align="middle"');
    $remove_button = create_button('delete.gif', 'remove', 'remove', 'align="middle"');
    $split_button = create_button('split.gif', 'split', 'split', 'align="middle"');
    $approve_button = create_button('approve.gif', 'approve', 'approve', 'align="middle"');
    $restore_message_button = create_button('restore_topic.gif', 'restore_message', 'restore_message', 'align="middle"');
    $ignoredMsgs = array();
    $removableMessageIDs = array();
    // Get all the messages...
    while ($message = $context['get_message']()) {
        $is_first_post = !isset($is_first_post) ? true : false;
        $ignoring = false;
        if ($message['can_remove']) {
            $removableMessageIDs[] = $message['id'];
        }
        echo '
		<div class="bordercolor">';
        // Are we ignoring this message?
        if (!empty($message['is_ignored'])) {
            $ignoring = true;
            $ignoredMsgs[] = $message['id'];
        }
        // Show the message anchor and a "new" anchor if this message is new.
        if ($message['id'] != $context['first_message']) {
            echo '
			<a id="msg', $message['id'], '"></a>', $message['first_new'] ? '<a id="new"></a>' : '';
        }
        echo '
			<div class="clearfix ', !$is_first_post ? 'topborder ' : '', $message['approved'] ? $message['alternate'] == 0 ? 'windowbg' : 'windowbg2' : 'approvebg', ' largepadding">';
        // Show information about the poster of this message.
        echo '
				<div class="floatleft poster">
					<h4>', $message['member']['link'], '</h4>
					<ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';
        // Show the member's custom title, if they have one.
        if (isset($message['member']['title']) && $message['member']['title'] != '') {
            echo '
						<li>', $message['member']['title'], '</li>';
        }
        // Show the member's primary group (like 'Administrator') if they have one.
        if (isset($message['member']['group']) && $message['member']['group'] != '') {
            echo '
						<li>', $message['member']['group'], '</li>';
        }
        // Don't show these things for guests.
        if (!$message['member']['is_guest']) {
            // Show the post group if and only if they have no other group or the option is on, and they are in a post group.
            if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') {
                echo '
						<li>', $message['member']['post_group'], '</li>';
            }
            echo '
						<li>', $message['member']['group_stars'], '</li>';
            // Is karma display enabled?  Total or +/-?
            if ($modSettings['karmaMode'] == '1') {
                echo '
						<li class="margintop">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
            } elseif ($modSettings['karmaMode'] == '2') {
                echo '
						<li class="margintop">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';
            }
            // Is this user allowed to modify this member's karma?
            if ($message['member']['karma']['allow']) {
                echo '
						<li>
							<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
							<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>
						</li>';
            }
            // Show online and offline buttons?
            if (!empty($modSettings['onlineEnable'])) {
                echo '
						<li>', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $message['member']['online']['image_href'] . '" alt="' . $message['member']['online']['text'] . '" border="0" style="margin-top: 2px;" />' : $message['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $message['member']['online']['text'] . '</span>' : '', '</li>';
            }
            // Show the member's gender icon?
            if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender'])) {
                echo '
						<li>', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';
            }
            // Show how many posts they have made.
            if (!isset($context['disabled_fields']['posts'])) {
                echo '
						<li>', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';
            }
            // Any custom fields for standard placement?
            if (!empty($message['member']['custom_fields'])) {
                foreach ($message['member']['custom_fields'] as $custom) {
                    if (empty($custom['placement']) && !empty($custom['value'])) {
                        echo '
						<li>', $custom['title'], ': ', $custom['value'], '</li>';
                    }
                }
            }
            // Show avatars, images, etc.?
            if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) {
                echo '
						<li class="margintop" style="overflow: auto;">', $message['member']['avatar']['image'], '</li>';
            }
            // Show their personal text?
            if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') {
                echo '
						<li class="margintop">', $message['member']['blurb'], '</li>';
            }
            // Any custom fields to show as icons?
            if (!empty($message['member']['custom_fields'])) {
                $shown = false;
                foreach ($message['member']['custom_fields'] as $custom) {
                    if ($custom['placement'] != 1 || empty($custom['value'])) {
                        continue;
                    }
                    if (empty($shown)) {
                        $shown = true;
                        echo '
						<li class="margintop">
							<ul class="reset nolist">';
                    }
                    echo '
								<li>', $custom['value'], '</li>';
                }
                if ($shown) {
                    echo '
							</ul>
						</li>';
                }
            }
            // This shows the popular messaging icons.
            if ($message['member']['has_messenger'] && $message['member']['can_view_profile']) {
                echo '
						<li class="margintop">
							<ul class="reset nolist">
								', !isset($context['disabled_fields']['icq']) && !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
								', !isset($context['disabled_fields']['msn']) && !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
								', !isset($context['disabled_fields']['aim']) && !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
								', !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
							</ul>
						</li>';
            }
            // Show the profile, website, email address, and personal message buttons.
            if ($settings['show_profile_buttons']) {
                echo '
						<li class="margintop">
							<ul class="reset nolist">';
                // Don't show the profile button if you're not allowed to view the profile.
                if ($message['member']['can_view_profile']) {
                    echo '
								<li><a href="', $message['member']['href'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" border="0" />' : $txt['view_profile'], '</a></li>';
                }
                // Don't show an icon if they haven't specified a website.
                if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website'])) {
                    echo '
								<li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $message['member']['website']['title'] . '" border="0" />' : $txt['www'], '</a></li>';
                }
                // Don't show the email address if they want it hidden.
                if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum'))) {
                    echo '
								<li><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email'], '</a></li>';
                }
                // Since we know this person isn't a guest, you *can* message them.
                if ($context['can_send_pm']) {
                    echo '
								<li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" border="0" />' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';
                }
                echo '
							</ul>
						</li>';
            }
            // Are we showing the warning status?
            if ($message['member']['can_see_warning']) {
                echo '
						<li>', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<img src="', $settings['images_url'], '/warning_', $message['member']['warning_status'], '.gif" alt="', $txt['user_warn_' . $message['member']['warning_status']], '" />', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
            }
        } elseif (!empty($message['member']['email']) && in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum'))) {
            echo '
						<li><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" border="0" />' : $txt['email'], '</a></li>';
        }
        // Done with the information about the poster... on to the post itself.
        echo '
					</ul>
				</div>
				<div class="postarea">
					<div class="flow_hidden">
						<div class="keyinfo">
							<div class="messageicon"><img src="', $message['icon_url'] . '" alt="" border="0"', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' /></div>
							<h5 id="subject_', $message['id'], '">
								<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
							</h5>
							<div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
							<div id="msg_', $message['id'], '_quick_mod"></div>
						</div>';
        // If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
        if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg']) {
            echo '
						<ul class="reset smalltext postingbuttons">';
        }
        // Maybe we can approve it, maybe we should?
        if ($message['can_approve']) {
            echo '
							<li><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $approve_button, '</a></li>';
        }
        // Can they reply? Have they turned on quick reply?
        if ($context['can_quote'] && !empty($options['display_quick_reply'])) {
            echo '
							<li><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" onclick="return oQuickReply.quote(', $message['id'], ');">', $reply_button, '</a></li>';
        } elseif ($context['can_quote']) {
            echo '
							<li><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '">', $reply_button, '</a></li>';
        }
        // Can the user modify the contents of this post?
        if ($message['can_modify']) {
            echo '
							<li><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '">', $modify_button, '</a></li>';
        }
        // How about... even... remove it entirely?!
        if ($message['can_remove']) {
            echo '
							<li><a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');">', $remove_button, '</a></li>';
        }
        // What about splitting it off the rest of the topic?
        if ($context['can_split'] && !empty($context['real_num_replies'])) {
            echo '
							<li><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', $split_button, '</a></li>';
        }
        // Can we restore topics?
        if ($context['can_restore_msg']) {
            echo '
							<li><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $restore_message_button, '</a></li>';
        }
        // Show a checkbox for quick moderation?
        if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove']) {
            echo '
							<li style="display: none;" id="in_topic_mod_check_', $message['id'], '"></li>';
        }
        if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg']) {
            echo '
						</ul>';
        }
        echo '
					</div>';
        // Ignoring this user? Hide the post.
        if ($ignoring) {
            echo '
					<div class="ignored" id="msg_', $message['id'], '_ignored_prompt">
						', $txt['ignoring_user'], '
						<a href="#" id="msg_', $message['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
					</div>';
        }
        // Show the post itself, finally!
        echo '
					<div class="post">
						<hr class="hrcolor" width="100%" size="1" />';
        if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id']) {
            echo '
						<div class="approve_post">
							', $txt['post_awaiting_approval'], '
						</div>';
        }
        echo '
						<div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>
					</div>', $message['can_modify'] ? '
					<img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="' . $txt['modify_msg'] . '" title="' . $txt['modify_msg'] . '" class="modifybutton" id="modify_button_' . $message['id'] . '" style="cursor: ' . ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer') . '; display: none;" onclick="oQuickModify.modifyMsg(\'' . $message['id'] . '\')" />' : '';
        // Assuming there are attachments...
        if (!empty($message['attachment'])) {
            // Now for the attachments, signature, ip logged, etc...
            echo '
					<div id="msg_', $message['id'], '_footer" class="attachments smalltext">';
            $last_approved_state = 1;
            foreach ($message['attachment'] as $attachment) {
                // Show a special box for unapproved attachments...
                if ($attachment['is_approved'] != $last_approved_state) {
                    $last_approved_state = 0;
                    echo '
							<fieldset>
								<legend>', $txt['attach_awaiting_approve'];
                    if ($context['can_approve']) {
                        echo '&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';
                    }
                    echo '</legend>';
                }
                if ($attachment['is_image']) {
                    if ($attachment['thumbnail']['has_thumb']) {
                        echo '
								<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
                    } else {
                        echo '
								<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
                    }
                }
                echo '
								<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" />&nbsp;' . $attachment['name'] . '</a> ';
                if (!$attachment['is_approved'] && $context['can_approve']) {
                    echo '
								[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>]&nbsp;|&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
                }
                echo '
										(', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
            }
            // If we had unapproved attachments clean up.
            if ($last_approved_state == 0) {
                echo '
							</fieldset>';
            }
            echo '
					</div>';
        }
        echo '
				</div>
				<div class="moderatorbar">
					<div class="smalltext floatleft" id="modified_', $message['id'], '">';
        // Show "« Last Edit: Time by Person »" if this post was edited.
        if ($settings['show_modify'] && !empty($message['modified']['name'])) {
            echo '
						&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;';
        }
        echo '
					</div>
					<div class="smalltext largepadding floatright">';
        // Maybe they want to report this post to the moderator(s)?
        if ($context['can_report_moderator']) {
            echo '
						<a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['report_to_mod'], '</a> &nbsp;';
        }
        // Can we issue a warning because of this post?  Remember, we can't give guests warnings.
        if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest']) {
            echo '
						<a href="', $scripturl, '?action=profile;area=issuewarning;u=', $message['member']['id'], ';msg=', $message['id'], '"><img src="', $settings['images_url'], '/warn.gif" alt="', $txt['issue_warning_post'], '" title="', $txt['issue_warning_post'], '" border="0" /></a>';
        }
        echo '
						<img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />';
        // Show the IP to this user for this post - because you can moderate?
        if ($context['can_moderate_forum'] && !empty($message['member']['ip'])) {
            echo '
						<a href="', $scripturl, '?action=', !empty($message['member']['is_guest']) ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $message['member']['id'], ';searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a> <a href="', $scripturl, '?action=helpadmin;help=see_admin_ip" onclick="return reqWin(this.href);" class="help">(?)</a>';
        } elseif ($message['can_see_ip']) {
            echo '
						<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $message['member']['ip'], '</a>';
        } elseif (!$context['user']['is_guest']) {
            echo '
						<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $txt['logged'], '</a>';
        } else {
            echo '
						', $txt['logged'];
        }
        echo '
					</div>';
        // Are there any custom profile fields for above the signature?
        if (!empty($message['member']['custom_fields'])) {
            $shown = false;
            foreach ($message['member']['custom_fields'] as $custom) {
                if ($custom['placement'] != 2 || empty($custom['value'])) {
                    continue;
                }
                if (empty($shown)) {
                    $shown = true;
                    echo '
						<div class="custom_fields_above_signature">
							<ul class="reset nolist>';
                }
                echo '
								<li>', $custom['value'], '</li>';
            }
            if ($shown) {
                echo '
							</ul>
						</div>';
            }
        }
        // Show the member's signature?
        if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) {
            echo '
					<div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';
        }
        echo '
				</div>
			</div>
		</div>';
    }
    echo '
	</form>';
    echo '
</div>
<a id="lastPost"></a>';
    echo '
<div class="clearfix marginbottom" id="postbuttons_lower">
	<div class="nav floatright">', template_button_strip($normal_buttons, 'top'), '</div>
	<div class="middletext floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
	<div class="clear">', $context['previous_next'], '</div>
</div>';
    // Show the lower breadcrumbs.
    theme_linktree();
    $mod_buttons = array('move' => array('test' => 'can_move', 'text' => 'move_topic', 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'), 'delete' => array('test' => 'can_delete', 'text' => 'remove_topic', 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['are_sure_remove_topic'] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;' . $context['session_var'] . '=' . $context['session_id']), 'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'set_lock' : 'set_unlock', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'set_sticky' : 'set_nonsticky', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'merge' => array('test' => 'can_merge', 'text' => 'merge', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']), 'calendar' => array('test' => 'calendar_post', 'text' => 'calendar_link', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0'));
    // Restore topic. eh?  No monkey business.
    if ($context['can_restore_topic']) {
        $mod_buttons[] = array('text' => 'restore_topic', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']);
    }
    // Allow adding new mod buttons easily.
    call_integration_hook('integrate_mod_buttons', array(&$mod_buttons));
    echo '
<div id="moderationbuttons" class="clearfix">', template_button_strip($mod_buttons, 'bottom', array('id' => 'moderationbuttons_strip')), '</div>';
    // Show the jumpto box, or actually...let Javascript do it.
    echo '
<div class="tborder">
	<div class="titlebg2" style="padding: 4px;" align="', !$context['right_to_left'] ? 'right' : 'left', '" id="display_jump_to">&nbsp;</div>
</div><br />';
    if ($context['can_reply'] && !empty($options['display_quick_reply'])) {
        echo '
<a id="quickreply"></a>
<div class="tborder" id="quickreplybox">';
        echo '
	<h3 class="catbg">
		<a href="javascript:oQuickReply.swap();">
			<img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" id="quickReplyExpand" />
		</a>
		<a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a>
	</h3>
	<div class="windowbg" id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
		<div class="floatleft" id="quickReplyWarning">
			', $txt['quick_reply_desc'], $context['is_locked'] ? '<p><strong>' . $txt['quick_reply_warning'] . '</strong></p>' : '', $context['oldTopicError'] ? '<p><strong>' . sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']) . '</strong></p>' : '', '
		</div>
		<div id="quickReplyContent">', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
			', !$context['can_reply_approved'] && $context['require_verification'] ? '<br />' : '', '
			<form action="', $scripturl, '?action=post2', empty($context['current_board']) ? '' : ';board=' . $context['current_board'], '" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);smc_saveEntities(\'postmodify\', [\'subject\', \'message\', \'guestname\', \'evtitle\', \'question\']);" style="margin: 0;">
				<input type="hidden" name="topic" value="', $context['current_topic'], '" />
				<input type="hidden" name="subject" value="', $context['response_prefix'], $context['subject'], '" />
				<input type="hidden" name="icon" value="xx" />
				<input type="hidden" name="from_qr" value="1" />
				<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
				<input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '" />
				<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
				<input type="hidden" name="last_msg" value="', $context['topic_last_message'], '" />';
        // Guests just need more.
        if ($context['user']['is_guest']) {
            echo '
				<strong>', $txt['name'], ':</strong> <input type="text" name="guestname" value="', $context['name'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" />
				<strong>', $txt['email'], ':</strong> <input type="text" name="email" value="', $context['email'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" /><br />';
        }
        // Is visual verification enabled?
        if ($context['require_verification']) {
            echo '
				<strong>', $txt['verification'], ':</strong>', template_control_verification($context['visual_verification_id'], 'quick_reply'), '<br />';
        }
        echo '
				<textarea cols="600" rows="7" name="message" tabindex="', $context['tabindex']++, '"></textarea><br />
				<input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="', $context['tabindex']++, '" class="button_submit" />
				<input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />';
        if ($context['show_spellchecking']) {
            echo '
				<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="', $context['tabindex']++, '" class="button_submit" />';
        }
        echo '
				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
				<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
			</form>
		</div>
		<div class="clear"></div>
	</div>
</div>';
    }
    if ($context['show_spellchecking']) {
        echo '
<form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value="" /></form>
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/spellcheck.js"></script>';
    }
    echo '
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/topic.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[';
    if (!empty($options['display_quick_reply'])) {
        echo '
	var oQuickReply = new QuickReply({
		bDefaultCollapsed: ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] == 2 ? 'false' : 'true', ',
		iTopicId: ', $context['current_topic'], ',
		iStart: ', $context['start'], ',
		sScriptUrl: smf_scripturl,
		sImagesUrl: "', $settings['images_url'], '",
		sContainerId: "quickReplyOptions",
		sImageId: "quickReplyExpand",
		sImageCollapsed: "collapse.gif",
		sImageExpanded: "expand.gif",
		sJumpAnchor: "quickreply"
	});';
    }
    if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post']) {
        echo '
	var oInTopicModeration = new InTopicModeration({
		sSelf: \'oInTopicModeration\',
		sCheckboxContainerMask: \'in_topic_mod_check_\',
		aMessageIds: [\'', implode('\', \'', $removableMessageIDs), '\'],
		sSessionId: \'', $context['session_id'], '\',
		sSessionVar: \'', $context['session_var'], '\',
		sButtonStrip: \'moderationbuttons\',
		sButtonStripDisplay: \'moderationbuttons_strip\',
		bUseImageButton: false,
		bCanRemove: ', $context['can_remove_post'] ? 'true' : 'false', ',
		sRemoveButtonLabel: \'', $txt['quickmod_delete_selected'], '\',
		sRemoveButtonImage: \'delete_selected.gif\',
		sRemoveButtonConfirm: \'', $txt['quickmod_confirm'], '\',
		bCanRestore: ', $context['can_restore_msg'] ? 'true' : 'false', ',
		sRestoreButtonLabel: \'', $txt['quick_mod_restore'], '\',
		sRestoreButtonImage: \'restore_selected.gif\',
		sRestoreButtonConfirm: \'', $txt['quickmod_confirm'], '\',
		sFormId: \'quickModForm\'
	});';
    }
    echo '
	if (\'XMLHttpRequest\' in window)
	{
		var oQuickModify = new QuickModify({
			sScriptUrl: smf_scripturl,
			bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
			iTopicId: ', $context['current_topic'], ',
			sTemplateBodyEdit: ', JavaScriptEscape('
				<div id="quick_edit_body_container" style="width: 90%">
					<div id="error_box" style="padding: 4px;" class="error"></div>
					<textarea class="editor" name="message" rows="12" style="' . ($context['browser']['is_ie8'] ? 'width: 635px; max-width: 100%; min-width: 100%' : 'width: 100%') . ';  margin-bottom: 10px;" tabindex="' . $context['tabindex']++ . '">%body%</textarea><br />
					<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
					<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
					<input type="hidden" name="msg" value="%msg_id%" />
					<div class="righttext">
						<input type="submit" name="post" value="' . $txt['save'] . '" tabindex="' . $context['tabindex']++ . '" onclick="return oQuickModify.modifySave(\'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\');" accesskey="s" class="button_submit" />&nbsp;&nbsp;' . ($context['show_spellchecking'] ? '<input type="button" value="' . $txt['spell_check'] . '" tabindex="' . $context['tabindex']++ . '" onclick="spellCheck(\'quickModForm\' . \'message\');" class="button_submit" />&nbsp;&nbsp;' : '') . '<input type="submit" name="cancel" value="' . $txt['modify_cancel'] . '" tabindex="' . $context['tabindex']++ . '" onclick="return oQuickModify.modifyCancel();" class="button_submit" />
					</div>
				</div>'), ',
			sTemplateSubjectEdit: ', JavaScriptEscape('<input type="text" style="width: 90%" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" />'), ',
			sTemplateBodyNormal: ', JavaScriptEscape('%body%'), ',
			sTemplateSubjectNormal: ', JavaScriptEscape('<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%</a>'), ',
			sTemplateTopSubject: ', JavaScriptEscape($txt['topic'] . ': %subject% &nbsp;(' . $txt['read'] . ' ' . $context['num_views'] . ' ' . $txt['times'] . ')'), ',
			sErrorBorderStyle: ', JavaScriptEscape('1px solid red'), '
		});

		aJumpTo[aJumpTo.length] = new JumpTo({
			sContainerId: "display_jump_to",
			sJumpToTemplate: "<label class=\\"smalltext\\" 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['go'], '"
		});

		aIconLists[aIconLists.length] = new IconList({
			sBackReference: "aIconLists[" + aIconLists.length + "]",
			sIconIdPrefix: "msg_icon_",
			sScriptUrl: smf_scripturl,
			bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
			iBoardId: ', $context['current_board'], ',
			iTopicId: ', $context['current_topic'], ',
			sSessionId: "', $context['session_id'], '",
			sSessionVar: "', $context['session_var'], '",
			sLabelIconList: "', $txt['message_icon'], '",
			sBoxBackground: "transparent",
			sBoxBackgroundHover: "#ffffff",
			iBoxBorderWidthHover: 1,
			sBoxBorderColorHover: "#adadad" ,
			sContainerBackground: "#ffffff",
			sContainerBorder: "1px solid #adadad",
			sItemBorder: "1px solid #ffffff",
			sItemBorderHover: "1px dotted gray",
			sItemBackground: "transparent",
			sItemBackgroundHover: "#e0e0f0"
		});
	}';
    if (!empty($ignoredMsgs)) {
        echo '
	var aIgnoreToggles = new Array();';
        foreach ($ignoredMsgs as $msgid) {
            echo '
	aIgnoreToggles[', $msgid, '] = new smc_Toggle({
		bToggleEnabled: true,
		bCurrentlyCollapsed: true,
		aSwappableContainers: [
			\'msg_', $msgid, '_extra_info\',
			\'msg_', $msgid, '\',
			\'msg_', $msgid, '_footer\',
			\'msg_', $msgid, '_quick_mod\',
			\'modify_button_', $msgid, '\',
			\'msg_', $msgid, '_signature\'

		],
		aSwapLinks: [
			{
				sId: \'msg_', $msgid, '_ignored_link\',
				msgExpanded: \'\',
				msgCollapsed: ', JavaScriptEscape($txt['show_ignore_user_post']), '
			}
		]
	});';
        }
    }
    echo '
	// ]]></script>';
}
コード例 #16
0
function template_folder()
{
    global $context, $settings, $options, $scripturl, $modSettings, $txt;
    // The every helpful javascript!
    echo '
	<script type="text/javascript"><!-- // --><![CDATA[
		var allLabels = {};
		var currentLabels = {};
		function loadLabelChoices()
		{
			var listing = document.forms.pmFolder.elements;
			var theSelect = document.forms.pmFolder.pm_action;
			var add, remove, toAdd = {length: 0}, toRemove = {length: 0};

			if (theSelect.childNodes.length == 0)
				return;';
    // This is done this way for internationalization reasons.
    echo '
			if (!(\'-1\' in allLabels))
			{
				for (var o = 0; o < theSelect.options.length; o++)
					if (theSelect.options[o].value.substr(0, 4) == "rem_")
						allLabels[theSelect.options[o].value.substr(4)] = theSelect.options[o].text;
			}

			for (var i = 0; i < listing.length; i++)
			{
				if (listing[i].name != "pms[]" || !listing[i].checked)
					continue;

				var alreadyThere = [], x;
				for (x in currentLabels[listing[i].value])
				{
					if (!(x in toRemove))
					{
						toRemove[x] = allLabels[x];
						toRemove.length++;
					}
					alreadyThere[x] = allLabels[x];
				}

				for (x in allLabels)
				{
					if (!(x in alreadyThere))
					{
						toAdd[x] = allLabels[x];
						toAdd.length++;
					}
				}
			}

			while (theSelect.options.length > 2)
				theSelect.options[2] = null;

			if (toAdd.length != 0)
			{
				theSelect.options[theSelect.options.length] = new Option("', $txt['pm_msg_label_apply'], '", "");
				setInnerHTML(theSelect.options[theSelect.options.length - 1], "', $txt['pm_msg_label_apply'], '");
				theSelect.options[theSelect.options.length - 1].disabled = true;

				for (i in toAdd)
				{
					if (i != "length")
						theSelect.options[theSelect.options.length] = new Option(toAdd[i], "add_" + i);
				}
			}

			if (toRemove.length != 0)
			{
				theSelect.options[theSelect.options.length] = new Option("', $txt['pm_msg_label_remove'], '", "");
				setInnerHTML(theSelect.options[theSelect.options.length - 1], "', $txt['pm_msg_label_remove'], '");
				theSelect.options[theSelect.options.length - 1].disabled = true;

				for (i in toRemove)
				{
					if (i != "length")
						theSelect.options[theSelect.options.length] = new Option(toRemove[i], "rem_" + i);
				}
			}
		}
	// ]]></script>';
    echo '
<form action="', $scripturl, '?action=pm;sa=pmactions;', $context['display_mode'] == 2 ? 'conversation;' : '', 'f=', $context['folder'], ';start=', $context['start'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', '" method="post" accept-charset="', $context['character_set'], '" name="pmFolder">';
    // If we are not in single display mode show the subjects on the top!
    if ($context['display_mode'] != 1) {
        template_subject_list();
        echo '<br />';
    }
    // 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) {
            // Build the normal button array.
            $conversation_buttons = array('reply' => array('text' => 'reply_to_all', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=pm;sa=send;f=' . $context['folder'] . ($context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '') . ';pmsg=' . $context['current_pm'] . ';u=all'), 'delete' => array('text' => 'delete_conversation', 'image' => 'delete.gif', 'lang' => true, 'url' => $scripturl . '?action=pm;sa=pmactions;pm_actions[' . $context['current_pm'] . ']=delete;conversation;f=' . $context['folder'] . ';start=' . $context['start'] . ($context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '') . ';' . $context['session_var'] . '=' . $context['session_id'], 'custom' => 'onclick="return confirm(\'' . addslashes($txt['remove_message']) . '?\');"'));
            // Show the conversation buttons.
            echo '
				<div class="modbuttons_top margintop flow_hidden">';
            template_button_strip($conversation_buttons, 'right');
            echo '
				</div>';
        }
        echo '
	<div class="tborder" style="padding: 1px">';
        // Show the helpful titlebar - generally.
        if ($context['display_mode'] != 1) {
            echo '
		<div id="forumposts">
			<h3 class="catbg3">
				<span>', $txt['author'], '</span>
				<span id="top_subject">', $txt[$context['display_mode'] == 0 ? 'messages' : 'conversation'], '</span>
			</h3>
		</div>';
        }
        // Cache some handy buttons.
        $quote_button = create_button('quote.gif', 'reply_quote', 'quote', 'align="middle"');
        $reply_button = create_button('im_reply.gif', 'reply', 'reply', 'align="middle"');
        $reply_all_button = create_button('im_reply_all.gif', 'reply_to_all', 'reply_to_all', 'align="middle"');
        $forward_button = create_button('quote.gif', 'reply_quote', 'reply_quote', 'align="middle"');
        $delete_button = create_button('delete.gif', 'remove_message', 'remove', 'align="middle"');
        while ($message = $context['get_pmessage']('message')) {
            $is_first_post = !isset($is_first_post) ? true : false;
            // Show information about the poster of this message.
            echo '
		<div class="bordercolor" id="msg', $message['id'], '">
			<div class="clearfix ', !$is_first_post ? 'topborder ' : '', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' largepadding">
				<div class="floatleft poster">
					<h4>', $message['member']['link'], '</h4>
					<ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';
            // Show the member's custom title, if they have one.
            if (isset($message['member']['title']) && $message['member']['title'] != '') {
                echo '
						<li>', $message['member']['title'], '</li>';
            }
            // Show the member's primary group (like 'Administrator') if they have one.
            if (isset($message['member']['group']) && $message['member']['group'] != '') {
                echo '
						<li>', $message['member']['group'], '</li>';
            }
            // Don't show these things for guests.
            if (!$message['member']['is_guest']) {
                // Show the post group if and only if they have no other group or the option is on, and they are in a post group.
                if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') {
                    echo '
						<li>', $message['member']['post_group'], '</li>';
                }
                echo '
						<li>', $message['member']['group_stars'], '</li>';
                // Is karma display enabled?  Total or +/-?
                if ($modSettings['karmaMode'] == '1') {
                    echo '
						<li class="margintop">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
                } elseif ($modSettings['karmaMode'] == '2') {
                    echo '
						<li class="margintop">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';
                }
                // Is this user allowed to modify this member's karma?
                if ($message['member']['karma']['allow']) {
                    echo '
						<li>
							<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';f=', $context['folder'], ';start=', $context['start'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pm=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
							<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';f=', $context['folder'], ';start=', $context['start'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pm=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>
						</li>';
                }
                // Show online and offline buttons?
                if (!empty($modSettings['onlineEnable'])) {
                    echo '
						<li>', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $message['member']['online']['image_href'] . '" alt="' . $message['member']['online']['text'] . '" border="0" style="margin-top: 2px;" />' : $message['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $message['member']['online']['text'] . '</span>' : '', '</li>';
                }
                // Show the member's gender icon?
                if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender'])) {
                    echo '
						<li>', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';
                }
                // Show how many posts they have made.
                if (!isset($context['disabled_fields']['posts'])) {
                    echo '
						<li>', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';
                }
                // Any custom fields for standard placement?
                if (!empty($message['member']['custom_fields'])) {
                    foreach ($message['member']['custom_fields'] as $custom) {
                        if (empty($custom['placement']) && !empty($custom['value'])) {
                            echo '
						<li>', $custom['title'], ': ', $custom['value'], '</li>';
                        }
                    }
                }
                // Show avatars, images, etc.?
                if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) {
                    echo '
						<li class="margintop" style="overflow: auto;">', $message['member']['avatar']['image'], '</li>';
                }
                // Show their personal text?
                if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') {
                    echo '
						<li class="margintop">', $message['member']['blurb'], '</li>';
                }
                // Any custom fields to show as icons?
                if (!empty($message['member']['custom_fields'])) {
                    $shown = false;
                    foreach ($message['member']['custom_fields'] as $custom) {
                        if ($custom['placement'] != 1 || empty($custom['value'])) {
                            continue;
                        }
                        if (empty($shown)) {
                            $shown = true;
                            echo '
						<li class="margintop">
							<ul class="reset nolist">';
                        }
                        echo '
								<li>', $custom['value'], '</li>';
                    }
                    if ($shown) {
                        echo '
							</ul>
						</li>';
                    }
                }
                // This shows the popular messaging icons.
                if ($message['member']['has_messenger'] && $message['member']['can_view_profile']) {
                    echo '
						<li class="margintop">
							<ul class="reset nolist">
								', !isset($context['disabled_fields']['icq']) && !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
								', !isset($context['disabled_fields']['msn']) && !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
								', !isset($context['disabled_fields']['aim']) && !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
								', !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
							</ul>
						</li>';
                }
                // Show the profile, website, email address, and personal message buttons.
                if ($settings['show_profile_buttons']) {
                    echo '
						<li class="margintop">
							<ul class="reset nolist">';
                    // Don't show the profile button if you're not allowed to view the profile.
                    if ($message['member']['can_view_profile']) {
                        echo '
								<li><a href="', $message['member']['href'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" border="0" />' : $txt['view_profile'], '</a></li>';
                    }
                    // Don't show an icon if they haven't specified a website.
                    if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website'])) {
                        echo '
								<li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $message['member']['website']['title'] . '" border="0" />' : $txt['www'], '</a></li>';
                    }
                    // Don't show the email address if they want it hidden.
                    if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum'))) {
                        echo '
								<li><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $message['member']['id'], '" rel="nofollow">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email'], '</a></li>';
                    }
                    // Since we know this person isn't a guest, you *can* message them.
                    if ($context['can_send_pm']) {
                        echo '
								<li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" border="0" />' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';
                    }
                    echo '
							</ul>
						</li>';
                }
                // Are we showing the warning status?
                if ($message['member']['can_see_warning']) {
                    echo '
						<li>', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<img src="', $settings['images_url'], '/warning_', $message['member']['warning_status'], '.gif" alt="', $txt['user_warn_' . $message['member']['warning_status']], '" />', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
                }
            }
            // Done with the information about the poster... on to the post itself.
            echo '
					</ul>
				</div>
				<div class="postarea">
					<div class="flow_hidden">
						<div class="keyinfo">
							<h5>
								<strong>', $message['subject'], '</strong>
							</h5>';
            // Show who the message was sent to.
            echo '
							<div class="smalltext">
								&#171; <strong> ', $txt['sent_to'], ':</strong> ';
            // People it was sent directly to....
            if (!empty($message['recipients']['to'])) {
                echo implode(', ', $message['recipients']['to']);
            } elseif ($context['folder'] != 'sent') {
                echo '(', $txt['pm_undisclosed_recipients'], ')';
            }
            echo '
								<strong> ', $txt['on'], ':</strong> ', $message['time'], ' &#187;
							</div>';
            // If we're in the sent items, show who it was sent to besides the "To:" people.
            if (!empty($message['recipients']['bcc'])) {
                echo '
							<div class="smalltext">&#171; <strong> ', $txt['pm_bcc'], ':</strong> ', implode(', ', $message['recipients']['bcc']), ' &#187;</div>';
            }
            if (!empty($message['is_replied_to'])) {
                echo '
							<div class="smalltext">&#171; ', $txt['pm_is_replied_to'], ' &#187;</div>';
            }
            echo '
						</div>
						<ul class="reset smalltext postingbuttons">';
            // Show reply buttons if you have the permission to send PMs.
            if ($context['can_send_pm']) {
                // You can't really reply if the member is gone.
                if (!$message['member']['is_guest']) {
                    // Were than more than one recipient you can reply to? (Only shown when not in conversation mode.)
                    if ($message['number_recipients'] > 1 && $context['display_mode'] != 2) {
                        echo '
							<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $reply_all_button, '</a></li>';
                    }
                    echo '
							<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button, '</a></li>
							<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $quote_button, '</a></li>';
                } else {
                    echo '
							<li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $forward_button, '</a></li>';
                }
            }
            echo '
							<li><a href="', $scripturl, '?action=pm;sa=pmactions;pm_actions[', $message['id'], ']=delete;f=', $context['folder'], ';start=', $context['start'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', addslashes($txt['remove_message']), '?\');">', $delete_button, '</a></li>';
            if (empty($context['display_mode'])) {
                echo '
							<li><input style="vertical-align: middle;" type="checkbox" name="pms[]" id="deletedisplay', $message['id'], '" value="', $message['id'], '" onclick="document.getElementById(\'deletelisting', $message['id'], '\').checked = this.checked;" class="input_check" /></li>';
            }
            echo '
						</ul>
					</div>
					<div class="personalmessage">
						<hr width="100%" size="1" class="hrcolor" />
						', $message['body'], '
					</div>';
            if (!empty($modSettings['enableReportPM']) && $context['folder'] != 'sent') {
                echo '
					<div class="reportlinks smalltext righttext">
						<a href="', $scripturl, '?action=pm;sa=report;l=', $context['current_label_id'], ';pmsg=', $message['id'], '">', $txt['pm_report_to_admin'], '</a>
					</div>';
            }
            // Are there any custom profile fields for above the signature?
            if (!empty($message['member']['custom_fields'])) {
                $shown = false;
                foreach ($message['member']['custom_fields'] as $custom) {
                    if ($custom['placement'] != 2 || empty($custom['value'])) {
                        continue;
                    }
                    if (!$shown) {
                        $shown = true;
                        echo '
						<div class="custom_fields_above_signature">
							<ul class="reset nolist>';
                    }
                    echo '
								<li>', $custom['value'], '</li>';
                }
                if ($shown) {
                    echo '
							</ul>
						</div>';
                }
            }
            // Show the member's signature?
            if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) {
                echo '
						<div class="signature">', $message['member']['signature'], '</div>';
            }
            // 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 '
						<div class="labels righttext">';
                // Add the label drop down box.
                if (!empty($context['currently_using_labels'])) {
                    echo '
							<select name="pm_actions[', $message['id'], ']" onchange="if (this.options[this.selectedIndex].value) form.submit();">
								<option value="">', $txt['pm_msg_label_title'], ':</option>
							<option value="" disabled="disabled">---------------</option>';
                    // Are there any labels which can be added to this?
                    if (!$message['fully_labeled']) {
                        echo '
							<option value="" disabled="disabled">', $txt['pm_msg_label_apply'], ':</option>';
                        foreach ($context['labels'] as $label) {
                            if (!isset($message['labels'][$label['id']])) {
                                echo '
							<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
                            }
                        }
                    }
                    // ... and are there any that can be removed?
                    if (!empty($message['labels']) && (count($message['labels']) > 1 || !isset($message['labels'][-1]))) {
                        echo '
								<option value="" disabled="disabled">', $txt['pm_msg_label_remove'], ':</option>';
                        foreach ($message['labels'] as $label) {
                            echo '
								<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
                        }
                    }
                    echo '
							</select>
							<noscript>
								<input type="submit" value="', $txt['pm_apply'], '" class="button_submit" />
							</noscript>';
                }
                echo '
						</div>';
            }
            echo '
					</div>
				</div>
			</div>';
        }
        echo '
		</div>';
        if (empty($context['display_mode'])) {
            echo '
		<div class="catbg flow_hidden" style="padding: 1px; margin-top: 1ex;">
			<div class="floatleft pagesection">', $txt['pages'], ': ', $context['page_index'], '</div>
			<div class="floatright"><input type="submit" name="del_selected" value="', $txt['quickmod_delete_selected'], '" style="font-weight: normal;" onclick="if (!confirm(\'', $txt['delete_selected_confirm'], '\')) return false;" class="button_submit" /></div>
		</div>';
        } elseif ($context['display_mode'] == 2 && isset($conversation_buttons)) {
            template_button_strip($conversation_buttons);
        }
        echo '
		<br />';
    }
    // Individual messages = buttom list!
    if ($context['display_mode'] == 1) {
        template_subject_list();
        echo '<br />';
    }
    echo '
	<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</form>';
}
コード例 #17
0
ファイル: index.template.php プロジェクト: meetdilip/meet
/**
 * Another used and abused piece of template that can be found everywhere
 *
 * @param string $button_strip index of $context to create the button strip
 * @param string $strip_direction direction of the button strip (see template_button_strip for details)
 * @param array $options array of optional values, possible values:
 *                - 'page_index' (string) index of $context where is located the pages index generated by constructPageIndex
 *                - 'page_index_markup' (string) markup for the page index, overrides 'page_index' and can be used if
 *                   the page index code is not in the first level of $context
 *                - 'extra' (string) used to add html markup at the end of the template
 */
function template_pagesection($button_strip = false, $strip_direction = '', $options = array())
{
    global $context;
    // Hmmm. I'm a tad wary of having floatleft here but anyway............
    // @todo - Try using table-cell display here. Should do auto rtl support. Less markup, less css. :)
    if (!empty($options['page_index_markup'])) {
        $pages = '<ul ' . (isset($options['page_index_id']) ? 'id="' . $options['page_index_id'] . '" ' : '') . 'class="pagelinks floatleft" role="menubar">' . $options['page_index_markup'] . '</ul>';
    } else {
        if (!isset($options['page_index'])) {
            $options['page_index'] = 'page_index';
        }
        $pages = empty($context[$options['page_index']]) ? '' : '<ul ' . (isset($options['page_index_id']) ? 'id="' . $options['page_index_id'] . '" ' : '') . 'class="pagelinks floatleft" role="menubar">' . $context[$options['page_index']] . '</ul>';
    }
    if (!isset($options['extra'])) {
        $options['extra'] = '';
    }
    echo '
			<div class="pagesection" role="application">
				', $pages, '
				', !empty($button_strip) && !empty($context[$button_strip]) ? template_button_strip($context[$button_strip], $strip_direction) : '', $options['extra'], '
			</div>';
}
コード例 #18
0
ファイル: Recent.template.php プロジェクト: Bloc67/ShelfLife
function template_replies()
{
    global $context, $settings, $options, $txt, $scripturl, $modSettings;
    loadtemplate('Common');
    echo '
	<div id="recent">';
    $showCheckboxes = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $settings['show_mark_read'];
    if ($showCheckboxes) {
        echo '
		<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
			<input type="hidden" name="qaction" value="markread" />
			<input type="hidden" name="redirect_url" value="action=unreadreplies', !empty($context['showing_all_topics']) ? ';all' : '', $context['querystring_board_limits'], '" />';
    }
    if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read'])) {
        // Generate the button strip.
        $mark_read = array('markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=unreadreplies;topics=' . $context['topics_to_mark'] . ';' . $context['session_var'] . '=' . $context['session_id']));
        if ($showCheckboxes) {
            $mark_read['markselectread'] = array('text' => 'quick_mod_markread', 'image' => 'markselectedread.gif', 'lang' => true, 'url' => 'javascript:document.quickModForm.submit();');
        }
    }
    if (!empty($context['topics'])) {
        echo '
			<div class="pagesection themepadding">
				<div class="bwgrid">
					<div class="bwcell8">
						<br><div>', $txt['pages'], ': ', $context['page_index'], '</div>
					</div>
					<div class="bwcell8">';
        if (!empty($mark_read) && !empty($settings['use_tabs'])) {
            echo template_button_strip($mark_read, 'right');
        }
        echo '
					</div>
				</div>
			</div>
			<div class="topic_table clear" id="unreadreplies">
				<table class="table_grid" cellspacing="0">
					<thead>
						<tr class="catbg">
							<th scope="col" class="first_th">&nbsp;</th>
							<th scope="col">
								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] === 'subject' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] === 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
							</th>
							<th scope="col" width="14%" align="center">
								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] === 'replies' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] === 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
							</th>';
        // Show a "select all" box for quick moderation?
        if ($showCheckboxes) {
            echo '
							<th scope="col" width="22%">
								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] === 'last_post' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] === 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
							</th>
							<th class="last_th" width="2%">
								<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
							</th>';
        } else {
            echo '
							<th scope="col" class="last_th" width="22%">
								<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] === 'last_post' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] === 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
							</th>';
        }
        echo '
						</tr>
					</thead>
					<tbody>';
        template_topiclist($context['topics'], $showCheckboxes);
        if (empty($settings['use_tabs']) && !empty($mark_read)) {
            echo '
						<tr class="catbg">
							<td colspan="', $showCheckboxes ? '5' : '4', '" align="right">
								', template_button_strip($mark_read, 'top'), '
							</td>
						</tr>';
        }
        echo '
					</tbody>
				</table>
			</div>
			<div class="pagesection themepadding">';
        if (!empty($settings['use_tabs']) && !empty($mark_read)) {
            template_button_strip($mark_read, 'right');
        }
        echo '
				<span>', $txt['pages'], ': ', $context['page_index'], '</span>
			</div><br class="clear" />';
    } else {
        echo '
			<div class="cat_bar">
				<h3 class="catbg centertext">
					', $context['showing_all_topics'] ? $txt['msg_alert_none'] : $txt['unread_topics_visit_none'], '
				</h3>
			</div>';
    }
    if ($showCheckboxes) {
        echo '
		</form>';
    }
    echo '
	</div>';
}
コード例 #19
0
function template_unread_comments()
{
    global $context, $txt, $adkFolder, $scripturl;
    $menu_buttons = array('clean_unread' => array('text' => 'adkmodules_clean_unread', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=pages;sa=clean;' . $context['session_var'] . '=' . $context['session_id']));
    echo '
	<div class="pagesection">
		<div class="pagelinks floatleft smalltext">', $txt['pages'], ': ', $context['page_index'], '</div>
		', template_button_strip($menu_buttons, 'right'), '
	</div>';
    echo '
	<div class="tborder topic_table" id="messageindex">
		<table class="table_grid m_100" cellspacing="0">
				<tr class="catbg">
					<th scope="col" class="first_th" width="8%">&nbsp;</th>
					<th scope="col" class="lefttext">', $txt['subject'], '</th>
					<th scope="col" width="14%">', $txt['views'], '</th>
					<th scope="col" class="lefttext last_th" width="22%">', $txt['last_post'], '</th>
				</tr>
			';
    foreach ($context['unread_comments'] as $post) {
        $bg = $post['alternate'] == 0 ? 'windowbg' : 'windowbg2';
        echo '
				<tr>
					<td class="icon1 ' . $bg . '" align="center">
						#' . $post['counter'] . '
					</td>
					<td class="subject ' . $bg . '">
						', $post['link'], '
					</td>
					<td class="stats ' . $bg . '" align="center">
						', $post['views'], '
					</td>
					<td class="lastpost ' . $bg . '">
						', $post['date'], '<br />
						', $txt['by'], ' ', $post['member_link'], '
					</td>
				</tr>';
    }
    if (empty($context['unread_comments'])) {
        echo '
				<tr>
					<td colspan="4" class="windowbg" align="center">' . $txt['adkmodules_no_unread'] . '</td>
				</tr>';
    }
    echo '
		</table>
	</div>';
    echo '
	<div class="pagesection">
		<div class="pagelinks floatleft smalltext">', $txt['pages'], ': ', $context['page_index'], '</div>
		', template_button_strip($menu_buttons, 'right'), '
	</div>';
}
コード例 #20
0
function template_search()
{
    global $context, $settings, $options, $scripturl, $txt;
    // Build the memberlist button array.
    $memberlist_buttons = array('view_all_members' => array('text' => 'view_all_members', 'image' => 'mlist.gif', 'lang' => true, 'url' => $scripturl . '?action=mlist' . ';sa=all'), 'mlist_search' => array('text' => 'mlist_search', 'image' => 'mlist.gif', 'lang' => true, 'url' => $scripturl . '?action=mlist' . ';sa=search', 'active' => true));
    // Start the submission form for the search!
    echo '
	<form action="', $scripturl, '?action=mlist;sa=search" method="post" accept-charset="', $context['character_set'], '">
		<div id="memberlist">
			<div class="cat_bar">
				<h3 class="catbg mlist">
					<span class="ie6_header floatleft">', !empty($settings['use_buttons']) ? '<img src="' . $settings['images_url'] . '/buttons/search.gif" alt="" class="icon" />' : '', $txt['mlist_search'], '</span>
				</h3>
			</div>
			<div class="pagesection">
				', template_button_strip($memberlist_buttons, 'right'), '
			</div>';
    // Display the input boxes for the form.
    echo '	<div id="memberlist_search" class="clear">
				<span class="upperframe"><span></span></span>
				<div class="roundframe">
					<div id="mlist_search" class="flow_hidden">
						<div id="search_term_input"><br />
							<strong>', $txt['search_for'], ':</strong>
							<input type="text" name="search" value="', $context['old_search'], '" size="35" class="input_text" /> <input type="submit" name="submit" value="' . $txt['search'] . '" class="button_submit" />
						</div>
						<span class="floatleft">';
    $count = 0;
    foreach ($context['search_fields'] as $id => $title) {
        echo '
							<label for="fields-', $id, '"><input type="checkbox" name="fields[]" id="fields-', $id, '" value="', $id, '" ', in_array($id, $context['search_defaults']) ? 'checked="checked"' : '', ' class="input_check" />', $title, '</label><br />';
        // Half way through?
        if (round(count($context['search_fields']) / 2) == ++$count) {
            echo '
						</span>
						<span class="floatleft">';
        }
    }
    echo '
						</span>
					</div>
				</div>
				<span class="lowerframe"><span></span></span>
			</div>
		</div>
	</form>';
}
コード例 #21
0
function template_char_sheet()
{
    global $context, $txt, $scripturl;
    echo '
			<div class="cat_bar">
				<h3 class="catbg profile_hd">
					', $txt['char_sheet'], ' - ', $context['character']['character_name'], '
				</h3>
			</div>';
    if (empty($context['character']['sheet_details']['sheet_text'])) {
        echo '
			<div class="windowbg2">
				', $txt['char_sheet_none'], '
			</div>';
        template_button_strip($context['sheet_buttons'], 'right');
        echo '
			<div class="clear"></div>';
    } else {
        if (empty($context['character']['sheet_details']['id_approver'])) {
            echo '
			<div class="noticebox">
				', $txt['char_sheet_not_approved'], '
				', !empty($context['character']['sheet_details']['approval_state']) ? $txt['char_sheet_waiting_approval'] : '', '
			</div>';
        }
        template_button_strip($context['sheet_buttons'], 'right');
        echo '
			<div class="clear"></div>
			<div class="windowbg">
				', parse_bbc($context['character']['sheet_details']['sheet_text'], false), '
			</div>';
    }
    // If it's not set, there's not even a comment box, let alone history.
    if (isset($context['sheet_comments'])) {
        echo '
			<br />
			<div class="cat_bar">
				<h3 class="catbg">
					', $txt['char_sheet_comments'], '
				</h3>
			</div>
			<div id="quickReplyOptions">
				<div class="roundframe">
					<form action="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=characters;char=', $context['character']['id_character'], ';sa=sheet" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" class="flow_hidden" onsubmit="submitonce(this);smc_saveEntities(\'postmodify\', [\'message\'], \'options\');">
						', template_control_richedit('message', 'smileyBox_message', 'bbcBox_message'), '
						<br class="clear_right">
						<span id="post_confirm_buttons">
							<input type="submit" value="', $txt['char_sheet_add_comment'], '" name="post" class="button_submit">
							<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
						</span>
					</form>
				</div>
			</div>';
        foreach ($context['sheet_comments'] as $comment) {
            echo '
			<div class="windowbg2">
				<div>
					<strong>', !empty($comment['real_name']) ? $comment['real_name'] : $txt['char_unknown'], '</strong> - ', timeformat($comment['time_posted']), '
				</div>
				<div>', parse_bbc($comment['sheet_comment'], true, 'sheet-comment-' . $comment['id_comment']), '</div>
			</div>';
        }
    }
}
コード例 #22
0
function template_main()
{
    global $context, $settings, $options, $scripturl, $modSettings, $txt;
    echo '
	<div style="margin-bottom: 2px;"><a name="top"></a>', theme_linktree(), '</div>';
    if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) {
        echo '
	<div class="tborder" style="margin-bottom: 3ex; ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
		<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor">
			<tr>
				<td colspan="4" class="catbg">', $txt['parent_boards'], '</td>
			</tr>';
        foreach ($context['boards'] as $board) {
            echo '
			<tr>
				<td ', !empty($board['children']) ? 'rowspan="2"' : '', ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';
            // If the board is new, show a strong indicator.
            if ($board['new']) {
                echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
            } elseif ($board['children_new']) {
                echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
            } else {
                echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
            }
            echo '</a>
				</td>
				<td class="windowbg2">
					<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
					', $board['description'];
            // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
            if (!empty($board['moderators'])) {
                echo '
					<div style="padding-top: 1px;"><small><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></small></div>';
            }
            // Show some basic information about the number of posts, etc.
            echo '
				</td>
				<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><small>
					', $board['posts'], ' ', $txt[21], ' <br />
					', $board['topics'], ' ', $txt[330], '</small>
				</td>
				<td class="windowbg2" valign="middle" width="22%"><small>';
            /* The board's and children's 'last_post's have:
            			time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
            			link, href, subject, start (where they should go for the first unread post.),
            			and member. (which has id, name, link, href, username in it.) */
            if (!empty($board['last_post']['id'])) {
                echo '
					<b>', $txt[22], '</b> ', $txt[525], ' ', $board['last_post']['member']['link'], '<br />
					', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
					', $txt[30], ' ', $board['last_post']['time'];
            }
            echo '</small>
				</td>
			</tr>';
            // 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) {
                    $child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
                    $children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
                }
                echo '
			<tr>
				<td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
					<small><b>', $txt['parent_boards'], '</b>: ', implode(', ', $children), '</small>
				</td>
			</tr>';
            }
        }
        echo '
		</table>
	</div>';
    }
    if (!empty($options['show_board_desc']) && $context['description'] != '') {
        echo '
		<table width="100%" cellpadding="6" cellspacing="1" border="0" class="tborder" style="padding: 0; margin-bottom: 2ex;">
			<tr>
				<td class="titlebg2" width="100%" height="24" style="border-top: 0;">
					<small>', $context['description'], '</small>
				</td>
			</tr>
		</table>';
    }
    // Create the button set...
    $normal_buttons = array('markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;sesc=' . $context['session_id']), 'notify' => array('test' => 'can_mark_notify', 'text' => 125, 'image' => 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';sesc=' . $context['session_id']), 'new_topic' => array('test' => 'can_post_new', 'text' => 'smf258', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0'), 'post_poll' => array('test' => 'can_post_poll', 'text' => 'smf20', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'));
    // They can only mark read if they are logged in and it's enabled!
    if (!$context['user']['is_logged'] || !$settings['show_mark_read']) {
        unset($normal_buttons['markread']);
    }
    if (!$context['no_topic_listing']) {
        echo '
		<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td class="middletext">', $txt[139], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#bot"><b>' . $txt['topbottom5'] . '</b></a>' : '', '</td>
				<td align="right" style="padding-right: 1ex;">
					<table cellpadding="0" cellspacing="0">
						<tr>
							', template_button_strip($normal_buttons, 'bottom'), '
						</tr>
					</table>
				</td>
			</tr>
		</table>';
        // If Quick Moderation is enabled start the form.
        if (!empty($options['display_quick_mod']) && !empty($context['topics'])) {
            echo '
	<form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">';
        }
        echo '
			<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
				<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
					<tr>';
        // Are there actually any topics to show?
        if (!empty($context['topics'])) {
            echo '
						<td width="9%" colspan="2" class="catbg3"></td>

						<td class="catbg3"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[70], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>

						<td class="catbg3" width="11%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[109], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>

						<td class="catbg3" width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[110], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>

						<td class="catbg3" width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[301], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>

						<td class="catbg3" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[111], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>';
            // Show a "select all" box for quick moderation?
            if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) {
                echo '
						<td class="catbg3" width="24" valign="middle" align="center">
							<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="check" />
						</td>';
            } elseif (!empty($options['display_quick_mod'])) {
                echo '
						<td class="catbg3" width="4%" valign="middle" align="center"></td>';
            }
        } else {
            echo '
						<td class="catbg3" width="100%" colspan="7"><b>', $txt[151], '</b></td>';
        }
        echo '
					</tr>';
        if (!empty($settings['display_who_viewing'])) {
            echo '
					<tr class="windowbg2">
						<td colspan="', !empty($options['display_quick_mod']) ? '8' : '7', '"><small>';
            if ($settings['display_who_viewing'] == 1) {
                echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19];
            } else {
                echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
            }
            echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '
						</small></td>
					</tr>';
        }
        foreach ($context['topics'] as $topic) {
            // Do we want to seperate the sticky and lock status out?
            if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false) {
                $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_sticky'));
            }
            if (!empty($settings['seperate_sticky_lock']) && strpos($topic['class'], 'locked') !== false) {
                $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_locked'));
            }
            echo '
					<tr>
						<td class="windowbg2" valign="middle" align="center" width="5%">
							<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
						</td>
						<td class="windowbg2" valign="middle" align="center" width="4%">
							<img src="', $topic['first_post']['icon_url'], '" alt="" />
						</td>
						<td class="windowbg', !empty($settings['seperate_sticky_lock']) && $topic['is_sticky'] ? '3' : '', '" valign="middle" ', !empty($topic['quick_mod']['remove']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\', \'' . $context['session_id'] . '\');"' : '', '>';
            // Tagging System
            // Version 2.4.1+stef
            if ($modSettings['smftags_set_display_messageindex'] && in_array($context['current_board'], explode(" ", $modSettings['smftags_set_taggable']))) {
                if (allowedTo('smftags_edit_any') || $topic['first_post']['member']['id'] == $context['user']['id'] && allowedTo('smftags_edit_own')) {
                    // if we have edit rights and there are tags, show edit button
                    echo '<a href="' . $scripturl . '?action=tags;sa=edittopic;topic=' . $topic['id'] . '"><img src="' . $settings['images_url'] . '/icons/tag_blue', empty($topic['tagCount']) ? '_add.gif" title="' . $txt['smftags_addtopic'] . '" ' : '_edit.gif" title="' . $txt['smftags_edittopic'] . ' (' . ($topic['tagCount'] == 1 ? $txt['smftags_1tag'] : sprintf($txt['smftags_xtags'], $topic['tagCount'])) . ')"', ' align="right" id="tagicon' . $topic['id'] . '" style="margin: 0;" /></a>';
                } else {
                    if (!empty($topic['tagCount'])) {
                        // otherwise just show tag icon if there any
                        echo '<img src="' . $settings['images_url'] . '/icons/tag_blue.gif" title="' . ($topic['tagCount'] == 1 ? $txt['smftags_1tag'] : sprintf($txt['smftags_ntags'], $topic['tagCount'])) . '" align="right" id="tagicon' . $topic['id'] . '" style="margin: 0;" />';
                    }
                }
            }
            // End tagging system
            if (!empty($settings['seperate_sticky_lock'])) {
                echo '
							', $topic['is_locked'] ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" id="lockicon' . $topic['first_post']['id'] . '" style="margin: 0;" />' : '', '
							', $topic['is_sticky'] ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" id="stickyicon' . $topic['first_post']['id'] . '" style="margin: 0;" />' : '';
            }
            echo '
							', $topic['is_sticky'] ? '<b>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</b>' : '';
            // Is this topic new? (assuming they are logged in!)
            if ($topic['new'] && $context['user']['is_logged']) {
                echo '
							<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a>';
            }
            echo '
							<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
						</td>
						<td class="windowbg2" valign="middle" width="14%">
							', $topic['first_post']['member']['link'], '
						</td>
						<td class="windowbg', $topic['is_sticky'] ? '3' : '', '" valign="middle" width="4%" align="center">
							', $topic['replies'], '
						</td>
						<td class="windowbg', $topic['is_sticky'] ? '3' : '', '" valign="middle" width="4%" align="center">
							', $topic['views'], '
						</td>
						<td class="windowbg2" valign="middle" width="22%">
							<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" style="float: right;" /></a>
							<span class="smalltext">
								', $topic['last_post']['time'], '<br />
								', $txt[525], ' ', $topic['last_post']['member']['link'], '
							</span>
						</td>';
            // Show the quick moderation options?
            if (!empty($options['display_quick_mod'])) {
                echo '
						<td class="windowbg', $topic['is_sticky'] ? '3' : '', '" valign="middle" align="center" width="4%">';
                if ($options['display_quick_mod'] == 1) {
                    echo '
								<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="check" />';
                } 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[', $topic['id'], ']=remove;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_remove.gif" width="16" alt="', $txt[63], '" title="', $txt[63], '" /></a>';
                    }
                    if ($topic['quick_mod']['lock']) {
                        echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=lock;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_lock.gif" width="16" alt="', $txt['smf279'], '" title="', $txt['smf279'], '" /></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[', $topic['id'], ']=sticky;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_sticky.gif" width="16" alt="', $txt['smf277'], '" title="', $txt['smf277'], '" /></a>';
                    }
                    if ($topic['quick_mod']['move']) {
                        echo '<a href="', $scripturl, '?action=movetopic;board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><img src="', $settings['images_url'], '/icons/quick_move.gif" width="16" alt="', $txt[132], '" title="', $txt[132], '" /></a>';
                    }
                }
                echo '</td>';
            }
            echo '
					</tr>';
        }
        if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) {
            echo '
					<tr class="catbg">
						<td colspan="8" align="right">
					<select name="qaction"', $context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
								<option value="">--------</option>
								', $context['can_remove'] ? '<option value="remove">' . $txt['quick_mod_remove'] . '</option>' : '', '
								', $context['can_lock'] ? '<option value="lock">' . $txt['quick_mod_lock'] . '</option>' : '', '
								', $context['can_sticky'] ? '<option value="sticky">' . $txt['quick_mod_sticky'] . '</option>' : '', '
								', $context['can_move'] ? '<option value="move">' . $txt['quick_mod_move'] . ': </option>' : '', '
								', $context['can_merge'] ? '<option value="merge">' . $txt['quick_mod_merge'] . '</option>' : '', '
								<option value="markread">', $txt['quick_mod_markread'], '</option>
							</select>';
            if ($context['can_move']) {
                echo '
							<select id="moveItTo" name="move_to" disabled="disabled">';
                foreach ($context['jump_to'] as $category) {
                    foreach ($category['boards'] as $board) {
                        if (!$board['is_current']) {
                            echo '
												<option value="', $board['id'], '"', !empty($board['selected']) ? ' selected="selected"' : '', '>', str_repeat('-', $board['child_level'] + 1), ' ', $board['name'], '</option>';
                        }
                    }
                }
                echo '
							</select>';
            }
            echo '
							<input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' &amp;&amp; confirm(\'', $txt['quickmod_confirm'], '\');" />
						</td>
					</tr>';
        }
        echo '
				</table>
			</div>
			<a name="bot"></a>';
        // Finish off the form - again.
        if (!empty($options['display_quick_mod']) && !empty($context['topics'])) {
            echo '
			<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
	</form>';
        }
        echo '
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td class="middletext">', $txt[139], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#top"><b>' . $txt['topbottom4'] . '</b></a>' : '', '</td>
			<td align="right" style="padding-right: 1ex;">
				<table cellpadding="0" cellspacing="0">
					<tr>
						', template_button_strip($normal_buttons, 'top'), '
					</tr>
				</table>
			</td>
		</tr>
	</table>';
    }
    // Show breadcrumbs at the bottom too?
    echo '
	<div>', theme_linktree(), '<br /></div>';
    echo '
	<div class="tborder">
		<table cellpadding="8" cellspacing="0" width="100%" class="titlebg2">
			<tr>';
    if (!$context['no_topic_listing']) {
        echo '
				<td style="padding-top: 2ex;" class="smalltext">', !empty($modSettings['enableParticipation']) ? '
					<img src="' . $settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' . $txt['participation_caption'] . '<br />' : '', '
					<img src="' . $settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' . $txt[457] . '<br />
					<img src="' . $settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' . $txt[454] . '<br />
					<img src="' . $settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' . $txt[455] . '
				</td>
				<td valign="top" style="padding-top: 2ex;" class="smalltext">
					<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" alt="" align="middle" /> ' . $txt[456] . '<br />' . ($modSettings['enableStickyTopics'] == '1' ? '
					<img src="' . $settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' . $txt['smf96'] . '<br />' : '') . ($modSettings['pollMode'] == '1' ? '
					<img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['smf43'] : '') . '
				</td>';
    }
    echo '
				<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="middle">
					<form action="', $scripturl, '" method="get" accept-charset="', $context['character_set'], '" name="jumptoForm">
						<span class="smalltext"><label for="jumpto">' . $txt[160] . '</label>:</span>
					<select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">
								<option value="">' . $txt[251] . ':</option>';
    // Show each category - they all have an id, name, and the boards in them.
    foreach ($context['jump_to'] as $category) {
        // Show the category name with a link to the category. (index.php#id)
        echo '
								<option value="" disabled="disabled">-----------------------------</option>
								<option value="#', $category['id'], '">', $category['name'], '</option>
								<option value="" disabled="disabled">-----------------------------</option>';
        /* Now go through each board - they all have:
        			id, name, child_level (how many parents they have, basically...), and is_current. (is this the current board?) */
        foreach ($category['boards'] as $board) {
            // Show some more =='s if this is a child, so as to make it look nice.
            echo '
								<option value="?board=', $board['id'], '.0"', $board['is_current'] ? ' selected="selected"' : '', '> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>';
        }
    }
    echo '
						</select>&nbsp;
					<input type="button" value="', $txt[161], '" onclick="if (this.form.jumpto.options[this.form.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '\' + this.form.jumpto.options[this.form.jumpto.selectedIndex].value;" />
					</form>
				</td>
			</tr>
		</table>
	</div>';
    // Javascript for inline editing.
    echo '
<script language="JavaScript" type="text/javascript" src="' . $settings['default_theme_url'] . '/xml_board.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

	// Hide certain bits during topic edit.
	hide_prefixes.push("lockicon", "stickyicon", "pages", "newicon");

	// Use it to detect when we\'ve stopped editing.
	document.onclick = modify_topic_click;

	var mouse_on_div;
	function modify_topic_click()
	{
		if (in_edit_mode == 1 && mouse_on_div == 0)
			modify_topic_save("', $context['session_id'], '");
	}

	function modify_topic_keypress(oEvent)
	{
		if (typeof(oEvent.keyCode) != "undefined" && oEvent.keyCode == 13)
		{
			modify_topic_save("', $context['session_id'], '");
			if (typeof(oEvent.preventDefault) == "undefined")
				oEvent.returnValue = false;
			else
				oEvent.preventDefault();
		}
	}

	// For templating, shown when an inline edit is made.
	function modify_topic_show_edit(subject)
	{
		// Just template the subject.
		setInnerHTML(cur_subject_div, \'<input type="text" name="subject" value="\' + subject + \'" size="60" style="width: 99%;"  maxlength="80" onkeypress="modify_topic_keypress(event)" /><input type="hidden" name="topic" value="\' + cur_topic_id + \'" /><input type="hidden" name="msg" value="\' + cur_msg_id.substr(4) + \'" />\');
	}

	// And the reverse for hiding it.
	function modify_topic_hide_edit(subject)
	{
		// Re-template the subject!
		setInnerHTML(cur_subject_div, \'<a href="', $scripturl, '?topic=\' + cur_topic_id + \'.0">\' + subject + \'</a>\');
	}

// ]]></script>';
}
コード例 #23
0
/**
 *	Display a list of requirements for moving a ticket to a topic.
 *
 *	When moving a ticket to the forum, certain information is required: the board to move to, whether to send the ticket starter a
 *	personal message (and if so, the contents of the message) and what to do in the event there are deleted replies to deal with.
 *	This function handles showing the form to the user.
 *
 *	@see shd_tickettotopic()
 *	@see shd_tickettotopic2()
 *
 *	@since 1.0
*/
function template_shd_tickettotopic()
{
    global $txt, $settings, $context, $scripturl, $modSettings;
    // Back to the helpdesk.
    echo '
		<div class="floatleft">
			', template_button_strip(array($context['navigation']['back']), 'bottom'), '
		</div><br class="clear" /><br />';
    echo '
		<div class="cat_bar grid_header">
			<h3 class="catbg">
				<img src="', $settings['default_images_url'], '/simpledesk/tickettotopic.png" alt="*" />
				', $txt['shd_move_ticket_to_topic'], '
			</h3>
		</div>
		<div class="roundframe">
		<form action="', $scripturl, '?action=helpdesk;sa=tickettotopic2;ticket=', $context['ticket_id'], '" method="post" onsubmit="submitonce(this);">
			<div class="content">
				<dl class="settings">
					<dt>
						<strong>', $txt['shd_ticket_board'], ':</strong>
					</dt>
					<dd>
						<select name="toboard">';
    foreach ($context['categories'] as $category) {
        echo '
							<optgroup label="', $category['name'], '">';
        foreach ($category['boards'] as $board) {
            echo '
								<option value="', $board['id'], '">', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt; ' : '', $board['name'], '</option>';
        }
        echo '
							</optgroup>';
    }
    echo '
						</select>
					</dd>
					<dt>
						<strong>', $txt['shd_change_ticket_subject'], ':</strong>
					</dt>
					<dd>
						<input type="checkbox" name="change_subject" id="change_subject" onclick="document.getElementById(\'new_subject\').style.display = this.checked ? \'block\' : \'none\';" class="input_check" />
					</dd>
				</dl>
				<dl class="settings" style="display: none;" id="new_subject">
					<dt>
						<strong>', $txt['shd_new_subject'], ':</strong>
					</dt>
					<dd>
						<input type="text" name="subject" id="subject" value="', $context['ticket_subject'], '" />
					</dd>
				</dl>
				<dl class="settings">
					<dt>
						<strong>', $txt['shd_move_send_pm'], ':</strong>
					</dt>
					<dd>
						<input type="checkbox" name="send_pm" id="send_pm" checked="checked" onclick="document.getElementById(\'pm_message\').style.display = this.checked ? \'block\' : \'none\';" class="input_check" />
					</dd>
				</dl>
				<fieldset id="pm_message">
					<dl class="settings">
						<dt>
							', $txt['shd_move_why'], '
						</dt>
						<dd>
							<textarea name="pm_content" rows="9" cols="70">', $txt['shd_move_default'], '</textarea>
						</dd>
					</dl>
				</fieldset>';
    if (!empty($context['deleted_prompt'])) {
        echo '
				<br />
				<fieldset id="deleted_replies">
					<dl class="settings">
						<dt>
							', $txt['shd_ticket_move_deleted'], '
						</dt>
						<dd>
							<select name="deleted_replies">
								<option value="abort">', $txt['shd_ticket_move_deleted_abort'], '</option>
								<option value="delete">', $txt['shd_ticket_move_deleted_delete'], '</option>
								<option value="undelete">', $txt['shd_ticket_move_deleted_undelete'], '</option>
							</select>
						</dd>
					</dl>
				</fieldset>';
    }
    if (!empty($context['custom_fields'])) {
        echo '
				<br />
				<fieldset id="custom_fields">
					<dl class="settings">
						<dt>
							<strong>', $txt['shd_ticket_move_cfs'], '</strong>';
        if (!empty($context['custom_fields_warning'])) {
            echo '
							<div class="error">', $txt['shd_ticket_move_cfs_warn'], '</div>';
        }
        echo '
						</dt>
						<br />';
        foreach ($context['custom_fields'] as $field) {
            echo '
						<dt>';
            if (!empty($field['visible_warn'])) {
                echo '
							<img src="' . $settings['default_images_url'] . '/simpledesk/warning.png" alt="', $txt['shd_ticket_move_cfs_warn_user'], '" title="', $txt['shd_ticket_move_cfs_warn_user'], '" />';
            } else {
                echo '
							<img src="' . $settings['default_images_url'] . '/simpledesk/perm_yes.png" alt="', $txt['shd_ticket_move_ok'], '" title="', $txt['shd_ticket_move_ok'], '" />';
            }
            echo '
							<img src="', $settings['default_images_url'], '/simpledesk/cf_ui_', $context['field_types'][$field['type']][1], '.png" class="icon" alt="', $context['field_types'][$field['type']][0], '" title="', $context['field_types'][$field['type']][0], '" />', $field['name'];
            foreach ($field['visible'] as $group => $visible) {
                if (!$visible) {
                    continue;
                }
                echo '
							<img src="' . $settings['default_images_url'] . '/simpledesk/', $group, '.png" alt="', $txt['shd_ticket_move_cfs_' . $group], '" title="', $txt['shd_ticket_move_cfs_' . $group], '" style="margin-right:0px;" />';
            }
            echo '
						</dt>
						<dd>
							<select name="field', $field['id_field'], '">
								<option value="keep">', $txt['shd_ticket_move_cfs_embed'], '</option>
								<option value="lose">', $txt['shd_ticket_move_cfs_purge'], '</option>
							</select>
						</dd>';
        }
        echo '
						</dd>
					</dl>';
        if (!empty($context['custom_fields_warning'])) {
            echo '
					<hr />
					<dl class="settings">
						<dt>
							<strong>', $txt['shd_ticket_move_accept'], '</strong>
							<div class="error">', $txt['shd_ticket_move_reqd'], '</div>
						</dt>
						<dd><input type="checkbox" name="accept_move" class="input_check" /></dd>
					</dl>';
        }
        echo '
				</fieldset>';
    }
    echo '
				<input type="submit" value="', $txt['shd_move_ticket'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button_submit" />
				<input type="submit" name="cancel" value="', $txt['shd_cancel_ticket'], '" accesskey="c" class="button_submit" />
				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
				<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
			</div>
		</form>
		</div>
		<span class="lowerframe"><span></span></span>';
}
コード例 #24
0
ファイル: BoardIndex.template.php プロジェクト: CeeMoo/pisi
function template_main()
{
    global $context, $txt, $scripturl, $boarddir, $modSettings, $boardurl;
    echo '<table border="0" width="100%" cellpadding="0" cellspacing="0">
		<tbody><tr>';
    require_once $boarddir . '/SSI.php';
    if (!empty($modSettings['sideleft'])) {
        echo '<td valign="top">
			<button type="button" id="teknoleft" title="" onclick="leftPanel.toggle();"></button>
			</td>
			<td valign="top" id="upshrinkLeftBarTD">
				<div id="upshrinkLeftBar" style="width:', $modSettings['sideleftwidth'] ? $modSettings['sideleftwidth'] : '200px', '; margin-right:4px; overflow:auto;" >
				', empty($modSettings['sideleft1']) ? '' : '<div class="cat_bar"><h3 class="catbg">' . $modSettings['lefthtmlbaslik'] . '</h3></div>' . $modSettings['sideleft1'] . '', '
				', empty($modSettings['sideleftphp']) ? '' : '<div class="cat_bar"><h3 class="catbg">' . $modSettings['leftphpbaslik'] . '</h3></div>';
        eval($modSettings['sideleftphp']);
        if (!empty($modSettings['sidelefthaberetkin'])) {
            $array = ssi_boardNews($modSettings['sidelefthaber'], $modSettings['sideleftsay'], null, 1000, 'array');
            echo '<div class="cat_bar">
							<h3 class="catbg">', $modSettings['lbaslik'], '</h3>
						</div>';
            global $memberContext;
            foreach ($array as $news) {
                loadMemberData($news['poster']['id']);
                loadMemberContext($news['poster']['id']);
                echo '<div class="sidehaber">
								<div class="sideBaslik">
								', $news['icon'], '
								<h3><a href="', $news['href'], '">', shorten_subject($news['subject'], 30), '</a></h3>
								</div>
								<div class="snrj"> ', $memberContext[$news['poster']['id']]['avatar']['image'], ' 
								<p>', $txt['by'], '', $news['poster']['link'], '</p>
								</div>
								</div><hr/>';
            }
        }
        echo '</div>
			</td>';
    }
    echo '<td valign="top" width="100%">
			<table id="maintable" border="0" width="100%" cellpadding="0" cellspacing="0"><tbody><tr><td valign="top">';
    echo '<div id="uyari">Lütfen Yardım ve Destek için Sohbet alanı ve Kişisel iletileri kullanmayın.Herkezin bilgilenmesi için <span class="generic_icons moderate"></span><a href="index.php?board=24.0">2.0.x sorularınız için buraya</a> <span class="generic_icons moderate"></span><a href="index.php?board=35.0">2.1.x sorularınız için buraya</a></div>';
    require_once $boarddir . "/NChat/NChatBoardIndex.php";
    echo '
	<div id="boardindex_table" class="boardindex_table">';
    /* 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 '
		<div class="main_container">
			<div class="cat_bar" id="category_', $category['id'], '">
				<h3 class="catbg">';
        // If this category even can collapse, show a link to collapse it.
        if ($category['can_collapse']) {
            echo '
					<span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'], '" style="display: none;"></span>';
        }
        echo '
					<b>SMF </b>', $category['link'], '
				</h3>', !empty($category['description']) ? '
				<div class="desc">' . $category['description'] . '</div>' : '', '
			</div>
			<div id="category_', $category['id'], '_boards">';
        /* Each board in each category's boards has:
        			new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
        			children (see below.), link_children (easier to use.), children_new (are they new?),
        			topics (# of), posts (# of), link, href, and last_post. (see below.) */
        foreach ($category['boards'] as $board) {
            echo '
				<div id="board_', $board['id'], '" class="up_contain">
					<div class="icon">
						<a href="', $board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children', '">
							<span class="board_', $board['board_class'], '"', !empty($board['board_tooltip']) ? ' title="' . $board['board_tooltip'] . '"' : '', '></span>
						</a>
					</div>
					<div class="info">
						<h2><a class="subject" href="', $board['href'], '" id="b', $board['id'], '">', $board['name'], '</a></h2>';
            // Has it outstanding posts for approval?
            if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) {
                echo '
						<a href="', $scripturl, '?action=moderate;area=postmod;sa=', $board['unapproved_topics'] > 0 ? 'topics' : 'posts', ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
            }
            echo '

						<p>', $board['description'], '</p>';
            // 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'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
                    } else {
                        $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>';
                    }
                    // Has it posts awaiting approval?
                    if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) {
                        $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
                    }
                    $children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : '<strong>' . $child['link'] . '</strong>';
                }
                echo '
					<div id="board_', $board['id'], '_children" class="children">
						<p>', implode(' ', $children), '</p>
					</div>';
            }
            // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
            if (!empty($board['link_moderators'])) {
                echo '
						<p class="moderators">', count($board['link_moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
            }
            // Show some basic information about the number of posts, etc.
            echo '
					</div>
					<div class="stats">
						<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '
						', $board['is_redirect'] ? '' : '<br> ' . comma_format($board['topics']) . ' ' . $txt['board_topics'], '
						</p>
					</div>
					<div class="lastpost">';
            if (!empty($board['last_post']['id'])) {
                echo '
						<p>', $board['last_post']['last_post_message'], '</p>';
            }
            echo '
					</div>';
            echo '
					</div>';
        }
        echo '
			</div>
		</div>';
    }
    echo '
	</div>';
    // Show the mark all as read button?
    if ($context['user']['is_logged'] && !empty($context['categories'])) {
        echo '
		<div class="mark_read">', template_button_strip($context['mark_read_button'], 'right'), '</div>';
    }
}
コード例 #25
0
ファイル: Reports.template.php プロジェクト: norv/EosAlpha
function template_main()
{
    global $context, $settings, $options, $scripturl, $txt, $modSettings;
    // Build the reports button array.
    $report_buttons = array('generate_reports' => array('text' => 'generate_reports', 'image' => 'print.gif', 'lang' => true, 'url' => $scripturl . '?action=admin;area=reports', 'active' => true), 'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'url' => $scripturl . '?action=admin;area=reports;rt=' . $context['report_type'] . ';st=print', 'custom' => 'target="_blank"'));
    echo '
	<div id="admincenter">
		<div class="cat_bar2">
			<h3>', $txt['results'], '</h3>
		</div>
		<br>
		<div id="report_buttons">';
    if (!empty($report_buttons)) {
        template_button_strip($report_buttons, 'right');
    }
    echo '
		</div><br class="clear" /><br />';
    // Go through each table!
    foreach ($context['tables'] as $table) {
        echo '
		<table class="table_grid mlist" style="width:100%;margin-bottom:1em;">';
        if (!empty($table['title'])) {
            echo '
			<thead>
				<tr>
					<th class="glass" scope="col" colspan="', $table['column_count'], '">', $table['title'], '</th>
				</tr>
			</thead>
			<tbody>';
        }
        // Now do each row!
        $row_number = 0;
        $alternate = false;
        foreach ($table['data'] as $row) {
            if ($row_number == 0 && !empty($table['shading']['top'])) {
                echo '
				<tr class="windowbg table_caption">';
            } else {
                echo '
				<tr class="', !empty($row[0]['separator']) ? 'catbg' : ($alternate ? 'windowbg' : 'windowbg2'), '">';
            }
            // Now do each column.
            $column_number = 0;
            foreach ($row as $key => $data) {
                // If this is a special separator, skip over!
                if (!empty($data['separator']) && $column_number == 0) {
                    echo '
					<td colspan="', $table['column_count'], '" class="smalltext">
						', $data['v'], ':
					</td>';
                    break;
                }
                // Shaded?
                if ($column_number == 0 && !empty($table['shading']['left'])) {
                    echo '
					<td align="', $table['align']['shaded'], '" class="table_caption"', $table['width']['shaded'] != 'auto' ? ' width="' . $table['width']['shaded'] . '"' : '', '>
						', $data['v'] == $table['default_value'] ? '' : $data['v'] . (empty($data['v']) ? '' : ':'), '
					</td>';
                } else {
                    echo '
					<td class="smalltext" align="', $table['align']['normal'], '"', $table['width']['normal'] != 'auto' ? ' width="' . $table['width']['normal'] . '"' : '', !empty($data['style']) ? ' style="' . $data['style'] . '"' : '', '>
						', $data['v'], '
					</td>';
                }
                $column_number++;
            }
            echo '
				</tr>';
            $row_number++;
            $alternate = !$alternate;
        }
        echo '
			</tbody>
		</table>';
    }
    echo '
	</div>
	<br class="clear" />';
}
コード例 #26
0
/**
 * @name      EosAlpha BBS
 * @copyright 2011 Alex Vie silvercircle(AT)gmail(DOT)com
 *
 * This software is a derived product, based on:
 *
 * Simple Machines Forum (SMF)
 * copyright:	2011 Simple Machines (http://www.simplemachines.org)
 * license:  	BSD, See included LICENSE.TXT for terms and conditions.
 *
 * @version 1.0pre
 */
function template_single_post()
{
    global $context, $settings, $options, $txt, $scripturl, $topic, $modSettings;
    echo '
		<div class="jqmWindow" style="display:none;" id="interpostlink_helper">
		<div class="jqmWindow_container">
		<div class="glass jsconfirm title">', $txt['quick_post_link_title'], '
		</div>
		<div class="flat_container lefttext smalltext">', $txt['quick_post_link_text'], '
		<dl class="common left" style="line-height:24px;">
		<dt><strong>', $txt['quick_post_link_bbcode'], '</strong></dt><dd><input size="78" type="text" id="interpostlink_helper_content" value="" /></dd>
		<dt><strong>', $txt['quick_post_link_full'], '</strong></dt><dd><input size="78" type="text" id="interpostlink_helper_content_full" value="" /></dd>
		</dl>
		</div>
		<div class="centertext smalltext smallpadding"><span class="button default centered" onclick="$(\'#interpostlink_helper\').css(\'position\',\'static\');$(\'#interpostlink_helper\').hide();setDimmed(0);">', $txt['quick_post_link_dismiss'], '</span></div>
		</div>
		</div>
		<div id="share_bar" style="display:none;position:absolute;right:0;white-space:nowrap;width:auto;">
		<div class="bmbar">
		 <span role="button" class="button icon share_this share_fb" data-href="http://www.facebook.com/sharer.php?u=%%uri%%">Share</span>
		 <span role="button" class="button icon share_this share_tw" data-href="http://twitter.com/share?text=%%txt%%&amp;url=%%uri%%">Tweet</span>
		 <span role="button" class="button icon share_this share_digg" data-href="http://digg.com/submit?phase=2&amp;title=%%txt%%&amp;url=%%uri%%">Digg</span>
		 <div class="clear"></div>
       	</div>
       	</div>';
    // Show the anchor for the top and for the first message. If the first message is new, say so.
    echo '
		<a id="top"></a>
		', $context['first_new_message'] ? '<a id="new"></a>' : '';
    // Build the normal button array.
    $normal_buttons = array('reply' => array('test' => 'can_reply', 'text' => 'reply', 'custom' => 'onclick="return oQuickReply.quote(0);" ', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'], 'active' => true), 'add_poll' => array('test' => 'can_add_poll', 'text' => 'add_poll', 'image' => 'add_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start']), 'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : '') . 'notify.gif', 'lang' => true, 'custom' => 'onclick="return Eos_Confirm(\'\', \'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\', $(this).attr(\'href\'));"', 'url' => $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'mark_unread' => array('test' => 'can_mark_unread', 'text' => 'mark_unread', 'image' => 'markunread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'send' => array('test' => 'can_send_topic', 'text' => 'send_topic', 'image' => 'sendtopic.gif', 'lang' => true, 'url' => $scripturl . '?action=emailuser;sa=sendtopic;topic=' . $context['current_topic'] . '.0'), 'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'));
    // Allow adding new buttons easily.
    HookAPI::callHook('integrate_display_buttons', array(&$normal_buttons));
    // Show the topic information - icon, subject, etc.
    echo '
			<div id="forumposts">';
    if ($context['tags_active']) {
        echo '
		<div id="tagstrip"><span id="tags">';
        foreach ($context['topic_tags'] as $i => $tag) {
            echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a>';
            if ($context['can_delete_tags']) {
                echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><span onclick="sendRequest(\'action=xmlhttp;sa=tags;deletetag=1;tagid=' . $tag['ID'] . '\', $(\'#tags\'));return(false);" class="xtag">&nbsp;&nbsp;</span></a>';
            } else {
                echo '&nbsp;&nbsp;';
            }
        }
        echo '</span>';
        if ($context['can_add_tags']) {
            echo '
			&nbsp;<a rel="nofollow" id="addtag" onclick="$(\'#tagform\').remove();sendRequest(\'action=xmlhttp;sa=tags;addtag=1;topic=', $topic, '\', $(\'#addtag\'));return(false);" data-id="', $topic, '" href="' . $scripturl . '?action=tags;sa=addtag;topic=', $topic, '">' . $txt['smftags_addtag'] . '</a>';
        } else {
            echo '&nbsp;';
        }
        echo '
		</div>';
    }
    echo '
		<div class="clear"></div><form data-alt="', $scripturl, '?action=post;msg=%id_msg%;topic=', $context['current_topic'], '.', $context['start'], '" action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" accept-charset="UTF-8" name="quickModForm" id="quickModForm" style="margin: 0;" onsubmit="return oQuickModify.bInEditMode ? oQuickModify.modifySave(\'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\') : false">';
    $ignoredMsgs = array();
    $removableMessageIDs = array();
    // Get all the messages...
    while ($message = $context['get_message']()) {
        if ($message['can_remove']) {
            $removableMessageIDs[] = $message['id'];
        }
        $context['postbit_callbacks']['firstpost']($message);
    }
    echo '
				<input type="hidden" name="goadvanced" value="1" />
				</form>
			</div>
			<a id="lastPost"></a>';
    $context['inline_footer_script'] .= '
	var smf_likelabel = \'' . $txt['like_label'] . '\';
	var smf_unlikelabel = \'' . $txt['unlike_label'] . '\'
	';
    // Show the lower breadcrumbs.
    $remove_url = $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;' . $context['session_var'] . '=' . $context['session_id'];
    $mod_buttons = array('move' => array('test' => 'can_move', 'text' => 'move_topic', 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'), 'delete' => array('test' => 'can_delete', 'text' => 'remove_topic', 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return Eos_Confirm(\'\',\'' . $txt['are_sure_remove_topic'] . '\',\'' . $remove_url . '\');"', 'url' => $remove_url), 'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'set_lock' : 'set_unlock', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'set_sticky' : 'set_nonsticky', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'merge' => array('test' => 'can_merge', 'text' => 'merge', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']), 'calendar' => array('test' => 'calendar_post', 'text' => 'calendar_link', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0'));
    // Restore topic. eh?  No monkey business.
    if ($context['can_restore_topic']) {
        $mod_buttons[] = array('text' => 'restore_topic', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']);
    }
    // Allow adding new mod buttons easily.
    HookAPI::callHook('integrate_mod_buttons', array(&$mod_buttons));
    echo '
		<div id="moderationbuttons">', template_button_strip($mod_buttons, 'right', array('id' => 'moderationbuttons_strip', 'class' => 'plainbuttonlist')), '</div>';
    if ($context['can_reply'] && !empty($options['display_quick_reply'])) {
        echo '
			<a id="quickreply"></a>
			<div class="clear"></div>
			<div style="display:none;overflow:hidden;" id="quickreplybox">';
        echo '
					<div class="cat_bar">
					 <strong>', $txt['post_reply'], '</strong>&nbsp;&nbsp;<a href="', $scripturl, '?action=helpadmin;help=quickreply_help', '" onclick="return reqWin(this.href);" class="help tinytext">', $txt['post_reply_help'], '</a>
					</div>
					<div class="flat_container mediumpadding">';
        echo '
							<input type="hidden" name="_qr_board" value="', $context['current_board'], '" />
							<input type="hidden" name="topic" value="', $context['current_topic'], '" />
							<input type="hidden" name="subject" value="', $context['response_prefix'], $context['subject'], '" />
							<input type="hidden" name="icon" value="xx" />
							<input type="hidden" name="from_qr" value="1" />
							<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
							<input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '" />
							<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
							<input type="hidden" name="last_msg" value="', $context['topic_last_message'], '" />
							<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
							<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />';
        // Guests just need more.
        if ($context['user']['is_guest']) {
            echo '
							<strong>', $txt['name'], ':</strong> <input type="text" name="guestname" value="', $context['name'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" />
							<strong>', $txt['email'], ':</strong> <input type="text" name="email" value="', $context['email'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" /><br />';
        }
        // Is visual verification enabled?
        if ($context['require_verification']) {
            echo '
							<strong>', $txt['verification'], ':</strong>', template_control_verification($context['visual_verification_id'], 'quick_reply'), '<br />';
        }
        if (isset($context['user']['avatar']['image']) && !empty($context['user']['avatar']['image'])) {
            echo '
					<div class="floatleft blue_container smallpadding avatar">', $context['user']['avatar']['image'], '
					</div>';
        }
        echo '
							<div class="quickReplyContent" style="margin-left:150px;">';
        echo $context['is_locked'] ? '<div class="red_container tinytext">' . $txt['quick_reply_warning'] . '</div>' : '', $context['oldTopicError'] ? '<div class="red_container tinytext">' . sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']) . '</div>' : '', '
						', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
						', !$context['can_reply_approved'] && $context['require_verification'] ? '<br />' : '';
        echo '
								<textarea id="quickReplyMessage" style="width:99%;" rows="18" name="message" tabindex="', $context['tabindex']++, '"></textarea>';
        if ($context['automerge']) {
            echo '
								<input type="checkbox" name="want_automerge" id="want_automerge" checked="checked" value="1" />', $txt['want_automerge'];
        }
        echo '
								</div>
								<div class="righttext padding">
								<input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="', $context['tabindex']++, '" class="button_submit" />
								<input type="submit" name="preview" value="', $txt['go_advanced'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />
								<input type="submit" name="cancel" value="', 'Cancel', '" onclick="return(oQuickReply.cancel());" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />
						</div>
				</div>
				<br>
			</div>';
    }
    theme_linktree();
    // Show the jumpto box, or actually...let Javascript do it.
    echo '
			<div class="plainbox" id="display_jump_to">&nbsp;</div>';
    $context['inline_footer_script'] .= '
	var oQuickReply = new QuickReply({
		bDefaultCollapsed: ' . (!empty($options['display_quick_reply']) && $options['display_quick_reply'] == 2 ? 'false' : 'true') . ',
		iTopicId: ' . $context['current_topic'] . ',
		iStart: ' . $context['start'] . ',
		sScriptUrl: smf_scripturl,
		sImagesUrl: "' . $settings['images_url'] . '",
		sContainerId: "quickReplyOptions",
		sImageId: "quickReplyExpand",
		sImageCollapsed: "collapse.gif",
		sImageExpanded: "expand.gif",
		iMarkedForMQ: ' . $context['multiquote_posts_count'] . ',
		sJumpAnchor: "quickreplybox",
		bEnabled: ' . (!empty($options['display_quick_reply']) ? 'true' : 'false') . '
	});
	';
    if (!empty($options['display_quick_mod']) && $context['can_remove_post']) {
        $context['inline_footer_script'] .= '
	var oInTopicModeration = new InTopicModeration({
		sSelf: \'oInTopicModeration\',
		sCheckboxContainerMask: \'in_topic_mod_check_\',
		aMessageIds: [\'' . implode('\', \'', $removableMessageIDs) . '\'],
		sSessionId: \'' . $context['session_id'] . '\',
		sSessionVar: \'' . $context['session_var'] . '\',
		sButtonStrip: \'moderationbuttons\',
		sButtonStripDisplay: \'moderationbuttons_strip\',
		bUseImageButton: false,
		bCanRemove: ' . ($context['can_remove_post'] ? 'true' : 'false') . ',
		sRemoveButtonLabel: \'' . $txt['quickmod_delete_selected'] . '\',
		sRemoveButtonImage: \'delete_selected.gif\',
		sRemoveButtonConfirm: \'' . $txt['quickmod_confirm'] . '\',
		bCanRestore: ' . ($context['can_restore_msg'] ? 'true' : 'false') . ',
		sRestoreButtonLabel: \'' . $txt['quick_mod_restore'] . '\',
		sRestoreButtonImage: \'restore_selected.gif\',
		sRestoreButtonConfirm: \'' . $txt['quickmod_confirm'] . '\',
		sFormId: \'quickModForm\'
	});
	';
    }
    $context['inline_footer_script'] .= '
	if (\'XMLHttpRequest\' in window)
	{
		var oQuickModify = new QuickModify({
		sScriptUrl: smf_scripturl,
		bShowModify: ' . ($settings['show_modify'] ? 'true' : 'false') . ',
		iTopicId: ' . $context['current_topic'] . ',
		sTemplateBodyEdit: ' . JavaScriptEscape('
			<div id="quick_edit_body_container">
			<div id="error_box" style="padding: 4px;" class="error"></div>
			<textarea class="editor" name="message" rows="20" style="' . ($context['browser']['is_ie8'] ? 'width: 635px; max-width: 100%; min-width: 100%' : 'width: 100%') . '; margin-bottom: 10px;" tabindex="' . $context['tabindex']++ . '">%body%</textarea><br />
			<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
			<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
			<input type="hidden" name="msg" value="%msg_id%" />
			<input type="hidden" style="width: 50%;" name="subject" value="%subject%" size="50" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" />
			<div class="righttext">
				<span class="button floatright" onclick="return oQuickModify.goAdvanced(\'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\');" />Go Advanced</a></span>
				<span class="button floatright" onclick="return oQuickModify.modifyCancel();" >' . $txt['modify_cancel'] . '</span>
				<span class="button floatright" onclick="return oQuickModify.modifySave(\'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\');" accesskey="s">' . $txt['save'] . '</span>
			</div>
			</div>') . ',
		sTemplateSubjectEdit: ' . JavaScriptEscape('<input type="text" style="width: 50%;" name="subject_edit" value="%subject%" size="50" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" />') . ',
		sTemplateBodyNormal: ' . JavaScriptEscape('%body%') . ',
		sTemplateSubjectNormal: ' . JavaScriptEscape('<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%</a>') . ',
		sTemplateTopSubject: ' . JavaScriptEscape($txt['topic'] . ': %subject% &nbsp;(' . $txt['read'] . ' ' . $context['num_views'] . ' ' . $txt['times'] . ')') . ',
		sErrorBorderStyle: ' . JavaScriptEscape('1px solid red') . '
		});

		aJumpTo[aJumpTo.length] = new JumpTo({
			sContainerId: "display_jump_to",
			sJumpToTemplate: "<label class=\\"smalltext\\" 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['go'] . '"
		});
	}
	';
    if (!empty($ignoredMsgs)) {
        $context['inline_footer_script'] .= '';
    }
    $context['inline_footer_script'] .= '
	function getIntralink(e, mid) {
		var tid = ' . $context['current_topic'] . ';
		var _sid = "#subject_" + mid;
		var el = $("#interpostlink_helper");
		el.css("position", "fixed");
		var _content = "[ilink topic=" + tid + " post=" + mid + "]" + $(_sid).html().trim() + "[/ilink]";
		$("#interpostlink_helper_content").val(_content);
		$("#interpostlink_helper_content_full").val(e.attr("href"));
		centerElement(el, -200);
		el.css("z-index", 9999);
		setDimmed(1);
		el.show();
		$("#interpostlink_helper_content").focus();
		$("#interpostlink_helper_content").select();
	}
	$(document).keydown(function(e) {
		if(e.keyCode == 27 && $("#interpostlink_helper").css("display") != "none") {
        	$("#interpostlink_helper").css("position", "static");
        	$("#interpostlink_helper").hide();
			setDimmed(0);
    	}
	});
	var topic_id = ' . $context['current_topic'] . ';
	';
}
コード例 #27
0
function template_search()
{
    global $context, $settings, $options, $scripturl, $txt;
    // Start the submission form for the search!
    echo '
	<form action="', $scripturl, '?action=mlist;sa=search" method="post" accept-charset="', $context['character_set'], '">
		<div id="memberlist">
			<div class="pagesection">
				', template_button_strip($context['memberlist_buttons'], 'right'), '
			</div>
			<div class="cat_bar">
				<h3 class="catbg mlist">
					', !empty($settings['use_buttons']) ? '<img src="' . $settings['images_url'] . '/buttons/search.png" alt="" class="icon" />' : '', $txt['mlist_search'], '
				</h3>
			</div>
			<div id="memberlist_search" class="clear">
				<div class="roundframe">
					<dl id="mlist_search" class="settings">
						<dt>
							<label><strong>', $txt['search_for'], ':</strong></label>
						</dt>
						<dd>
							<input type="text" name="search" value="', $context['old_search'], '" size="40" class="input_text" />
						</dd>
						<dt>
							<label><strong>', $txt['mlist_search_filter'], ':</strong></label>
						</dt>';
    foreach ($context['search_fields'] as $id => $title) {
        echo '
						<dd>
							<label for="fields-', $id, '"><input type="checkbox" name="fields[]" id="fields-', $id, '" value="', $id, '" ', in_array($id, $context['search_defaults']) ? 'checked="checked"' : '', ' class="input_check floatright" />', $title, '</label>
						</dd>';
    }
    echo '
					</dl>
					<hr class="hrcolor" />
					<div class="flow_auto">
						<input type="submit" name="submit" value="' . $txt['search'] . '" class="button_submit" />
					</div>
				</div>
			</div>
		</div>
	</form>';
}
コード例 #28
0
/**
 * Simple Machines Forum (SMF)
 *
 * @package SMF
 * @author Simple Machines
 * @copyright 2011 Simple Machines
 * @license http://www.simplemachines.org/about/smf/license.php BSD
 *
 * @version 2.0
 */
function template_main()
{
    global $context, $settings, $options, $scripturl, $modSettings, $txt;
    echo '
	<a id="top"></a>';
    if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) {
        echo '
	<div class="tborder childboards" id="board_', $context['current_board'], '_childboards">
		<div class="cat_bar">
			<h3 class="catbg">', $txt['parent_boards'], '</h3>
		</div>
		<div class="table_frame">
			<table class="table_list">
				<tbody id="board_', $context['current_board'], '_children" class="content">';
        foreach ($context['boards'] as $board) {
            echo '
				<tr id="board_', $board['id'], '" class="windowbg2">
					<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
						<a href="', $board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children', '">';
            // If the board or children is new, show an indicator.
            if ($board['new'] || $board['children_new']) {
                echo '
							<img src="', $settings['images_url'], '/' . $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
            } elseif ($board['is_redirect']) {
                echo '
							<img src="', $settings['images_url'], '/' . $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
            } else {
                echo '
							<img src="', $settings['images_url'], '/' . $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
            }
            echo '
						</a>
					</td>
					<td class="info">
						<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
            // Has it outstanding posts for approval?
            if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) {
                echo '
						<a href="', $scripturl, '?action=moderate;area=postmod;sa=', $board['unapproved_topics'] > 0 ? 'topics' : 'posts', ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
            }
            echo '

						<p>', $board['description'], '</p>';
            // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
            if (!empty($board['moderators'])) {
                echo '
						<p class="moderators">', count($board['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
            }
            // Show some basic information about the number of posts, etc.
            echo '
					</td>
					<td class="stats windowbg">
						<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
						', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
						</p>
					</td>
					<td class="lastpost">';
            /* The board's and children's 'last_post's have:
            			time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
            			link, href, subject, start (where they should go for the first unread post.),
            			and member. (which has id, name, link, href, username in it.) */
            if (!empty($board['last_post']['id'])) {
                echo '
						<p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'], '<br />
						', $txt['in'], ' ', $board['last_post']['link'], '<br />
						', $txt['on'], ' ', $board['last_post']['time'], '
						</p>';
            }
            echo '
					</td>
				</tr>';
            // 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'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
                    } else {
                        $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
                    }
                    // Has it posts awaiting approval?
                    if ($child['can_approve_posts'] && $child['unapproved_posts'] | $child['unapproved_topics']) {
                        $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
                    }
                    $children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
                }
                echo '
				<tr id="board_', $board['id'], '_children"><td colspan="3" class="children windowbg"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td></tr>';
            }
        }
        echo '
				</tbody>
			</table>
		</div>
	</div>';
    }
    if (!empty($options['show_board_desc']) && $context['description'] != '') {
        echo '
	<p class="description_board">', $context['description'], '</p>';
    }
    // Create the button set...
    $normal_buttons = array('new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true), 'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'), 'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : '') . 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']));
    // They can only mark read if they are logged in and it's enabled!
    if (!$context['user']['is_logged'] || !$settings['show_mark_read']) {
        unset($normal_buttons['markread']);
    }
    // Allow adding new buttons easily.
    call_integration_hook('integrate_messageindex_buttons', array(&$normal_buttons));
    if (!$context['no_topic_listing']) {
        echo '
	<div class="pagesection">
		<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#bot"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
		', template_button_strip($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 class="tborder topic_table" id="messageindex">
		<table class="table_grid" cellspacing="0">
			<thead>
				<tr class="catbg">';
        // Are there actually any topics to show?
        if (!empty($context['topics'])) {
            echo '
					<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
					<th scope="col" class="lefttext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
					<th scope="col" width="14%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['views'], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
            // Show a "select all" box for quick moderation?
            if (empty($context['can_quick_mod'])) {
                echo '
					<th scope="col" class="lefttext last_th" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
            } else {
                echo '
					<th scope="col" class="lefttext" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
            }
            // Show a "select all" box for quick moderation?
            if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1) {
                echo '
					<th scope="col" class="last_th" width="24"><input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" /></th>';
            } elseif (!empty($context['can_quick_mod'])) {
                echo '
					<th class="last_th" width="4%">&nbsp;</th>';
            }
        } else {
            echo '
					<th scope="col" class="first_th" width="8%">&nbsp;</th>
					<th colspan="3"><strong>', $txt['msg_alert_none'], '</strong></th>
					<th scope="col" class="last_th" width="8%">&nbsp;</th>';
        }
        echo '
				</tr>
			</thead>
			<tbody>';
        if (!empty($settings['display_who_viewing'])) {
            echo '
				<tr class="windowbg2 whos_viewing">
					<td colspan="', !empty($context['can_quick_mod']) ? '6' : '5', '" class="smalltext">';
            if ($settings['display_who_viewing'] == 1) {
                echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members'];
            } else {
                echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
            }
            echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '
					</td>
				</tr>';
        }
        // If this person can approve items and we have some awaiting approval tell them.
        if (!empty($context['unapproved_posts_message'])) {
            echo '
				<tr class="windowbg2">
					<td colspan="', !empty($context['can_quick_mod']) ? '6' : '5', '">
						<span class="alert">!</span> ', $context['unapproved_posts_message'], '
					</td>
				</tr>';
        }
        foreach ($context['topics'] as $topic) {
            // Is this topic pending approval, or does it have any posts pending approval?
            if ($context['can_approve_posts'] && $topic['unapproved_posts']) {
                $color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
            } elseif ($topic['is_sticky'] && $topic['is_locked']) {
                $color_class = 'stickybg locked_sticky';
            } elseif ($topic['is_sticky']) {
                $color_class = 'stickybg';
            } elseif ($topic['is_locked']) {
                $color_class = 'lockedbg';
            } else {
                $color_class = 'windowbg';
            }
            // Some columns require a different shade of the color class.
            $alternate_class = $color_class . '2';
            echo '
				<tr>
					<td class="icon1 ', $color_class, '">
						<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
					</td>
					<td class="icon2 ', $color_class, '">
						<img src="', $topic['first_post']['icon_url'], '" alt="" />
					</td>
					<td class="subject ', $alternate_class, '">
						<div ', !empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\');"' : '', '>
							', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], !$context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : '', '</span>', $topic['is_sticky'] ? '</strong>' : '';
            // Is this topic new? (assuming they are logged in!)
            if ($topic['new'] && $context['user']['is_logged']) {
                echo '
							<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';
            }
            echo '
							<p>', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '
								<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
							</p>
						</div>
					</td>
					<td class="stats ', $color_class, '">
						', $topic['replies'], ' ', $txt['replies'], '
						<br />
						', $topic['views'], ' ', $txt['views'], '
					</td>
					<td class="lastpost ', $alternate_class, '">
						<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
						', $topic['last_post']['time'], '<br />
						', $txt['by'], ' ', $topic['last_post']['member']['link'], '
					</td>';
            // Show the quick moderation options?
            if (!empty($context['can_quick_mod'])) {
                echo '
					<td class="moderation ', $color_class, '" align="center">';
                if ($options['display_quick_mod'] == 1) {
                    echo '
						<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />';
                } 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[', $topic['id'], ']=remove;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_remove.gif" width="16" alt="', $txt['remove_topic'], '" title="', $txt['remove_topic'], '" /></a>';
                    }
                    if ($topic['quick_mod']['lock']) {
                        echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=lock;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_lock.gif" width="16" alt="', $txt['set_lock'], '" title="', $txt['set_lock'], '" /></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[', $topic['id'], ']=sticky;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_sticky.gif" width="16" alt="', $txt['set_sticky'], '" title="', $txt['set_sticky'], '" /></a>';
                    }
                    if ($topic['quick_mod']['move']) {
                        echo '<a href="', $scripturl, '?action=movetopic;board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><img src="', $settings['images_url'], '/icons/quick_move.gif" width="16" alt="', $txt['move_topic'], '" title="', $txt['move_topic'], '" /></a>';
                    }
                }
                echo '
					</td>';
            }
            echo '
				</tr>';
        }
        if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) {
            echo '
				<tr class="titlebg">
					<td colspan="6" align="right">
						<select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
							<option value="">--------</option>', $context['can_remove'] ? '
							<option value="remove">' . $txt['quick_mod_remove'] . '</option>' : '', $context['can_lock'] ? '
							<option value="lock">' . $txt['quick_mod_lock'] . '</option>' : '', $context['can_sticky'] ? '
							<option value="sticky">' . $txt['quick_mod_sticky'] . '</option>' : '', $context['can_move'] ? '
							<option value="move">' . $txt['quick_mod_move'] . ': </option>' : '', $context['can_merge'] ? '
							<option value="merge">' . $txt['quick_mod_merge'] . '</option>' : '', $context['can_restore'] ? '
							<option value="restore">' . $txt['quick_mod_restore'] . '</option>' : '', $context['can_approve'] ? '
							<option value="approve">' . $txt['quick_mod_approve'] . '</option>' : '', $context['user']['is_logged'] ? '
							<option value="markread">' . $txt['quick_mod_markread'] . '</option>' : '', '
						</select>';
            // Show a list of boards they can move the topic to.
            if ($context['can_move']) {
                echo '
						<select class="qaction" id="moveItTo" name="move_to" disabled="disabled">';
                foreach ($context['move_to_boards'] as $category) {
                    echo '
							<optgroup label="', $category['name'], '">';
                    foreach ($category['boards'] as $board) {
                        echo '
								<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '</option>';
                    }
                    echo '
							</optgroup>';
                }
                echo '
						</select>';
            }
            echo '
						<input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' &amp;&amp; confirm(\'', $txt['quickmod_confirm'], '\');" class="button_submit qaction" />
					</td>
				</tr>';
        }
        echo '
			</tbody>
		</table>
	</div>
	<a id="bot"></a>';
        // 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">
		', template_button_strip($normal_buttons, 'right'), '
		<div class="pagelinks">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
	</div>';
    }
    // Show breadcrumbs at the bottom too.
    theme_linktree();
    echo '
	<div class="tborder" id="topic_icons">
		<div class="description">
			<p class="floatright" id="message_index_jump_to">&nbsp;</p>';
    if (!$context['no_topic_listing']) {
        echo '
			<p class="floatleft smalltext">', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
				<img src="' . $settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' . $txt['participation_caption'] . '<br />' : '', '
				<img src="' . $settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' . $txt['normal_topic'] . '<br />
				<img src="' . $settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' . sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']) . '<br />
				<img src="' . $settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' . sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']) . '
			</p>
			<p class="smalltext">
				<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" alt="" align="middle" /> ' . $txt['locked_topic'] . '<br />' . ($modSettings['enableStickyTopics'] == '1' ? '
				<img src="' . $settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' . $txt['sticky_topic'] . '<br />' : '') . ($modSettings['pollMode'] == '1' ? '
				<img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['poll'] : '') . '
			</p>';
    }
    echo '
			<script type="text/javascript"><!-- // --><![CDATA[
				if (typeof(window.XMLHttpRequest) != "undefined")
					aJumpTo[aJumpTo.length] = new JumpTo({
						sContainerId: "message_index_jump_to",
						sJumpToTemplate: "<label class=\\"smalltext\\" 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>
			<br class="clear" />
		</div>
	</div>';
    // Javascript for inline editing.
    echo '
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/topic.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[

	// Hide certain bits during topic edit.
	hide_prefixes.push("lockicon", "stickyicon", "pages", "newicon");

	// Use it to detect when we\'ve stopped editing.
	document.onclick = modify_topic_click;

	var mouse_on_div;
	function modify_topic_click()
	{
		if (in_edit_mode == 1 && mouse_on_div == 0)
			modify_topic_save("', $context['session_id'], '", "', $context['session_var'], '");
	}

	function modify_topic_keypress(oEvent)
	{
		if (typeof(oEvent.keyCode) != "undefined" && oEvent.keyCode == 13)
		{
			modify_topic_save("', $context['session_id'], '", "', $context['session_var'], '");
			if (typeof(oEvent.preventDefault) == "undefined")
				oEvent.returnValue = false;
			else
				oEvent.preventDefault();
		}
	}

	// For templating, shown when an inline edit is made.
	function modify_topic_show_edit(subject)
	{
		// Just template the subject.
		setInnerHTML(cur_subject_div, \'<input type="text" name="subject" value="\' + subject + \'" size="60" style="width: 95%;" maxlength="80" onkeypress="modify_topic_keypress(event)" class="input_text" /><input type="hidden" name="topic" value="\' + cur_topic_id + \'" /><input type="hidden" name="msg" value="\' + cur_msg_id.substr(4) + \'" />\');
	}

	// And the reverse for hiding it.
	function modify_topic_hide_edit(subject)
	{
		// Re-template the subject!
		setInnerHTML(cur_subject_div, \'<a href="', $scripturl, '?topic=\' + cur_topic_id + \'.0">\' + subject + \'<\' +\'/a>\');
	}

// ]]></script>';
}
コード例 #29
0
/**
 * Show information below the boardindex, like stats, infocenter
 */
function template_boardindex_outer_below()
{
    global $context, $settings, $txt;
    // @todo - Just <div> for the parent, <p>'s for the icon stuffz, and the buttonlist <ul> for "Mark read".
    // Sort the floats in the CSS file, as other tricks will be needed as well (media queries, for instance).
    echo '
		<div id="posting_icons">';
    // Show the mark all as read button?
    if ($settings['show_mark_read'] && !$context['user']['is_guest'] && !empty($context['categories'])) {
        echo '
			', template_button_strip($context['mark_read_button'], 'right');
    }
    if ($context['user']['is_logged']) {
        echo '
			<p class="board_key new_some_board" title="', $txt['new_posts'], '">', $txt['new_posts'], '</p>';
    }
    echo '
			<p class="board_key new_none_board" title="', $txt['old_posts'], '">', $txt['old_posts'], '</p>
			<p class="board_key new_redirect_board" title="', $txt['redirect_board'], '">', $txt['redirect_board'], '</p>
		</div>';
    if (!empty($context['info_center_callbacks'])) {
        template_info_center();
    }
}
コード例 #30
0
ファイル: Help.template.php プロジェクト: VBGAMER45/SMFMods
function template_manual_intro()
{
    global $context, $settings, $options, $txt, $scripturl, $modSettings;
    echo '

	<p>', $txt['manual_index_you_have_arrived_part1'], '<a href="http://www.simplemachines.org/">', $txt['manual_index_you_have_arrived_link_site0'], '</a>', $txt['manual_index_you_have_arrived_part2'], '<a href="', $scripturl, '?action=help;page=index#board">', $txt['manual_index_you_have_arrived_link_site0_board'], '</a>', $txt['manual_index_you_have_arrived_part3'], '</p>
	<p>', $txt['manual_index_guest_permit_read_part1'], '<a href="', $scripturl, '?action=help;page=registering">', $txt['manual_index_guest_permit_read_link_registering'], '</a>', $txt['manual_index_guest_permit_read_part2'], '</p>
	<ol>
		<li><a href="', $scripturl, '?action=help;page=index#main">', $txt['manual_index_main_menu'], '</a></li>
		<li><a href="', $scripturl, '?action=help;page=index#board">', $txt['manual_index_sec_board_index'], '</a></li>
		<li><a href="', $scripturl, '?action=help;page=index#message">', $txt['manual_index_sec_msg_index'], '</a></li>
		<li><a href="', $scripturl, '?action=help;page=index#topic">', $txt['manual_index_sec_topic'], '</a></li>
	</ol>
	<h2 id="main">', $txt['manual_index_main_menu'], '</h2>
	<p>', $txt['manual_index_suppossing_guest'], '</p>
	<ul>
		<li>', $txt['manual_index_home_desc_part1'], '<a href="', $scripturl, '?action=help;page=index#board">', $txt['manual_index_home_desc_link_board'], '</a>', $txt['manual_index_home_desc_part2'], '</li>
		<li>', $txt['manual_index_help_desc'], '</li>
		<li>', $txt['manual_index_search_desc_part1'], '<a href="', $scripturl, '?action=help;page=searching">', $txt['manual_index_search_desc_link_searching'], '</a>', $txt['manual_index_search_desc_part2'], '</li>
		<li>', $txt['manual_index_calendar_desc_part1'], '<a href="', $scripturl, '?action=help;page=post#calendar">', $txt['manual_index_calendar_desc_link_posting_calendar'], '</a>', $txt['manual_index_calendar_desc_part2'], '</li>
		<li>', $txt['manual_index_login_desc_part1'], '<a href="', $scripturl, '?action=help;page=loginout">', $txt['manual_index_login_desc_link_loginout'], '</a>', $txt['manual_index_login_desc_part2'], '</li>
		<li>', $txt['manual_index_register_desc_part1'], '<a href="', $scripturl, '?action=help;page=registering">', $txt['manual_index_register_desc_link_registering'], '</a>', $txt['manual_index_register_desc_part2'], '</li>
	</ul>
	<p>', $txt['manual_index_once_registered'], '</p>
	<ul>
		<li>', $txt['manual_index_home_reg'], '</li>
		<li>', $txt['manual_index_help_reg'], '</li>
		<li>', $txt['manual_index_search_reg'], '</li>
		<li>', $txt['manual_index_profile_reg_part1'], '<a href="', $scripturl, '?action=help;page=profile">', $txt['manual_index_profile_reg_link_profile'], '</a>', $txt['manual_index_profile_reg_part2'], '</li>
		<li>', $txt['manual_index_calendar_reg'], '</li>
		<li>', $txt['manual_index_logout_reg_part1'], '<a href="', $scripturl, '?action=help;page=loginout#logout">', $txt['manual_index_logout_reg_link_loginout_logout'], '</a>', $txt['manual_index_logout_reg_part2'], '</li>
	</ul>
	<p>', $txt['manual_index_forum_admins_note_presentation'], '</p>
	<h2 id="board">', $txt['manual_index_sec_board_index'], '</h2>
	<p>', $txt['manual_index_sec_board_index_def'], '</p>
	<div style="border: solid 1px;">
		<div style="padding: 2px 30px;">
			<table width="100%" cellpadding="3" cellspacing="0">
				<tr>
					<td valign="bottom"><span class="nav"><img src="', $settings['images_url'], '/icons/folder_open.gif" alt="+" border="0" />&nbsp; <b><a href="', $scripturl, '?action=help;page=index#board" class="nav">', $txt['manual_index_forum_name'], '</a></b></span></td>
				</tr>
			</table><script language="JavaScript1.2" type="text/javascript">
//<![CDATA[
			var collapseExpand = false;
			function collapseExpandCategory()
			{
					document.getElementById("collapseArrow").src = smf_images_url + "/" + (collapseExpand ? "collapse.gif" : "expand.gif");
					document.getElementById("collapseArrow").alt = collapseExpand ? "-" : "+";
					document.getElementById("collapseCategory").style.display = collapseExpand ? "" : "none";
					collapseExpand = !collapseExpand;
			}
			function markBoardRead()
			{
					document.getElementById("board-new-or-not").src = smf_images_url + "/" + "off.gif";
					document.getElementById("board-new-or-not").alt = "', $txt['manual_index_no_new'], '";
			}
//]]>
</script>
			<div class="tborder">
				<table border="0" width="100%" cellspacing="1" cellpadding="5">
					<tr>
						<td colspan="4" class="catbg" height="18"><a href="javascript:collapseExpandCategory();"><img src="', $settings['images_url'], '/collapse.gif" alt="-" border="0" id="collapseArrow" name="collapseArrow" /></a>&nbsp; <a href="javascript:collapseExpandCategory();" class="board">', $txt['manual_index_cat_name'], '</a></td>
					</tr>
					<tr id="collapseCategory" class="windowbg2">
						<td class="windowbg" width="6%" align="center" valign="top"><img src="', $settings['images_url'], '/on.gif" id="board-new-or-not" alt="', $txt['manual_index_new_posts'], '" name="board-new-or-not" /></td>
						<td align="left" class="windowbg"><b><a href="', $scripturl, '?action=help;page=index#message" class="board">', $txt['manual_index_board_name'], '</a></b><br />
						', $txt['manual_index_board_desc'], '</td>
						<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">', $txt['manual_index_topics_posts'], '</span></td>
						<td class="smalltext" valign="middle" width="22%" class="windowbg">', $txt['manual_index_date_time'], '</td>
					</tr>
				</table>
			</div>';
    // This changes dependant on theme really...
    $mark_read_button = array('markread' => array('text' => 452, 'image' => 'markread.gif', 'lang' => true, 'url' => 'javascript:markBoardRead();'));
    if (!empty($settings['use_tabs'])) {
        echo '
		<table border="0" width="100%" cellspacing="0" cellpadding="5">
			<tr>
				<td align="', !$context['right_to_left'] ? 'left' : 'right', '" class="smalltext">
					<img src="' . $settings['images_url'] . '/new_some.gif" alt="" align="middle" /> ', $txt['manual_index_new_posts'], '
					<img src="' . $settings['images_url'] . '/new_none.gif" alt="" align="middle" style="margin-left: 4ex;" /> ', $txt['manual_index_no_new'], '
				</td>
				<td align="', !$context['right_to_left'] ? 'right' : 'left', '">
					<table cellpadding="0" cellspacing="0" border="0" style="position: relative; top: -5px;">
						<tr>
							', template_button_strip($mark_read_button, 'top', false, 'align="right" class="smalltext"'), '
						</tr>
					</table>
				</td>
			</tr>
		</table>';
    } else {
        echo '
			<br />
			<div class="tborder" style="padding: 3px;">
				<table border="0" width="100%" cellspacing="0" cellpadding="5">
					<tr class="titlebg">
						<td align="left" class="smalltext">';
        // To back support the classic theme we do a little hack here...
        if (file_exists($settings['theme_dir'] . '/images/' . $context['user']['language'] . '/new_some.gif')) {
            echo '
				<img src="', $settings['images_url'], '/', $context['user']['language'], '/new_some.gif" alt="', $txt['manual_index_new_posts'], '" border="0" />&nbsp;&nbsp;<img src="', $settings['images_url'], '/', $context['user']['language'], '/new_none.gif" alt="', $txt['manual_index_no_new'], '" border="0" />';
        } else {
            echo '
				<img src="', $settings['images_url'], '/new_some.gif" alt="" align="middle" />&nbsp; ', $txt['manual_index_new_posts'], '<img src="', $settings['images_url'], '/new_none.gif" alt="" align="middle" style="margin-left: 4ex;" />&nbsp; ', $txt['manual_index_no_new'];
        }
        echo '
						</td>
						', template_button_strip($mark_read_button, 'top', false, 'align="right" class="smalltext"'), '
					</tr>
				</table>
			</div><br />';
    }
    echo '
		</div>
	</div><br />
		<ul>
		<li>', $txt['manual_index_f_name'], '</li>
		<li>', $txt['manual_index_cat'], '</li>
		<li>', $txt['manual_index_b_name_part1'], '<a href="', $scripturl, '?action=help;page=index#message">', $txt['manual_index_b_name_link_message'], '</a>', $txt['manual_index_b_name_part2'], '</li>
		<li>', $txt['manual_index_b_desc'], '</li>
		<li>', $txt['manual_index_n_no_n_posts'], '</li>
		<li>', $txt['manual_index_m_read'], '</li>
	</ul>
	<h2 id="message">', $txt['manual_index_sec_msg_index'], '</h2>
	<p>', $txt['manual_index_sec_msg_index_def'], '</p>
	<div style="border: solid 1px;">
		<div style="padding: 2px 30px;">
			<script language="JavaScript1.2" type="text/javascript">
//<![CDATA[
			var currentSort = false;
			function sortLastPost()
			{
					document.getElementById("sort-arrow").src = smf_images_url + "/" + (currentSort ? "sort_down.gif" : "sort_up.gif");
					document.getElementById("sort-arrow").alt = "";
					currentSort = !currentSort;
			}
			function markMessageRead()
			{
					document.getElementById("message-new-or-not").style.display = "none";
			}
//]]>
</script>
			<table width="100%" cellpadding="3" cellspacing="0">
				<tr>
					<td><span class="nav"><img src="', $settings['images_url'], '/icons/folder_open.gif" alt="+" border="0" />&nbsp; <b><a href="', $scripturl, '?action=help;page=index#board" class="nav">', $txt['manual_index_forum_name'], '</a></b><br />
					<img src="', $settings['images_url'], '/icons/linktree_side.gif" alt="|-" border="0" /> <img src="', $settings['images_url'], '/icons/folder_open.gif" alt="+" border="0" />&nbsp; <b><a href="', $scripturl, '?action=help;page=index#board" class="nav">', $txt['manual_index_cat_name'], '</a></b><br />
					<img src="', $settings['images_url'], '/icons/linktree_main.gif" alt="| " border="0" /> <img src="', $settings['images_url'], '/icons/linktree_side.gif" alt="|-" border="0" /> <img src="', $settings['images_url'], '/icons/folder_open.gif" alt="+" border="0" />&nbsp; <b><a href="', $scripturl, '?action=help;page=index#message" class="nav">', $txt['manual_index_board_name'], '</a></b></span></td>
				</tr>
			</table>';
    // Create the buttons we need here...
    $mindex_buttons = array('markmread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => 'javascript:markMessageRead();'), 'notify' => array('text' => 'manual_index_notify', 'image' => 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['manual_index_ru_sure_notify'] . '\');"', 'url' => $scripturl . '?action=help;page=index#message'), 'topic' => array('text' => 'manual_index_start_new', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=help;page=post#newtopic'), 'poll' => array('text' => 'manual_index_new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=help;page=post#newpoll'));
    if (!empty($settings['use_tabs'])) {
        echo '
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td class="middletext">', $txt['manual_index_pages'], ': [<b>1</b>]</td>
					<td align="right" style="padding-right: 1ex;">
						<table cellpadding="0" cellspacing="0">
							<tr>
								', template_button_strip($mindex_buttons, 'bottom'), '
							</tr>
						</table>
					</td>
				</tr>
			</table>';
    } else {
        echo '
			<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="margin-bottom: 1ex;">
				<tr>
					<td align="left" class="catbg" width="100%" height="30">
						<table cellpadding="3" cellspacing="0" width="100%">
							<tr>
								<td><b>', $txt['manual_index_pages'], ':</b> [<b>1</b>]</td>
								', template_button_strip($mindex_buttons, 'bottom', false, 'align="right" nowrap="nowrap" style="font-size: smaller;"'), '
							</tr>
						</table>
					</td>
				</tr>
			</table>';
    }
    echo '
			<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
				<tr class="titlebg">
					<td width="9%" colspan="2"></td>
					<td><a href="', $scripturl, '?action=help;page=index#message">', $txt['manual_index_subject'], '</a></td>
					<td width="14%"><a href="', $scripturl, '?action=help;page=index#message">', $txt['manual_index_started_by'], '</a></td>
					<td width="4%" align="center"><a href="', $scripturl, '?action=help;page=index#message">', $txt['manual_index_replies'], '</a></td>
					<td width="4%" align="center"><a href="', $scripturl, '?action=help;page=index#message">', $txt['manual_index_views'], '</a></td>
					<td width="22%"><a href="javascript:sortLastPost();">', $txt['manual_index_last_post'], ' &nbsp; <img id="sort-arrow" src="', $settings['images_url'], '/sort_down.gif" alt="" border="0" name="sort-arrow" /></a></td>
				</tr>
				<tr>
					<td class="windowbg2" valign="middle" align="center" width="5%"><img src="', $settings['images_url'], '/topic/my_normal_poll.gif" alt="" /></td>
					<td class="windowbg2" valign="middle" align="center" width="4%"><img src="', $settings['images_url'], '/post/xx.gif" alt="" align="middle" /></td>
					<td class="windowbg" valign="middle"><a href="', $scripturl, '?action=help;page=index#topic" class="board">', $txt['manual_index_topic_subject'], '</a> <a href="', $scripturl, '?action=help;page=index#topic"><img id="message-new-or-not" src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" border="0" alt="', $txt['manual_index_new'], '" name="message-new-or-not" /></a></td>
					<td class="windowbg2" valign="middle" width="14%"><a href="', $scripturl, '?action=help;page=profile" class="board">', $txt['manual_index_topic_starter'], '</a></td>
					<td class="windowbg" valign="middle" width="4%" align="center">0</td>
					<td class="windowbg" valign="middle" width="4%" align="center">0</td>
					<td class="windowbg2" valign="middle" width="22%"><span class="smalltext">', $txt['manual_index_last_poster'], '</span></td>
				</tr>
			</table>';
    if (!empty($settings['use_tabs'])) {
        echo '
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td class="middletext">', $txt['manual_index_pages'], ': [<b>1</b>]</td>
					<td align="right" style="padding-right: 1ex;">
						<table cellpadding="0" cellspacing="0">
							<tr>
								', template_button_strip($mindex_buttons, 'top'), '
							</tr>
						</table>
					</td>
				</tr>
			</table>';
    } else {
        echo '
			<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="margin-top: 1ex;">
				<tr>
					<td align="left" class="catbg" width="100%" height="30">
						<table cellpadding="3" cellspacing="0" width="100%">
							<tr>
								<td><b>', $txt['manual_index_pages'], ':</b> [<b>1</b>]</td>
								', template_button_strip($mindex_buttons, 'bottom', false, 'align="right" nowrap="nowrap" style="font-size: smaller;"'), '
							</tr>
						</table>
					</td>
				</tr>
			</table>';
    }
    echo '
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td class="smalltext" align="left" style="padding-top: 1ex;"><img src="', $settings['images_url'], '/topic/my_normal_post.gif" alt="" align="middle" />&nbsp; ', $txt['manual_index_normal_post'], '<br />
					<img src="', $settings['images_url'], '/topic/normal_post.gif" alt="" align="middle" />&nbsp; ', $txt['manual_index_normal_topic'], '<br />
					<img src="', $settings['images_url'], '/topic/hot_post.gif" alt="" align="middle" />&nbsp; ', $txt['manual_index_hot_post'], '<br />
					<img src="', $settings['images_url'], '/topic/veryhot_post.gif" alt="" align="middle" />&nbsp; ', $txt['manual_index_very_hot_post'], '</td>
					<td class="smalltext" align="left" valign="top" style="padding-top: 1ex;"><img src="', $settings['images_url'], '/topic/normal_post_locked.gif" alt="" align="middle" />&nbsp; ', $txt['manual_index_locked'], '<br />
					<img src="', $settings['images_url'], '/topic/normal_post_sticky.gif" alt="" align="middle" />&nbsp; ', $txt['manual_index_sticky'], '<br />
					<img src="', $settings['images_url'], '/topic/normal_poll.gif" alt="" align="middle" />&nbsp; ', $txt['manual_index_poll'], '</td>
					<td class="smalltext" align="right" valign="middle">
						<form action="', $scripturl, '?action=help;page=index" method="get" accept-charset="', $context['character_set'], '">
							<label for="jumpto">', $txt['manual_index_jump_to'], '</label>: <select name="jumpto" id="jumpto" onchange="if (this.options[this.selectedIndex].value) window.location.href=\'', $scripturl, '?action=help;page=index\' + this.options[this.selectedIndex].value;">
								<option value="">
									', $txt['manual_index_destination'], ':
								</option>
								<option value="">
									-----------------------------
								</option>
								<option value="#board">
									', $txt['manual_index_cat_name'], '
								</option>
								<option value="">
									-----------------------------
								</option>
								<option value="#message">
									=&gt; ', $txt['manual_index_board_name'], '
								</option>
								<option value="#message">
									=&gt; ', $txt['manual_index_another_board'], '
								</option>
							</select>&nbsp; <input type="button" onclick="if (this.form.jumpto.options[this.form.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '?action=help;page=index\' + this.form.jumpto.options[this.form.jumpto.selectedIndex].value;" value="', $txt['manual_index_go'], '" />
						</form>
					</td>
				</tr>
			</table><br />
		</div>
	</div><br />
	<ul>
		<li>', $txt['manual_index_nav_tree'], '</li>
		<li>', $txt['manual_index_page_number'], '</li>
		<li>', $txt['manual_index_mark_read_button'], '</li>
		<li>', $txt['manual_index_notify_button'], '</li>
		<li>', $txt['manual_index_new_topic_poll_button_part1'], '<a href="', $scripturl, '?action=help;page=post">', $txt['manual_index_new_topic_poll_button_link_posting'], '</a>', $txt['manual_index_new_topic_poll_button_part2'], '</li>
		<li>', $txt['manual_index_subject_replies_etc'], '</li>
		<li>', $txt['manual_index_topic_icons'], '</li>
		<li>', $txt['manual_index_post_icons'], '</li>
		<li>', $txt['manual_index_topic_subject_links_part1'], '<a href="', $scripturl, '?action=help;page=index#topic">', $txt['manual_index_topic_subject_links_link_topic'], '</a>', $txt['manual_index_topic_subject_links_part2'], '</li>
		<li>', $txt['manual_index_where_topic_part1'], '<a href="', $scripturl, '?action=help;page=profile">', $txt['manual_index_where_topic_link_profile'], '</a>', $txt['manual_index_where_topic_part2'], '</li>
		<li>', $txt['manual_index_jump_to_menu'], '</li>
	</ul>
	<h2 id="topic">', $txt['manual_index_sec_topic'], '</h2>
	<p>', $txt['manual_index_ref_thread'], '</p>';
    // The buttons...
    $display_buttons = array('reply' => array('text' => 'manual_index_reply', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=help;page=post#reply'), 'notify' => array('text' => 'manual_index_notify', 'image' => 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['manual_index_ru_sure_enable_notify'] . '\');"', 'url' => $scripturl . '?action=help;page=post#topic'), 'markunread' => array('text' => 'manual_index_mark_unread', 'image' => 'markunread.gif', 'lang' => true, 'url' => $scripturl . '?action=help;page=post#topic'), 'sendtopic' => array('text' => 'manual_index_send_topic', 'image' => 'sendtopic.gif', 'lang' => true, 'url' => $scripturl . '?action=help;page=post#topic'), 'print' => array('text' => 'manual_index_print', 'image' => 'print.gif', 'lang' => true, 'url' => $scripturl . '?action=help;page=post#topic'));
    echo '
	<div style="border: solid 1px;">
		<div style="padding: 2px 30px;">
			<table width="100%" cellpadding="3" cellspacing="0">
				<tr>
					<td valign="bottom"><span class="nav"><img src="', $settings['images_url'], '/icons/folder_open.gif" alt="+" border="0" />&nbsp; <b><a href="', $scripturl, '?action=help;page=index#board" class="nav">', $txt['manual_index_forum_name'], '</a></b><br />
					<img src="', $settings['images_url'], '/icons/linktree_side.gif" alt="|-" border="0" /> <img src="', $settings['images_url'], '/icons/folder_open.gif" alt="+" border="0" />&nbsp; <b><a href="', $scripturl, '?action=help;page=index#board" class="nav">', $txt['manual_index_cat_name'], '</a></b><br />
					<img src="', $settings['images_url'], '/icons/linktree_main.gif" alt="| " border="0" /> <img src="', $settings['images_url'], '/icons/linktree_side.gif" alt="|-" border="0" /> <img src="', $settings['images_url'], '/icons/folder_open.gif" alt="+" border="0" />&nbsp; <b><a href="', $scripturl, '?action=help;page=index#message" class="nav">', $txt['manual_index_board_name'], '</a></b><br />
					<img src="', $settings['images_url'], '/icons/linktree_main.gif" alt="| " border="0" /> <img src="', $settings['images_url'], '/icons/linktree_main.gif" alt="| " border="0" /> <img src="', $settings['images_url'], '/icons/linktree_side.gif" alt="|-" border="0" /> <img src="', $settings['images_url'], '/icons/folder_open.gif" alt="+" border="0" />&nbsp; <b><a href="', $scripturl, '?action=help;page=index#topic" class="nav">', $txt['manual_index_topic_subject'], '</a></b></span></td>
				</tr>
			</table>';
    if (!empty($settings['use_tabs'])) {
        echo '
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td class="middletext" valign="bottom" style="padding-bottom: 4px;"><b>', $txt['manual_index_pages'], ':</b> [<b>1</b>]</td>
					<td align="right" style="padding-right: 1ex;">
						<table cellpadding="0" cellspacing="0">
							<tr>
								', template_button_strip($display_buttons, 'bottom'), '
							</tr>
						</table>
					</td>
				</tr>
			</table>';
    } else {
        echo '
			<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="margin-bottom: 1ex;">
				<tr>
					<td align="left" class="catbg" width="100%" height="35">
						<table cellpadding="3" cellspacing="0" width="100%">
							<tr>
								<td><b>', $txt['manual_index_pages'], ':</b> [<b>1</b>]</td>
								', template_button_strip($display_buttons, 'bottom', false, 'align="right" style="font-size: smaller;"'), '
							</tr>
						</table>
					</td>
				</tr>
			</table>';
    }
    echo '
			<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="border-bottom: 0;">
				<tr class="catbg3">
					<td valign="middle" align="left" width="2%" style="padding-left: 6px;"><img src="', $settings['images_url'], '/topic/normal_post.gif" alt="" align="middle" /></td>
					<td width="13%">', $txt['manual_index_author'], '</td>
					<td valign="middle" align="left" width="85%" style="padding-left: 6px;">', $txt['manual_index_topic'], ': ', $txt['manual_index_topic_subject'], ' &nbsp;(', $txt['manual_index_read_x_times'], ')</td>
				</tr>
			</table>
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="bordercolor">
				<tr>
					<td style="padding: 1px;">
						<table cellpadding="3" cellspacing="0" border="0" width="100%">
							<tr>
								<td class="windowbg">
									<table width="100%" cellpadding="5" cellspacing="0" style="table-layout: fixed;">
										<tr>
											<td valign="top" width="15%" rowspan="2" style="overflow: hidden;"><b><a href="', $scripturl, '?action=help;page=profile" class="board" title="', $txt['manual_index_view_author_profile'], '">', $txt['manual_index_author'], '</a></b><br />
											<span class="smalltext">', $txt['manual_index_member_group'], '<br />
											', $txt['manual_index_post_group'], '<br />
											<img src="', $settings['images_url'], '/star.gif" alt="*" border="0" /><br />
											', $txt['manual_index_post_count'], '<br />
											<br />
											<br />
											<br />
											<a href="', $scripturl, '?action=help;page=profile" title="', $txt['manual_index_view_profile'], '"><img src="', $settings['images_url'], '/icons/profile_sm.gif" border="0" alt="', $txt['manual_index_view_profile'], '" /></a> <a href="mailto:author@some.address" title="', $txt['manual_index_email'], '"><img src="', $settings['images_url'], '/email_sm.gif" border="0" alt="', $txt['manual_index_email'], '" /></a> <a href="', $scripturl, '?action=help;page=pm" title="', $txt['manual_index_personal_msg'], '"><img src="', $settings['images_url'], '/im_off.gif" border="0" alt="', $txt['manual_index_personal_msg'], '" /></a></span></td>
											<td valign="top" width="85%" height="100%">
												<table width="100%" border="0">
													<tr>
														<td width="20" align="left" valign="middle"><a href="index.php?topic=2.msg2#msg2"><img src="', $settings['images_url'], '/post/xx.gif" alt="" border="0" /></a></td>
														<td align="left" valign="middle">
															<b><a href="', $scripturl, '?action=help;page=index#topic" class="board">', $txt['manual_index_topic_subject'], '</a></b>
															<div class="smalltext">
																&laquo; ', $txt['manual_index_post_date_time'], ' &raquo;
															</div>
														</td>
														<td align="right" valign="bottom" height="20" style="font-size: smaller;"><a href="', $scripturl, '?action=help;page=post#quote">', create_button('quote.gif', 'manual_index_reply_quote', 'smf240', 'align="middle"'), '</a></td>
													</tr>
												</table>
												<hr width="100%" size="1" class="hrcolor" />
												<div style="overflow: auto; width: 100%;">
													', $txt['manual_index_topic_text'], '&nbsp;<img src="', $modSettings['smileys_url'], '/', $context['user']['smiley_set'], '/smiley.gif" border="0" alt="', $txt['manual_index_smiley'], '" />
												</div>
											</td>
										</tr>
										<tr>
											<td valign="bottom" class="smalltext">
												<table width="100%" border="0" style="table-layout: fixed;">
													<tr>
														<td align="right" valign="bottom" class="smalltext"><a href="', $scripturl, '?action=help;page=index#topic" class="board" style="font-size: x-small;">', $txt['manual_index_report_to_mod'], '</a>&nbsp;&nbsp; <img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />&nbsp; ', $txt['manual_index_logged'], '</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table><a name="lastPost" id="lastPost"></a>';
    if (!empty($settings['use_tabs'])) {
        echo '
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td class="middletext"><b>', $txt['manual_index_pages'], ':</b> [<b>1</b>]</td>
					<td align="right" style="padding-right: 1ex;">
						<table cellpadding="0" cellspacing="0">
							<tr>
								', template_button_strip($display_buttons, 'top', false), '
							</tr>
						</table>
					</td>
				</tr>
			</table>';
    } else {
        echo '
			<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="margin-top: 1ex;">
				<tr>
					<td align="left" class="catbg" width="100%" height="30">
						<table cellpadding="3" cellspacing="0" width="100%">
							<tr>
								<td><b>', $txt['manual_index_pages'], ':</b> [<b>1</b>]</td>
								', template_button_strip($display_buttons, 'top', false, 'align="right" style="font-size: smaller;"'), '
							</tr>
						</table>
					</td>
				</tr>
			</table>';
    }
    echo '
			<div style="padding-top: 4px; padding-bottom: 4px;"></div>
			<div align="right" style="float: right; margin-bottom: 1ex;">
				<form action="', $scripturl, '?action=help;page=index" method="get" accept-charset="', $context['character_set'], '">
					<label for="jump2">', $txt['manual_index_jump_to'], '</label>: <select name="jump2" id="jump2" onchange="if (this.options[this.selectedIndex].value) window.location.href=\'', $scripturl, '?action=help;page=index\' + this.options[this.selectedIndex].value;">
						<option value="">
							', $txt['manual_index_destination'], ':
						</option>
						<option value="">
							-----------------------------
						</option>
						<option value="#board">
							', $txt['manual_index_cat_name'], '
						</option>
						<option value="">
							-----------------------------
						</option>
						<option value="#message">
							=&gt; ', $txt['manual_index_board_name'], '
						</option>
						<option value="#message">
							=&gt; ', $txt['manual_index_another_board'], '
						</option>
					</select>&nbsp; <input type="button" onclick="if (this.form.jump2.options[this.form.jump2.selectedIndex].value) window.location.href = \'', $scripturl, '?action=help;page=index\' + this.form.jump2.options[this.form.jump2.selectedIndex].value;" value="', $txt['manual_index_go'], '" />
				</form>
			</div><br />
			<br clear="all" />
		</div>
	</div><br />
	<ul>
		<li>', $txt['manual_index_navigation_tree'], '</li>
		<li>', $txt['manual_index_prev_next'], '</li>
		<li>', $txt['manual_index_page_no_link'], '</li>
		<li>', $txt['manual_index_reply_button_part1'], '<a href="', $scripturl, '?action=help;page=post#reply">', $txt['manual_index_reply_button_link_posting_reply'], '</a>', $txt['manual_index_reply_button_part2'], '</li>
		<li>', $txt['manual_index_notify_button_enables'], '</li>
		<li>', $txt['manual_index_mark_unread_button'], '</li>
		<li>', $txt['manual_index_send_topic_button'], '</li>
		<li>', $txt['manual_index_print_button'], '</li>
		<li>', $txt['manual_index_author_name_link_part1'], '<a href="', $scripturl, '?action=help;page=profile">', $txt['manual_index_author_name_link_link_profile'], '</a></li>
		<li>', $txt['manual_index_author_details'], '</li>
		<li>', $txt['manual_index_topic_subject_links_start'], '</li>
		<li>', $txt['manual_index_quote_button_part1'], '<a href="', $scripturl, '?action=help;page=post#quote">', $txt['manual_index_quote_button_link_posting_quote'], '</a>', $txt['manual_index_quote_button_part2'], '</li>
		<li>', $txt['manual_index_modify_delete_part1'], '<a href="', $scripturl, '?action=help;page=post#modify">', $txt['manual_index_modify_delete_link_posting_modify'], '</a>', $txt['manual_index_modify_delete_part2'], '</li>
		<li>', $txt['manual_index_report_to_moderator'], '</li>
		<li>', $txt['manual_index_logged_IP'], '</li>
		<li>', $txt['manual_index_jump_to_menu_provides'], '</li>
	</ul>';
}