Contact Admin

Fill subject field in the email + date format - Contact Admin

Fill subject field in the email + date format

by R3gi » Mon Mar 19, 2018 8:09 pm

Hi,
would be please possible to fill the subject field in the email with the subject that was filled by user in the form? In case that user has to select a contact reason, then fill the reason to the subject field.

Also please notice that the date format doesn't reflect format which was set for board (time is OK, but the format is wrong for my country).

I know, it may look as details, but in case there are many emails, the subject is very important.

Thanks!
Attachments
Email.png
User avatar
R3gi
Registered User
Posts: 101
Joined: Mon May 05, 2014 4:33 pm
Location: Czech Republic
Contact:

Re: Fill subject field in the email + date format

by Neverlands » Sat Nov 03, 2018 4:04 pm

I also would appreciate these options!
User avatar
Neverlands
Registered User
Posts: 46
Joined: Thu Sep 05, 2002 12:06 am
Location: Vienna / Austria
Contact:

Re: Fill subject field in the email + date format

by Neverlands » Sat Nov 03, 2018 8:02 pm

PS
I found out how to change the date format but still don't know how to add the subject to emails.

In /ext/rmcgirr83/contactadmin/controller/main_controller.php I changed the line 470

from:

Code: Select all

$date = $date->format('D M d, Y g:i a');
to:

Code: Select all

$date = $date->format('j. F Y, H:i');
User avatar
Neverlands
Registered User
Posts: 46
Joined: Thu Sep 05, 2002 12:06 am
Location: Vienna / Austria
Contact:

Re: Fill subject field in the email + date format

by Neverlands » Sun Nov 04, 2018 9:25 am

When using reasons to make them visible as subject in emails I changed the following.

In /ext/rmcgirr83/contactadmin/styles/prosilver/template/contactadmin_body.html

Replace:

Code: Select all

<!-- IF CONTACT_REASONS -->
<dl>
	<dt><label for="contact_reason">{L_CONTACT_REASON}{L_COLON}</label></dt>
	<dd><select name="contact_reason" id="contact_reason" tabindex="4">{CONTACT_REASONS}</select></dd>
</dl>
<!-- ENDIF -->
With:

Code: Select all

<!-- IF CONTACT_REASONS -->
<dl>
	<dt><label for="contact_subject">{L_CONTACT_REASON}{L_COLON}</label></dt>
	<dd><select name="contact_subject" id="contact_subject" tabindex="4">{CONTACT_REASONS}</select></dd>
</dl>
<!-- ENDIF -->
User avatar
Neverlands
Registered User
Posts: 46
Joined: Thu Sep 05, 2002 12:06 am
Location: Vienna / Austria
Contact:

Re: Fill subject field in the email + date format

by tojag » Sun Feb 17, 2019 6:44 pm

It does not work.
As I see in phpbb lang file, this is NO_EMAIL_SUBJECT const is always assigned to email subjcet. I don't know why.
It always happens even if "contact reason" and "contact subject" are filled.

It is probably a problem to relay reason or subject data from contact form to email header data.
Any ideas?
Sorry my english. I hope You understand what I mean.
User avatar
tojag
Registered User
Posts: 400
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: Fill subject field in the email + date format

by RMcGirr83 » Mon Feb 18, 2019 12:42 am

Try

Open

rmcgirr83\contactadmin\controller\main_controller.php

FIND

Code: Select all

$messenger->replyto($data['email']);
AFTER ADD

Code: Select all

$messenger->subject($subject);
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: Fill subject field in the email + date format

by tojag » Mon Feb 18, 2019 2:52 pm

That is! At now it works ok.
Big thanks!
Sorry my english. I hope You understand what I mean.
User avatar
tojag
Registered User
Posts: 400
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory