[RC1] Prime Birthdate - Require on Registration

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
Locked
User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Birthdate (0.1.3) Require on Registration

Post by primehalo »

playerfr wrote:I am confused here in install file you say :

Code: Select all

Open: index.php
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

if ($config['load_birthdays'] && $config['allow_birthdays'])

Find

Tip: This may be a partial find and not the whole line.
Code: Select All

$result = $db->sql_query($sql);

Add before

Tip: Add these lines on a new blank line before the preceding line(s) to find.
Code: Select All

//-- mod: Prime Birthdate Require -------------------------------------------//
	$sql = str_replace('SELECT user_id', 'SELECT user_show_age, user_id', $sql);
//-- end: Prime Birthdate Require -------------------------------------------//
What should i do with first find ? :?
The first find gets your cursor in position so that the next find will be the correct one (because the second find may occur several times in the file).
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

User avatar
playerfr
Registered User
Posts: 851
Joined: Fri Jul 18, 2003 9:50 am
Location: France - Paris

Re: [BETA] Prime Birthdate (0.1.3) Require on Registration

Post by playerfr »

Oh ok thanks :)

I done it and it is working fine for time being.

Thanks :)
All kind of help for your Forums / Sites. Installing for you the forum, the Mods, creating Custom Mods : for small fee http://www.phpbbhelpers.com

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Birthdate (0.1.3) Require on Registration

Post by primehalo »

playerfr wrote:Oh ok thanks :)

I done it and it is working fine for time being.

Thanks :)
Glad to hear it. Hopefully there will be no more bugs!
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Hunter_wow
Registered User
Posts: 238
Joined: Wed Sep 14, 2005 11:35 pm
Location: Sweden

Re: [BETA] Prime Birthdate (0.1.3) Require on Registration

Post by Hunter_wow »

Into my forum into that "info field"(Site Admin - Posts: x - Joined: ....)it also shows "Display age: Yes". Any idea how to remove that one?

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Birthdate (0.1.3) Require on Registration

Post by primehalo »

Hunter_wow wrote:Into my forum into that "info field"(Site Admin - Posts: x - Joined: ....)it also shows "Display age: Yes". Any idea how to remove that one?
That shouldn't be there. "Display age:" should only show up in the User Control Panel and in the Admin Control Panel. I checked the Installation Instructions and found a mistake. The part of the installation instructions that add it are as follows:

Open: adm/style/acp_users_profile.php
Find:

Code: Select all

	<dl> 
		<dt><label for="birthday">{L_BIRTHDAY}:</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
		<dd>{L_DAY}: <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}: <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}: <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>
	</dl>
Replace with:

Code: Select all

<!-- mod: Prime Birthdate Require ---------------------------------------- -->
	<dl>
		<dt><label for="bday_day">{L_PRIME_BIRTHDATE_NAME}:</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
		<dd>
			<select name="bday_month" id="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select>
			<select name="bday_day" id="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select>
			<select name="bday_year" id="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select>
		</dd>
	</dl>
	<dl>
		<dt><label for="show_age1">{L_PRIME_BIRTHDATE_SHOW_AGE}:</label><br /><span>{L_PRIME_BIRTHDATE_SHOW_AGE_EXPLAIN}</span></dt>
		<dd>
			<label for="show_age1"><input type="radio" name="show_age" id="show_age1" value="1"<!-- IF S_SHOW_AGE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> 
			<label for="show_age0"><input type="radio" name="show_age" id="show_age0" value="0"<!-- IF not S_SHOW_AGE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
		</dd>
	</dl>
	<dl>
		<dt><label for="show_congrats1">{L_PRIME_BIRTHDATE_SHOW_CONGRATS}:</label><br /><span>{L_PRIME_BIRTHDATE_SHOW_CONGRATS_EXPLAIN}</span></dt>
		<dd>
			<label for="show_congrats1"><input type="radio" name="show_congrats" id="show_congrats1" value="1"<!-- IF S_SHOW_CONGRATS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> 
			<label for="show_congrats0"><input type="radio" name="show_congrats" id="show_congrats0" value="0"<!-- IF not S_SHOW_CONGRATS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
		</dd>
	</dl>
<!-- end: Prime Birthdate Require ---------------------------------------- -->
The mistake is that Open: adm/style/acp_users_profile.php should be Open: adm/style/acp_users_profile.html. A adm/style/acp_users_profile.php file does not exist, so it's likely that you added the lines somewhere else. Search for L_PRIME_BIRTHDATE_SHOW_AGE to find out where. It should only appear in acp_users_profile.html and ucp_profile_profile_info.html.
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: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Birthdate (0.1.4) Require on Registration

Post by primehalo »

No other bugs seem to have been reported in a while, so hopefully it will be ready for a Release Candidate soon. But first I still want to add one more feature: the ability to make the birth date NOT required. I would hate for someone to have to uninstall this thing if they decide they don't want to make it a requirement.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

User avatar
playerfr
Registered User
Posts: 851
Joined: Fri Jul 18, 2003 9:50 am
Location: France - Paris

Re: [BETA] Prime Birthdate (0.1.4) Require on Registration

Post by playerfr »

primehalo wrote:No other bugs seem to have been reported in a while, so hopefully it will be ready for a Release Candidate soon. But first I still want to add one more feature: the ability to make the birth date NOT required. I would hate for someone to have to uninstall this thing if they decide they don't want to make it a requirement.
Yes that will be a good idea :) An option in Board features
All kind of help for your Forums / Sites. Installing for you the forum, the Mods, creating Custom Mods : for small fee http://www.phpbbhelpers.com

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Birthdate (1.0.RC1) Require on Registration

Post by primehalo »

Alright, I added that option. It's under the "Board Features" section of the ACP.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

User avatar
playerfr
Registered User
Posts: 851
Joined: Fri Jul 18, 2003 9:50 am
Location: France - Paris

Re: [BETA] Prime Birthdate (1.0.RC1) Require on Registration

Post by playerfr »

Wao well done dude :) Nice to see a RC relase :D
All kind of help for your Forums / Sites. Installing for you the forum, the Mods, creating Custom Mods : for small fee http://www.phpbbhelpers.com

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

Re: [BETA] Prime Birthdate (1.0.RC1) Require on Registration

Post by azzurri »

*solved*

User avatar
c4gamerz
Registered User
Posts: 161
Joined: Thu Aug 30, 2007 5:08 pm
Contact:

Re: [BETA] Prime Birthdate (1.0.RC1) Require on Registration

Post by c4gamerz »

hmm i am stuck in last step of
Open: styles/subsilver2/template/ucp_register.html
Find
Tip: This may be a partial find and not the whole line.
<tr>

Replace With
Tip: Replace the preceding line(s) to find with the following lines.
<tr id="coppa_area"<!-- IF not S_COPPA --> style="display:none"<!-- ENDIF -->>
that <tr> is present 6 to 7 times in the file so which line shud i edit?
Web Designing | Script Integration | Logo Designing | Web Development | ExtensiveWeb.com

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Birthdate (1.0.RC1) Require on Registration

Post by primehalo »

The instructions always go in order, so it's the first one after the previous line(s) to find.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

cotp
Registered User
Posts: 445
Joined: Wed Sep 14, 2005 7:34 pm
Contact:

Re: [BETA] Prime Birthdate (1.0.RC1) Require on Registration

Post by cotp »

Hello I installed this file in phpBB3 RC5... (French)

I have coppa disabled

Now when I try to register I get the "accept terms button" but can't even get to the newt page when I click on it ?

I checked all my instructions... Could'nt find the bug ?

I also het this error message when I go to ucp

Code: Select all

Fatal error: Call to undefined function get_birth_date_options() in C:\Program Files\wamp\www\phpBB3_rc5\includes\ucp\ucp_profile.php on line 449
And I can't find this function actually, where is it supposed to be ?

Thanks in advance

Cotp

PS: By the way, in sql I used

Code: Select all

UPDATE phpbb_users SET user_show_age='3';
instead of 
INSERT INTO phpbb_users (user_show_age) VALUES (3)
Cotp

joebart72
Registered User
Posts: 743
Joined: Thu Feb 01, 2007 5:54 am

Re: [BETA] Prime Birthdate (1.0.RC1) Require on Registration

Post by joebart72 »

I install this mod in order to see the age of the members. I don't really understand the option to display or not the age.... Is there a way to prevent this choice ?
I learn English with phpbb.com :)

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Birthdate (1.0.RC1) Require on Registration

Post by primehalo »

cotp wrote:Hello I installed this file in phpBB3 RC5... (French)

I have coppa disabled

Now when I try to register I get the "accept terms button" but can't even get to the newt page when I click on it ?

I checked all my instructions... Could'nt find the bug ?

I also het this error message when I go to ucp

Code: Select all

Fatal error: Call to undefined function get_birth_date_options() in C:\Program Files\wamp\www\phpBB3_rc5\includes\ucp\ucp_profile.php on line 449
And I can't find this function actually, where is it supposed to be ?

Thanks in advance

Cotp

PS: By the way, in sql I used

Code: Select all

UPDATE phpbb_users SET user_show_age='3';
instead of 
INSERT INTO phpbb_users (user_show_age) VALUES (3)
Cotp
I just tried it with the COPPA turned off and it still worked fine, so there's gotta be something messed up somewhere. The get_birth_date_options() function is located in the "includes/prime_birthdate.php" file. Since your board can't find the function, that indicates the file isn't being included. This is weird, because the code checks for the existance of the function, and if the function doesn't exist then it includes the file:

Code: Select all

					if (!function_exists('get_birth_date_options'))
					{
						include($phpbb_root_path . 'includes/prime_birthdate.' . $phpEx);
					}
					$bday_options = get_birth_date_options(sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']));
There are three files that are all named "prime_birthdate.php", but they are located in different directories. Make sure you copied the correct ones to their correct directories.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Locked

Return to “[3.0.x] MODs in Development”