Warning: The author of this contribution does not provide support for it anymore.

Prime Birthdate Require

Compatible with "Display user's age in viewtopic" - Prime Birthdate Require

Compatible with "Display user's age in viewtopic"

by Tarantino » Tue Mar 06, 2012 10:05 am

When in UCP I set up:

Display age:
Determines if your age is publicly viewable.


to NO, the age still appears in viewtopic. ('cause I've installed an MOD "Display user's age in viewtopic")

How can I make it compatible with this MOD of yours?! Maybe some IF on some viewtopic.html ?

Cheers
Tarantino
Registered User
Posts: 805
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

Re: Compatible with "Display user's age in viewtopic"

by Tarantino » Fri Mar 09, 2012 3:42 pm

I've tried:

Code: Select all

<!-- IF postrow.POSTER_AGE --><!-- IF postrow.S_SHOW_AGE --><strong>{L_AGE}:</strong> {postrow.POSTER_AGE}<br /><!-- ENDIF --><!-- ENDIF -->


And

Code: Select all

<!-- IF postrow.POSTER_AGE --><!-- IF S_SHOW_AGE --><strong>{L_AGE}:</strong> {postrow.POSTER_AGE}<br /><!-- ENDIF --><!-- ENDIF -->


But without sucess :/
Tarantino
Registered User
Posts: 805
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

Re: Compatible with "Display user's age in viewtopic"

by primehalo » Tue Mar 27, 2012 7:46 am

Yeah, that won't work. Those template variables are only defined on the User Control Panel. You will have create your own template variables. For example, in viewtopic.php, try adding something like this:

Code: Select all

@include($phpbb_root_path 'includes/prime_birthdate.' $phpEx);

$postrow['S_SHOW_AGE'] = $prime_birthdate->user_show_age($poster_id);  


directly above this code:

Code: Select all

    // Dump vars into template
    
$template->assign_block_vars('postrow'$postrow); 
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2910
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: Compatible with "Display user's age in viewtopic"

by lws96 » Fri Dec 28, 2012 12:20 am

I don't see this topic was resolved. Now with phpBB 3.0.11 out, I am still looking for an answer.

I require birthdates (including year) because of the COPPA requirement (http://www.ftc.gov/privacy/coppafaqs.shtm and http://www.coppa.org/). Because we gather information (such as email, etc.), I need parental consent from the users under 13 for compliance purposes.

However, when it comes to birthdates, even if the "Display Age" is set to "No" or the Birthday Congrats is set to "No", I am still seeing the users' ages being posted.

Before I upgraded to 3.0.11, I finally decided to heck with it and completely removed the portion where it displayed the age in the Birthday Congrats area. However, I forgot what I had done. Furthermore, it seems a lot of the 3.0.11 modifications to the core script have been completed, rendering it difficult for previous MODS to be installed since the verbage has changed.

I look forward to a working solution, other than simply removing the "(Age)" part when it's your birthday.
lws96
Registered User
Posts: 100
Joined: Wed Aug 05, 2009 4:39 am
Contact:

Re: Compatible with "Display user's age in viewtopic"

by primehalo » Wed Jan 23, 2013 8:05 am

The topic posted here is in regards to making the Display Age option in my MOD work with the Display user's age in viewtopic MOD. Is this what you're referring to as well, or are you talking about the birthday congrats area on the index page? The latest version of this MOD along with the latest version of phpBB should properly remove the user's age from the birthday congrats area if they have their Display Age option set to No.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2910
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: Compatible with "Display user's age in viewtopic"

by Tarantino » Sun Nov 03, 2013 11:45 pm

primehalo wrote:Yeah, that won't work. Those template variables are only defined on the User Control Panel. You will have create your own template variables. For example, in viewtopic.php, try adding something like this:

Code: Select all

@include($phpbb_root_path 'includes/prime_birthdate.' $phpEx);

$postrow['S_SHOW_AGE'] = $prime_birthdate->user_show_age($poster_id);   


directly above this code:

Code: Select all

    // Dump vars into template
    
$template->assign_block_vars('postrow'$postrow);  


Thanks, it solved my problem :mrgreen:
Tarantino
Registered User
Posts: 805
Joined: Sat Feb 18, 2012 1:51 pm
Contact: