Additional Info |
---|
Type
|
Package ID
LHVWB:OrderStickiedTopics
|
First Created
August 06, 2008, 08:29:11 AM
|
Last Updated
November 11, 2008, 04:06:50 AM
|
'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'),
'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'),
// Show the Link/Button for the Order Stickied Topics Mod.
'order_stickied_topics' => array('test' => 'can_order_stickied_topics', 'text' => 'OrderStickiedTopics_title', 'lang' => true, 'url' => $scripturl . '?action=orderstickiedtopics;board=' . $context['current_board'] . '.0'),
// Function to display the list of stickiedtopics.
function template_orderstickiedtopics()
{
global $context, $txt, $board_info, $scripturl, $settings;
// Show the start of the table, as well as the main heading and the column headings.
echo '
<br />
<table border="0" align="center" cellspacing="1" cellpadding="4" class="bordercolor" width="60%">
<tr class="catbg3">
<td colspan="5" align="left">
<div style="float: left;">
<b>', $txt['OrderStickiedTopics_title'] ,'</b> - <a href="' . $scripturl . '?board=', $context['current_board'], '.0">', $board_info['name'], '</a>
</div>
</td>
</tr>
<tr class="titlebg">
<th>', $txt[70], '</th>
<th>', $txt['OrderStickiedTopics_current'], '</th>
<th>', $txt['OrderStickiedTopics_modify'], '</th>
</tr>';
// Show a list of the topics.
foreach($context['topics'] as $topic)
{
echo '
<tr>
<td align="left" valign="top" class="windowbg"><b><a href="', $scripturl, '?topic=', $topic['id'], '.0">', $topic['title'], '</a></b></td>
<td align="left" valign="top" class="windowbg2" style="text-align:center;">', $topic['value'], '</td>
<td align="center" valign="top" class="windowbg2">
<a href="', $scripturl, '?action=orderstickiedtopics;topic=', $topic['id'],';decrease"><img src="', $settings['images_url'], '/sort_down.gif" alt="', $txt['OrderStickiedTopics_decrease'], '" border="0" /></a>
<a href="', $scripturl, '?action=orderstickiedtopics;topic=', $topic['id'],';increment"><img src="', $settings['images_url'], '/sort_up.gif" alt="', $txt['OrderStickiedTopics_increase'], '" border="0" /></a>
<a href="', $scripturl, '?action=orderstickiedtopics;topic=', $topic['id'],';unsticky">', $txt['OrderStickiedTopics_unsticky'], '</a>
</td>
</tr>';
}
// If we have no topics, then show a short message telling the moderator.
if(empty($context['topics']))
echo '
<tr>
<td colspan="3" valign="top" class="windowbg">', $txt['OrderStickiedTopics_emptylist'], '</td>
</tr>';
// Finish the table.
echo '
<tr class="catbg3">
<td colspan="5" align="left">
<b style="font-size:14px;"><a href="', $scripturl, '?board=', $context['current_board'], '.0">', $txt['OrderStickiedTopics_back'], ' ', $board_info['name'], '</a></b>
</td>
</tr>
</table>';
}
'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'),
'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'),
// Show the Link/Button for the Order Stickied Topics Mod.
'order_stickied_topics' => array('test' => 'can_order_stickied_topics', 'text' => 'OrderStickiedTopics_title', 'lang' => true, 'url' => $scripturl . '?action=orderstickiedtopics;board=' . $context['current_board'] . '.0'),
// Function to display the list of stickiedtopics.
function template_orderstickiedtopics()
{
global $context, $txt, $board_info, $scripturl, $settings;
// Show the start of the table, as well as the main heading and the column headings.
echo '
<br />
<table border="0" align="center" cellspacing="1" cellpadding="4" class="bordercolor" width="60%">
<tr class="catbg3">
<td colspan="5" align="left">
<div style="float: left;">
<b>', $txt['OrderStickiedTopics_title'] ,'</b> - <a href="' . $scripturl . '?board=', $context['current_board'], '.0">', $board_info['name'], '</a>
</div>
</td>
</tr>
<tr class="titlebg">
<th>', $txt['subject'], '</th>
<th>', $txt['OrderStickiedTopics_current'], '</th>
<th>', $txt['OrderStickiedTopics_modify'], '</th>
</tr>';
// Show a list of the topics.
foreach($context['topics'] as $topic)
{
echo '
<tr>
<td align="left" valign="top" class="windowbg"><b><a href="', $scripturl, '?topic=', $topic['id'], '.0">', $topic['title'], '</a></b></td>
<td align="left" valign="top" class="windowbg2" style="text-align:center;">', $topic['value'], '</td>
<td align="center" valign="top" class="windowbg2">
<a href="', $scripturl, '?action=orderstickiedtopics;topic=', $topic['id'],';decrease"><img src="', $settings['images_url'], '/sort_down.gif" alt="', $txt['OrderStickiedTopics_decrease'], '" border="0" /></a>
<a href="', $scripturl, '?action=orderstickiedtopics;topic=', $topic['id'],';increment"><img src="', $settings['images_url'], '/sort_up.gif" alt="', $txt['OrderStickiedTopics_increase'], '" border="0" /></a>
<a href="', $scripturl, '?action=orderstickiedtopics;topic=', $topic['id'],';unsticky">', $txt['OrderStickiedTopics_unsticky'], '</a>
</td>
</tr>';
}
// If we have no topics, then show a short message telling the moderator.
if(empty($context['topics']))
echo '
<tr>
<td colspan="3" valign="top" class="windowbg">', $txt['OrderStickiedTopics_emptylist'], '</td>
</tr>';
// Finish the table.
echo '
<tr class="catbg3">
<td colspan="5" align="left">
<b style="font-size:14px;"><a href="', $scripturl, '?board=', $context['current_board'], '.0">', $txt['OrderStickiedTopics_back'], ' ', $board_info['name'], '</a></b>
</td>
</tr>
</table>';
}
// How about new polls, can the user post those?
if ($context['can_post_poll'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new_poll.gif" alt="' . $txt['smf20'] . '" border="0" />' : $txt['smf20']) . '</a>';
// How about new polls, can the user post those?
if ($context['can_order_stickied_topics'])
$buttonArray[] = '<a href="' . $scripturl . '?action=orderstickiedtopics;board=' . $context['current_board'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new_topic.gif" alt="' . $txt['OrderStickiedTopics_title'] . '" border="0" />' : $txt['OrderStickiedTopics_title']) . '</a>';