[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!
Get Involved
User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Birthdate - Require on Registration

Post by primehalo »

To answer the first question, you should execute the SQL statements in the installation file, or run the included db_install.php file as instructed in the installation file.

To answer the second question:
Image
That is a partial screenshot of installation instructions from a different MOD, but the important parts are highlighted.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

ladygirl
Registered User
Posts: 1
Joined: Fri Apr 22, 2011 9:56 pm

Re: [RC1] Prime Birthdate - Require on Registration

Post by ladygirl »

I was glad to see this topic bumped. I have a question concerning the compatible styles.

Will this MOD work with Prosilver Special Edition (3.0.8)?

I've tried other MODs and they only work with the Prosilver Style (but not ProsilverSE).

Has anyone successfully installed this MOD on ProsilverSE (3.0.8)?

Thank you.

Charlie_M
Registered User
Posts: 69
Joined: Sun Sep 14, 2008 6:22 pm

Re: [RC1] Prime Birthdate - Require on Registration

Post by Charlie_M »

Hi ladygirl,
of course, the Mod works fine with ProsilverSE (3.0.8). U can see the Mod working in our Forum

User avatar
alicia86
Registered User
Posts: 75
Joined: Sat Oct 10, 2009 10:10 pm
Name: Alicia
Contact:

Re: [RC1] Prime Birthdate - Require on Registration

Post by alicia86 »

Hey, I'm experiencing a problem I hope someone can help me solve.

Everything works fine except the profile options to display age and the congratulations on a prosilver based theme for 3.0.9.
Going through the UCP menu results in no visible errors, while attempting it through the ACP gives me this:

Code: Select all

SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0 = NULL WHERE user_id = 54' at line 2 [1064]

SQL

UPDATE phpbb_users SET user_icq = '', user_aim = 'songgirl134', user_msnm = 'alicia86@gmail.com', user_yim = '', user_jabber = '', user_website = 'http://swrpgrc.com', user_from = 'Columbus Ohio', user_occ = 'Retail. Student in Web Development and Design', user_interests = '', user_birthday = ' 6-11-1986', 0 = NULL WHERE user_id = 54

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/acp/acp_users.php
LINE: 1405
CALL: dbal_mysqli->sql_query()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_users->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
Now I've gone through and triple checked the code, particularly having to do with the admin and UCP.
I've also purged the cache each time.

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

Re: [RC1] Prime Birthdate - Require on Registration

Post by primehalo »

What does the code look like around line #1405 of includes/acp/acp_users.php? The error is in the SQL statement somewhere on or above that line.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: [RC1] Prime Birthdate - Require on Registration

Post by canonknipser »

primehalo wrote:What does the code look like around line #1405 of includes/acp/acp_users.php? The error is in the SQL statement somewhere on or above that line.
its exactly her: 0 = NULL - a column named "0" (Zero) can't work ...
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

User avatar
alicia86
Registered User
Posts: 75
Joined: Sat Oct 10, 2009 10:10 pm
Name: Alicia
Contact:

Re: [RC1] Prime Birthdate - Require on Registration

Post by alicia86 »

primehalo wrote:What does the code look like around line #1405 of includes/acp/acp_users.php? The error is in the SQL statement somewhere on or above that line.
Ahah found it!
Apparently I put this bit of code inside the array rather than below it. Jeez...

Code: Select all

//-- mod: Prime Birthdate ---------------------------------------------------//
						$prime_birthdate->acp_users_inject_sql($sql_ary, $data);
//-- end: Prime Birthdate ---------------------------------------------------//

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

Re: [RC1] Prime Birthdate - Require on Registration

Post by primehalo »

I would suggest using AutoMOD to install MODs, as it would help prevent these type of installation mistakes.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

docco
Registered User
Posts: 280
Joined: Sun Mar 04, 2012 3:28 am

Re: [RC1] Prime Birthdate - Require on Registration

Post by docco »

I installed this MOD by Automod for my phpbb ver. 3.0.12, prosilver style. It shows no error
In user profile, the default is "not show age", what to be modified to set the default to "show age"?
Thanks for help

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

Re: [RC1] Prime Birthdate - Require on Registration

Post by primehalo »

The Author Notes section of the installation instructions explain how to change the Display Age default.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

docco
Registered User
Posts: 280
Joined: Sun Mar 04, 2012 3:28 am

Re: [RC1] Prime Birthdate - Require on Registration

Post by docco »

primehalo wrote:The Author Notes section of the installation instructions explain how to change the Display Age default.
I ínstall MOD by automod, I'm not sure what file to be modified. Is this Ok:
Change

Code: Select all

ALTER TABLE phpbb_users ADD COLUMN user_show_age tinyint(1) DEFAULT 0 NOT NULL;
ALTER TABLE phpbb_users ADD COLUMN user_congrats tinyint(1) DEFAULT 0 NOT NULL;
in install.xml to

Code: Select all

ALTER TABLE phpbb_users ADD COLUMN user_show_age tinyint(1) DEFAULT 1 NOT NULL;
ALTER TABLE phpbb_users ADD COLUMN user_congrats tinyint(1) DEFAULT 1 NOT NULL;
before installation?

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

Re: [RC1] Prime Birthdate - Require on Registration

Post by primehalo »

That change would work if you hadn't already installed the MOD. Once the MOD is installed, AutoMOD already executed the SQL statements so now you have to follow the instructions after the "If you want to change the default AFTER you have already executed the SQL statement" part. Change the SQL statements as instructed and then execute the SQL statements in phpMyAdmin or whatever program you use to access your database.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

bieb
Registered User
Posts: 1
Joined: Mon Oct 06, 2014 7:13 pm

Re: [RC1] Prime Birthdate - Require on Registration

Post by bieb »

I have the Mod installed and seems to work correctly. Should I disable Coppa? The site requirement is 18+, originally I was messing with Coppa with an edit for 18 years, vs 13 years.

When I attempt to create an account and use a birthdate in the year 1972 which is well over 18, I still get this message in the Coppa section:
Please note that clicking submit will create your account. However it cannot be activated until a parent or guardian approves your registration. You will be emailed a copy of the necessary form with details of where to send it.

Thanks
Harold

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

Re: [RC1] Prime Birthdate - Require on Registration

Post by primehalo »

I just tested on my forum and the COPPA works fine. If the birthdate entered gives an age older than 13 years then the COPPA message is not displayed.

Turning off COPPA should work for you, but you may want to investigate as to why it's not working properly.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

noghiri
Registered User
Posts: 1
Joined: Mon Mar 16, 2015 3:01 am

Re: [RC1] Prime Birthdate - Require on Registration

Post by noghiri »

I'm attempting to install this on 3.0.13PL1.
I used automod to install, with compressed file download method (FTP doesn't want to work for some reason).
I also ran the SQL commands via the db_install.php method described in the notes.

The problem is as follows: I don't see any of the options that are supposed to exist. I tried clearing the cache, and that hasn't changed anything. I have very very little knowledge of PHP, so I don't know where or what to look for to troubleshoot. Any ideas?

EDIT: Now nothing's working properly, fortunately I won't lose anything from a reset. Let's try this again...

EDIT2: I have no idea how I screwed it up the first time, it all works fine now, and as expected.

Locked

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