Unique Custom Profile Field

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Suggested Hosts
indieben
Registered User
Posts: 21
Joined: Sun Feb 04, 2018 12:51 am

Unique Custom Profile Field

Post by indieben » Fri Feb 09, 2018 8:47 am

Hi there,

How would I go about creating a custom profile field that is unique please, the idea is that someone registering would have the input checked, an error returned if it was not unique and the rest of the content would be sticky.

Thanks :-)

User avatar
KevC
Support Team Member
Support Team Member
Posts: 68011
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Unique Custom Profile Field

Post by KevC » Fri Feb 09, 2018 9:00 am

What's the bigger picture of what you're trying to do? There may be other ways to do it.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

indieben
Registered User
Posts: 21
Joined: Sun Feb 04, 2018 12:51 am

Re: Unique Custom Profile Field

Post by indieben » Fri Feb 09, 2018 7:17 pm

KevC wrote:
Fri Feb 09, 2018 9:00 am
What's the bigger picture of what you're trying to do? There may be other ways to do it.
Hello Kev,

My previous topic got confused by people not agreeing with how I want to run my project - the age old issue. I felt that it was helpful to ask the question in isolation as the answers will be useful to a lot of different scenarios.

Thanks for your reply.

User avatar
Lumpy Burgertushie
Registered User
Posts: 64451
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Unique Custom Profile Field

Post by Lumpy Burgertushie » Fri Feb 09, 2018 7:33 pm

well, to get exactly what you asked for, you would need to go to the extension request forum and request a custom extension be made for you.

there is reallyl no way in standard phpbb to do exactly what you asked for.

now, just in case you did not ask for what you really want or that we just simply do not understand exactly what you want, how about you explain that bigger picture.

we may be able to help you get exactly what you want the final outcome to be even if it is not the way you think it should be done.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

indieben
Registered User
Posts: 21
Joined: Sun Feb 04, 2018 12:51 am

Re: Unique Custom Profile Field

Post by indieben » Fri Feb 09, 2018 7:41 pm

I can't afford to pay for it - i'm doing the project for free in my spare time anyway :-)

It's just a community project. I am sending people a unique registration code by post, I have set that up in the registration page as a custom profile field, i just need, as part of the script that:

a) Makes a connection to the mysql database
b) records the unique registration code in the database

to add to that script two jobs

c) check whether the code is NOT already stored in that table and associated with somebody elses record - if it is NOT :- proceed to (d) or return error and do not allow registration.

d) check a separate table to see if it IS already listed (i.e. a permitted codes table) - if it satisfies this test, the user is then registered as normal and the code would be deleted from the permitted codes table - if not, return error and do not allow registration.

if there is a failure, a human error message would be nice :-)

Thanks for your time again.

User avatar
Lumpy Burgertushie
Registered User
Posts: 64451
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Unique Custom Profile Field

Post by Lumpy Burgertushie » Fri Feb 09, 2018 7:57 pm

ok, as I thought, you will need someone to write a very specific set of scripts to make all this happen. this would be much better in the extension request section. however, I seriously doubt you would get anyone to create this type of extension that would really not benefit anyone but you. or at least, not for free.

your best bet is going to be to hire someone to create these scripts and turn them into an extension. or just install them on the board and be aware that you will have to add them back each time you update etc.

I wish you luck with this.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

indieben
Registered User
Posts: 21
Joined: Sun Feb 04, 2018 12:51 am

Re: Unique Custom Profile Field

Post by indieben » Fri Feb 09, 2018 8:00 pm

Thanks Robert but I can't imagine editing the PHP script to do two extra validation checks and delete a code would require huge amounts of code, unless you have reasons for seeing this as much more complicated. Where is the actual script that commits a registration form to the mysql database please?

Thanks :)

indieben
Registered User
Posts: 21
Joined: Sun Feb 04, 2018 12:51 am

Unique Custom Profile Field

Post by indieben » Fri Feb 09, 2018 10:14 pm

Hi there,

I am looking to see if anything is currently available that allows for the create of a custom profile field that:

a) Checks whether the unique ID specified by the registrant is unique and not associated with any other registrant.
b) Checks whether the unique ID is available within a separate table and, if so, once it is used once, it then deletes it from the available unique id's table otherwise the registration should fail.

I am setting up a community forum where I want to ensure that only people who receive an invite request through their door can register on the forum. The unique codes are already printed, I just have no idea of how to deploy this but I would think it is not too much code. I'm doing this on a voluntary basis for my neighbours on the estate that I live on, I receive no funds from it and i'm hoping someone might be kind enough to help me.

Thanks :)

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19312
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff
Contact:

Re: Unique Custom Profile Field

Post by Mick » Sat Feb 10, 2018 9:27 am

indieben wrote:
Fri Feb 09, 2018 7:41 pm
I can't afford to pay
All support here is provided FOC.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.
Forza Garibaldi

User avatar
KevC
Support Team Member
Support Team Member
Posts: 68011
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Unique Custom Profile Field

Post by KevC » Sat Feb 10, 2018 11:14 am

indieben wrote:
Fri Feb 09, 2018 7:17 pm
KevC wrote:
Fri Feb 09, 2018 9:00 am
What's the bigger picture of what you're trying to do? There may be other ways to do it.
Hello Kev,

My previous topic got confused by people not agreeing with how I want to run my project - the age old issue. I felt that it was helpful to ask the question in isolation as the answers will be useful to a lot of different scenarios.

Thanks for your reply.
Oh that topic.

It's this if anyone is interested
viewtopic.php?f=556&t=2458081

It's not so much disagreeing with how you want to run your project, it's working within the confines of what the software can and can't do out of the box and the suggestions fitted it without having to go through an elaborate custom coding venture.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

User avatar
GanstaZ
Registered User
Posts: 325
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: Unique Custom Profile Field

Post by GanstaZ » Sat Feb 10, 2018 1:21 pm

Why not use a simple way? Make a custom profile field in acp (unique id or validation, this was mentioned in 1 of your topics) & use it for registration page only, don't show it on other pages. You have 2 options: activate newly registered group or use admin verify activation. With small template code for admins or owner only you can check that code (verify it manually or make a verification function/method to do it for you), depends on what you prefer, output could be simple unique id or something like green id or red one.

indieben
Registered User
Posts: 21
Joined: Sun Feb 04, 2018 12:51 am

Re: Unique Custom Profile Field

Post by indieben » Sat Feb 10, 2018 8:14 pm

GanstaZ wrote:
Sat Feb 10, 2018 1:21 pm
Why not use a simple way? Make a custom profile field in acp (unique id or validation, this was mentioned in 1 of your topics) & use it for registration page only, don't show it on other pages. You have 2 options: activate newly registered group or use admin verify activation. With small template code for admins or owner only you can check that code (verify it manually or make a verification function/method to do it for you), depends on what you prefer, output could be simple unique id or something like green id or red one.
Hi,

Thanks for your response. I actually have the 312 letters printed ready for me to handpost them around the estate. The upshot is that I need the system to automatically check whether the code is listed as a permitted code within a db table (presumably one that I will need to set up) and for the system to check whether any other registered party has the code linked to their account.

I envisage having to, every so often, upload new codes therefore, I would like old codes to be deleted out of the permitted code table.

Currently, the Unique Code input is a custom profile field on the registration form - I just need to work out what php file the code is in that takes the registrant's submission and inputs it into the standard user database, and add on the checks mentioned.

As for templates and template code, I'm not sure what you mean - I don't think i've seen anything like that over the years in the PHPBB ACP. Not sure what you mean by green id and red one. For these reasons, the output can't be the verification code, it needs to be the one that I have created for each of the 312 properties (to match the letters printed). Also, the creation of a Unique ID by the system will totally defeat the object because it is there to ensure that:

a) each property has received an invite letter through their door and that the Registrant was one of those to receive the invite letter through their door (each letter contains a unique code linked to their address in my spreadsheet).

b) if the code was simply allocated by the system, then anybody could register and that is not the intention. i've deliberately posted this question in the Developer's forum, I've already explored alternative ways of doing this and I was hoping to avoid people not necessarily understanding what I am trying to achieve - the Developers forum is not for alternative methods and I don't want my question in here to be confused.

Thanks for your reply...

User avatar
david63
Jr. Extension Validator
Posts: 14313
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Unique Custom Profile Field

Post by david63 » Sun Feb 11, 2018 12:50 am

There is actually a lot more work involved in creating this as an extension than you might imagine. One area that you have not considered is that of adding the unique codes to the database - that in itself will require an ACP module and from what you are saying there will need to be quite a bit of validation of the input.

Whilst non of it is too difficult the problem is that it would be a "one off" and I doubt that many extension developers would want to spend their time on such a limited project.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

indieben
Registered User
Posts: 21
Joined: Sun Feb 04, 2018 12:51 am

Re: Unique Custom Profile Field

Post by indieben » Mon Feb 26, 2018 7:37 pm

indieben wrote:
Fri Feb 09, 2018 7:17 pm
KevC wrote:
Fri Feb 09, 2018 9:00 am
What's the bigger picture of what you're trying to do? There may be other ways to do it.
Hello Kev,

My previous topic got confused by people not agreeing with how I want to run my project - the age old issue. I felt that it was helpful to ask the question in isolation as the answers will be useful to a lot of different scenarios.

Thanks for your reply.
So you've linked it to the other question? That doesn't help and discourages people from looking at it afresh.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49148
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Unique Custom Profile Field

Post by stevemaury » Mon Feb 26, 2018 7:50 pm

You have a list of people. You have a list of codes. Make a Custom Profile Field visible only to admins. At Registration, the user fills in the code in the CPF. Use Admin activation. When you get a registration, check the CPF. Cross the code off the list and activate the registration. If the code has already been used or is incorrect, don't activate.

No custom coding, no money spent. Just you and a pencil. Why does that not work?
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

Post Reply

Return to “Extension Requests”

Who is online

Users browsing this forum: Ger, Mick and 8 guests

cron