Field plugins

16 years 7 months ago #44759 by mikko
Field plugins was created by mikko
CB with field plugins. The attached zip file contains patched files and an example of a field plugin. The files should replace the CB files with the same name.

This patch enables creating of additional field types as plugins.

A field plugin extends class cbFieldHandler and implements 3 methods
-getFieldValue for displaying field value on profile
-getFieldEntry for displaying field edit on profile edit
-prepareFieldDataSave to prepare user input for saving to database.

The patch is around 30-40 lines of code, if excluding comments and empty lines. No changes to DB required.

-Mikko

Attachment cb_fileld_plugins.zip not found

Attachments:

Please Log in to join the conversation.

16 years 7 months ago #44760 by beat
Replied by beat on topic Re:Field plugins
Thanks Mikko,

Will look at this as just discussed off-forum :)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

16 years 7 months ago #44761 by mikko
Replied by mikko on topic Re:Field plugins
OK, cool. I will probably post a couple of changes to the userslist SQL to this same thread.

-Mikko

Please Log in to join the conversation.

16 years 7 months ago #45323 by kmharper
Replied by kmharper on topic Re:Field plugins
I need something that allows the CB registration page to operate as a GET rather than a POST form.

Mikko, does your plugin do this?

In other words, I'd like the following URL...

[code:1]index.php?option=com_comprofiler&task=registers&firstname=Joe[/code:1]

...would pre-fill the "First" name field with the value "Joe".

If that's not what your plugin does, can you tell me if this is something that might be feasible to do in CB?

Please Log in to join the conversation.

16 years 7 months ago #45441 by beat
Replied by beat on topic Re:Field plugins
It's not very recommended to use GETs... against spambots...

In addition, we have anti-spamming/anti-spoofing in the POST, which would need to be disabled.... :(

You would need to change the function in comprofiler.php to do that.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

14 years 9 months ago #104939 by unknonw
Replied by unknonw on topic Re:Field plugins
Hi Mikko,

cb_fileld_plugins.zip is for CB 1.2 right? I have replaced your files and it appears me a blank page when I choose CommunityBuilder from Components menu.

In fact I want to build a CB Plugin which will handle the Country & the Flags of the countries; The way I think there are 2 possibilities:
  • creating a new filed type [drop down list | single-select + image tag - best example which I can give you is demo.cubecart.com/cc4/ ; make sure you visit that url with Firefox -]. Check the left side of the site at language selection.
  • the second option could be a CB Plugin using 2 fields [at least]; [drop-down single-select & image field type {read-only} ]

I have all the Countries flags & the structure of the MySQL table [which I think its good, but I'm not sure for that].

Could you please help me to start it? A little help from an J 1.5 and CB expert will be grateful.

Thank you B)

Post edited by: unknonw, at: 2009/07/15 00:10

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.237 seconds

Facebook Twitter LinkedIn