News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

Reply to all in PM's

Started by Douglas, April 14, 2004, 11:31:16 PM

Previous topic - Next topic

Douglas

With the advancement of the PM features, and the easy ability to send the same PM to multiple people, I would like to see the ability to reply to all.

If someone's suggested this previously, my apologies.  I could definitely use it (ask the Project Managers, I just sent them a PM tonight, and had to search for each name individually in order to do so).
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* HBCUAC.org Web Developer, the NAIA's only HBCU Athletic Conference
* Former Sports Photographer and Media Personality and Former CFB Historian
* Tech Admin for one 2.9M+ post and one 11.6M+ post sites. Used to own a 1M+ post site.
* WordPress Developer (Junkie / Guru / Maven / whatever)

Homie


Anguz

I don't understand how the "reply to all" works, I'm sorry if this is supposed to be common knowledge (^^;)
Cristián Lávaque http://cristianlavaque.com

Ben_S

Once would assume the same way as in an email thats sent to multiple recipients, when you hit reply to all, it replies to the sender and all the other people in the too field. Currently theres only an option to reply to sender.
Liverpool FC Forum with 14 million+ posts.

Anguz

ah ok... thanks for the explanation... I have never used that option in emails :P
Cristián Lávaque http://cristianlavaque.com

Oldiesmann

Reply To All is definitely handy. Another handy feature might be to be able to defiine "PM Lists", similar to a mailing list where you can group names under a common heading, and then just send it to that "list" and have it sent to everyone that you put on that list...
Michael Eshom
Christian Metal Fans

[Unknown]


Jack.R.Abbit™

Just now I was trying to reply to sender and other recipients... and I thought, "A reply all feature would be handy"  I did a little search and found its already been asked for.  how about that.  :)

rhizome

Just wondering if this feature of "reply to all" is still being planned to be implemented

thanks

rhizome

Is this feature already in 1.1?
May tempt me to sign up for charter membership  ;)

dschwab9


Ben_S

I beleive the feature exists, there just isn't a link in the template currently.
Liverpool FC Forum with 14 million+ posts.

rhizome

Quote from: dschwab9 on May 22, 2005, 03:05:38 PM
It is not in 1.1
That's a real shame  :'(
It would be a really useful feature as it mimics regular email


Quote from: Ben_S on May 22, 2005, 05:00:35 PM
I beleive the feature exists, there just isn't a link in the template currently.
I guess some kind soul couldn't write a hack/script?
I'm finding myself saying "I really need this feature"  :D

rhizome

Sorry, bumping this

Any chance it will go in for the final 1.1?

DaveHanson


jdougher


Kraig K.

Here here I say for this feature.

I also like the idea of a "mailing list".

I wonder how hard it would be to code a mod for this.

Zenigata

Quote from: rhizome on May 23, 2005, 12:28:35 PM

I guess some kind soul couldn't write a hack/script?
I'm finding myself saying "I really need this feature"  :D

Yes, a mod would be nice.

DanielZKlein

Bit disappointed not to see more than a "might happen, sounds nice"; aren't there developers around reading these boards? I mean, this sounds like a must-have feature, and it's been requested quite a while ago.

(this was a verbose bump)

Kraig K.

I just started looking through the code for 1.0.5 and in InstantMessage.php there is a section about replying to all.  Now I'm not familiar with php so it may be a struggle for me to mod it but wanted to point it out for someone more familiar.

So maybe it's close to being implemented.

Kraig K.

OK, I just found out that it works.  When you click on the reply button, u= someuserID, but if u=all then guess what.  8)

Now just to figure out how to get the reply to all button on the template...

dschwab9

If you find this:

<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'];

and add something like this after it:

<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=all'">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply_all.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'];

That should do what you want.   You'd need an image called im_reply_all.gif

Anguz

I'm moving this to Tips & Tricks.
Cristián Lávaque http://cristianlavaque.com

Zenigata

Quote from: Kraig K. on September 28, 2005, 05:29:22 PM
OK, I just found out that it works.  When you click on the reply button, u= someuserID, but if u=all then guess what.  8)

Now just to figure out how to get the reply to all button on the template...

What we need to change in code? Please show us. :)

Thanks

1MileCrash

nothing. It already works. You just need to add the reply to all button in the template, as a link, which is stated in dschwab9's post.
The only thing php can't do is tell you how much milk is left in the fridge.



Zenigata

That's great!

Does it works with 1.0.5 and 1.1Rc1?


Kraig K.

Quote from: Zenigata on September 28, 2005, 08:10:00 PM
That's great!

