Contact Admin

Change e-mailaddress - Contact Admin

Change e-mailaddress

by johnths2 » Mon Sep 26, 2016 5:07 pm

How can i change the e-mail address where the contact form is send to.
Now it's not send to the e-mailaddress of my forum but to the address of the administrator/owner of the forum. I switched "Send to Owner" off but that makes no difference.
johnths2
Registered User
Posts: 5
Joined: Thu Sep 01, 2016 1:06 pm
Location: Hellevoetsluis, NL
Name: John
Contact:

Re: Change e-mailaddress

by RMcGirr83 » Tue Sep 27, 2016 10:54 am

It sends the emails to all administrators of the forum.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Change e-mailaddress

by johnths2 » Wed Sep 28, 2016 9:16 am

Can i change it to the forums contact email address?
johnths2
Registered User
Posts: 5
Joined: Thu Sep 01, 2016 1:06 pm
Location: Hellevoetsluis, NL
Name: John
Contact:

Re: Change e-mailaddress

by RMcGirr83 » Wed Sep 28, 2016 10:35 am

open
rmcgirr83/contactadmin/controller/main_controller.php

find

Code: Select all

$contact_users = $this->contactadmin->admin_array();


replace with

Code: Select all

$contact_users = array($this->config['board_contact']);
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Change e-mailaddress

by johnths2 » Thu Sep 29, 2016 1:35 pm

Thanks, Rich!
johnths2
Registered User
Posts: 5
Joined: Thu Sep 01, 2016 1:06 pm
Location: Hellevoetsluis, NL
Name: John
Contact:

Re: Change e-mailaddress

by johnths2 » Thu Sep 29, 2016 2:11 pm

Hoi Rich,

I replaced the code and tested it.
No email was send to the Boards emailaddress.
I only get the following error: The "./language/f/email" directory does not exist.
johnths2
Registered User
Posts: 5
Joined: Thu Sep 01, 2016 1:06 pm
Location: Hellevoetsluis, NL
Name: John
Contact:

Re: Change e-mailaddress

by RMcGirr83 » Fri Sep 30, 2016 1:12 am

After looking further at it, won't be possible without changing a lot of the code.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Change e-mailaddress

by johnths2 » Sat Oct 01, 2016 6:02 am

Oké Rich,

If it's to much work than i have to look for another solution.

Thanks anyway and have a nice weekend!
johnths2
Registered User
Posts: 5
Joined: Thu Sep 01, 2016 1:06 pm
Location: Hellevoetsluis, NL
Name: John
Contact:

Re: Change e-mailaddress

by boardman » Mon Apr 24, 2017 8:38 pm

Rich, can you possibly document somewhere in clear terms WHO actually receives a mail via the contact form? Because...

- Sending the message to all admins (!) is counter-intuitive imho. I would have believed the message goes to the board contact (isn't that what the default contact form does as well?).
- Your information that the form sends mail to all adminstrators is actually incorrect - apparently it sends out mail to all administrators AND founders. That's a difference, and it is important to know.
- I would find it very useful if the extension could be configured (not tweaked) to just send the message to the board contact. I would prefer this as the default (see above), but at least having it as an option would be great, not least because the mere existence of this option would help everyone understand what the form does or doesn't do.

Thanks for all the work you put into this plugin!
boardman
Registered User
Posts: 47
Joined: Wed May 06, 2015 10:08 pm
Contact:

Re: Change e-mailaddress

by RMcGirr83 » Mon Apr 24, 2017 8:53 pm

It will send to all admins OR you can specify that it only go to board founders. If a founder is also an admin then they will always get an email.

I will consider being able to select which way to send the email.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Change e-mailaddress

by boardman » Mon Apr 24, 2017 8:57 pm

Turns out a founder will also get an email if he isn't an admin. Learned that the hard way. ;)

But just to make sure: after depriving everyone except myself of founder status and setting "Contact via just the Board Founder" to YES, I will be the only one getting these messages, correct?
boardman
Registered User
Posts: 47
Joined: Wed May 06, 2015 10:08 pm
Contact:

Re: Change e-mailaddress

by RMcGirr83 » Mon Apr 24, 2017 9:00 pm

boardman wrote:Turns out a founder will also get an email if he isn't an admin. Learned that the hard way. ;)
by nature founders have admin permissions so yes.

Code: Select all

		// Only founders...maybe
		if ($this->config['contactadmin_founder_only'])
		{
			$sql_where .= ' WHERE user_type = ' . USER_FOUNDER;
		}
		else
		{
			// Grab an array of user_id's with admin permissions
			$admin_ary = $this->auth->acl_get_list(false, 'a_', false);
			$admin_ary = (!empty($admin_ary[0]['a_'])) ? $admin_ary[0]['a_'] : array();

			if ($this->config['contactadmin_method'] == contact_constants::CONTACT_METHOD_EMAIL && sizeof($admin_ary))
			{
				$sql_where .= ' WHERE ' . $this->db->sql_in_set('user_id', $admin_ary) . ' AND user_allow_viewemail = 1';
			}
			else if ($this->config['contactadmin_method'] == contact_constants::CONTACT_METHOD_PM && sizeof($admin_ary))
			{
				$sql_where .= ' WHERE ' . $this->db->sql_in_set('user_id', $admin_ary) . ' AND user_allow_pm = 1';
			}
		}
But just to make sure: after depriving everyone except myself of founder status and setting "Contact via just the Board Founder" to YES, I will be the only one getting these messages, correct?
Per the code above, yes.

[EDIT] forgot founders automatically have admin permissions.
Last edited by RMcGirr83 on Mon Apr 24, 2017 9:12 pm
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Change e-mailaddress

by boardman » Mon Apr 24, 2017 9:08 pm

I am 100% positive. Perhaps, per above code, when you query for admin permissions, phpBB returns founders as well?

https://wiki.phpbb.com/Founder
boardman
Registered User
Posts: 47
Joined: Wed May 06, 2015 10:08 pm
Contact:

Re: Change e-mailaddress

by RMcGirr83 » Mon Apr 24, 2017 9:10 pm

Well yeah, they do have admin permissions (like being able to access the ACP) so sure they are included as well so I will have to recant what I said earlier. Mea culpa.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Change e-mailaddress

by boardman » Mon Apr 24, 2017 9:14 pm

Ok. Thanks for the quick replies and clarifications - much appreciated.
boardman
Registered User
Posts: 47
Joined: Wed May 06, 2015 10:08 pm
Contact: