Email on Birthday

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Email on Birthday

Post by iftitaj » Fri Apr 11, 2008 6:32 am

p858snake wrote:Would it be possibly to have it work out if they have their year in their eg:

No Year:
We wish you a happy birthday....

With Year:
We wish you a happy <yr>th birthday?
According to lefty74 reply, thats exactly what it will do. As far as I can understand, it'll send the following:

No Year:
Many congratulations on your birthday and have a great day !!

With Year:
Many congratulations on your {AGE} birthday and have a great day !!

In place of {AGE} actual age will show.

If I'm wrong, plz correct me.

User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: Email on Birthday

Post by lefty74 » Fri Apr 11, 2008 10:12 am

iftitaj wrote:
p858snake wrote:Would it be possibly to have it work out if they have their year in their eg:

No Year:
We wish you a happy birthday....

With Year:
We wish you a happy <yr>th birthday?
According to lefty74 reply, thats exactly what it will do. As far as I can understand, it'll send the following:

No Year:
Many congratulations on your birthday and have a great day !!

With Year:
Many congratulations on your {AGE} birthday and have a great day !!

In place of {AGE} actual age will show.

If I'm wrong, plz correct me.
that's correct, however, it should only display the age and not append th or st or something like that.

i have not tested my code if it does work. i assume it does but ...
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.

iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Email on Birthday

Post by iftitaj » Fri Apr 11, 2008 11:32 am

Hi lefty! I guess for great developers like you, it is not that difficult to add th/st if age has to be shown. Plz work on it. My request! :arrow:

User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: Email on Birthday

Post by lefty74 » Fri Apr 11, 2008 4:40 pm

iftitaj wrote:Hi lefty! I guess for great developers like you, it is not that difficult to add th/st if age has to be shown. Plz work on it. My request! :arrow:
not tested whether it displays correctly

open index.php
find

