Birthdays

Started by Gaz-uk, March 27, 2013, 03:30:08 AM

Previous topic - Next topic

Gaz-uk

Hi i like the birthday greetings the forum sends out when its a members birthday but how can you make it so birthdays are added on sign up ?

Mr. Pedram

Quote from: gazgrace on March 27, 2013, 03:30:08 AM
Hi i like the birthday greetings the forum sends out when its a members birthday but how can you make it so birthdays are added on sign up ?

Hi, you want to add "Birthday" field to registration (signup) page?
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

Gaz-uk

Yes and so it registers that its a members birthday so emails are sent ..

I need a step by step guide if i have to alter something as im not very good at this stuff :)

Mr. Pedram

Quote from: gazgrace on March 27, 2013, 03:57:35 AM
Yes and so it registers that its a members birthday so emails are sent ..

I need a step by step guide if i have to alter something as im not very good at this stuff :)

Well, you must add this snip to your Register.template.php, open it via a editor:

Find:

// If OpenID is enabled, give the user a choice between password and OpenID.

Replace With:

//Show Birthday
global $txt;
echo '
<dl class="register_form">
<dt>
<strong>', $txt['dob'], '</strong><br />
<span class="smalltext">', $txt['dob_year'], ' - ', $txt['dob_month'], ' - ', $txt['dob_day'], '</span>
</dt>
<dd>
<input type="text" name="bday3" size="4" maxlength="4" value="', (!empty($context['member']['birth_date']) ? $context['member']['birth_date']['year'] : ''), '" /> -
<input type="text" name="bday1" size="2" maxlength="2" value="', (!empty($context['member']['birth_date']) ? $context['member']['birth_date']['month'] : ''), '" /> -
<input type="text" name="bday2" size="2" maxlength="2" value="', (!empty($context['member']['birth_date']) ? $context['member']['birth_date']['day'] : ''), '" />
</dd>
</dl>';

// If OpenID is enabled, give the user a choice between password and OpenID.


And add this to login.english.php

$txt['dob'] = 'Birthdate:';
$txt['dob_month'] = 'Month (MM)';
$txt['dob_day'] = 'Day (DD)';
$txt['dob_year'] = 'Year (YYYY)';


Then use this MOD:
http://custom.simplemachines.org/mods/index.php?mod=2026
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

Gaz-uk

Thanks i will try this :)

Kindred

I believe that there is also a mod for this...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Mr. Pedram

Quote from: Kindred on March 27, 2013, 07:17:36 AM
I believe that there is also a mod for this...

I've searched for him but nothing found. sounds like we must create a MOD for this!
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

Kindred

there were 3 or 4 mods for this with 1.1.x. and another for 2.0RC3
They have since been removed.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Mr. Pedram

Quote from: Kindred on March 27, 2013, 08:25:02 AM
there were 3 or 4 mods for this with 1.1.x. and another for 2.0RC3
They have since been removed.

If i write this MOD, will be removed like those? : ))
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

Kindred

the mods were not removed by the smf team.... rather by the authors
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Mr. Pedram

Quote from: Kindred on March 27, 2013, 09:35:57 AM
the mods were not removed by the smf team.... rather by the authors

Good. I'll try to write a MOD for this, and never remove it.
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

Arantor

If you don't, you will forever be expected to maintain it and keep it up to date and then add new features to it, whether you want to or not.

Gaz-uk

Can i ask then . Should i use that method you posted or wait for the mod if you are making one ?


Mr. Pedram

#13
Quote from: gazgrace on March 29, 2013, 12:45:45 PM
Can i ask then . Should i use that method you posted or wait for the mod if you are making one ?

I made the MOD, Use this. (Attached)
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

Drunken Clam

Quote from: Mr. Pedram on March 29, 2013, 02:22:58 PM
Quote from: gazgrace on March 29, 2013, 12:45:45 PM
Can i ask then . Should i use that method you posted or wait for the mod if you are making one ?

I made the MOD, Use this. (Attached)
Really don't think you should be attaching things like that in public without going through the Mod approval process!?!

BTW what's with the 'New SMF Developer' text? That could be quite misleading to new users don't you think?

Just my 2 pence

Kindred

as noted - mod distribution on this site should either go through the process of be directed off site with the understanding that the mod has not been reviewed or validated  by the SMF team


Also...   yes, the "New SMF Developer" is kinda misleading.
As much as we'd love to encourage people to develope and submit code to the github repository, only actual team members get to claim the title of "SMF Developer" (plus, I don't think I have seen any pull requests from you on Github (?)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Gaz-uk

Quote from: Mr. Pedram on March 29, 2013, 02:22:58 PM
Quote from: gazgrace on March 29, 2013, 12:45:45 PM
Can i ask then . Should i use that method you posted or wait for the mod if you are making one ?

I made the MOD, Use this. (Attached)

Hi sorry im a little slow - :o - attached where .. ?

Ahh im taking its been removed ..


Kindred

the attachment was removed for the reasons stated above...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Gaz-uk

Yea you was posting as i was . I thought so when i read yours  .  ;)

How long does it take to approve  a mod ?

Kindred

depends on the mod and on the current backlog.

You an always get the file directly from Mr Pedram, if you wish...   just not as an attachment in support. :)

(He could post it in the mod reviews board)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: