Profile field and database

12 years 11 months ago #78721 by mts
Profile field and database was created by mts
Hi,
I have two problems with the latest version of CB.

First, I wanted to add custom fields that only allow lower case, so for example "a,b,c" but there should not be allowed "A,B,C". Hope you could help, with that first problem.

Second problem. At the registration I want to write the user detail into a second database, so I need to know where to find the insert into function into the joomla database to add my custom insert function.

thx

Please Log in to join the conversation.

12 years 11 months ago #78878 by stutteringp0et
Replied by stutteringp0et on topic Re:Profile field and database
I can't help you with the first problem, but the second is fairly easy.

write a new plugin (I suggest using the available helloworld plugin as a starting point)

in this new plugin: Compare your cb_FIELD to your custom database field, if they're not the same, perform a write to your new table.

the plugin needs no output, only needs to be placed in a published tab, raw type is ok.

Enjoy!

Please Log in to join the conversation.

12 years 11 months ago #78884 by nant
Replied by nant on topic Re:Profile field and database
mts wrote:

Hi,
I have two problems with the latest version of CB.

First, I wanted to add custom fields that only allow lower case, so for example "a,b,c" but there should not be allowed "A,B,C". Hope you could help, with that first problem.


you should be able to handle this with CB 1.2 RC3 by editing the Authorized input parameter in the field parameter area (right side of the screen when you edit your custom field) - you should be able to put in the proper expression.

Second problem. At the registration I want to write the user detail into a second database, so I need to know where to find the insert into function into the joomla database to add my custom insert function.

thx


A CB plugin can be written - use CB helloworld plugin articles to get started.

Please Log in to join the conversation.

12 years 8 months ago #85758 by cvoogt
Replied by cvoogt on topic Re:Profile field and database
I have tried both Hello World plugins, plug_helloworld.zip and plug_helloworld_part2.zip, but they do not show how to create and access custom fields. I have gone through other plugins for examples, and the only ones that seem to use user fields are the core and connections plugins, which go way beyond what I am trying to do. A simple Hello World example with fields would be very useful to a lot of people. Maybe I've just missed it?

If so cold you point me in the right direction?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.156 seconds

Facebook Twitter LinkedIn