[Beta] Contact Board Administration 0.1.4

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
Locked
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [Beta] Contact Board Administration 0.1.4

Post by saaiberke »

Thank you very much Ashok. :) That worked great!

I'm nearly there, now i changed the mailaddress to send to in that file but the mail is being sent 3 times (because there are 3 admins), do you know how to avoid this? I only needs it to be send out once :)

Grtz,

Nic
DubCA
Registered User
Posts: 77
Joined: Thu Sep 27, 2007 8:32 am

Re: [Beta] Contact Board Administration 0.1.4

Post by DubCA »

Might be a dumb question, but how do I enable the contact form? I can't figure it out.
Ashok
Registered User
Posts: 38
Joined: Wed Jan 02, 2008 9:07 pm

Re: [Beta] Contact Board Administration 0.1.4

Post by Ashok »

DubCA wrote:Might be a dumb question, but how do I enable the contact form? I can't figure it out.
It is a little bit tricky.
  • Go to the ACP and click the System tab.
  • Then, on the left, locate MODULE MANAGEMENT and click Administration Control Panel.
  • Look for "Add Module" button on the right. You will also see a drop-down list to the left of the Add Module button. From the drop-down list, look for "Board Management [acp_board]" and within this heading, "Contact board administration". Choose it, and click "Add Module".
  • This action will cause "Contact board administration" to appear in the list of modules. It will be shown with a lock, meaning disabled. Click the "Enable" link to enable the module.
  • You should now see a separate tab at the top level for "CONTACT BOARD ADMINISTRATION". If not refresh your page.
  • Go into that tab, and make the settings you need.
That should work.
Ashok
Registered User
Posts: 38
Joined: Wed Jan 02, 2008 9:07 pm

Re: [Beta] Contact Board Administration 0.1.4

Post by Ashok »

saaiberke wrote:Thank you very much Ashok. :) That worked great!

I'm nearly there, now i changed the mailaddress to send to in that file but the mail is being sent 3 times (because there are 3 admins), do you know how to avoid this? I only needs it to be send out once :)
You are welcome. I have only one admin on my board, so I do not have that issue. But I think this might work:

Look for:

Code: Select all

           // Loop through our list of users
            for ($i = 0, $size = sizeof($contact_users); $i < $size; $i++)
Replace with:

Code: Select all

           // Loop through our list of users
            for ($i = 0, $size = sizeof($contact_users); $i < 1; $i++)
Of course, this means it will send the email to the first admin it finds in the list of admins.
DubCA
Registered User
Posts: 77
Joined: Thu Sep 27, 2007 8:32 am

Re: [Beta] Contact Board Administration 0.1.4

Post by DubCA »

Ashok wrote:
DubCA wrote:Might be a dumb question, but how do I enable the contact form? I can't figure it out.
It is a little bit tricky.
  • Go to the ACP and click the System tab.
  • Then, on the left, locate MODULE MANAGEMENT and click Administration Control Panel.
  • Look for "Add Module" button on the right. You will also see a drop-down list to the left of the Add Module button. From the drop-down list, look for "Board Management [acp_board]" and within this heading, "Contact board administration". Choose it, and click "Add Module".
  • This action will cause "Contact board administration" to appear in the list of modules. It will be shown with a lock, meaning disabled. Click the "Enable" link to enable the module.
  • You should now see a separate tab at the top level for "CONTACT BOARD ADMINISTRATION". If not refresh your page.
  • Go into that tab, and make the settings you need.
That should work.
Thank you!
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [Beta] Contact Board Administration 0.1.4

Post by saaiberke »

Ashok wrote:
Of course, this means it will send the email to the first admin it finds in the list of admins.
As I changed the to: address this is no problem :) It is working now.

Thank you for your help!

Grtz,


Nic
Frold
Registered User
Posts: 447
Joined: Sat Nov 02, 2002 8:19 am

Re: [Beta] Contact Board Administration 0.1.4

Post by Frold »