Code: Select all

		if (trim($row['user_email']) && $config['birthday_emails'])
		{
after add

Code: Select all

			$age_mail = ($age) ? ($now['year'] - $age) : '';
			$age_mail .= ($age) ? ((int)substr($age_mail, -1) == 1) ? 'st' : (((int)substr($age_mail, -1) == 2) ? 'nd' : (((int)substr($age_mail, -1) == 3) ? 'rd' : 'th')) : '';

Code: Select all

				'jabber'	=> $row['user_jabber'],
after add

Code: Select all

				'age'      => $age_mail,
find

Code: Select all

			'USERNAME'		=> htmlspecialchars_decode($addr['name'])
replace wiht

Code: Select all

			'USERNAME'		=> htmlspecialchars_decode($addr['name']),
			'AGE'			=> htmlspecialchars_decode($addr['age'])
then in in your email template

Code: Select all

[code]Subject: Happy Birthday {USERNAME}! 

Dear {USERNAME},

Many congratulations on your {AGE} birthday and have a great day !!

{EMAIL_SIG}
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.

Sascha Mueller
Registered User
Posts: 95
Joined: Tue Mar 28, 2006 8:11 pm
Contact:

Re: Email on Birthday

Post by Sascha Mueller » Mon Apr 14, 2008 4:45 pm

Is this mod ready for phpBB 3.0.1 ?
Please excuse my bad English, I'm German!

Tarabass
Registered User
Posts: 44
Joined: Mon Mar 31, 2008 7:45 pm
Location: Elburg, Gelderland, The Netherlands
Contact:

Re: Email on Birthday

Post by Tarabass » Sat Apr 19, 2008 10:02 am

And once again a great MOD From Lefty74. Great job!

It's my second MOD and it works without any problems. I looooooovvvveeee you :lol: :roll:

User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: Email on Birthday

Post by lefty74 » Sat Apr 19, 2008 11:05 am

:lol: cheers tarabass
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.

gergokee
Registered User
Posts: 87
Joined: Fri Feb 16, 2007 1:26 pm

Re: Email on Birthday

Post by gergokee » Sun Apr 20, 2008 10:07 am

lefty74 wrote:
iftitaj wrote:Hi lefty! I guess for great developers like you, it is not that difficult to add th/st if age has to be shown. Plz work on it. My request! :arrow:
not tested whether it displays correctly

open index.php
find

Code: Select all

		if (trim($row['user_email']) && $config['birthday_emails'])
		{
after add

Code: Select all

			$age_mail = ($age) ? ($now['year'] - $age) : '';
			$age_mail .= ($age) ? ((int)substr($age_mail, -1) == 1) ? 'st' : (((int)substr($age_mail, -1) == 2) ? 'nd' : (((int)substr($age_mail, -1) == 3) ? 'rd' : 'th')) : '';

Code: Select all

				'jabber'	=> $row['user_jabber'],
after add

Code: Select all

				'age'      => $age_mail,
find

Code: Select all

			'USERNAME'		=> htmlspecialchars_decode($addr['name'])
replace wiht

Code: Select all

			'USERNAME'		=> htmlspecialchars_decode($addr['name']),
			'AGE'			=> htmlspecialchars_decode($addr['age'])
then in in your email template

Code: Select all

[code]Subject: Happy Birthday {USERNAME}! 

Dear {USERNAME},

Many congratulations on your {AGE} birthday and have a great day !!

{EMAIL_SIG}
DID IT WORK????
And may i ask how to set congratulations to yes for everybody?! Users lazy to set it to yes and for this, it's no use(in my forum)

User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: Email on Birthday

Post by lefty74 » Sun Apr 20, 2008 10:22 am

DID IT WORK????
i dont know, i have not tried it.
And may i ask how to set congratulations to yes for everybody?! Users lazy to set it to yes and for this, it's no use(in my forum)
Is that a standard feature of phpbb3?
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.

gergokee
Registered User
Posts: 87
Joined: Fri Feb 16, 2007 1:26 pm

Re: Email on Birthday

Post by gergokee » Sun Apr 20, 2008 2:13 pm

well i don't know i thought it came with the email on birthday mod! It can be set in the UCP -->
Display congratulation yes or no... But it should be Yes for everybody cause the people are lazy to set it to yes...
And because of this, few people receives email on birthday... or this email on birthday isn't connected to this "congratulation set field" ?

iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Email on Birthday

Post by iftitaj » Sun Apr 20, 2008 8:08 pm

I'm afraid to test it on my running website. Someone plz test it completely & on phpBB3.0.1

User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: Email on Birthday

Post by lefty74 » Sun Apr 20, 2008 11:01 pm

gergokee wrote:well i don't know i thought it came with the email on birthday mod! It can be set in the UCP -->
Display congratulation yes or no... But it should be Yes for everybody cause the people are lazy to set it to yes...
And because of this, few people receives email on birthday... or this email on birthday isn't connected to this "congratulation set field" ?
that is not from this mod, no
iftitaj wrote:I'm afraid to test it on my running website. Someone plz test it completely & on phpBB3.0.1
if you want to know so badly, why don't you set up a test board and try it out urself. ;)
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.

gergokee
Registered User
Posts: 87
Joined: Fri Feb 16, 2007 1:26 pm

Re: Email on Birthday

Post by gergokee » Wed Apr 23, 2008 12:07 pm

Hi Lefty !

I was right!I tested it several times. It uses "display birthday congrats" So the mod only works when "Display birthday congrats" is set to YES in every users profile! So in this way it is no use... How can i make it send email to everyone , not needing to set the "Display birthday congrats" ?

coldrock
Registered User
Posts: 2
Joined: Mon Mar 14, 2005 11:09 am

Re: Email on Birthday

Post by coldrock » Wed Apr 23, 2008 12:41 pm

Does this work in 3.0.1?

User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: Email on Birthday

Post by lefty74 » Wed Apr 23, 2008 4:33 pm

gergokee wrote:Hi Lefty !

I was right!I tested it several times. It uses "display birthday congrats" So the mod only works when "Display birthday congrats" is set to YES in every users profile! So in this way it is no use... How can i make it send email to everyone , not needing to set the "Display birthday congrats" ?
hi, have a look at the ucp here and tell me where you can see that option. i cannot find it... you probably have another mod installed...
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.

Locked

Return to “[3.0.x] MOD Database Releases”