Does it works with 1.0.5 and 1.1Rc1?

I tried it with 1.0.5  I haven't modified the code yet to add the reply all button but the code to make it work is already there.

Thanks for the code dschwab9, I was getting there but didn't have time to finish it up yesterday.

Kraig K.

#27
It seems there was a typo in dschwab9's code, so here's what you need to do.  In InstantMessage.template.php

find:
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'outbox' ? '' : $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';reply;u=', $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'];

and replace with:
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'outbox' ? '' : $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';reply;u=', $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'],'
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';u=all">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply_all.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'];


Make sure to have an image named im_reply_all.gif in your theme's images folder.

It works sweet!!

Kraig K.

#28
I just changed it a bit.  I figured since you have multiple recipients, quoting the message by default might be good.  So if you want that, change the third line to this:

<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';quote;u=all">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply_all.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'];

Kraig K.

I edited my code changes because I was getting hundreds of forums errors, they were transparent to the user though.

So if you used the code before the edits, you probably should change it, just check your error log.  ;)

kriskd

Quote from: Kraig K. on September 30, 2005, 09:25:14 AM
It seems there was a typo in dschwab9's code, so here's what you need to do.  In InstantMessage.template.php

find:
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'outbox' ? '' : $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';reply;u=', $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'];

and replace with:
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'outbox' ? '' : $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';reply;u=', $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'],'
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';u=all">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply_all.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'];


Make sure to have an image named im_reply_all.gif in your theme's images folder.

It works sweet!!
Quote from: Kraig K. on September 30, 2005, 01:33:21 PM
I just changed it a bit.  I figured since you have multiple recipients, quoting the message by default might be good.  So if you want that, change the third line to this:

<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';quote;u=all">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply_all.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'];

Is this still valid for SMF 1.1 RC2?  I couldn't find an InstantMessage.template.php, but I assume I should be editing PersonalMessage.template.php.  And then I could find the exact two lines that need to be searched and replaced.

Please let me know... my members are asking for this!
SMF 2.0.2

kriskd

SMF 2.0.2

jpark

i would also like to know how to fix this for RC2

jacortina

It's already there in RC2 (at least in my installation of it).

The file is now PersonalMessage.template.php. And at around line 457:


if ($message['number_recipients'] > 1 && (!empty($settings['use_buttons']) || !$settings['use_image_buttons']))
echo '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $reply_all_button, '</a>', $context['menu_separator'];



kriskd

Based on the info from jacortina, I made the changes, but don't see any changes on my board.  Just to verify, PersonalMessage.template.php is part of the default template, but I want this to appear in a version of the classic template.  Is there anything I need to change in the classic template?
SMF 2.0.2

jacortina

I pointed out that the template already HAD a reply to all built in for version 1.1RC2:







The 'reply to all' button and text should appear only for messages with # of recipients greater than one. I don't believe the Classic theme has it's own PersonalMessage.template.php, so it should use the one from the 'default' directory (which has the code I noted already in it).

kriskd

I'm running a 1.1RC2 message board and a 1.1RC3 message board and not seeing it on either for PMs that were sent to more than one user.  However, I'm not using the default theme either.  Do I need to edit any files in my classic theme?
SMF 2.0.2

jacortina

If there's a PersonalMessage.template.php in the folder for your theme, look in there. Otherwise, look in the default folder. Look for this:

// Were than more than one recipient you can reply to? (Only in the "button style", or text)
if ($message['number_recipients'] > 1 && (!empty($settings['use_buttons']) || !$settings['use_image_buttons']))
echo '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $reply_all_button, '</a>', $context['menu_separator'];
echo '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'outbox' ? '' : $message['member']['id'], '">', $quote_button, '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button, '</a> ', $context['menu_separator'];


The 'if' statement is for the reply-to-all. The next two lines output the 'Quote' and 'Reply' (and I assume those show up just fine.

If all that's in place, then I'd say it has to do with the settings that are being checked there (for links being set to button/text style).

kriskd

PersonalMessage.template.php is only in the default folder and this is how mine looks:


// Were than more than one recipient you can reply to? (Only in the "button style", or text)
if ($message['number_recipients'] > 1 && (!empty($settings['use_buttons']) || !$settings['use_image_buttons']))
echo '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'outbox' ? '' : $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';reply;u=', $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'],'
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';u=all">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply_all.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'];
echo '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'outbox' ? '' : $message['member']['id'], '">', $quote_button, '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button, '</a> ', $context['menu_separator'];
}


And I have im_reply_all.gif in images/english in both the default theme and my classic theme and still nothing is showing up. 

This really isn't the most urgent issue in the world to me or anything, I'm more interested in what I could be doing wrong!  ;D
SMF 2.0.2

jacortina

If your Quote and Reply buttons only show up once, then you're not 'passing' the test in the 'if' statement.

First, find these llines (in PersonalMessage.template.php):
$quote_button = create_button('quote.gif', 145, 'smf240', 'align="middle"');
$reply_button = create_button('im_reply.gif', 146, 146, 'align="middle"');


And make sure there's a line in that area like:
$reply_all_button = create_button('im_reply_all.gif', 'Reply to All', 'Reply to All', 'align="middle"');


Then, change these lines:
if ($message['number_recipients'] > 1 && (!empty($settings['use_buttons']) || !$settings['use_image_buttons']))
echo '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'outbox' ? '' : $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';reply;u=', $message['member']['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'],'
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], ';pmsg=', $message['id'], ';u=all">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_reply_all.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a> ', $context['menu_separator'];
echo '


To:

// if ($message['number_recipients'] > 1 && (!empty($settings['use_buttons']) || !$settings['use_image_buttons']))
if ($message['number_recipients'] > 1)
echo '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $reply_all_button, '</a>', $context['menu_separator'];
echo '

kriskd

Thanks!  That worked great on my RC2 forum!  Will have to attempt it on my RC3 forum.
SMF 2.0.2

kriskd

Ugh... I'm not getting this to work on my RC3 forum because I can't find the exact text to replace.  How much has PersonalMessage.template.php changed in this version?  I ask because I can not even find $txt[145] or $txt[146] when I search through the template file.
SMF 2.0.2

jacortina

No, you won't find those exact strings. Look at the message above. They are referred to only by the number in the lines which create the buttons.

Search for:

$quote_button = create_button('quote.gif', 145, 'smf240', 'align="middle"');
$reply_button = create_button('im_reply.gif', 146, 146, 'align="middle"');

kriskd

Thanks for your patience with my jacortina....

Upon further investigation, I do have the following in place as noted in Reply #37.


// Were than more than one recipient you can reply to? (Only in the "button style", or text)
if ($message['number_recipients'] > 1 && (!empty($settings['use_buttons']) || !$settings['use_image_buttons']))
echo '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all">', $reply_all_button, '</a>', $context['menu_separator'];
echo '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'outbox' ? '' : $message['member']['id'], '">', $quote_button, '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button, '</a> ', $context['menu_separator'];


You indicated that if that is in place, it should work and maybe I don't have a button placed correctly?  But, I do have my button image (im_reply_all.gif) in the images/english folder of my template.

I also have these lines:


$quote_button = create_button('quote.gif', 145, 'smf240', 'align="middle"');
$reply_button = create_button('im_reply.gif', 146, 146, 'align="middle"');
$reply_all_button = create_button('im_reply_all.gif', 'reply_to_all', 'reply_to_all', 'align="middle"');
$forward_button = create_button('quote.gif', 145, 145, 'align="middle"');
$delete_button = create_button('delete.gif', 154, 31, 'align="middle"');


Any other thoughts?
SMF 2.0.2

jacortina

Right. And it was something in your settings (or combination of settings) which was making it avoid that 'if':

if ($message['number_recipients'] > 1 && (!empty($settings['use_buttons']) || !$settings['use_image_buttons']))


We worked around that by ignoring the settings and ONLY checking for multiple recipients:
// if ($message['number_recipients'] > 1 && (!empty($settings['use_buttons']) || !$settings['use_image_buttons']))
if ($message['number_recipients'] > 1)


kriskd

Thanks again, jacortina, it works like a dream!  Maybe one of these days I'll figure out how to pull this all together myself without having to be hand held through every step!
SMF 2.0.2

Janet

I'm sorry for sounding ignorant but I've been struggling with the tips posted above for like an hour and I still can't find the PersonalMessage.template.php. I use 1.1 RC3 and the Babylon theme. You say I have to look in the "default" folder but (shame, shame) I don't know where to find that! I know how the templates work and how to edit them (I changed the layout of the forum myself YAY!) but this is new to me. I would really REALLY love this function on my board -- would someone be kind enough to help me please?  :-[


jacortina

It should be in <forum>/Themes/default/

Unless you have one in <forum>/Themes/Babylon/

Janet

I feel oh so stupid but I can't access the default template. Could someone make me a screenshot please so I know where to look? I can't find it and if I can't stand anything it's when I can't solve a problem. Please? I'm fairly new to this but I really want to learn  :-[

Advertisement: