[REQUEST]Reply-to-all PM function

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
User avatar
Brf
Support Team Member
Support Team Member
Posts: 51826
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [REQUEST]Reply-to-all PM function

Post by Brf » Sat May 17, 2008 11:02 pm

You friends-list already shows up on the PM page, with "Add" buttons for each name.

BeyondHelp
Registered User
Posts: 82
Joined: Wed Feb 13, 2008 4:29 pm

Re: [REQUEST]Reply-to-all PM function

Post by BeyondHelp » Sun May 18, 2008 2:49 am

Yes, but that is not what I'm asking for, in any way. Thank you though!

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51826
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [REQUEST]Reply-to-all PM function

Post by Brf » Sun May 18, 2008 11:52 am

You were asking for an easy way to send a PM to all of your friends. I was saying that that is already available, as long as you do not mind a single click for each friend.

justin2748
Registered User
Posts: 19
Joined: Wed May 14, 2008 12:05 pm

Re: [REQUEST]Reply-to-all PM function

Post by justin2748 » Sun May 18, 2008 4:43 pm

I think he was asking for an easy way to do the following:

Person A sends a pm to person B, C and D. (not on friends list)

Person B wants to respond and have A, C and D get the response.

Reply to all just like email.

BeyondHelp
Registered User
Posts: 82
Joined: Wed Feb 13, 2008 4:29 pm

Re: [REQUEST]Reply-to-all PM function

Post by BeyondHelp » Sat May 24, 2008 4:29 pm

Yes, that is exactly it! Just a 'reply to all' button. I've kind of got it half figured out, but I'm a bit stumped. Not a coder. :(

BeyondHelp
Registered User
Posts: 82
Joined: Wed Feb 13, 2008 4:29 pm

Re: [REQUEST]Reply-to-all PM function

Post by BeyondHelp » Tue May 27, 2008 6:42 am

^^

BeyondHelp
Registered User
Posts: 82
Joined: Wed Feb 13, 2008 4:29 pm

Re: [REQUEST]Reply-to-all PM function

Post by BeyondHelp » Tue Jun 03, 2008 1:06 am

bump

BeyondHelp
Registered User
Posts: 82
Joined: Wed Feb 13, 2008 4:29 pm

Re: [REQUEST]Reply-to-all PM function

Post by BeyondHelp » Thu Jun 05, 2008 12:11 am

Keepin' on keepin' on.

Magiw
Registered User
Posts: 34
Joined: Sun Mar 21, 2004 6:00 pm

Re: [REQUEST]Reply-to-all PM function

Post by Magiw » Tue Jun 10, 2008 12:39 pm

Had another post for this, but it's not getting the same visibility, I tried making something since no one would reply to my request. I found that the information is readily in the tables to make a "reply all" button for PM's, but I am not sophisticated enough with my php coding yet to put the rest together. Anyone else out there that might have the ability?

justin2748
Registered User
Posts: 19
Joined: Wed May 14, 2008 12:05 pm

Re: [REQUEST]Reply-to-all PM function

Post by justin2748 » Tue Jun 10, 2008 12:44 pm

Can you share what you have already worked on, maybe someone can help getting it to work, without having to "reinvent the wheel"

Magiw
Registered User
Posts: 34
Joined: Sun Mar 21, 2004 6:00 pm

Re: [REQUEST]Reply-to-all PM function

Post by Magiw » Tue Jun 10, 2008 1:15 pm

Heh...you're giving me a lot of credit! :P Here's the little bit I was able to figure out, I hope it's on the right path!

I looked through the tables to see where the user ID's that are sent to in a pm are tracked and found everything in "phpbb_privmsgs" with fields "to_address" & "author_id" or maybe "phpbb_privmsgs_to" and pull all "user_id" and the "author_id" for "msg_id" replying to and drop the current "user_id" sending from?

I think the "phpbb_privmsgs_to" may be easier to work with, but I have no clue how to begin coding in an environment like this. I'm guessing the next step would be to add a function to "functions_privmsgs.php" and a button somewhere.

BeyondHelp
Registered User
Posts: 82
Joined: Wed Feb 13, 2008 4:29 pm

Re: [REQUEST]Reply-to-all PM function

Post by BeyondHelp » Wed Jun 11, 2008 9:14 pm

You got farther than me! :P

joebert
Registered User
Posts: 224
Joined: Mon Jan 24, 2005 5:50 am
Location: Kenneth City, FL USA
Name: Joe

Re: [REQUEST]Reply-to-all PM function

Post by joebert » Thu Jun 12, 2008 3:53 am

I just finished and submitted for validation a MOD to add a moderator-tool that forwards you from a topic to the PM form with the to field pre-filled with everyone who participated in that topic.

I'm pretty sure I understand what you want & have an idea that would be simple to implement, I'll post back here in a few hours after further investigation.

BeyondHelp
Registered User
Posts: 82
Joined: Wed Feb 13, 2008 4:29 pm

Re: [REQUEST]Reply-to-all PM function

Post by BeyondHelp » Thu Jun 12, 2008 7:05 am

Thank you!!!!

joebert
Registered User
Posts: 224
Joined: Mon Jan 24, 2005 5:50 am
Location: Kenneth City, FL USA
Name: Joe

Re: [REQUEST]Reply-to-all PM function

Post by joebert » Thu Jun 12, 2008 7:52 am

I think I saw something about you "not being a coder" in this thread somewhere & I'm not sure what template you're using so I'm not sure how to go about explaining the template part of this.

The scripting section looks like it's going to be simple though, only two small additions to two files, so I'll start with that.

Code: Select all

#
#-----[ OPEN ]---------------------------------------------
#
includes/ucp/ucp_pm_compose.php
#
#-----[ FIND ]---------------------------------------------
# Around line 282

			if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !sizeof($address_list) && !$refresh && !$submit && !$preview)
			{
				$address_list = array('u' => array($post['author_id'] => 'to'));
#
#-----[ AFTER, ADD ]---------------------------------------------
#
				if(request_var('all', false))
				{
					// Split Addresses into users and groups
					preg_match_all('/:?(u|g)_([0-9]+):?/', $post['to_address'], $match);

					foreach ($match[1] as $indx => $type)
					{
						$address_list[$type][(int) $match[2][$indx]] = 'to';
					}
					unset($address_list['u'][$user->data['user_id']]);
				}
#
#-----[ OPEN ]---------------------------------------------
#
includes/ucp/ucp_pm_viewmessage.php
#
#-----[ FIND ]---------------------------------------------
# Around line 210
		'U_EMAIL'			=> $user_info['email'],
		'U_QUOTE'			=> ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '',
		'U_EDIT'			=> (($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '',
		'U_POST_REPLY_PM'	=> ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '',
#
#-----[ AFTER, ADD ]---------------------------------------------
#
		'U_POST_REPLY_ALL'	=> ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS && ($config['allow_mass_pm'] && $auth->acl_get('u_masspm'))) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] . '&all=1' : '',
#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------------------------
#
# EoM
That's all as far as adding the functionality part of it.

As for the template part, it needs a new button.
I copied the "Reply" button to test it with and changed the address the button leads to.

Code: Select all

#
#-----[ OPEN ]---------------------------------------------
#
styles/prosilver/template/ucp_pm_message_header.html
#
#-----[ FIND ]---------------------------------------------
#
		<!-- IF U_POST_REPLY_PM or U_POST_NEW_TOPIC or U_FORWARD_PM -->
		<div class="buttons">
			<!-- IF U_POST_REPLY_PM --><div class="pmreply-icon"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_POST_REPLY_PM}</a></div>
			<!-- ELSEIF U_POST_NEW_TOPIC --><div class="newpm-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n" title="{L_UCP_PM_COMPOSE}"><span></span>{L_UCP_PM_COMPOSE}</a></div><!-- ENDIF -->
			<!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span></span>{L_FORWARD_PM}</a></div><!-- ENDIF -->
		</div>
		<!-- ENDIF -->
#
#-----[ REPLACE WITH ]---------------------------------------------
#
		<!-- IF U_POST_REPLY_PM or U_POST_NEW_TOPIC or U_FORWARD_PM or U_POST_REPLY_ALL -->
		<div class="buttons">
			<!-- IF U_POST_REPLY_PM --><div class="pmreply-icon"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_POST_REPLY_PM}</a></div>
			<!-- ELSEIF U_POST_NEW_TOPIC --><div class="newpm-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n" title="{L_UCP_PM_COMPOSE}"><span></span>{L_UCP_PM_COMPOSE}</a></div><!-- ENDIF -->
			<!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span></span>{L_FORWARD_PM}</a></div><!-- ENDIF -->
			<!-- IF U_POST_REPLY_ALL --><div class="pmreply-icon"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_ALL}"><span></span>{L_POST_REPLY_PM}</a></div><!-- ENDIF -->
		</div>
		<!-- ENDIF -->
I'm kinda hoping you catch on to the difference & know how to proceed from here, though I'm subscribed so if I can help I will. :)

P.S. -- Don't forget to backup your files before trying this out.
Last edited by joebert on Fri Jun 13, 2008 2:19 am, edited 3 times in total.

Locked

Return to “[3.0.x] MOD Requests”