Adriano Faria Posted February 5, 2013 Share Posted February 5, 2013 File Name: Disable Birthday Editing on 'My Settings' File Submitter: Adriano Faria File Submitted: 05 Feb 2013 File Category: User and Social Engagement Supported Versions: IP.Board 3.4.x This hook won't allow users to edit their birthday on My Settings (Control Panel). If the member hasn't filled yet his birthday, he can do it on My Settings (Control Panel). After he saves it, he can't edit it anymore 'cause the 3 fileds (day, month and year) won't appear anymore on My Settings. Ideal for use in conjunction with this hook: here to download this file Link to comment Share on other sites More sharing options...
BN_IT_Support Posted February 5, 2013 Share Posted February 5, 2013 I know this is a cheeky question not really related to your hook, but... if someone has their DOB set through this and your registration hook, is it possible to then test if a member is above or below a certain age and use that for example in a display template? <if test="IPSMember($this->memberData->something)<18"> Display this <else /> Display this </if> Link to comment Share on other sites More sharing options...
Adriano Faria Posted February 5, 2013 Author Share Posted February 5, 2013 Where exacly you want to display this? Link to comment Share on other sites More sharing options...
BN_IT_Support Posted February 5, 2013 Share Posted February 5, 2013 Probably in an ipContent block. Link to comment Share on other sites More sharing options...
Adriano Faria Posted February 5, 2013 Author Share Posted February 5, 2013 There's a way to get the age. Can't do it now 'cause I'm on mobile. I'll post it tomorrow. Link to comment Share on other sites More sharing options...
Adriano Faria Posted February 6, 2013 Author Share Posted February 6, 2013 I know this is a cheeky question not really related to your hook, but... if someone has their DOB set through this and your registration hook, is it possible to then test if a member is above or below a certain age and use that for example in a display template? Do something like that: <php> $age = ( $this->memberData['bday_year'] ) ? date( 'Y' ) - $this->memberData['bday_year'] : 0; </php> <if test="$age > 18"> You are 18+ years old <else /> You don't have 18 years!!! </if> Link to comment Share on other sites More sharing options...
BN_IT_Support Posted February 6, 2013 Share Posted February 6, 2013 Brilliant thank you, I'll give it a go over the weekend. This will help me a lot with our <18's section so will combine it with your hooks to create some display filters. Link to comment Share on other sites More sharing options...
Unlucky Posted June 12, 2013 Share Posted June 12, 2013 hi, will this one work on 3.3.x ? Link to comment Share on other sites More sharing options...
Adriano Faria Posted October 15, 2013 Author Share Posted October 15, 2013 What's New in Version 1.0.1: Fixed the bug that was removing the ABOUT ME button and MEMBER TITLE input field. Link to comment Share on other sites More sharing options...
ArMaTeC Posted August 10, 2016 Share Posted August 10, 2016 any chance this will get updated for IPB4 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.