Howto manually hack so it only sent out to a email I put into the script like...

Again Im site owner but I have more then one admin. When ppl use the contact form they should only sent mail to me, the sitewoner...
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [Beta] Contact Board Administration 0.1.4

Post by saaiberke »

In contact.php

search for

Code: Select all

					$messenger->to($contact_users[$i]['user_email'], $contact_users[$i]['username']);
change to

Code: Select all

					$messenger->to("youremailaddress@here");
Apply also the change abover these last post to avoid the mail being sent several times. :)

That did the trick on my board.

Grtz,

Nic
Frold
Registered User
Posts: 447
Joined: Sat Nov 02, 2002 8:19 am

Re: [Beta] Contact Board Administration 0.1.4

Post by Frold »

Ashok wrote:
saaiberke wrote:Thank you very much Ashok. :) That worked great!

I'm nearly there, now i changed the mailaddress to send to in that file but the mail is being sent 3 times (because there are 3 admins), do you know how to avoid this? I only needs it to be send out once :)
You are welcome. I have only one admin on my board, so I do not have that issue. But I think this might work:

Look for:

Code: Select all

           // Loop through our list of users
            for ($i = 0, $size = sizeof($contact_users); $i < $size; $i++)
Replace with:

Code: Select all

           // Loop through our list of users
            for ($i = 0, $size = sizeof($contact_users); $i < 1; $i++)
Of course, this means it will send the email to the first admin it finds in the list of admins.
The text is there twice - do I need to replace it both places?
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [Beta] Contact Board Administration 0.1.4

Post by saaiberke »

No only after

Code: Select all

			case CONTACT_METHOD_EMAIL:
Nic
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [Beta] Contact Board Administration 0.1.4

Post by saaiberke »

Ashok wrote:
Add the following on a new line after the last of the above lines:

Code: Select all

                    $messenger->from($contact_email);
                    $messenger->replyto($contact_email);
This will set both the FROM and REPLYTO email address to be the email address of the person trying to contact you via the form. If a registered user, their email address from their profile will be used. If it is a guest, then, it will be whatever email address they entered on the contact form.

Hope this is what you are looking for.
Hello Ashok,

Got it all working great now, except for one little detail, can I make it so that the "mail from" name is the registered users name or the name that is entered in the name field for non registered users?

I already tried to use:

Code: Select all

$messenger->from($contact_name);
but this gives me ==> username@mailprotect. as from and username@mailprotectrelay.be as reply mailaddress.


Grtz,

Nic
Ashok
Registered User
Posts: 38
Joined: Wed Jan 02, 2008 9:07 pm

Re: [Beta] Contact Board Administration 0.1.4

Post by Ashok »

Nic:

I am sorry, I do not know how to do that. Beyond my meagre php knowledge. But if it is any help, the real name of the person using the form is included in the body of the message. I guess you already knew that.

Regards,

Ashok
updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: [Beta] Contact Board Administration 0.1.4

Post by updown »

If have problems with special characters in the message - especially with German Umlauts, they appear in the final-email as two questionmarks '??'

I already checked the UTF-8 encoding, but I think this maybe not considered in the code of the contact-mod itself, since the predefined text is shown right with Umlauts, the included message isn't.

Has anybody an idea, or better: a solution?
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [Beta] Contact Board Administration 0.1.4

Post by saaiberke »

Ashok wrote:Nic:

I am sorry, I do not know how to do that. Beyond my meagre php knowledge. But if it is any help, the real name of the person using the form is included in the body of the message. I guess you already knew that.

Regards,

Ashok
No problem Ashok :)

Grtz,

Nic
User avatar
JunglistPerfection
Registered User
Posts: 611
Joined: Mon Apr 09, 2007 11:58 pm
Location: Chicago, IL

Re: [Beta] Contact Board Administration 0.1.4

Post by JunglistPerfection »

Is this mod safe to install on phpBB3 Gold?
Locked

Return to “[3.0.x] MODs in Development”