Page 3 of 16

Re: Email on Birthday

Posted: Fri Apr 11, 2008 6:32 am
by iftitaj
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.

Re: Email on Birthday

Posted: Fri Apr 11, 2008 10:12 am
by lefty74
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 ...

Re: Email on Birthday

Posted: Fri Apr 11, 2008 11:32 am
by iftitaj
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:

Re: Email on Birthday

Posted: Fri Apr 11, 2008 4:40 pm
by lefty74
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}

Re: Email on Birthday

Posted: Mon Apr 14, 2008 4:45 pm
by Sascha Mueller
Is this mod ready for phpBB 3.0.1 ?

Re: Email on Birthday

Posted: Sat Apr 19, 2008 10:02 am
by Tarabass
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:

Re: Email on Birthday

Posted: Sat Apr 19, 2008 11:05 am
by lefty74
:lol: cheers tarabass

Re: Email on Birthday

Posted: Sun Apr 20, 2008 10:07 am
by gergokee
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)

Re: Email on Birthday

Posted: Sun Apr 20, 2008 10:22 am
by lefty74
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?

Re: Email on Birthday

Posted: Sun Apr 20, 2008 2:13 pm
by gergokee
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" ?

Re: Email on Birthday

Posted: Sun Apr 20, 2008 8:08 pm
by iftitaj
I'm afraid to test it on my running website. Someone plz test it completely & on phpBB3.0.1

Re: Email on Birthday

Posted: Sun Apr 20, 2008 11:01 pm
by lefty74
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. ;)

Re: Email on Birthday

Posted: Wed Apr 23, 2008 12:07 pm
by gergokee
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" ?

Re: Email on Birthday

Posted: Wed Apr 23, 2008 12:41 pm
by coldrock
Does this work in 3.0.1?

Re: Email on Birthday

Posted: Wed Apr 23, 2008 4:33 pm
by lefty74
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...