The following will add a quick reply option to the PM read message, which is handy...
- Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
templates/ca_aphrodite/xs.cfg
#
#-----[ FIND ]------------------------------------------
#
$replace['jumpbox.tpl'] = 'xs/jumpbox.tpl';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$replace['privmsgs_read_body.tpl'] = 'xs/xs_privmsgread.tpl';
#
#-----[ OPEN ]------------------------------------------
#
templates/ca_aphrodite/privmsgs_read_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td align="left">{REPLY_PM_IMG}
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
# Note: There should be a space at the beginning of the line
<!-- BEGIN xs_quick_reply -->{CA_QUICK_REPLY_BUTTON}<!-- END xs_quick_reply -->
#
#-----[ FIND ]------------------------------------------
#
</tr>
</table>
</form>
#
#-----[ AFTER, ADD ]------------------------------------------
#
{CA_QUICK_REPLY_FORM}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Now download the following file and save it in 'templates/ca_aphrodite/xs/' with the filename specified in the download, so you should then have 'templates/ca_aphrodite/xs/xs_privmsgread.tpl'.
[code filename="xs_privmsgread.tpl"]<?php
// check if quick reply is enabled
global $userdata, $board_config, $lang, $phpEx;
$can_reply = $userdata['session_logged_in'] ? true : false;
if($can_reply)
{
$this->assign_block_vars('xs_quick_reply', array());
}
// show quick reply
if($can_reply)
{
$this->vars['POST_SUBJECT_REPLY'] = ( ( !preg_match('/^Re:/', $this->vars['POST_SUBJECT']) ) ? 'Re: ' : '' ) . $this->vars['POST_SUBJECT'];
// 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="{S_PRIVMSGS_ACTION}" 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"><span class="gen"><b>{L_USERNAME}</b></span></td>
<td class="row2" align="left"><span class="genmed"><input type="text" class="post" name="username" maxlength="25" size="25" tabindex="1" value="{MESSAGE_FROM}" /> <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'height=200,width=400,resizable=yes');return false;" /></span></td>
</tr>
<tr>
<td class="row1" width="200" nowrap="nowrap" align="left"><span class="gen"><b><?php echo $lang['Subject']; ?>:</b></span></td>
<td class="row2" width="100%" align="left"><input type="text" name="subject" size="45" maxlength="60" style="width:98%" tabindex="2" class="post" value="{POST_SUBJECT_REPLY}" /></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></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 } ?>
</span></td>
</tr>
<tr>
<td class="catBottom" colspan="2"><input type="hidden" name="sid" value="<?php echo $userdata['session_id']; ?>" /><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="mainoption" 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 privmsgs_read_body.tpl -->[/code]




