Moderator: Moderators







<?php
// check if quick reply is enabled
global $userdata, $board_config, $topic_id, $is_auth, $forum_topic_data, $lang, $phpEx;
$can_reply = $userdata['session_logged_in'] ? true : false;
if($can_reply)
{
$is_auth_type = 'auth_reply';
if(!$is_auth[$is_auth_type])
{
$can_reply = false;
}
elseif ( ($forum_topic_data['forum_status'] == FORUM_LOCKED || $forum_topic_data['topic_status'] == TOPIC_LOCKED) && !$is_auth['auth_mod'] )
{
$can_reply = false;
}
}
if($can_reply)
{
$this->assign_block_vars('xs_quick_reply', array());
}
$prev_id = false;
$postrow_count = ( isset($this->_tpldata['postrow.']) ) ? sizeof($this->_tpldata['postrow.']) : 0;
for ($postrow_i = 0; $postrow_i < $postrow_count; $postrow_i++)
{
$postrow_item = &$this->_tpldata['postrow.'][$postrow_i];
// set profile link and search button
if(!empty($postrow_item['PROFILE']) && strpos($postrow_item['POSTER_NAME'], '<') === false)
{
$postrow_item['SEARCH_IMG2'] = str_replace('%s', htmlspecialchars($postrow_item['POSTER_NAME']), $postrow_item['SEARCH_IMG']);
$search = array($lang['Read_profile'], '<a ');
$replace = array($postrow_item['POSTER_NAME'], '<a class="post-name" ');
$postrow_item['POSTER_NAME'] = str_replace($search, $replace, $postrow_item['PROFILE']);
}
// check for new post
$new_post = strpos($postrow_item['MINI_POST_IMG'], '_new') > 0 ? true : false;
$postrow_item['XS_NEW'] = $new_post ? '-new' : '';
// fix text
$search = array(' ', "\t", "\n ");
$replace = array(' ', ' ', "\n ");
$postrow_item['MESSAGE'] = str_replace($search, $replace, $postrow_item['MESSAGE']);
// set prev/next post links
$next_id = $postrow_i == ($postrow_count - 1) ? false : $this->_tpldata['postrow.'][$postrow_i + 1]['U_POST_ID'];
if($next_id !== false || $prev_id !== false)
{
$str = '<div style="width: 10px; height: 9px; float: left; margin-right: 3px; margin-top: 1px;">';
if($prev_id)
{
$str .= '<a href="#' . $prev_id . '"><img src="templates/ca_aphrodite/images/post_prev.gif" width="9" height="5" alt="" /></a>';
}
else
{
$str .= '<img src="templates/ca_aphrodite/images/spacer.gif" width="9" height="5" alt="" />';
}
$str .= '<br />';
if($next_id)
{
$str .= '<a href="#' . $next_id . '"><img src="templates/ca_aphrodite/images/post_next.gif" width="9" height="5" alt="" /></a>';
}
else
{
$str .= '<img src="templates/ca_aphrodite/images/spacer.gif" width="9" height="5" alt="" />';
}
$str .= '</div>';
$postrow_item['ARROWS'] = $str;
}
$prev_id = $postrow_item['U_POST_ID'];
}
// show quick reply
if($can_reply)
{
// quick reply button
global $images;
$this->vars['CA_QUICK_REPLY_BUTTON'] = '<a href="javascript:ShowHide(\'quick_reply\',\'quick_reply2\');"><img src="' . $images['quick_reply'] . '" alt="' . $lang['Post_a_reply'] . '" /></a>';
// quick reply form
ob_start();
?>
<div id="quick_reply" style="display: none; position: relative; "><form action="<?php echo append_sid('posting.'.$phpEx); ?>" method="post" name="post" style="display: inline;">{S_HIDDEN_FIELDS}<table class="forumline" width="100%" cellspacing="0">
<tr>
<td class="row-header" colspan="2"><span><?php echo $lang['Post_a_reply']; ?></span></td>
</tr>
<tr>
<td class="row1" align="left" width="200" nowrap="nowrap"><span class="gen"><b><?php echo $lang['Subject']; ?>:</b></span></td>
<td class="row2" align="left" width="100%"><input type="text" name="subject" size="45" maxlength="60" style="width:98%" tabindex="2" class="post" value="" /></td>
</tr>
<tr>
<td class="row1" align="left" width="200" nowrap="nowrap"><span class="gen"><b><?php echo $lang['Message_body']; ?>:<br /><img src="{T_TEMPLATE_PATH}/images/spacer.gif" width="200" height="1" border="0" alt="" /></b></span></td>
<td class="row2" align="left" width="100%"><textarea name="message" rows="15" cols="35" style="width:98%" tabindex="3" class="post"></textarea><br />
<img src="templates/ca_aphrodite/images/icon_reply.gif" alt="" /> <a href="javascript:void(0);" onclick="window.open('http://www.postimage.org/index.php?mode=phpbb&tpl=' + 'ca_aphrodite' + '&forumurl=' + escape(document.location.href), '_imagehost', 'resizable=yes,width=500,height=400');return false;">Add image to post</a></td>
</tr>
<tr>
<td class="row1" align="left" valign="top" nowrap="nowrap"><span class="gen"><b><?php echo $lang['Options']; ?>:</b></span></td>
<td class="row2" align="left"><span class="genmed">
<?php
$user_sig = ( $userdata['user_sig'] != '' && $board_config['allow_sig'] ) ? $userdata['user_sig'] : '';
$html_on = $board_config['allow_html'] ? $userdata['user_allowhtml'] : 1;
$bbcode_on = $board_config['allow_bbcode'] ? $userdata['user_allowbbcode'] : 0;
$smilies_on = $board_config['allow_smilies'] ? $userdata['user_allowsmile'] : 0;
?>
<?php if($board_config['allow_html']) { ?>
<label><input type="checkbox" name="disable_html" <?php echo ($html_on ? '' : 'checked="checked"'); ?> /> <span class="genmed"><?php echo $lang['Disable_HTML_post']; ?></span></label><br />
<?php } else { ?><input type="hidden" name="disable_html" value="checked" /><?php } ?>
<?php if($board_config['allow_bbcode']) { ?>
<label><input type="checkbox" name="disable_bbcode" <?php echo ($bbcode_on ? '' : 'checked="checked"'); ?> /> <span class="genmed"><?php echo $lang['Disable_BBCode_post']; ?></span></label><br />
<?php } else { ?><input type="hidden" name="disable_bbcode" value="checked" /><?php } ?>
<?php if($board_config['allow_smilies']) { ?>
<label><input type="checkbox" name="disable_smilies" <?php echo ($smilies_on ? '' : 'checked="checked"'); ?> /> <span class="genmed"><?php echo $lang['Disable_Smilies_post']; ?></span></label><br />
<?php } else { ?><input type="hidden" name="disable_smilies" value="checked" /><?php } ?>
<?php if($user_sig) { ?>
<label><input type="checkbox" name="attach_sig" <?php echo ($userdata['user_attachsig'] ? 'checked="checked"' : ''); ?> /> <span class="genmed"><?php echo $lang['Attach_signature']; ?></span></label><br />
<?php } else { ?><input type="hidden" name="attach_sig" value="" /><?php } ?>
<label><input type="checkbox" name="notify" <?php echo ($userdata['user_notify'] ? 'checked="checked"' : ''); ?> /> <span class="genmed"><?php echo $lang['Notify']; ?></span></label><br />
</span></td>
</tr>
<tr>
<td class="catBottom" colspan="2"> <input type="hidden" name="mode" value="reply" /><input type="hidden" name="t" value="<?php echo $topic_id; ?>" /><input type="submit" accesskey="s" tabindex="6" name="post" class="mainoption" value="<?php echo $lang['Submit']; ?>" /> <input type="submit" tabindex="5" name="preview" class="liteoption" value="<?php echo $lang['Preview']; ?>" /></td>
</tr>
</table></form></div>
<?php
$str = ob_get_contents();
ob_end_clean();
$this->vars['CA_QUICK_REPLY_FORM'] = $str;
}
?>
<!-- INCLUDE viewtopic_body.tpl -->


<div id="quick_reply" style="display: none; position: relative; "></div>

Users browsing this forum: No registered users and 2 guests