[Aphrodite] PM Quick Reply

Specific instructions on how to apply certain mods to certain styles.

Moderator: Moderators

[Aphrodite] PM Quick Reply

Postby UseLess on Mon Oct 31, 2005 9:42 pm

Greetings,

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}" />&nbsp;<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']; ?>" />&nbsp;<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]
Movie Quote:
It's not the years honey, it's the mileage...

I do not provide any install services for phpBB, Mods or Styles.
Please do not pm me for support/scripting help - you won't get any reply. If you have a question then make a post in the appropriate forum.
User avatar
UseLess
Registered User
Registered User
 
Posts: 6220
Joined: Mon Sep 27, 2004 2:14 am
Location: North East, UK

Postby UseLess on Mon Nov 28, 2005 3:54 pm

Greetings,

Updated to fix the 'Re: Re: Re:' bug... to update just download the updated template file 'xs_privmsgread.tpl' overwriting the one your currently using.
Movie Quote:
It's not the years honey, it's the mileage...

I do not provide any install services for phpBB, Mods or Styles.
Please do not pm me for support/scripting help - you won't get any reply. If you have a question then make a post in the appropriate forum.
User avatar
UseLess
Registered User
Registered User
 
Posts: 6220
Joined: Mon Sep 27, 2004 2:14 am
Location: North East, UK

Postby Case on Tue Jan 31, 2006 6:36 pm

After I add this I get this error...

Image

See where it hasn't filled in the username. It's put it outside the box.

Where have I gone wrong?
[size="9"]The Dope Spot - Urban Music Forum[/size]
User avatar
Case
Registered User
Registered User
 
Posts: 751
Joined: Thu Apr 28, 2005 3:27 pm
Location: North West UK

Postby UseLess on Tue Jan 31, 2006 7:12 pm

Greetings,

Not sure, but the username the PM is from is or should be filled in by this bit;

Code: Select all
value="{MESSAGE_FROM}"


the complete row should be;

Code: Select all
<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}" />&nbsp;<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>
Movie Quote:
It's not the years honey, it's the mileage...

I do not provide any install services for phpBB, Mods or Styles.
Please do not pm me for support/scripting help - you won't get any reply. If you have a question then make a post in the appropriate forum.
User avatar
UseLess
Registered User
Registered User
 
Posts: 6220
Joined: Mon Sep 27, 2004 2:14 am
Location: North East, UK

Postby Bas on Tue Jan 31, 2006 8:50 pm

I've had the problem too with the Totally ERC mod, but I can't remember how I fixed it :(
Bas
Registered User
Registered User
 
Posts: 18
Joined: Sun Feb 06, 2005 2:47 pm

Postby wizzzzzzzz on Thu Feb 02, 2006 8:47 am

[quote user="Bas" post="66047"]I've had the problem too with the Totally ERC mod, but I can't remember how I fixed it :([/quote]

I Have the same problem, i have also Totally ERC.... :(
User avatar
wizzzzzzzz
Registered User
Registered User
 
Posts: 141
Joined: Tue Feb 01, 2005 6:47 am
Location: The Netherlands

Postby brandsrus on Thu Jul 13, 2006 7:06 am

Sorry, I kick this topic because a have found the solution that solves the problem that two people have in this topic

The fix

OPEN privmsg

FIND

Code: Select all
$username_from=


AFTER ADD

Code: Select all
$username_from1 = $privmsg['username_1'];


FIND

Code: Select all
'MESSAGE_FROM' => $username_from,


AFTER ADD

Code: Select all
'MESSAGE_FROM1' => $username_from1,


OPEN templates/ca_aphrodite/xs/xs_privmsgread.tpl

FIND

Code: Select all
   <td class="row2" align="left"><span class="genmed"><input type="text"  class="post" name="username" maxlength="25" size="25" tabindex="1" value="{MESSAGE_FROM}" />&nbsp;<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>


REPLACE WITH

Code: Select all
   <td class="row2" align="left"><span class="genmed"><input type="text"  class="post" name="username" maxlength="25" size="25" tabindex="1" value="{MESSAGE_FROM1}" />&nbsp;<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>


Good luck and it should solves your problem with the username in the Quick Reply box!
brandsrus
Registered User
Registered User
 
Posts: 115
Joined: Fri Jan 06, 2006 6:08 am
Location: Leeuwarden, The Netherlands

Postby wizzzzzzzz on Tue Jul 18, 2006 4:02 pm

[quote user="brandsrus" post="79129"]Sorry, I kick this topic because a have found the solution that solves the problem that two people have in this topic

The fix

OPEN privmsg

FIND

Code: Select all
$username_from=


AFTER ADD

Code: Select all
$username_from1 = $privmsg['username_1'];




[/quote]

Great works now the error is away..

Only this i cant find $username_from= and this one already exist by me $username_from1 = $privmsg['username_1'];

And the search option there stays now blank
User avatar
wizzzzzzzz
Registered User
Registered User
 
Posts: 141
Joined: Tue Feb 01, 2005 6:47 am
Location: The Netherlands

Postby brandsrus on Tue Jul 18, 2006 4:05 pm

As soon is possible i will look at the search option!

Thanks wizzzzzz for your feedback!
brandsrus
Registered User
Registered User
 
Posts: 115
Joined: Fri Jan 06, 2006 6:08 am
Location: Leeuwarden, The Netherlands

Postby brandsrus on Tue Jul 18, 2006 6:28 pm

The lines what i have in privmsg are the follow but i have the Color Groups mod installed and that works perfectly.

Code: Select all
'L_DELETE_MSG' => $lang['Delete_message'],

      'S_PRIVMSGS_ACTION' => append_sid("privmsg.$phpEx?folder=$folder"),
      'S_HIDDEN_FIELDS' => $s_hidden_fields)
   );
   
   $username_from = color_group_colorize_name($privmsg['user_id_1'], true);
   $username_from1 = $privmsg['username_1'];
   $user_id_from = $privmsg['user_id_1'];
   $username_to = color_group_colorize_name($privmsg['user_id_2'], true);
   $user_id_to = $privmsg['user_id_2'];


But in Dutch

Wizzzzzzzz je kunt dit stukje code vergelijken en naar je eigen inzicht aanpassen in je eigen privmsg.php

Sorry moderators but I can explain how in it English!

For the problem with the search i search for a solution :wink:
brandsrus
Registered User
Registered User
 
Posts: 115
Joined: Fri Jan 06, 2006 6:08 am
Location: Leeuwarden, The Netherlands


Return to How to mod some styles

Who is online

Users browsing this forum: No registered users and 2 guests

cron