More information in activation email

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
User avatar
nl1sms
Registered User
Posts: 111
Joined: Wed May 25, 2005 4:24 pm
Location: Holland

More information in activation email

Post by nl1sms » Mon Jun 11, 2018 7:51 am

When i receive an email that a new user is registered on my forum I'd like to see more information in the activation email.

I'd like to see the users emailadress and the IP number. Is there an extension for this or how do I make this possible ? Thnx in advance.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20237
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: More information in activation email

Post by Mick » Mon Jun 11, 2018 8:33 am

You can edit the relevant email text file I suppose, if you need help editing an email text file I suggest you post in custom coding. You could have a search of the extensions dB and, if you don’t find anything to suit your purpose, you can make an extension request.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
</Solidjeuh>
Registered User
Posts: 1079
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: More information in activation email

Post by </Solidjeuh> » Mon Jun 11, 2018 12:19 pm

We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3403
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Re: More information in activation email

Post by bonelifer » Mon Jun 11, 2018 1:12 pm

Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .

User avatar
nl1sms
Registered User
Posts: 111
Joined: Wed May 25, 2005 4:24 pm
Location: Holland

Re: More information in activation email

Post by nl1sms » Tue Jun 12, 2018 12:39 pm

This extension does not do what I want unfortunately. I want only 1 email that says a new user has been registered and in that email I want a link to activate that user but I also want to see the email adress of that particular user.

I thought more like editing the standard phpbb activation tekst that is send by email. I can't find that file though plus I would not know how to edit it to include the email adress ???

I've find the file in language/nl/admin_activate.txt

I added {USER_EMAIL} and {USER_MAIL} but neither work. Which variable do I have to add ?

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20237
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: More information in activation email

Post by Mick » Tue Jun 12, 2018 1:21 pm

As I said before, you can edit the email text files and they're here /language/ur_lang/email

I also found this list of email variables earlier, I'm not certain how up to date the list is (not very, it's in the 3.0 forums) but it will give you a start. If you sift through the text files you may find more. There's one for IP's as well in contact_admin.txt - you'll have to search and experiment.

Failing that I suggest you make an extension request.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
nl1sms
Registered User
Posts: 111
Joined: Wed May 25, 2005 4:24 pm
Location: Holland

Re: More information in activation email

Post by nl1sms » Tue Jun 12, 2018 1:39 pm

I've tried almost 10 different variables. But none work.

FROM_EMAIL_ADDRESS
EMAIL_ADDRESS etc. etc.

I also found this topic. But it's very old:

viewtopic.php?f=71&t=2272111

Where the solution was:

I changed the "includes/ucp/ucp_register.php file, on line #400 and added

Code: Select all
'USER_EMAIL' => $data['email'],
And after that I added in the "admin_activate.txt" file

Code: Select all
{USER_EMAIL}
to the txt file.

But in 3.2.2 that line is already defined in ucp_register.php. {USER_EMAIL} does not work :(

This should'nt be so difficult… I'm sure it's just one variable to add. I don't need an extension to do that.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20237
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: More information in activation email

Post by Mick » Tue Jun 12, 2018 1:41 pm

I’ll move this to custom coding then, someone there may be able to help you.

The user email address should be {EMAIL_ADDRESS} as per the list I linked to.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
nl1sms
Registered User
Posts: 111
Joined: Wed May 25, 2005 4:24 pm
Location: Holland

Re: More information in activation email

Post by nl1sms » Tue Jun 12, 2018 1:54 pm

{EMAIL_ADDRESS} does not work for me as i stated before. It stays blank in the activation email.

I also purged the cache after everytime i uploaded the admin_activate.txt

edit:

found this topic:

viewtopic.php?f=641&t=2443426

But that's a bit to difficult for me.... :oops:

User avatar
canonknipser
Registered User
Posts: 1652
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: More information in activation email

Post by canonknipser » Tue Jun 12, 2018 3:17 pm

Just a few questions:
Did you change the template file for your language (I suppose it is nl) instead of the default english one?
Did you clear your board's cache after changing the template file?
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

User avatar
nl1sms
Registered User
Posts: 111
Joined: Wed May 25, 2005 4:24 pm
Location: Holland

Re: More information in activation email

Post by nl1sms » Tue Jun 12, 2018 4:02 pm

Yes to both questions. Cheers

User avatar
nl1sms
Registered User
Posts: 111
Joined: Wed May 25, 2005 4:24 pm
Location: Holland

Re: More information in activation email

Post by nl1sms » Tue Jun 19, 2018 9:33 am

No one? :(

User avatar
pierredu
Registered User
Posts: 880
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: More information in activation email

Post by pierredu » Thu Jun 21, 2018 6:35 am

I did this on my board:

File language/fr/email/admin_activate.txt

Code: Select all

E-Mail: {USER_EMAIL}
Adresse IP: {USER_IP}
Localisation: {USER_LOCATION}

File phpbb/notification/type/admin_activate_user.php
Added lines:
135 - $data = $this->user_loader->get_user($this->item_id);
136 & ss. 
// Querying the localisation
$sql = 'SELECT pf_phpbb_location from ' . PROFILE_FIELDS_DATA_TABLE .
' where user_id = ' . $this->item_id;
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
$location = $row['pf_phpbb_location'];
}
$this->db->sql_freeresult($result);
// end
148 & ss - 'USER_EMAIL' => $data['user_email'],
'USER_IP' => $data['user_ip'],
'USER_LOCATION' => $location,
Hope that helps.
Last edited by Mick on Thu Jun 21, 2018 9:28 am, edited 1 time in total.
Reason: Codectagsxadded for clarity.

User avatar
nl1sms
Registered User
Posts: 111
Joined: Wed May 25, 2005 4:24 pm
Location: Holland

Re: More information in activation email

Post by nl1sms » Thu Jun 21, 2018 8:38 am

Thanx for your reply.

Can you be a bit more specific with the changes in admin_activate_user.php ?

Where do i need or add those lines precisely ? Line 135 and 136? I use dutch language so for me it's probably different.

Can you tell me what to find and what to add after or before???

User avatar
pierredu
Registered User
Posts: 880
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: More information in activation email

Post by pierredu » Thu Jun 21, 2018 8:46 am

Have a look in the code. Its evident. You need to extract more from the data array and to build the location item with the query.
It has nothing to do with the dutch or french version.

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: No registered users and 4 guests