phpBB2
##############################################################
## :
## : 1.0.0
##
## :
## : 5
##
## : 1
## viewtopic.php
##
## : 2
## print_viewtopic_body.tpl
## print_viewtopic_poll_result.tpl
##
## :
##############################################################
## Back Up
##
##############################################################
#
#---- [ ] ----
#
# : print_viewtopic_body.tpl
# : templates/subSilver/print_viewtopic_body.tpl
#
# : print_viewtopic_poll_result.tpl
# : templates/subSilver/print_viewtopic_poll_result.tpl


#
#---- [ ] ----
#
viewtopic.php


#
#---- [ F ] ----
#
//
// Generate a 'Show posts in previous x days' select box. If the postdays var is POSTed
// then get it's value, find the number of topics with dates newer than it (to properly
// handle pagination) and alter the main query
//
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
$previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);


#
#---- [ ] ----
//
//+ViewTopic Printer-Friendly
/*
//
// Generate a 'Show posts in previous x days' select box. If the postdays var is POSTed
// then get it's value, find the number of topics with dates newer than it (to properly
// handle pagination) and alter the main query
//
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
$previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
*/
//-ViewTopic Printer-Friendly
//


#
#---- [ ] ----
#
$select_post_days = '<select name="postdays">';
for($i = 0; $i < count($previous_days); $i++)
{
$selected = ($post_days == $previous_days[$i]) ? ' selected="selected"' : '';
$select_post_days .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';
}
$select_post_days .= '</select>';


#
#---- [ ] ----
# (You may simply delete these lines)
//
//+ViewTopic Printer-Friendly
/*
$select_post_days = '<select name="postdays">';
for($i = 0; $i < count($previous_days); $i++)
{
$selected = ($post_days == $previous_days[$i]) ? ' selected="selected"' : '';
$select_post_days .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';
}
$select_post_days .= '</select>';
*/
//-ViewTopic Printer-Friendly
//


#
#---- [ ] ----
#
//
// Go ahead and pull all data for this topic


#
#---- [ ] ----
#
//
//+ViewTopic Printer-Friendly
$viewTopicPrinterFriendly = ( isset($_GET['print']) && $_GET['print'] == 'yes' );
if ( $viewTopicPrinterFriendly )
{
$select_post_order = '';
if ( $post_time_order == 'ASC' )
{
$select_post_order .= $lang['Oldest_First'];
$select_post_order .= ' .::. ';
$select_post_order .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&print=yes&postorder=desc") . '">' . $lang['Newest_First'] . '</a>';
}
else
{
$select_post_order .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&print=yes&postorder=asc") . '">' . $lang['Oldest_First'] . '</a>';
$select_post_order .= ' .::. ';
$select_post_order .= $lang['Newest_First'];
}
}
else
{
$select_post_order = '<select name="postorder">';
if ( $post_time_order == 'ASC' )
{
$select_post_order .= '<option value="asc" selected="selected">' . $lang['Oldest_First'] . '</option><option value="desc">' . $lang['Newest_First'] . '</option>';
}
else
{
$select_post_order .= '<option value="asc">' . $lang['Oldest_First'] . '</option><option value="desc" selected="selected">' . $lang['Newest_First'] . '</option>';
}
$select_post_order .= '</select>';

$previous_days = array(
0 => $lang['All_Posts'],
1 => $lang['1_Day'],
7 => $lang['7_Days'],
14 => $lang['2_Weeks'],
30 => $lang['1_Month'],
90 => $lang['3_Months'],
180 => $lang['6_Months'],
364 => $lang['1_Year'],
);
$select_post_days = '<select name="postdays">';
foreach ($previous_days as $k => $v)
{
$select_post_days .= '<option value="' . $k . '"' . ( ($post_days == $k) ? ' selected="selected"' : '' ) . '>' . $v . '</option>';
}
$select_post_days .= '</select>';
}
//-ViewTopic Printer-Friendly
//


#
#---- [ ] ----
#
ORDER BY p.post_time $post_time_order
LIMIT $start, ".$board_config['posts_per_page'];


#
#---- [ ] ----
#
//
//+ViewTopic Printer-Friendly
. ( $viewTopicPrinterFriendly ? '' : " LIMIT " . $start . ", " . $board_config['posts_per_page'] );
//-ViewTopic Printer-Friendly
//


#
#---- [ ] ----
#
$template->set_filenames(array(
'body' => 'viewtopic_body.tpl',
));


#
#---- [ ] ----
#
//
//+ViewTopic Printer-Friendly
if ( $viewTopicPrinterFriendly )
{
$template->set_filenames(array(
'body' => 'print_viewtopic_body.tpl',
));
$gen_simple_header = TRUE;
}
else
{
$template->set_filenames(array(
'body' => 'viewtopic_body.tpl',
));
make_jumpbox('viewforum.'.$phpEx, $forum_id);
}
//-ViewTopic Printer-Friendly
//


#
#---- [ ] ----
#
if ( $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] || $forum_topic_data['topic_status'] == TOPIC_LOCKED )


#
#---- [ ] ----
#
//
//+ViewTopic Printer-Friendly
/*
if ( $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] || $forum_topic_data['topic_status'] == TOPIC_LOCKED )
*/
if ( $viewTopicPrinterFriendly || $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] || $forum_topic_data['topic_status'] == TOPIC_LOCKED )
//-ViewTopic Printer-Friendly
//


#
#---- [ ] ----
#
'pollbox' => 'viewtopic_poll_result.tpl',


#
#---- [ ] ----
#
//
//+ViewTopic Printer-Friendly
//'pollbox' => 'viewtopic_poll_result.tpl',
'pollbox' => $viewTopicPrinterFriendly ? 'print_viewtopic_poll_result.tpl' : 'viewtopic_poll_result.tpl',
//-ViewTopic Printer-Friendly
//

#
#---- [ ] ----
#
//
// Parse smilies


#
#---- [ ] ----
#
//
//+ViewTopic Printer-Friendly
if ( ! $viewTopicPrinterFriendly )
{
//-ViewTopic Printer-Friendly
//

#
#---- [ ] ----
#
//
// Replace naughty words


#
#---- [ ] ----
#
//
//+ViewTopic Printer-Friendly
}
//-ViewTopic Printer-Friendly
//


#
#---- [ ] ----
#
#

/ /